/* ============================================================
   CÁC COMPONENT CHÍNH CỦA WEBSITE THIỆP CƯỚI
   ============================================================ */

/* Khung vỏ chính (Card Shell dạng thiệp cưới cao cấp) */
.wedding-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--color-page-bg);
  color: var(--color-primary);
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.09);
  min-height: 100vh;
  -webkit-overflow-scrolling: touch; /* iOS momentum scrolling ngay sau khi mở phong bì */
  overscroll-behavior: contain;      /* Ngăn bounce ra ngoài container trên Android */
}

@media (min-width: 768px) {
  .wedding-container {
    max-width: 880px;
    margin: 32px auto;
    border-radius: 20px;
    border: 1px solid rgba(81, 20, 25, 0.14);
  }
}

@media (min-width: 1280px) {
  .wedding-container {
    max-width: 960px;
    margin: 40px auto;
    border-radius: 22px;
  }
}

/* Lớp phủ vân giấy mỹ thuật thủ công */
.texture-paper-overlay {
  position: absolute;
  inset: 0;
  background-image: url("../assets/images/paper.webp");
  background-size: 100% auto;
  background-position: top center;
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

/* --- HERO SECTION --- */
.hero-section {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 48px;
  text-align: center;
  overflow: hidden;
}

.castle-watermark {
  position: absolute;
  pointer-events: none;
  width: 160%;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  opacity: 0.1;
  object-fit: contain;
  z-index: 0;
}

.hero-announcement {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--font-serif-heading);
  color: var(--color-deep);
  font-size: 13px;
  letter-spacing: 0.16em;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 60px;
}

.announcement-en,
.announcement-vi {
  display: block;
  line-height: 1.3;
}

.announcement-dot {
  display: block;
  font-size: 11px;
  line-height: 1;
  color: var(--color-deep);
  opacity: 0.75;
}

@media (min-width: 640px) {
  .hero-announcement {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    letter-spacing: 0.18em;
    margin-bottom: 58px;
  }

  .announcement-dot {
    font-size: 14px;
    opacity: 0.85;
  }
}

/* Khung phong bì chứa ảnh polaroid lơ lửng */
.hero-envelope-frame {
  position: relative;
  z-index: 10;
  width: 82%;
  max-width: 330px;
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 48px 24px 56px;
  }

  .hero-envelope-frame {
    max-width: 420px;
    margin-top: 10px;
  }
}

.hero-envelope-inner {
  position: relative;
  aspect-ratio: 333 / 384;
}

.envelope-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.envelope-polaroid-box {
  position: absolute;
  left: 33%;
  top: -2%;
  z-index: 20;
  width: 64%;
  animation: drFloat 6.5s ease-in-out infinite;
  animation-delay: 0.4s;
  will-change: transform;
}

.polaroid-frame {
  aspect-ratio: 221 / 309;
  transform: rotate(12deg);
  border: 7px solid #ffffff;
  background-color: #ffffff;
  box-shadow: var(--shadow-polaroid);
  overflow: hidden;
}

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

.envelope-cover-img {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  pointer-events: none;
}

/* Hoa mẫu đơn đung đưa góc phong bì hero */
.floating-peony {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  filter: drop-shadow(var(--shadow-float-peony));
  will-change: transform;
}

.hero-peony {
  left: -4%;
  top: -10%;
  width: 44%;
  animation: drFloat 5s ease-in-out infinite;
  transform: rotate(-17deg);
}

/* Tên cô dâu chú rể Typography nghệ thuật */
.hero-couple-names {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.couple-name-line {
  font-family: var(--font-couple);
  color: var(--color-primary);
  font-size: clamp(36px, 10vw, 44px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.giant-ampersand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-ampersand);
  font-size: clamp(86px, 22vw, 110px);
  line-height: 1;
  color: rgba(81, 20, 25, 0.16);
  pointer-events: none;
  user-select: none;
}

/* --- THẺ ĐỎ ĐÔ CHUNG (LỄ THÀNH HÔN & TIỆC CƯỚI & TIMELINE) --- */
.darkred-card-section {
  position: relative;
  z-index: 10;
  width: 88%;
  max-width: 420px;
  margin: 48px auto;
}

@media (min-width: 768px) {
  .darkred-card-section {
    max-width: 560px;
    margin: 56px auto;
  }
  .darkred-card {
    padding: 42px 36px;
  }
}

.darkred-card {
  position: relative;
  background-color: var(--color-primary);
  color: var(--color-cream);
  border-radius: var(--radius-card);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-card-dark);
  overflow: hidden;
}

