/* ==========================================================================
   EXACT MULTI-SECTION DIGITAL INVITATION ARCHITECTURE WITH 3D COVERFLOW GALLERY
   ========================================================================== */

:root {
  --bg-deep-maroon: #38050a;
  --bg-gradient: radial-gradient(circle at center, #4d0a12 0%, #2b0307 65%, #150103 100%);
  --bg-ivory-parchment: radial-gradient(circle at center, #faf6ee 0%, #f4eee2 60%, #e8decb 100%);
  
  --card-bg: #f8f3eb;
  --burgundy-dark-card: #42070e;
  --burgundy-btn-top: #520912;
  --burgundy-btn-bottom: #2b0307;
  --gold-accent: #c49a45;
  
  --text-dark: #3a1519;
  --text-light: #fcefdc;
  --text-muted: #735357;
  
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-title: 'Playfair Display', Georgia, serif;
  --font-arabic: 'Amiri', serif;
  --font-sans: 'Outfit', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Playfair & Cormorant default to old-style figures that dip below the
     baseline; force lining numbers so digits sit level with capitals */
  font-variant-numeric: lining-nums;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-serif);
  background: var(--bg-gradient);
  color: var(--text-dark);
  overflow-x: hidden;
  transition: background 1s ease;
}

body.envelope-mode {
  background: var(--bg-ivory-parchment);
  overflow-y: auto;
}

/* Background Canvas Particles */
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

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

.audio-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--burgundy-dark-card);
  border: 1px solid var(--gold-accent);
  color: #fcefdc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.audio-btn:hover {
  transform: scale(1.1);
}

.audio-btn.playing {
  animation: audioPulse 2s infinite ease-in-out;
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

@keyframes audioPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}


/* ==========================================================================
   STAGE 1: COVER LANDING CARD (Exact Image 1 Replica)
   ========================================================================== */

