/* ==========================================================================
   CHUNGDOI EXACT WEDDING INVITATION THEME (MINIMALISM DARK RED)
   Couples: Roshan Glatvin Lobo & Elvisha Dsouza
   Date: Monday, January 11, 2027
   Venue: Mother of God Church, Mogarnad
   Music: Ed Sheeran - Perfect
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --bg-parchment: #F7F4EB;
  --bg-parchment-warm: #FAF7F2;
  --card-burgundy: #4A0D15;
  --card-burgundy-dark: #3D0911;
  --card-burgundy-light: #5A101C;
  --gold-accent: #C5A584;
  --gold-light: #E8D8C8;
  --cream-white: #FAF8F5;
  --text-dark: #4A0D15;
  --text-dark-muted: #7A3D45;
  --text-light: #FAF8F5;
  --text-gold: #C5A584;
  
  --font-serif: 'EB Garamond', 'Lora', 'Playfair Display', Georgia, serif;
  --font-title: 'Viaoda Libre', 'EB Garamond', Georgia, serif;
  --font-script: 'Great Vibes', 'Alex Brush', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --max-content-width: 480px;
  --card-radius: 20px;
  --shadow-card: 0 16px 40px rgba(50, 10, 18, 0.28);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.chungdoi-theme {
  background-color: var(--bg-parchment);
  color: var(--text-dark);
  font-family: var(--font-serif);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

body.entrance-locked {
  overflow: hidden !important;
}

/* ==========================================================================
   0. FULLSCREEN ENTRANCE GATE SCREEN (OPEN THE WEBSITE)
   ========================================================================== */
.entrance-gate-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6e1a20 0%, #511419 50%, #380a0e 100%);
  overflow: hidden;
  padding: 16px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

.entrance-gate-screen.dismissed {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06);
  pointer-events: none;
}

/* Floating Ambient Hearts */
.ambient-floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.float-heart {
  position: absolute;
  color: #a8323b;
  font-size: 20px;
  opacity: 0.35;
  animation: float-up-ambient 18s infinite linear;
}