.darkred-card-paper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  opacity: 0.4;
  pointer-events: none;
}

.darkred-card-inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.card-title-gold {
  font-family: var(--font-content);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-cream);
}

/* Cụm hoa mẫu đơn lơ lửng bám thẻ */
.card-floating-peony {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  filter: drop-shadow(var(--shadow-float-peony));
  animation: drFloat 5.5s ease-in-out infinite;
}

.peony-ceremony {
  right: -16%;
  bottom: 22%;
  width: 38%;
  animation-delay: 0.6s;
}

.peony-reception {
  left: -14%;
  top: 8%;
  width: 32%;
  animation-delay: 0.3s;
}

.peony-timeline {
  right: -14%;
  top: -8%;
  width: 30%;
  animation-delay: 0.8s;
}

/* Lưới thông tin 2 bên gia đình (Nhà Trai - Nhà Gái) */
.family-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  color: var(--color-cream);
  margin-top: 4px;
}

.family-column {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.family-role-label {
  font-size: 12px;
  color: var(--color-cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.family-parents-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-cream);
  line-height: 1.35;
}

.family-address-text {
  font-size: 10px;
  color: var(--color-cream-muted);
  line-height: 1.3;
  margin-top: 4px;
}

.family-vertical-divider {
  width: 1px;
  height: 54px;
  background-color: var(--color-cream-dim);
  align-self: center;
}

/* Lời ngỏ & Tên cô dâu chú rể trong card */
.ceremony-message {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-cream);
  line-height: 1.5;
  max-width: 90%;
}

.ceremony-couple-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ceremony-couple-name {
  font-family: var(--font-couple);
  font-size: clamp(28px, 8vw, 36px);
  color: var(--color-cream);
  line-height: 1.15;
}

.ceremony-ampersand-script {
  font-family: var(--font-ampersand);
  font-size: 34px;
  line-height: 0.9;
  color: var(--color-cream);
}

/* Bảng thời gian ngày giờ xếp tầng & 2 Cụm Sự Kiện (Lễ Vu Quy & Lễ Thành Hôn) */
.dual-ceremony-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 4px;
}

@media (min-width: 768px) {
  .dual-ceremony-container {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
  }
}

.ceremony-event-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(246, 237, 227, 0.16);
  border-radius: 12px;
  padding: 16px 14px 14px;
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
}

.ceremony-event-badge {
  font-family: var(--font-content);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.ceremony-event-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cream-dim);
  font-size: 14px;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .ceremony-event-sep {
    display: none;
  }
}

.ceremony-map-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 6px 14px;
  background-color: rgba(246, 237, 227, 0.12);
  color: var(--color-cream);
  border: 1px solid rgba(246, 237, 227, 0.28);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.ceremony-map-link:hover {
  background-color: var(--color-cream);
  color: var(--color-primary);
  border-color: var(--color-cream);
}

.ceremony-time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 250px;
}

.ceremony-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.ceremony-date-box {
  font-family: var(--font-content);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-cream);
}

.ceremony-date-meta {
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--color-cream);
  text-align: left;
  line-height: 1.3;
}

.ceremony-lunar-date {
  font-family: var(--font-body);
  font-size: 10.5px;
  color: var(--color-cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

.ceremony-place-desc {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--color-cream-muted);
  border-top: 1px solid var(--color-cream-dim);
  padding-top: 8px;
  width: 100%;
  line-height: 1.4;
}

.ceremony-place-desc strong {
  color: var(--color-cream);
}

/* --- TIỆC CƯỚI & LỊCH & ĐẾM NGƯỢC --- */
.reception-header-text {
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--color-cream-muted);
  letter-spacing: 0.12em;
}