.cover-wrapper {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.cover-wrapper.hidden {
  opacity: 0;
  transform: scale(0.9) translateY(-40px);
  pointer-events: none;
}

.invitation-card-container {
  width: 580px;
  max-width: 92vw;
  min-height: 360px;
  height: auto;
  max-height: 90vh;
  padding: 25px 15px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(66, 7, 14, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.corner-floral {
  position: absolute;
  width: 190px;
  height: auto;
  pointer-events: none;
  z-index: 2;
  opacity: 0.98;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

.top-left-floral { top: 12px; left: -10px; }
.top-right-floral { top: 12px; right: -10px; transform: scaleX(-1); }

.card-inner-wrapper {
  position: relative;
  z-index: 5;
  text-align: center;
  width: 100%;
  max-width: 360px;
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cover-bismillah {
  font-family: 'Amiri', serif;
  font-size: 1.35rem;
  line-height: 1.6;
  color: #42070e;
  margin: 0 auto;
  padding-bottom: 16px;
  text-align: center;
}

.top-heart-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--burgundy-dark-card);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 12px;
  box-shadow: 0 6px 16px rgba(45, 5, 10, 0.35);
}

.names-block { margin-bottom: 6px; }

.couple-title {
  font-family: var(--font-title);
  color: var(--burgundy-dark-card);
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.5px;
}

.couple-title .name-part { display: block; }

.couple-title .ampersand {
  display: block;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--burgundy-dark-card);
  margin: 1px 0;
}

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

.divider-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 170px;
  margin: 8px auto 12px;
}

.divider-flourish .flourish-line {
  flex: 1;
  height: 1px;
  background: rgba(66, 7, 14, 0.25);
}

.divider-flourish .flourish-heart {
  font-size: 0.75rem;
  color: var(--burgundy-dark-card);
  opacity: 0.8;
}

.invitation-date {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--burgundy-dark-card);
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.invitation-subtext {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.btn-open-sheen {
  padding: 10px 42px;
  border-radius: 50px;
  background: linear-gradient(180deg, var(--burgundy-btn-top) 0%, var(--burgundy-btn-bottom) 100%);
  color: #fff;
  border: none;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(35, 3, 7, 0.5), 0 0 15px rgba(66, 7, 14, 0.3);
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Gold text shimmer: gold lettering with a soft light passing through it */
.btn-open-sheen {
  border: 1px solid rgba(226, 185, 100, 0.55);
  will-change: transform;
}

.btn-gold-text {
  background: linear-gradient(110deg,
    #e2b964 0%, #f3d48a 35%, #fffaf0 50%, #f3d48a 65%, #e2b964 100%);
  font-weight: 600;
  letter-spacing: 0.4px;
  display: inline-block;
  background-size: 250% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #e6c27a;
  animation: btnGoldText 4s ease-in-out infinite;
}

@keyframes btnGoldText {
  0% { background-position: 100% 0; }
  45%, 100% { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-gold-text { animation: none; background-position: 50% 0; }
}

.btn-open-sheen:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(35, 3, 7, 0.7), 0 0 20px rgba(196, 154, 69, 0.4);
}


/* ==========================================================================
   STAGE 2: SEAMLESS SCROLLABLE INVITATION PAGE
   ========================================================================== */

.invitation-page-flow {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.invitation-page-flow.hidden {
  display: none;
  opacity: 0;
}

/* SECTION 1: ENVELOPE HERO (Image 3 Aesthetic) */
.section-envelope-hero {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.save-the-date-header h2 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  letter-spacing: 5px;
  color: var(--burgundy-dark-card);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 25px;
}

/* Verse sits in its own paper-coloured band above the envelope image,
   so it can never overlap the photo or flowers */
.envelope-hero-wrapper {
  position: relative;
  background: #f6efe6;
}

.hero-verse {
  position: relative;
  z-index: 2;
  padding: 22px 16px 4px;
  text-align: center;
}

.hero-verse + .user-envelope-hero-img {
  margin-top: -6%;
}

.hero-verse-ar {
  font-family: 'Amiri', serif;
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  line-height: 1.6;
  color: #42070e;
}

.hero-verse-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.75rem, 2.6vw, 1rem);
  color: var(--text-muted);
}

.hero-verse-en span {
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--gold-accent);
}

.envelope-hero-wrapper {
  width: 640px;
  max-width: 94vw;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

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

/* On phones, zoom the image and crop the empty paper at the sides
   so the envelope and photo fill more of the screen */
@media (max-width: 650px) {
  .user-envelope-hero-img {
    width: 135%;
    max-width: none;
    margin-left: -17.5%;
  }

  /* Thin serif strokes fade on small screens: go heavier and darker */
  .hero-verse-ar {
    font-size: 1.6rem;
    font-weight: 700;
  }

  .hero-verse-en {
    font-size: 0.95rem;
    font-weight: 600;
    color: #5a2a2f;
  }

  .hero-verse-en span {
    font-weight: 700;
    color: #a8823a;
  }
}


/* SECTION 2: CEREMONY INFO CARD (Image 4 Replica) */
.section-ceremony-card-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 60px;
}

.ceremony-top-names {
  text-align: center;
  margin-bottom: 4px;
}

.ceremony-divider-img {
  display: block;
  width: min(420px, 85%);
  height: auto;
  margin: -20px auto -16px;
  filter: drop-shadow(0 4px 8px rgba(66, 7, 14, 0.15));
}

.ceremony-top-names h2 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  color: var(--burgundy-dark-card);
  font-weight: 500;
}

.ceremony-top-names span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--gold-accent);
}

/* Vertical Dark Burgundy Card (Image 4 Design) */
.dark-burgundy-ceremony-card {
  width: 580px;
  max-width: 92vw;
  background: var(--burgundy-dark-card);
  color: var(--text-light);
  border-radius: 16px;
  padding: 45px 70px 45px 45px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.3);
  text-align: center;
  overflow: visible;
}

.card-right-floral {
  position: absolute;
  top: 100px;
  right: -135px;
  width: 210px;
  height: auto;
  pointer-events: none;
  z-index: 2;
  opacity: 0.98;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
}

.ceremony-card-inner {
  position: relative;
  z-index: 10;
  padding-right: 15px;
}

.ceremony-info-badge {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-accent);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.arabic-bismillah-small {
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  color: var(--gold-accent);
  margin-bottom: 4px;
}

.arabic-salutation-small {
  font-size: 0.95rem;
  color: rgba(252, 239, 220, 0.8);
  margin-bottom: 18px;
}

.joyful-announcement {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  line-height: 1.6;
  color: rgba(252, 239, 220, 0.9);
  margin-bottom: 25px;
  font-weight: 500;
}

.parents-lineage-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.parents-col { flex: 1; }

.parents-col .p-label {
  font-size: 0.75rem;
  color: var(--gold-accent);
  text-transform: uppercase;
  display: block;
}