.float-heart.h-1 { left: 12%; bottom: -30px; font-size: 18px; animation-duration: 20s; animation-delay: 0s; color: #a8323b; }
.float-heart.h-2 { left: 24%; bottom: -30px; font-size: 26px; animation-duration: 16s; animation-delay: 3s; color: #c5a584; opacity: 0.45; }
.float-heart.h-3 { left: 42%; bottom: -30px; font-size: 16px; animation-duration: 22s; animation-delay: 7s; color: #a8323b; }
.float-heart.h-4 { left: 58%; bottom: -30px; font-size: 22px; animation-duration: 19s; animation-delay: 2s; color: #c5a584; opacity: 0.4; }
.float-heart.h-5 { left: 74%; bottom: -30px; font-size: 28px; animation-duration: 17s; animation-delay: 5s; color: #a8323b; }
.float-heart.h-6 { left: 88%; bottom: -30px; font-size: 16px; animation-duration: 24s; animation-delay: 9s; color: #c5a584; opacity: 0.35; }
.float-heart.h-7 { left: 6%; bottom: -30px; font-size: 24px; animation-duration: 21s; animation-delay: 11s; color: #c5a584; opacity: 0.4; }
.float-heart.h-8 { left: 34%; bottom: -30px; font-size: 14px; animation-duration: 25s; animation-delay: 4s; color: #a8323b; }
.float-heart.h-9 { left: 66%; bottom: -30px; font-size: 20px; animation-duration: 18s; animation-delay: 8s; color: #c5a584; opacity: 0.45; }
.float-heart.h-10 { left: 82%; bottom: -30px; font-size: 24px; animation-duration: 23s; animation-delay: 1s; color: #a8323b; }

@keyframes float-up-ambient {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.45;
  }
  85% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-110vh) rotate(45deg);
    opacity: 0;
  }
}

/* Centered Keepsake Invitation Card */
.entrance-card-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: #FAF7F2;
  border-radius: 16px;
  padding: 38px 24px 34px 24px;
  text-align: center;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transform: translateY(0);
  transition: transform 0.4s ease;
}

/* Corner Flowers */
.entrance-flower-corner {
  position: absolute;
  width: 130px;
  pointer-events: none;
  z-index: 15;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.28));
}

.entrance-flower-corner.flower-tl {
  top: -16px;
  left: -22px;
  transform: rotate(-4deg);
}

.entrance-flower-corner.flower-tr {
  top: -16px;
  right: -22px;
  transform: scaleX(-1) rotate(-4deg);
}

.entrance-flower-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Wax Seal Badge */
.entrance-wax-seal {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6a141b, #43090e);
  box-shadow: 0 4px 16px rgba(60, 10, 15, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  cursor: pointer;
  animation: seal-gentle-pulse 2.4s infinite ease-in-out;
  transition: transform 0.2s ease;
}

.entrance-wax-seal:hover {
  transform: scale(1.1);
}

.entrance-seal-heart {
  width: 22px;
  height: 22px;
}

/* Card Typography */
.entrance-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.entrance-couple-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  font-family: var(--font-title);
  color: #511419;
  margin-bottom: 8px;
}

.title-groom,
.title-bride {
  font-size: clamp(2rem, 6.5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 1px;
}

.title-ampersand {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--gold-accent);
  line-height: 0.9;
  margin: -2px 0;
  opacity: 0.9;
}

/* Divider */
.entrance-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 10px 0;
  width: 100%;
}

.div-line {
  width: 45px;
  height: 1px;
  background: rgba(81, 20, 25, 0.3);
}

.div-symbol {
  color: #511419;
  font-size: 0.95rem;
  opacity: 0.8;
}

.entrance-date-text {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: #511419;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.entrance-invite-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: #7A3D45;
  margin-bottom: 22px;
}

/* "Open" Pill Button */
.btn-open-entrance {
  position: relative;
  background: #511419;
  color: #FAF8F5;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  padding: 10px 38px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(81, 20, 25, 0.45);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-open-entrance:hover {
  background: #681820;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(81, 20, 25, 0.6);
}

.btn-open-entrance:active {
  transform: translateY(1px) scale(0.98);
}

.btn-shine-bar {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  animation: shine-sweep 3.5s infinite;
}

@keyframes shine-sweep {
  0% { left: -100%; }
  35%, 100% { left: 160%; }
}

@media (max-width: 480px) {
  .entrance-card-container {
    max-width: 330px;
    padding: 32px 18px 28px 18px;
  }

  .entrance-flower-corner {
    width: 105px;
  }

  .entrance-flower-corner.flower-tl {
    top: -14px;
    left: -16px;
  }

  .entrance-flower-corner.flower-tr {
    top: -14px;
    right: -16px;
  }

  .title-groom,
  .title-bride {
    font-size: 1.85rem;
  }
}

/* --- Architectural Church Watermark Background --- */
.watermark-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.watermark-image {
  width: 100%;
  max-width: 620px;
  height: 100%;
  background-position: center top;
  background-repeat: repeat-y;
  background-size: 100% auto;
  opacity: 0.13;
  mix-blend-mode: multiply;
  filter: sepia(30%) contrast(110%);
}

.watermark-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, transparent 40%, rgba(247, 244, 235, 0.4) 80%, rgba(247, 244, 235, 0.85) 100%);
}

/* --- Main Page Container --- */
.page-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-content-width);
  padding: 24px 16px 80px 16px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
   1. LANDING ENVELOPE SECTION (CHUNGDOI SIGNATURE)
   ========================================================================== */
.envelope-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 24px;
}

.save-the-date-text {
  font-family: var(--font-title);
  font-size: 0.95rem;
  letter-spacing: 4.5px;
  text-transform: uppercase;
  color: var(--card-burgundy);
  margin-bottom: 30px;
  font-weight: 600;
  opacity: 0.9;
}

