/* =========================================================================
   STYLE.CSS - TEMPLATE 19: HẸN ƯỚC (Cinelove 39)
   Palette: ruby (Crimson #8b2f30, Soft Ivory #fff3f3, Dark #161515)
   ========================================================================= */

:root, [data-palette="ruby"] {
  --color-ruby: #8b2f30;
  --color-ruby-dark: #631d1e;
  --color-ruby-light: #ab4445;
  --color-ruby-soft: #fff3f3;
  --color-dark: #161515;
  --color-muted: #666666;
  --color-border: #f0dcdc;
  --bg-white: #ffffff;
  --font-serif: 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-script: 'Alex Brush', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-card: 16px;
  --radius-pill: 9999px;
  --shadow-sm: 0 4px 15px rgba(139, 47, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(139, 47, 48, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-ruby-soft);
}

body {
  background-color: var(--color-ruby-soft);
  color: var(--color-dark);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums lining-nums;
}

.site-container {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-white);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow-x: hidden;  /* máy cũ (iOS 15 trở xuống) chưa hiểu clip, dùng tạm hidden */
  overflow-x: clip;    /* hidden ép overflow-y thành auto, biến khối này thành vùng cuộn riêng và nuốt mất cú vuốt của khách; clip thì không */
}

/* ================= MUSIC CONTROL ================= */
.audio-control-wrapper {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 999;
}

.audio-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.vinyl-disk {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a1111 40%, #1a0808 70%, #000000 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  animation: rotateDisc 6s linear infinite;
  animation-play-state: paused;
}

.audio-toggle.is-playing .vinyl-disk {
  animation-play-state: running;
}

.vinyl-center {
  width: 18px;
  height: 18px;
  background: var(--color-ruby);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-note-icon {
  width: 10px;
  height: 10px;
  fill: #ffffff;
}

@keyframes rotateDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ================= 1. HERO ================= */
.section-hero {
  position: relative;
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  height: 560px;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-tag-top {
  position: absolute;
  top: 30px;
  left: 24px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-style: italic;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  z-index: 2;
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(22,21,21,0.85) 100%);
}

.hero-names-bottom {
  position: absolute;
  bottom: 30px;
  left: 24px;
  right: 24px;
  z-index: 2;
  color: #ffffff;
}

.hero-bride-name, .hero-groom-name {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-amp {
  font-family: var(--font-script);
  font-size: 32px;
  color: #f7d2d3;
  margin: -4px 0;
}

/* ================= 2. GUEST CARD ================= */
.section-guest {
  padding: 20px 20px 0;
}

.guest-card {
  background: var(--color-ruby-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  text-align: center;
}

.guest-envelope {
  font-size: 26px;
  display: block;
  margin-bottom: 4px;
}

.guest-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.guest-name {
  font-family: var(--font-serif);
  font-size: 25px;
  color: var(--color-ruby);
  font-weight: 700;
  margin: 4px 0;
}

.guest-sub {
  font-size: 13px;
  color: var(--color-muted);
}

/* ================= 3. CALENDAR HIGHLIGHT ================= */
.section-calendar {
  padding: 24px 20px 0;
}

.calendar-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.cal-badge {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--color-ruby);
  font-weight: 700;
}

.cal-month-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--color-dark);
  margin: 6px 0 12px;
}

.calendar-wedding-banner {
  background: var(--color-ruby-soft);
  padding: 14px;
  border-radius: 12px;
}

.cal-weekday {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-ruby);
}

.cal-lunar {
  font-size: 13px;
  color: var(--color-muted);
  font-style: italic;
  margin-top: 2px;
}

/* ================= 4. COUPLE CARDS ================= */
.section-couple {
  padding: 24px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.profile-img-wrap {
  width: 45%;
  aspect-ratio: 4/5;
  flex-shrink: 0;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-info {
  padding: 20px 18px;
  flex: 1;
}

.role-badge {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--color-ruby);
  background: var(--color-ruby-soft);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.profile-sub {
  font-size: 12.5px;
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.4;
}

/* ================= 5. LOVE STORY ================= */
.section-story {
  padding: 24px 20px 0;
}

.story-box {
  background: var(--color-ruby-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 30px 22px;
  text-align: center;
}

.story-tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--color-ruby);
  font-weight: 700;
}

.story-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-dark);
  margin: 6px 0 14px;
}

.story-divider {
  width: 40px;
  height: 2px;
  background: var(--color-ruby);
  margin: 0 auto 16px;
  border-radius: 2px;
}

.story-text {
  font-size: 14px;
  font-style: italic;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  text-wrap: balance;
}

.story-text p {
  margin-bottom: 6px;
}

.story-photo-frame {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.story-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================= 6. PARENTS ================= */
.section-parents {
  padding: 24px 20px 0;
}

.parents-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 26px 16px;
  box-shadow: var(--shadow-sm);
}

.parents-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.parent-side {
  flex: 1;
  text-align: center;
}

.side-title {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--color-ruby);
  font-weight: 700;
  margin-bottom: 10px;
}

.p-name {
  font-size: 13.5px;
  color: var(--color-dark);
  margin-bottom: 3px;
}

.p-addr {
  font-size: 11.5px;
  color: var(--color-muted);
  font-style: italic;
  margin-top: 6px;
}

.side-sep {
  font-size: 22px;
  color: var(--color-ruby);
  padding: 0 10px;
}

/* ================= 7. EVENTS ================= */
.section-events {
  padding: 24px 20px 0;
}

.events-container {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 30px 20px;
  box-shadow: var(--shadow-sm);
}

.events-main-badge {
  text-align: center;
  margin-bottom: 24px;
}

.invitation-lead {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--color-ruby);
  font-weight: 700;
}