.parents-col .p-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.parents-col .p-sub {
  font-size: 0.75rem;
  color: rgba(252, 239, 220, 0.75);
  display: block;
  margin-top: 2px;
}

.parents-v-line {
  width: 1px;
  height: 45px;
  background: rgba(212, 175, 55, 0.3);
  margin: 0 15px;
}

.person-role-block { margin-bottom: 15px; }

.person-role-block .person-name {
  font-family: var(--font-title);
  font-size: 2rem;
  color: #fff;
  font-weight: 500;
  line-height: 1.2;
}

/* Degree reads like classic invitation text, in bright gold beside the name */
.degree-pill {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 0.6em;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #f3d48a;
  margin-left: 4px;
}

.person-role-block .role-badge {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: rgba(252, 239, 220, 0.7);
  display: block;
  margin-top: 4px;
}

.person-role-block .profession-text {
  font-size: 0.85rem;
  color: rgba(252, 239, 220, 0.85);
}

.role-ampersand {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-style: italic;
  color: var(--gold-accent);
  margin: 10px 0;
}

.ceremony-venue-block {
  margin: 25px 0;
  padding: 15px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.venue-heading {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--gold-accent);
  margin-bottom: 4px;
}

.venue-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: #fff;
}

.venue-sub {
  font-size: 0.85rem;
  color: rgba(252, 239, 220, 0.8);
  margin-top: 2px;
}

.ceremony-time-date-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 15px;
}

.ceremony-time-date-grid .lbl {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-accent);
  display: block;
}

.ceremony-time-date-grid .sub-lbl {
  font-size: 0.75rem;
  color: rgba(252, 239, 220, 0.75);
}

.ceremony-time-date-grid .v-divider {
  width: 1px;
  height: 40px;
  background: rgba(212, 175, 55, 0.3);
}

.big-num-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.big-num-col .num {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.big-num-col .m-y {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-accent);
  text-align: left;
  line-height: 1.1;
}


/* SECTION 3: 3D COVERFLOW PHOTO GALLERY (Image 5 Replica) */
.section-photo-gallery {
  width: 100%;
  margin-bottom: 70px;
  text-align: center;
}

.gallery-header h2 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  letter-spacing: 5px;
  color: var(--burgundy-dark-card);
  font-weight: 600;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.coverflow-wrapper {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 420px;
  perspective: 1000px;
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.coverflow-slide {
  position: absolute;
  width: 250px;
  height: 370px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  background: #33040a;
}

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

/* 3D Coverflow Positions */
.coverflow-slide.slide-active {
  transform: translateX(0) scale(1) rotateY(0deg);
  z-index: 10;
  opacity: 1;
  box-shadow: 0 25px 50px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.4);
}

.coverflow-slide.slide-prev-1 {
  transform: translateX(-160px) scale(0.85) rotateY(35deg);
  z-index: 5;
  opacity: 0.85;
  filter: brightness(0.9);
}

.coverflow-slide.slide-prev-2 {
  transform: translateX(-290px) scale(0.7) rotateY(50deg);
  z-index: 2;
  opacity: 0.45;
  filter: brightness(0.7);
}

.coverflow-slide.slide-next-1 {
  transform: translateX(160px) scale(0.85) rotateY(-35deg);
  z-index: 5;
  opacity: 0.85;
  filter: brightness(0.9);
}

.coverflow-slide.slide-next-2 {
  transform: translateX(290px) scale(0.7) rotateY(-50deg);
  z-index: 2;
  opacity: 0.45;
  filter: brightness(0.7);
}

.coverflow-slide.slide-hidden {
  transform: translateX(0) scale(0.5) rotateY(0deg);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.coverflow-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(66, 7, 14, 0.85);
  border: 1px solid var(--gold-accent);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.coverflow-nav-btn:hover {
  transform: translateY(-50%) scale(1.1);
  background: var(--burgundy-dark-card);
}

.coverflow-nav-btn.prev { left: 20px; }
.coverflow-nav-btn.next { right: 20px; }


/* SECTION 4: FAMILY BLESSINGS & CONTACTS */
.section-blessings-contacts-full {
  width: 100%;
  display: flex;
  justify-content: center;
}

.details-paper-container {
  width: 720px;
  max-width: 94vw;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 40px 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--gold-accent);
  text-align: center;
}

.map-action-box { margin-bottom: 20px; }