/* Envelope Container */
.envelope-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 20px;
}

/* Flower attached to envelope top-left */
.envelope-flower-decor {
  position: absolute;
  top: 15px;
  left: -20px;
  width: 140px;
  z-index: 15;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
  transform: rotate(-10deg);
}

.envelope-flower-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Envelope Body Box */
.envelope-box {
  position: relative;
  width: 340px;
  max-width: 88vw;
  height: 250px;
  background: linear-gradient(145deg, #5A101C 0%, #460A12 100%);
  border-radius: 6px 6px 12px 12px;
  box-shadow: 0 18px 45px rgba(50, 10, 18, 0.35);
  display: flex;
  justify-content: center;
  overflow: visible;
}

/* Inside pocket liner with lace styling */
.envelope-inside-liner {
  position: absolute;
  inset: 0;
  border-radius: 6px 6px 12px 12px;
  background: linear-gradient(to bottom, #38080E, #2E050A);
  overflow: hidden;
  z-index: 1;
}

.envelope-inside-liner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-image: radial-gradient(circle at 10px 10px, rgba(255, 255, 255, 0.08) 2px, transparent 0);
  background-size: 20px 20px;
  opacity: 0.6;
}

/* Polaroid emerging from pocket - Faces Prominently Visible */
.polaroid-card {
  position: absolute;
  bottom: 45px; /* High enough that heads/faces are immediately in clear view */
  width: 205px;
  background: #FFFFFF;
  padding: 10px 10px 32px 10px;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 5;
  transform: rotate(-7deg) translateY(0);
  transition: transform 0.8s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.4s ease;
  cursor: pointer;
}

.polaroid-card:hover {
  transform: rotate(-5deg) translateY(-18px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.polaroid-card.opened {
  transform: rotate(0deg) translateY(-90px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.polaroid-photo-frame {
  width: 100%;
  aspect-ratio: 9 / 13; /* Taller portrait aspect ratio to reveal complete upper body and faces */
  overflow: hidden;
  border-radius: 2px;
  background: #EAE5D9;
}

/* Focus on the faces at the top of the photo */
.polaroid-photo.face-focused {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%; /* Positions view on faces and smiles with natural headroom */
  display: block;
}

/* Envelope Front Pocket Flaps */
.envelope-pocket {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.pocket-flap {
  position: absolute;
  inset: 0;
}

/* Left diagonal triangle */
.pocket-left {
  background: linear-gradient(135deg, #54111A, #440A11);
  clip-path: polygon(0 0, 52% 52%, 0 100%);
  filter: drop-shadow(2px 0 4px rgba(0, 0, 0, 0.18));
}

/* Right diagonal triangle */
.pocket-right {
  background: linear-gradient(225deg, #58121B, #480C12);
  clip-path: polygon(100% 0, 48% 52%, 100% 100%);
  filter: drop-shadow(-2px 0 4px rgba(0, 0, 0, 0.18));
}

/* Bottom upward triangle */
.pocket-bottom {
  background: linear-gradient(0deg, #3D080E, #4A0D15);
  clip-path: polygon(0 100%, 50% 46%, 100% 100%);
  filter: drop-shadow(0 -3px 6px rgba(0, 0, 0, 0.22));
}

/* Wax Seal with Heart */
.wax-seal-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -10%);
  width: 68px;
  height: 68px;
  z-index: 25;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: seal-gentle-pulse 2.8s infinite ease-in-out;
}

.wax-seal-wrapper:hover {
  transform: translate(-50%, -10%) scale(1.1);
  animation: none;
}

.wax-seal-wrapper:active {
  transform: translate(-50%, -10%) scale(0.95);
}

.wax-seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(40, 5, 10, 0.5));
}

.seal-hint {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--card-burgundy);
  opacity: 0.75;
  background: rgba(247, 244, 235, 0.85);
  padding: 2px 8px;
  border-radius: 12px;
  pointer-events: none;
}

@keyframes seal-gentle-pulse {
  0%, 100% {
    transform: translate(-50%, -10%) scale(1);
    filter: drop-shadow(0 4px 10px rgba(81, 20, 25, 0.4));
  }
  50% {
    transform: translate(-50%, -10%) scale(1.06);
    filter: drop-shadow(0 6px 18px rgba(197, 165, 132, 0.65));
  }
}

/* ==========================================================================
   2. HERO NAMES HEADER SECTION
   ========================================================================== */
.names-header-section {
  width: 100%;
  text-align: center;
  padding: 16px 0 28px 0;
}

.couple-hero-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  color: var(--card-burgundy);
  line-height: 1.15;
}

.hero-name-groom,
.hero-name-bride {
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  font-weight: 500;
  letter-spacing: 1.5px;
}

.hero-ampersand {
  font-family: var(--font-script);
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-style: italic;
  color: var(--gold-accent);
  line-height: 0.9;
  margin: -4px 0;
  opacity: 0.9;
}

/* ==========================================================================
   CARDS COMMON STYLING (DARK RED CONTAINERS)
   ========================================================================== */
.card-section {
  width: 100%;
  margin-bottom: 36px;
  position: relative;
}

.darkred-card {
  width: 100%;
  background: var(--card-burgundy);
  background: linear-gradient(170deg, #5A101C 0%, #440911 100%);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  color: var(--text-light);
  position: relative;
  overflow: visible;
  padding: 38px 24px 34px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Flower decorations attached along card edges */
.card-flower-decoration {
  position: absolute;
  width: 130px;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.flower-attachment-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Right attached flower */
.flower-right {
  top: 50%;
  right: -32px;
  transform: translateY(-50%);
}

/* Left attached flower */
.flower-left {
  top: 50%;
  left: -32px;
  transform: translateY(-50%) scaleX(-1);
}

.card-inner-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.card-header-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--cream-white);
  margin-bottom: 24px;
  font-weight: 500;
  position: relative;
}

/* ==========================================================================
   3. CARD 1: CEREMONY INFO
   ========================================================================== */
.parents-grid {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  margin-bottom: 30px;
  gap: 12px;
}

.parent-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.parent-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 4px 0;
  align-self: stretch;
}

.parent-prefix {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.parent-names {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--cream-white);
  line-height: 1.25;
}

.parent-address {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.8);
  line-height: 1.45;
  margin-top: 10px;
}

/* Announcement Banner */
.announcement-banner {
  margin-bottom: 24px;
}

.announcement-line1,
.announcement-line2 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold-light);
  line-height: 1.5;
  font-weight: 400;
}