/* Tờ lịch tháng 10/2026 mini */
.mini-calendar-wrapper {
  background-color: var(--color-cream);
  border-radius: 10px;
  padding: 14px 16px;
  width: 100%;
  max-width: 290px;
  margin: 6px auto;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.calendar-month-title {
  font-family: var(--font-ampersand);
  color: var(--color-primary);
  font-size: 28px;
  margin-bottom: 8px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
  color: #511419;
}

.calendar-day-head {
  font-weight: 700;
  color: rgba(81, 20, 25, 0.7);
  padding-bottom: 4px;
}

.calendar-day-cell {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #380a0e;
}

.calendar-day-cell.is-highlight {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(81, 20, 25, 0.4);
}

/* Khối đồng hồ đếm ngược (Countdown Timer) */
.countdown-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(236, 228, 216, 0.2);
  border-radius: 8px;
  min-width: 52px;
  padding: 6px 4px;
}

.countdown-number {
  font-family: var(--font-content);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-cream);
  line-height: 1;
}

.countdown-label {
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--color-cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Nút thêm vào lịch & RSVP */
.calendar-action-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-add-calendar {
  color: var(--color-cream);
  font-family: var(--font-content);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-rsvp-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 28px;
  background-color: var(--color-cream);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.btn-rsvp-trigger:hover {
  transform: scale(1.04);
}

/* --- ALBUM HÌNH CƯỚI (3D COVERFLOW CHUẨN GỐC CHUNG ĐÔI) --- */
.gallery-section {
  position: relative;
  z-index: 10;
  padding: 36px 8px 28px;
  text-align: center;
  overflow: visible;
}

.coverflow-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 16px auto 0;
}

/* Sân khấu phối cảnh 3D */
.coverflow-stage {
  position: relative;
  width: 100%;
  height: 340px;
  perspective: 1100px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  user-select: none;
}

@media (min-width: 768px) {
  .coverflow-stage {
    height: 520px;
  }
}

@media (min-width: 1280px) {
  .coverflow-stage {
    height: 560px;
  }
}

/* Thẻ ảnh xoay vần 3D */
.coverflow-card {
  position: absolute;
  height: 92%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 1100ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease, filter 800ms ease, box-shadow 0.4s ease;
  background-color: #380a0e;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.coverflow-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, var(--white-veil, 0));
  pointer-events: none;
  transition: background-color 800ms cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: inherit;
  z-index: 2;
}

@media (max-width: 639px) {
  .coverflow-card {
    aspect-ratio: 2 / 3;
  }
}

.coverflow-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  pointer-events: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.coverflow-card.is-active {
  box-shadow: 0 16px 40px rgba(81, 20, 25, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.35);
}

/* Nút điều hướng Desktop */
.coverflow-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-primary);
  border: 1px solid rgba(81, 20, 25, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .coverflow-nav-btn {
    display: flex;
  }
}

.coverflow-nav-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
  color: #000000;
}

.coverflow-nav-btn.prev-btn {
  left: 12px;
}

.coverflow-nav-btn.next-btn {
  right: 12px;
}

@media (min-width: 768px) {
  .coverflow-nav-btn.prev-btn {
    left: calc(50% - 292px);
  }

  .coverflow-nav-btn.next-btn {
    right: calc(50% - 292px);
  }
}

/* Hàng chấm chỉ báo (Dots indicator) */
.coverflow-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.coverflow-dot {
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background-color: var(--color-primary);
  opacity: 0.25;
  border: none;
  cursor: pointer;
  transition: all 0.35s ease;
  padding: 0;
}

.coverflow-dot:hover {
  opacity: 0.45;
}

.coverflow-dot.is-active {
  width: 24px;
  opacity: 0.85;
}