.btn-hero-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--burgundy-dark-card);
  color: #fff;
  padding: 10px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.btn-hero-gold:hover { transform: scale(1.05); }

.gold-hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
  margin: 25px 0;
}

.blessings-heading {
  font-family: 'Great Vibes', cursive;
  font-size: 2.2rem;
  color: var(--burgundy-dark-card);
  margin-bottom: 15px;
}

.blessings-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.blessings-lists ul {
  list-style: none;
  font-size: 1rem;
  color: var(--text-dark);
  text-align: left;
}

.blessings-lists ul li {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blessings-lists ul li i {
  color: var(--gold-accent);
  font-size: 0.8rem;
}

.family-contacts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.contact-box {
  background: #f3ece1;
  padding: 18px 12px;
  border-radius: 12px;
  border: 1px solid rgba(196, 154, 69, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-box .tag {
  font-family: 'Great Vibes', cursive;
  font-size: 1.6rem;
  color: var(--burgundy-dark-card);
  margin-bottom: 4px;
}

.contact-box .names {
  font-size: 0.93rem;
  color: var(--text-dark);
  white-space: nowrap;
  margin-bottom: 4px;
}

.contact-box .names small {
  font-size: 0.85em;
  color: var(--text-muted);
}

.contact-box .location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.phone-link {
  font-family: var(--font-sans);
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: "lnum" 1;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--burgundy-dark-card);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.phone-link:hover {
  color: #8c1d29;
  transform: translateY(-1px);
}

.dua-footer {
  margin-top: 25px;
  padding: 20px;
  background: rgba(66, 7, 14, 0.05);
  border-radius: 12px;
}

.dua-arabic {
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  color: var(--burgundy-dark-card);
  font-weight: 700;
  margin-bottom: 8px;
}

.dua-english {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-dark);
}

/* ==========================================================================
   RECEPTION INFO CARD WITH CALENDAR (Matching User Screenshot)
   ========================================================================== */
.section-reception-card-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 70px;
  position: relative;
}

.dark-burgundy-reception-card {
  position: relative;
  width: 580px;
  max-width: 92vw;
  background: linear-gradient(145deg, #440c12 0%, #2b0609 100%);
  border-radius: 20px;
  padding: 40px 30px 45px 30px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.35);
  text-align: center;
  color: #fff;
  z-index: 5;
}

.card-left-floral {
  position: absolute;
  left: -135px;
  top: 15%;
  height: 390px;
  width: auto;
  pointer-events: none;
  z-index: 2;
  transform: scaleX(-1); /* Flip horizontally to attach nicely to left edge */
}

.reception-card-inner {
  position: relative;
  z-index: 10;
}

.reception-info-badge {
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 4px;
  color: var(--gold-accent);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.reception-take-place-heading {
  font-family: var(--font-title);
  font-size: 1.15rem;
  letter-spacing: 2px;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.reception-date-header .day-time {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--gold-accent);
  display: block;
  margin-bottom: 12px;
}

.reception-big-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

/* Day name mirrors the month/year block: gold text with a divider on its right */
.reception-big-date-row .rec-day {
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: var(--gold-accent);
  line-height: 1.1;
  text-align: right;
  border-right: 1px solid rgba(212, 175, 55, 0.4);
  padding: 6px 12px 6px 0;
}

.reception-big-date-row .rec-num {
  font-family: var(--font-title);
  font-size: 3.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.reception-big-date-row .rec-m-y {
  display: flex;
  flex-direction: column;
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: var(--gold-accent);
  text-align: left;
  line-height: 1.1;
  border-left: 1px solid rgba(212, 175, 55, 0.4);
  padding-left: 12px;
}

.reception-milestones-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  margin-bottom: 25px;
}

.milestone-item .m-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: rgba(252, 239, 220, 0.75);
  display: block;
  margin-bottom: 4px;
}

.milestone-item .m-time {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

/* EMBEDDED MINI CALENDAR CARD */
.reception-calendar-card {
  background: #f4efe8;
  border-radius: 18px;
  padding: 22px 20px 25px 20px;
  max-width: 380px;
  margin: 0 auto 25px auto;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08), 0 10px 25px rgba(0,0,0,0.3);
  color: #3d0c12;
}

.cal-month-title {
  font-family: 'Great Vibes', cursive;
  font-size: 2.2rem;
  color: #50151d;
  font-weight: normal;
  margin-bottom: 8px;
  line-height: 1;
}

.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-family: var(--font-title);
  font-size: 0.75rem;
  color: #8c4a52;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(80, 21, 29, 0.2);
}