/* Couple Profiles - Single Line Names (No Avatars) */
.couple-announcement-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.person-title-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* SINGLE LINE NAMES FOR BRIDE AND GROOM (User requirement!) */
.single-line-name {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 5.5vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--cream-white);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.person-role {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-accent);
  margin-top: 4px;
  font-weight: 500;
}

.ceremony-ampersand-sign {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--gold-accent);
  line-height: 1;
  margin: 6px 0;
  opacity: 0.9;
}

/* Nuptials Date & Time Block */
.nuptials-date-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nuptials-heading {
  font-family: var(--font-title);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 12px;
  font-weight: 500;
}

.date-time-strip {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--cream-white);
  margin-bottom: 8px;
}

.big-date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
}

.big-day-number {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--cream-white);
}

.big-date-separator {
  width: 1.5px;
  height: 48px;
  background: rgba(255, 255, 255, 0.3);
}

.big-month-year {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.big-month-year .month-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--cream-white);
  line-height: 1.1;
}

.big-month-year .year-number {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--gold-light);
  line-height: 1.1;
}

/* ==========================================================================
   4. OFFICIAL INVITATION CARD SECTION (UPLOADED CARD DISPLAY)
   ========================================================================== */
.official-card-caption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-top: -12px;
  margin-bottom: 20px;
}