.invitation-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--color-dark);
  margin-top: 6px;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-card-item {
  background: var(--color-ruby-soft);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 18px;
}

.event-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #ffffff;
  background: var(--color-ruby);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.event-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.event-place {
  font-size: 14px;
  color: var(--color-dark);
  margin-bottom: 2px;
}

.event-addr {
  font-size: 12.5px;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.event-map-btn {
  display: inline-block;
  font-size: 12.5px;
  color: var(--color-ruby);
  font-weight: 700;
  text-decoration: none;
}

/* ================= 8. TIMELINE ================= */
.section-timeline {
  padding: 24px 20px 0;
}

.timeline-box {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.timeline-tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--color-ruby);
  font-weight: 700;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 23px;
  color: var(--color-dark);
  margin: 6px 0 12px;
}

.timeline-divider {
  width: 36px;
  height: 2px;
  background: var(--color-ruby);
  margin: 0 auto 20px;
}

.timeline-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.flow-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-ruby-soft);
  padding: 14px 16px;
  border-radius: 12px;
}

.flow-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.flow-time {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-ruby);
  display: block;
}

.flow-desc {
  font-size: 13.5px;
  color: var(--color-dark);
}

/* ================= 9. ALBUM ================= */
.section-album {
  padding: 24px 20px 0;
  text-align: center;
}

.album-tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--color-ruby);
  font-weight: 700;
}

.album-title {
  font-family: var(--font-serif);
  font-size: 23px;
  color: var(--color-dark);
  margin: 6px 0 12px;
}

.album-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mosaic-item {
  aspect-ratio: 1/1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.mosaic-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mosaic-item:hover .mosaic-img {
  transform: scale(1.05);
}

/* ================= 10. COUNTDOWN ================= */
.section-countdown {
  padding: 24px 20px 0;
}

.countdown-wrap {
  background: var(--color-ruby);
  color: #ffffff;
  padding: 24px 16px;
  border-radius: var(--radius-card);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.cd-title {
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 600;
  margin-bottom: 16px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.cd-cell {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  padding: 10px 14px;
  border-radius: 10px;
  min-width: 58px;
}

.cd-cell .num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.cd-cell .txt {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  display: block;
}

/* ================= 11. GIFTS & QR ================= */
.section-gifts {
  padding: 24px 20px 0;
}

.gifts-container {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.gifts-title {
  font-family: var(--font-serif);
  font-size: 23px;
  color: var(--color-dark);
  margin: 6px 0 12px;
}

.gifts-p {
  font-size: 13.5px;
  color: var(--color-muted);
  margin-bottom: 20px;
  text-wrap: balance;
}

.gifts-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gift-item-row {
  background: var(--color-ruby-soft);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.qr-thumbnail {
  width: 88px;
  height: 88px;
  background: #ffffff;
  padding: 5px;
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
  text-align: center;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-zoom-lbl {
  font-size: 8.5px;
  color: var(--color-muted);
  display: block;
  margin-top: 2px;
}

.bank-info-col {
  flex: 1;
}

.b-name {
  font-size: 14px;
  color: var(--color-ruby);
  font-weight: 700;
}

.b-acc {
  font-size: 14px;
  color: var(--color-dark);
}

.b-owner {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.btn-copy-acc {
  padding: 6px 14px;
  background: var(--color-ruby);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* ================= 12. RSVP ================= */
.section-rsvp {
  padding: 24px 20px 0;
}

.rsvp-container {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 30px 20px;
  box-shadow: var(--shadow-sm);
}

.rsvp-header {
  text-align: center;
  margin-bottom: 20px;
}

.rsvp-heading {
  font-family: var(--font-serif);
  font-size: 23px;
  color: var(--color-dark);
  margin: 6px 0 12px;
}

.rsvp-subtitle {
  font-size: 13.5px;
  color: var(--color-muted);
  text-wrap: balance;
}

.rsvp-form-content {
  text-align: left;
}

.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 5px;
}

.form-row input[type="text"],
.form-row input[type="tel"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #ffffff;
  color: var(--color-dark);
  outline: none;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--color-ruby);
}

.choice-group {
  display: flex;
  gap: 16px;
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.btn-rsvp-submit {
  width: 100%;
  padding: 13px;
  background: var(--color-ruby);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
}

.rsvp-msg {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 14px;
  background: #fdf5f5;
  color: var(--color-dark);
  transition: all 0.2s;
}

.rsvp-msg.success {
  background: #eaf7ed;
  color: #27773a;
}

.rsvp-msg.error {
  background: #fde8e8;
  color: #c92a2a;
}

/* ================= 13. THANKS ================= */
.section-thanks {
  margin-top: 30px;
}

.thanks-box {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.thanks-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thanks-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(99,29,30,0.7) 60%, rgba(99,29,30,0.92) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 30px 24px;
  color: #ffffff;
  text-align: center;
}

.thanks-word {
  font-family: var(--font-script);
  font-size: 52px;
  color: #f7d2d3;
  line-height: 1;
}

.thanks-text {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 10px 0 14px;
  color: #fdf5f5;
  text-wrap: balance;
}

.thanks-names {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.credit-bar {
  background: #1a0808;
  padding: 16px;
  text-align: center;
}

.credit-bar a.credit {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 1px;
}

.credit-bar a.credit:hover {
  color: #ffffff;
}

/* ================= MODALS ================= */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 34px;
  color: #ffffff;
  cursor: pointer;
}

.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}

.qr-modal-box {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  max-width: 320px;
  width: 90%;
}

.qr-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-muted);
}

.qr-modal-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--color-ruby);
  margin-bottom: 14px;
}

.qr-modal-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto;
}
