﻿/* ==========================================================================
   Template m29: Vẹn nguyên (Wine Burgundy Royal Wedding)
   ========================================================================== */

:root, [data-palette="wine"] {
  --bg-primary: #fcf8f8;
  --bg-secondary: #faf0f0;
  --bg-card: #ffffff;
  --text-main: #331f1f;
  --text-muted: #6e5858;
  --text-light: #9c8a8a;
  --accent: #611010;
  --accent-dark: #460909;
  --accent-light: #8a0d0d;
  --accent-soft: rgba(97, 16, 16, 0.08);
  --gold: #b3882a;
  --border-color: #ebdada;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Alex Brush', cursive;
  --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 4px 14px rgba(97, 16, 16, 0.06);
  --shadow-md: 0 10px 30px rgba(97, 16, 16, 0.1);
}

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

body {
  background-color: #ececec;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.site-container {
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--bg-primary);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
  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 */
}

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

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

.vinyl-disk {
  width: 44px;
  height: 44px;
  background: #111;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 6s linear infinite;
  animation-play-state: paused;
}

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

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

.music-note-icon {
  width: 10px;
  height: 10px;
  color: #fff;
}

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

/* Hero Section */
.section-hero {
  padding: 30px 20px 30px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-arch-wrap {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 24px;
  padding: 8px;
  background: #fff;
  border-radius: 190px 190px 16px 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.hero-arch-inner {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 180px 180px 10px 10px;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-arch-overlay {
  display: none;
}

.hero-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.mono-name {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.mono-heart {
  width: 28px;
  height: auto;
}

.hero-invitation-badge {
  display: inline-block;
  padding: 0 10px;
}

.hero-badge-sub {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-event-name {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-wrap: balance;
}

.hero-date-line {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-sep {
  margin: 0 8px;
  color: var(--accent);
}

/* Guest */
.section-guest {
  padding: 10px 20px 20px;
}

.guest-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--accent);
  box-shadow: var(--shadow-sm);
}

.guest-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 6px;
}

.guest-tag {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.guest-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

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

/* Family Announcement */
.section-family-announcement {
  padding: 20px 20px 30px;
}

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

.crest-box {
  margin-bottom: 24px;
}

.hy-crest {
  width: 54px;
  height: auto;
  margin-bottom: 8px;
}

.crest-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.family-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.family-side {
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.side-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  background: var(--accent);
  padding: 3px 12px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 10px;
}

.side-parents {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 4px;
}

.side-addr {
  font-size: 12px;
  color: var(--text-muted);
}



.announcement-closing {
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.announcement-lead {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.announcement-couple {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.announcement-couple .amp {
  font-family: var(--font-script);
  font-size: 28px;
  color: var(--gold);
}

.announcement-lunar {
  font-size: 12px;
  color: var(--accent-light);
  font-style: italic;
}

/* Portrait */
.section-portrait {
  padding: 10px 20px 30px;
}

.portrait-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  text-align: center;
}

.portrait-photo-box {
  width: 100%;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.portrait-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-quote {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Section Title Wrap */
.section-title-wrap {
  text-align: center;
  margin-bottom: 24px;
}

.sub-title {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.main-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  text-wrap: balance;
}

/* Events */
.section-events {
  padding: 20px 20px 30px;
}

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

.event-card {
  background: #fff;
  border-radius: 18px;
  padding: 24px 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.event-card.is-main-event {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(97, 16, 16, 0.12);
}

.event-ribbon {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.event-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.event-time-row {
  font-size: 15px;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 4px;
}

.event-clock {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--accent-light);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
}

.event-sep {
  margin: 0 8px;
  color: var(--border-color);
}

.event-date-large {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.event-lunar {
  font-size: 13px;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 14px;
}

.event-venue {
  margin-bottom: 18px;
}

.venue-place {
  font-size: 15px;
  color: var(--text-main);
}

.venue-address {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn-event-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 24px;
  transition: background 0.2s ease;
  width: 100%;
}

.btn-event-map:hover {
  background: var(--accent-dark);
}

/* Countdown */
.section-countdown {
  padding: 10px 20px 30px;
}

.countdown-card {
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  padding: 28px 16px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.cd-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

.cd-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}

.countdown-boxes {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cd-box {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 12px 10px;
  min-width: 64px;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}

.cd-val {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums lining-nums;
}

.cd-lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 1px;
}

/* Couple profiles */
.section-couple {
  padding: 20px 20px 30px;
}

.couple-profile-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.couple-item {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  text-align: center;
}

.couple-img-box {
  width: 100%;
  height: 280px;
}

.couple-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.couple-details {
  padding: 20px;
}

.couple-role {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.couple-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.couple-addr {
  font-size: 13px;
  color: var(--text-muted);
}

/* Gallery */
.section-gallery {
  padding: 20px 20px 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-item:nth-child(5n+1) {
  grid-column: span 2;
  aspect-ratio: 16/10;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-thumb {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(97, 16, 16, 0.4);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.zoom-icon {
  font-size: 22px;
}

/* Gifts */
.section-gifts {
  padding: 24px 20px 34px;
  background: var(--bg-secondary);
  text-align: center;
}

.gifts-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding: 0 10px;
}

.bank-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bank-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  text-align: center;
}

.bank-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--accent);
  color: #fff;
  padding: 3px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 14px;
}

.qr-container {
  width: 150px;
  height: 150px;
  margin: 0 auto 14px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

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

.bank-info {
  margin-bottom: 14px;
}

.bank-name {
  font-size: 15px;
  color: var(--text-main);
}

.bank-account {
  font-size: 16px;
  font-family: monospace;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 0;
}

.bank-owner {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.btn-copy-acc {
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-acc:hover {
  background: var(--accent);
  color: #fff;
}

/* RSVP */
.section-rsvp {
  padding: 20px 20px 30px;
}

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

.rsvp-intro {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: #fff;
}

.radio-group {
  display: flex;
  gap: 20px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.btn-submit-rsvp {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 8px;
}

.btn-submit-rsvp:hover {
  background: var(--accent-dark);
}

.form-result-msg {
  margin-top: 14px;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}

.form-result-msg.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.form-result-msg.error {
  background: #ffebee;
  color: #c62828;
}

/* Wishes */
.section-wishes {
  padding: 20px 20px 30px;
}

.wishes-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.wish-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
}

.wish-author {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.wish-content {
  color: var(--text-main);
  line-height: 1.5;
}

/* Thanks Footer */
.section-thanks {
  padding: 30px 20px 20px;
  text-align: center;
  background: var(--bg-secondary);
}

.thanks-photo-wrap {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-sm);
  border: 4px solid #fff;
}

.thanks-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thanks-script {
  font-family: var(--font-script);
  font-size: 46px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

.thanks-text {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto 12px;
}

.thanks-names {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 28px;
}

.shop-credit-box {
  font-size: 12px;
}

.shop-credit-box a.credit {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.shop-credit-box a.credit:hover {
  color: var(--accent);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lb-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Toast */
.toast-box {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  z-index: 10000;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.toast-box.show {
  transform: translateX(-50%) translateY(0);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