.official-card-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(197, 165, 132, 0.5);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.official-card-frame:hover {
  transform: translateY(-4px) scale(1.02);
}

.official-wedding-card-img {
  width: 100%;
  height: auto;
  display: block;
}

.card-zoom-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(40, 5, 10, 0.9), transparent);
  padding: 16px 12px 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #FFFFFF;
}

.zoom-icon {
  font-size: 0.95rem;
}

.zoom-text {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ==========================================================================
   5. PHOTO GALLERY (3D PERSPECTIVE CAROUSEL)
   ========================================================================== */
.gallery-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 36px 0;
}

.section-title-cream {
  font-family: var(--font-title);
  font-size: 1.2rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--card-burgundy);
  margin-bottom: 24px;
  font-weight: 600;
  text-align: center;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-track {
  position: relative;
  width: 240px;
  height: 340px;
  transform-style: preserve-3d;
}

.carousel-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, filter 0.6s ease;
  cursor: pointer;
  background: #EAE5D9;
}

.carousel-card-inner {
  width: 100%;
  height: 100%;
}

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

.gallery-top-focus {
  object-position: center 5% !important;
}

/* 3D Coverflow positioning */
.carousel-card.active {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  z-index: 10;
  filter: none;
}

.carousel-card.prev {
  transform: translate3d(-55%, 0, -80px) rotateY(25deg) scale(0.85);
  opacity: 0.65;
  z-index: 5;
  filter: brightness(0.85);
}

.carousel-card.next {
  transform: translate3d(55%, 0, -80px) rotateY(-25deg) scale(0.85);
  opacity: 0.65;
  z-index: 5;
  filter: brightness(0.85);
}

.carousel-card.hidden-left {
  transform: translate3d(-100%, 0, -150px) rotateY(35deg) scale(0.7);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.carousel-card.hidden-right {
  transform: translate3d(100%, 0, -150px) rotateY(-35deg) scale(0.7);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* Arrow Navigation */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(247, 244, 235, 0.9);
  border: 1px solid rgba(74, 13, 21, 0.2);
  color: var(--card-burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.carousel-arrow:hover {
  background: var(--card-burgundy);
  color: var(--cream-white);
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow-prev {
  left: 6px;
}

.carousel-arrow-next {
  right: 6px;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(74, 13, 21, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  width: 22px;
  border-radius: 4px;
  background: var(--card-burgundy);
}

/* ==========================================================================
   6. CARD 3: RECEPTION INFO, COUNTDOWN & CALENDAR
   ========================================================================== */
.reception-intro-text {
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-white);
  margin-bottom: 16px;
  font-weight: 500;
}

.reception-time-highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.reception-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold-accent);
}

.reception-clock {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cream-white);
  letter-spacing: 1px;
}

/* Countdown Block */
.countdown-block {
  margin: 20px 0 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.countdown-value-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--cream-white);
  letter-spacing: 0.5px;
}

/* Calendar Widget Box */
.calendar-widget-box {
  width: 100%;
  max-width: 320px;
  background: var(--cream-white);
  border-radius: 14px;
  padding: 18px 16px;
  color: var(--card-burgundy);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  margin-bottom: 22px;
}

.calendar-month-title {
  font-family: var(--font-script);
  font-size: 2.1rem;
  text-align: center;
  line-height: 1;
  color: var(--card-burgundy);
  margin-bottom: 12px;
  font-weight: 400;
}

.calendar-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--card-burgundy);
  opacity: 0.7;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(74, 13, 21, 0.15);
  margin-bottom: 8px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  text-align: center;
  align-items: center;
}

.calendar-days-grid .day-empty {
  height: 28px;
}

.calendar-days-grid .day-num {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-burgundy);
}