.cal-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: #3d0c12;
  align-items: center;
  justify-items: center;
}

.cal-grid-days span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

/* Heart highlight badge for date 14 */
.highlight-date-heart {
  position: relative;
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #50151d;
  color: #ffffff !important;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(80, 21, 29, 0.4);
  transform: scale(1.1);
}

.highlight-date-heart span {
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 700;
}

.reception-actions {
  margin-top: 10px;
}

.add-to-cal-link {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

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

.btn-confirm-attendance {
  background: #f4efe8;
  color: #440c12;
  border: none;
  padding: 14px 36px;
  border-radius: 50px;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  text-transform: uppercase;
}

.btn-confirm-attendance:hover {
  transform: scale(1.05);
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

/* RSVP MODAL OVERLAY */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content-card {
  position: relative;
  background: var(--card-bg);
  border: 2px solid var(--gold-accent);
  border-radius: 20px;
  width: 440px;
  max-width: 90vw;
  padding: 35px 30px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--burgundy-dark-card);
  cursor: pointer;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  letter-spacing: 2px;
  color: var(--burgundy-dark-card);
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.rsvp-form .form-group {
  text-align: left;
  margin-bottom: 18px;
}

.rsvp-form label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--burgundy-dark-card);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.rsvp-form input, .rsvp-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(196, 154, 69, 0.5);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
}

.rsvp-form input:focus, .rsvp-form select:focus {
  border-color: var(--burgundy-dark-card);
  box-shadow: 0 0 0 3px rgba(66, 7, 14, 0.1);
}

.btn-send-rsvp {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  padding: 12px 20px;
  font-size: 0.95rem;
}

/* ==========================================================================
   WEDDING VENUE MAP & QR CODE SECTION (Matching User Image Aesthetic)
   ========================================================================== */
.section-venue-map-wrapper {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 70px auto;
  text-align: center;
  padding: 0 15px;
}

.venue-map-header h2 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  letter-spacing: 4px;
  color: var(--burgundy-dark-card);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.venue-address-text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 30px;
  opacity: 0.9;
}

.venue-map-content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 25px;
  align-items: center;
}

.map-frame-box {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  border: 2px solid var(--gold-accent);
  background: #ffffff;
}

.map-top-bar {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
}

.btn-open-in-maps {
  background: #ffffff;
  color: #3d0c12;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-open-in-maps:hover {
  transform: translateY(-2px);
  background: #f4efe8;
}

.map-frame-box iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}

.qr-code-card {
  background: var(--card-bg);
  border: 2px solid var(--gold-accent);
  border-radius: 20px;
  padding: 25px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-card-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  color: var(--burgundy-dark-card);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.qr-img-wrapper {
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.1), 0 4px 15px rgba(0,0,0,0.15);
  margin-bottom: 18px;
}

.qr-code-img {
  width: 170px;
  height: 170px;
  object-fit: contain;
  display: block;
}

.map-link-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.85rem;
}

/* On phones a QR code can't be scanned from the same screen:
   hide it and keep only the Get Directions button */