/* --- ĐỊA ĐIỂM & BẢN ĐỒ (VENUE & MAPS) --- */
.venue-section {
  position: relative;
  z-index: 10;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Nút tab chuyển đổi Nhà Trai / Nhà Gái */
.venue-tabs-bar {
  display: inline-flex;
  background-color: rgba(81, 20, 25, 0.08);
  padding: 4px;
  border-radius: 30px;
  gap: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(81, 20, 25, 0.12);
}

.venue-tab-btn {
  border: none;
  background: transparent;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.venue-tab-btn:hover {
  color: var(--color-primary);
  opacity: 0.85;
}

.venue-tab-btn.is-active {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(81, 20, 25, 0.2);
}

.venue-panel {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.venue-panel.is-active {
  display: flex;
  animation: fadeIn 0.35s ease;
}

.venue-card-title {
  font-family: var(--font-content);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.venue-address-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-sub);
  max-width: 320px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.map-embed-box {
  width: 100%;
  max-width: 338px;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(81, 20, 25, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .map-embed-box {
    max-width: 560px;
    height: 380px;
  }
}

.map-embed-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.btn-open-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-open-map:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* --- DRESS CODE --- */
.dresscode-section {
  position: relative;
  z-index: 10;
  padding: 24px 20px;
  text-align: center;
}

.dresscode-colors-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 18px 0 10px;
}

.color-swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.color-swatch-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease;
}

.color-swatch-circle:hover {
  transform: scale(1.12);
}

.color-swatch-name {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--color-text-sub);
}

/* --- LỊCH TRÌNH TIỆC CƯỚI (TIMELINE) --- */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  text-align: left;
  margin-top: 8px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timeline-icon-box {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.timeline-icon-svg {
  width: 32px;
  height: 32px;
  color: var(--color-cream);
  stroke: var(--color-cream);
}

.timeline-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-time-tag {
  font-family: var(--font-content);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gold);
}

.timeline-title-text {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-cream);
}

.timeline-desc-text {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--color-cream-muted);
}

/* --- SỔ LƯU BÚT / GỬI LỜI CHÚC (CHUNGDÔI PAPERNOTE GUESTBOOK) --- */
.guestbook-section {
  position: relative;
  z-index: 10;
  padding: 36px 16px 36px;
  text-align: center;
  overflow-x: clip;
}

.papernote-banner-wrap {
  position: relative;
  width: 100%;
  max-width: 370px;
  margin: 0 auto 10px;
  min-height: 425px;
}

@media (min-width: 768px) {
  .papernote-banner-wrap {
    max-width: 520px;
    min-height: 520px;
    margin-bottom: 14px;
  }
}

.papernote-bg-img {
  position: absolute;
  left: 50%;
  top: -20px;
  width: 128%;
  max-width: 650px;
  transform: translateX(-50%);
  opacity: 0.96;
  pointer-events: none;
  filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.22));
  z-index: 0;
  object-fit: contain;
}

@media (min-width: 768px) {
  .papernote-bg-img {
    top: -25px;
    width: 120%;
  }
}

.guestbook-content-box {
  position: relative;
  z-index: 10;
  padding-top: 68px;
  padding-bottom: 36px;
}

@media (min-width: 768px) {
  .guestbook-content-box {
    padding-top: 110px;
    padding-bottom: 24px;
  }
}

.guestbook-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

@media (min-width: 768px) {
  .guestbook-title {
    font-size: 26px;
  }
}

.guestbook-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.guestbook-divider-line {
  width: 36px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-primary));
}

.guestbook-divider-line.to-left {
  background: linear-gradient(to left, transparent, var(--color-primary));
}

.guestbook-divider-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  opacity: 0.85;
}

.guestbook-divider-glyph .monogram-seal-svg {
  width: 26px;
  height: 26px;
  display: block;
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .guestbook-form {
    max-width: 360px;
  }
}

.input-group {
  width: 100%;
}

.input-guest {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(81, 20, 25, 0.35);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-primary);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.input-guest::placeholder {
  color: rgba(81, 20, 25, 0.55);
  font-style: italic;
}

.input-guest:focus {
  border-color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(81, 20, 25, 0.12);
}

.textarea-guest {
  min-height: 60px;
  height: 60px;
  resize: none;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .textarea-guest {
    min-height: 90px;
    height: 90px;
  }
}

.guestbook-form-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.btn-submit-wish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 28px;
  background-color: var(--color-primary);
  color: #ded9d7;
  border: none;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(81, 20, 25, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit-wish:hover {
  transform: scale(1.03);
  background-color: var(--color-deep);
  box-shadow: 0 4px 16px rgba(81, 20, 25, 0.45);
}

.btn-submit-wish:active {
  transform: scale(0.98);
}

/* Thông báo cảm ơn Inline Toast */
.wish-success-alert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 280px;
  margin: 14px auto 0;
  padding: 8px 14px;
  border: 1px solid rgba(81, 20, 25, 0.4);
  border-radius: 8px;
  background-color: #f6eee5;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(81, 20, 25, 0.08);
  animation: fadeInDown 0.3s ease forwards;
}