/* Day 11 Highlighted with Burgundy Heart */
.day-wedding-highlight {
  position: relative;
  font-weight: 700;
}

.heart-shape-svg {
  position: absolute;
  width: 26px;
  height: 26px;
  fill: var(--card-burgundy);
  filter: drop-shadow(0 2px 4px rgba(74, 13, 21, 0.3));
  z-index: 1;
}

.heart-day-text {
  position: relative;
  z-index: 2;
  color: #FFFFFF !important;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Add to Calendar Link */
.calendar-action-row {
  margin-bottom: 18px;
}

.add-to-calendar-link {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--cream-white);
  text-decoration: underline;
  text-underline-offset: 4px;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.add-to-calendar-link:hover {
  color: var(--gold-accent);
}

/* Confirm Attendance Pill Button */
.rsvp-btn-row {
  width: 100%;
}

.btn-confirm-attendance {
  background: var(--cream-white);
  color: var(--card-burgundy);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-confirm-attendance:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  background: #FFFFFF;
}

.btn-confirm-attendance:active {
  transform: translateY(1px) scale(0.98);
}

/* ==========================================================================
   7. VENUE MAP & DIRECTIONS SECTION
   ========================================================================== */
.venue-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 36px;
}

.venue-subtitle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--card-burgundy);
  margin-top: -16px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
}

.venue-map-container {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(74, 13, 21, 0.12);
  border: 1px solid rgba(74, 13, 21, 0.1);
  background: #EAE5D9;
}

.directions-link-row {
  margin-top: 16px;
}

.directions-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--card-burgundy);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.directions-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

/* ==========================================================================
   8. DRESS CODE SECTION
   ========================================================================== */
.dresscode-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 38px;
}

.dresscode-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-dark-muted);
  margin-top: -16px;
  margin-bottom: 20px;
}

.dresscode-swatches {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.swatch-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.25s ease;
  cursor: default;
}

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

.swatch-burgundy {
  background-color: #4A0D15;
}

.swatch-champagne {
  background-color: #C5A584;
}

.swatch-white {
  background-color: #FFFFFF;
  border: 1px solid rgba(74, 13, 21, 0.2);
}

/* ==========================================================================
   9. CARD 4: WEDDING DAY SCHEDULE (TIMELINE)
   ========================================================================== */
.schedule-timeline {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 10px 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 28px 75px 24px 1fr;
  align-items: center;
  text-align: left;
}

.timeline-icon-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-time-col {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--cream-white);
  text-align: right;
  padding-right: 12px;
}

.timeline-line-col {
  position: relative;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timeline-node {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream-white);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  z-index: 2;
}

.timeline-line-segment {
  position: absolute;
  top: 8px;
  bottom: -30px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
  z-index: 1;
}

.timeline-label-col {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cream-white);
  padding-left: 12px;
}

/* ==========================================================================
   10. FOOTER SECTION
   ========================================================================== */
.page-footer {
  width: 100%;
  text-align: center;
  padding: 30px 16px 10px 16px;
}

.footer-presence-message {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--card-burgundy);
  margin-bottom: 8px;
  line-height: 1.4;
}

.footer-couple-signature {
  font-family: var(--font-title);
  font-size: 0.88rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--card-burgundy);
  font-weight: 600;
}

/* ==========================================================================
   FULLSCREEN LIGHTBOX MODAL FOR OFFICIAL CARD
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 3, 5, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox-content {
  position: relative;
  z-index: 10;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox-modal.open .lightbox-content {
  transform: scale(1);
}

.lightbox-full-img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close-btn {
  position: absolute;
  top: -42px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

/* ==========================================================================
   FLOATING AUDIO EQUALIZER BUTTON (CHUNGDOI SIGNATURE)
   ========================================================================== */