@media (max-width: 860px) {
  .qr-card-title,
  .qr-img-wrapper {
    display: none;
  }

  .qr-code-card {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .map-link-btn {
    width: auto;
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* ==========================================================================
   PERFECT RESPONSIVE DESIGN SYSTEM (Desktop, Tablet, Mobile)
   ========================================================================== */

/* Tablet & Medium Screens */
@media (max-width: 860px) {
  .venue-map-content-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .envelope-hero-wrapper {
    width: 94vw;
  }

  .dark-burgundy-ceremony-card,
  .dark-burgundy-reception-card,
  .details-paper-container {
    width: 92vw;
  }

  .card-right-floral {
    right: -70px;
    width: 160px;
  }

  .card-left-floral {
    left: -70px;
    width: 280px;
  }
}

/* Mobile & Phablet (<= 650px) */
@media (max-width: 650px) {
  /* Cover Landing Card */
  .cover-wrapper {
    padding: 15px;
  }

  .invitation-card-container {
    width: 94vw;
    height: auto;
    min-height: 350px;
    padding: 25px 12px;
  }

  .corner-floral {
    width: 110px;
  }

  .top-left-floral {
    top: 10px;
    left: -5px;
  }

  .top-right-floral {
    top: 10px;
    right: -5px;
  }

  .top-heart-badge {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
    margin-bottom: 8px;
  }

  .couple-title {
    font-size: 1.85rem;
  }

  .couple-title .ampersand {
    font-size: 1.15rem;
    margin: 0;
  }

  .full-couple-subtitle {
    font-size: 0.88rem;
  }

  .divider-flourish {
    width: 140px;
    margin: 6px auto 10px;
  }

  .invitation-date {
    font-size: 0.85rem;
  }

  .invitation-subtext {
    font-size: 0.82rem;
    margin-bottom: 12px;
  }

  .btn-open-sheen {
    padding: 9px 36px;
    font-size: 1rem;
  }

  /* Stage 2 Flow Padding */
  .invitation-page-flow {
    padding: 25px 12px 60px 12px;
  }

  .save-the-date-header h2 {
    font-size: 1.15rem;
    letter-spacing: 3px;
    margin-bottom: 18px;
  }

  .section-envelope-hero {
    margin-bottom: 40px;
  }

  /* Ceremony Card */
  .section-ceremony-card-wrapper {
    margin-bottom: 45px;
  }

  .ceremony-top-names h2 {
    font-size: 2rem;
  }

  .ceremony-top-names span {
    font-size: 1.5rem;
  }

  .dark-burgundy-ceremony-card {
    width: 100%;
    max-width: 95vw;
    padding: 30px 18px 30px 18px;
  }

  .card-right-floral,
  .card-left-floral {
    display: none;
  }

  .ceremony-card-inner {
    padding-right: 0;
  }

  .arabic-bismillah-small {
    font-size: 1.55rem;
  }

  .arabic-salutation-small {
    font-size: 0.85rem;
    margin-bottom: 14px;
  }

  .joyful-announcement {
    font-size: 0.72rem;
    letter-spacing: 1px;
    margin-bottom: 20px;
    line-height: 1.5;
  }

  .parents-lineage-row {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .parents-v-line {
    display: none;
  }

  .parents-col:first-child {
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
    width: 100%;
  }

  .parents-col:last-child {
    width: 100%;
  }

  .person-role-block .person-name {
    font-size: 1.65rem;
  }

  .ceremony-venue-block {
    margin: 18px 0;
    padding: 12px 0;
  }

  .venue-title {
    font-size: 1.15rem;
  }

  .venue-sub {
    font-size: 0.8rem;
  }

  .ceremony-time-date-grid {
    gap: 6px;
  }

  .ceremony-time-date-grid .lbl {
    font-size: 0.78rem;
  }

  .ceremony-time-date-grid .sub-lbl {
    font-size: 0.7rem;
  }

  .big-num-col .num {
    font-size: 2.3rem;
  }

  /* 3D Coverflow Gallery Mobile */
  .section-photo-gallery {
    margin-bottom: 50px;
  }

  .gallery-header h2 {
    font-size: 1.15rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
  }

  /* Sizes follow screen width so the photos fill the phone */
  .coverflow-wrapper {
    height: min(100vw, 490px);
  }

  .coverflow-slide {
    width: min(62vw, 300px);
    height: min(93vw, 450px);
    border-radius: 14px;
  }

  .coverflow-slide.slide-prev-1 {
    transform: translateX(max(-30vw, -150px)) scale(0.82) rotateY(25deg);
  }

  .coverflow-slide.slide-next-1 {
    transform: translateX(min(30vw, 150px)) scale(0.82) rotateY(-25deg);
  }

  .coverflow-slide.slide-prev-2 {
    transform: translateX(max(-46vw, -230px)) scale(0.65) rotateY(40deg);
    opacity: 0.2;
  }

  .coverflow-slide.slide-next-2 {
    transform: translateX(min(46vw, 230px)) scale(0.65) rotateY(-40deg);
    opacity: 0.2;
  }

  .coverflow-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

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

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

  /* Reception / Nikkah Card Mobile */
  .section-reception-card-wrapper {
    margin-bottom: 45px;
  }

  .dark-burgundy-reception-card {
    width: 100%;
    max-width: 95vw;
    padding: 30px 16px 35px 16px;
  }

  .reception-info-badge {
    font-size: 0.95rem;
    letter-spacing: 3px;
  }

  .reception-take-place-heading {
    font-size: 0.98rem;
    margin-bottom: 15px;
  }

  .reception-big-date-row .rec-num {
    font-size: 3.2rem;
  }

  .reception-milestones-row {
    gap: 25px;
  }

  .reception-calendar-card {
    padding: 16px 10px 20px 10px;
    width: 100%;
    max-width: 340px;
  }

  .cal-month-title {
    font-size: 1.85rem;
  }

  .cal-grid-days span {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  .highlight-date-heart {
    width: 26px;
    height: 26px;
  }

  /* Venue Map & QR Code Mobile */
  .section-venue-map-wrapper {
    margin-bottom: 45px;
    padding: 0 10px;
  }

  .venue-map-header h2 {
    font-size: 1.15rem;
    letter-spacing: 2px;
  }

  .venue-address-text {
    font-size: 0.88rem;
    margin-bottom: 20px;
  }

  .map-frame-box iframe {
    height: 280px;
  }

  /* Family Contacts & Dua */
  .details-paper-container {
    width: 100%;
    max-width: 95vw;
    padding: 28px 14px;
  }

  .family-contacts-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .contact-box {
    padding: 16px 10px;
  }

  .contact-box .names {
    font-size: clamp(0.85rem, 3.5vw, 0.95rem);
  }

  .dua-arabic {
    font-size: 1.45rem;
    line-height: 1.5;
  }

  .dua-english {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  /* Floating Audio Button */
  .audio-control-wrapper {
    top: 14px;
    right: 14px;
  }

  .audio-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

/* Small Smartphone Screen Adjustments (<= 400px) */
@media (max-width: 400px) {
  .corner-floral {
    width: 90px;
  }

  .couple-title {
    font-size: 1.6rem;
  }

  .ceremony-time-date-grid {
    justify-content: space-between;
  }

  .ceremony-time-date-grid .lbl {
    font-size: 0.72rem;
  }

  .ceremony-time-date-grid .sub-lbl {
    font-size: 0.65rem;
  }

  .big-num-col .num {
    font-size: 2rem;
  }

  .map-frame-box iframe {
    height: 240px;
  }

  .qr-code-img {
    width: 135px;
    height: 135px;
  }

  .phone-link {
    font-size: 1.05rem;
  }
}



/* Section headings on phones: larger and heavier so they don't look thin */
@media (max-width: 650px) {
  .save-the-date-header h2,
  .gallery-header h2,
  .venue-map-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.35;
  }
}

/* Cover card text on phones: bigger and clearer */
@media (max-width: 650px) {
  .couple-title {
    font-size: 2.3rem;
  }

  .couple-title .ampersand {
    font-size: 1.4rem;
  }

  .full-couple-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
  }

  .invitation-date {
    font-size: 1.05rem;
    font-weight: 600;
  }

  .invitation-subtext {
    font-size: 1rem;
    font-weight: 500;
  }

  .btn-open-sheen {
    font-size: 1.1rem;
  }

  .cover-bismillah {
    font-size: 1.5rem;
  }
}

/* Ceremony info card text on phones: bigger and clearer */
@media (max-width: 650px) {
  .ceremony-card-inner .ceremony-info-badge {
    font-size: 1rem;
    font-weight: 700;
  }

  .ceremony-card-inner .arabic-salutation-small {
    font-size: 1.05rem;
  }

  .ceremony-card-inner .joyful-announcement {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .ceremony-card-inner .p-label {
    font-size: 0.85rem;
    font-weight: 600;
  }

  .ceremony-card-inner .p-name {
    font-size: 1.3rem;
    font-weight: 600;
  }

  .ceremony-card-inner .p-sub {
    font-size: 0.95rem;
  }

  .ceremony-card-inner .person-name {
    font-size: 2.1rem;
  }

  .ceremony-card-inner .role-badge {
    font-size: 0.85rem;
    font-weight: 600;
  }

  .ceremony-card-inner .profession-text {
    font-size: 1.05rem;
  }

  .ceremony-card-inner .venue-heading {
    font-size: 0.85rem;
    font-weight: 600;
  }

  .ceremony-card-inner .venue-title {
    font-size: 1.6rem;
  }

  .ceremony-card-inner .venue-sub {
    font-size: 1rem;
  }

  .ceremony-card-inner .ceremony-time-date-grid .lbl {
    font-size: 0.95rem;
  }

  .ceremony-card-inner .ceremony-time-date-grid .sub-lbl {
    font-size: 0.85rem;
  }
}