@media (min-width: 768px) {
  .wish-success-alert {
    max-width: 360px;
  }
}

.wish-success-alert.is-hidden {
  display: none;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Khối bao ngoài danh sách lời chúc (Bề ngang bằng khối bản đồ: 338px mobile / 560px desktop & căn giữa) */
.wishes-outer-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 338px;
  margin: 0 auto;
  padding: 0 4px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .wishes-outer-container {
    max-width: 560px;
    padding: 0;
  }
}

/* Danh sách lời chúc hiển thị vintage có scroll riêng */
.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
  max-height: 290px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(81, 20, 25, 0.28) transparent;
}

.wishes-list::-webkit-scrollbar {
  width: 4px;
}

.wishes-list::-webkit-scrollbar-track {
  background: transparent;
}

.wishes-list::-webkit-scrollbar-thumb {
  background: rgba(81, 20, 25, 0.28);
  border-radius: 4px;
}

.wishes-list::-webkit-scrollbar-thumb:hover {
  background: rgba(81, 20, 25, 0.45);
}

.wish-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(81, 20, 25, 0.18);
  border-radius: 10px;
  padding: 12px 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wish-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(81, 20, 25, 0.07);
}

.wish-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 5px;
}

.wish-author {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-primary);
}

.wish-time {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(81, 20, 25, 0.6);
}

.wish-body {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(81, 20, 25, 0.9);
  line-height: 1.45;
  word-break: break-word;
}

/* --- CHÂN TRANG (FOOTER) --- */
.wedding-footer {
  position: relative;
  z-index: 10;
  padding: 24px 20px 48px;
  text-align: center;
}

.footer-thankyou-text {
  font-family: var(--font-content);
  font-size: 13px;
  color: var(--color-primary);
  max-width: 320px;
  margin: 0 auto 16px;
  line-height: 1.5;
  font-style: italic;
}

.footer-monogram {
  font-family: var(--font-ampersand);
  font-size: 38px;
  color: var(--color-primary);
  opacity: 0.7;
}

/* --- LIGHTBOX MODAL --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.2s ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* --- FLOATING MUSIC PLAYER --- */
.floating-music-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-cream);
  border: 1.5px solid rgba(246, 237, 227, 0.45);
  box-shadow: 0 6px 20px rgba(81, 20, 25, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.floating-music-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 24px rgba(81, 20, 25, 0.45);
}

.music-note-icon {
  display: block;
  stroke: var(--color-cream);
  transition: transform 0.4s ease;
}

.floating-music-btn.is-playing .music-note-icon {
  animation: rotateMusicDisc 5s linear infinite;
}

@keyframes rotateMusicDisc {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 3 thanh sóng âm thanh góc nút */
.music-waves {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 10px;
}

.music-waves span {
  width: 2px;
  height: 3px;
  background-color: var(--color-cream);
  border-radius: 1px;
  opacity: 0.85;
}

.floating-music-btn.is-playing .music-waves span:nth-child(1) {
  animation: waveBar 0.8s ease-in-out infinite alternate;
}
.floating-music-btn.is-playing .music-waves span:nth-child(2) {
  animation: waveBar 0.6s ease-in-out infinite alternate 0.2s;
}
.floating-music-btn.is-playing .music-waves span:nth-child(3) {
  animation: waveBar 0.9s ease-in-out infinite alternate 0.4s;
}

@keyframes waveBar {
  0% { height: 2px; }
  100% { height: 10px; }
}

/* --- RSVP MODAL DIALOG --- */
.rsvp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 16px;
}

.rsvp-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.rsvp-modal-card {
  position: relative;
  background-color: var(--color-page-bg);
  border-radius: 14px;
  width: 100%;
  max-width: 380px;
  padding: 28px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  border: 1px solid var(--color-card-border);
}

.rsvp-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--color-primary);
  cursor: pointer;
}