.floating-music-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card-burgundy);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.floating-music-btn:hover {
  transform: scale(1.08);
  background: var(--card-burgundy-light);
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.sound-bars .bar {
  width: 3px;
  background: #FFFFFF;
  border-radius: 2px;
  height: 6px;
  transition: height 0.2s ease;
}

/* Animated Soundwave bars when playing */
.floating-music-btn.playing .bar-1 {
  animation: bar-dance 1.1s infinite ease-in-out alternate;
}

.floating-music-btn.playing .bar-2 {
  animation: bar-dance 0.8s infinite ease-in-out alternate 0.2s;
}

.floating-music-btn.playing .bar-3 {
  animation: bar-dance 1.3s infinite ease-in-out alternate 0.4s;
}

@keyframes bar-dance {
  0% { height: 4px; }
  50% { height: 16px; }
  100% { height: 8px; }
}

/* ==========================================================================
   RSVP MODAL DIALOG
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(40, 5, 10, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 420px;
  background: var(--bg-parchment-warm);
  border: 1px solid rgba(74, 13, 21, 0.2);
  border-radius: 20px;
  padding: 30px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.8rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--card-burgundy);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.modal-close-btn:hover {
  opacity: 1;
}

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

.modal-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--card-burgundy);
}

.modal-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-dark-muted);
  margin-top: 4px;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--card-burgundy);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(74, 13, 21, 0.2);
  border-radius: 8px;
  background: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: #2E050A;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--card-burgundy);
  box-shadow: 0 0 0 3px rgba(74, 13, 21, 0.1);
}

.radio-options {
  display: flex;
  gap: 16px;
  margin-top: 2px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--card-burgundy);
  cursor: pointer;
}

.modal-submit-btn {
  background: var(--card-burgundy);
  color: var(--cream-white);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 13px 20px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 14px rgba(74, 13, 21, 0.3);
  transition: all 0.2s ease;
}

.modal-submit-btn:hover {
  background: var(--card-burgundy-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(74, 13, 21, 0.4);
}

.rsvp-success-message {
  text-align: center;
  padding: 20px 0;
}

.success-heart {
  font-size: 2.4rem;
  color: var(--card-burgundy);
  margin-bottom: 8px;
}

.rsvp-success-message h4 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--card-burgundy);
  margin-bottom: 8px;
}

.rsvp-success-message p {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-dark-muted);
}

/* ==========================================================================
   RESPONSIVENESS (MOBILE PHONE OPTIMIZATIONS)
   ========================================================================== */
@media (max-width: 480px) {
  .page-container {
    padding: 18px 12px 70px 12px;
  }

  .envelope-wrapper {
    height: 350px;
  }

  .envelope-box {
    width: 300px;
    height: 220px;
  }

  .polaroid-card {
    width: 180px;
    bottom: 38px;
    padding: 8px 8px 26px 8px;
  }

  .polaroid-card.opened {
    transform: rotate(0deg) translateY(-75px);
  }

  .envelope-flower-decor {
    width: 110px;
    left: -15px;
  }

  .darkred-card {
    padding: 32px 16px 28px 16px;
  }

  .card-flower-decoration {
    width: 105px;
  }

  .flower-right {
    right: -24px;
  }

  .flower-left {
    left: -24px;
  }

  .parent-names {
    font-size: 0.78rem;
  }

  .parent-address {
    font-size: 0.58rem;
  }

  /* Guarantee single line bride and groom names on narrow phones */
  .single-line-name {
    font-size: clamp(1.15rem, 4.7vw, 1.55rem);
  }

  .carousel-container {
    height: 330px;
  }

  .carousel-track {
    width: 210px;
    height: 290px;
  }

  .calendar-widget-box {
    padding: 14px 10px;
  }

  .calendar-month-title {
    font-size: 1.8rem;
  }

  .timeline-row {
    grid-template-columns: 24px 68px 20px 1fr;
  }

  .timeline-time-col {
    font-size: 0.75rem;
    padding-right: 8px;
  }

  .timeline-label-col {
    font-size: 0.88rem;
    padding-left: 8px;
  }
}
