
@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Aref+Ruqaa:wght@400;700&family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Great+Vibes&family=Montserrat:wght@300;400;500;600&family=Pinyon+Script&family=Reem+Kufi:wght@400;500;600;700&display=swap');

/* ==========================================================
   STAGE 1: THE PRISTINE CLOSED ENVELOPE (ZERO CLUTTER)
   ========================================================== */
.opening-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-color: #f7f2eb;
  z-index: 100;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.8s;
  cursor: pointer;
}

.opening-stage.stage-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-container {
  position: relative;
  width: auto;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #f7f2eb;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
  padding: 0;
  user-select: none;
}

/* Patch overlay seamlessly covering the bottom-right corner where AI sparkle resides */
.envelope-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 52px;
  height: 52px;
  background: radial-gradient(circle at bottom right, rgba(247, 242, 235, 0.98) 0%, rgba(247, 242, 235, 0) 75%);
  pointer-events: none;
  z-index: 25;
}

.envelope-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  pointer-events: none;
  background-color: #f7f2eb;
  /* Zoom 6.5% anchored to center to push AI sparkle watermark outside viewport cleanly */
  transform: scale(1.065);
  transform-origin: center center;
}

.wax-seal-hotspot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.seal-glow-ring {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0) 70%);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0);
  opacity: 0;
  transition: opacity 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.wax-seal-hotspot:hover .seal-glow-ring,
.wax-seal-hotspot:focus-visible .seal-glow-ring,
.wax-seal-hotspot:active .seal-glow-ring {
  opacity: 1;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.65);
  transform: scale(1.08);
}

.wax-seal-hotspot:active {
  transform: translate(-50%, -50%) scale(0.97);
}

.opening-active .wax-seal-hotspot {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================
   STAGE 2: W1 INTERIOR CONTAINER VISIBILITY
   ========================================================== */
.interior-stage {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s;
}

.interior-stage.stage-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Hero section without video */
.hero-section {
  background: radial-gradient(ellipse at 50% 40%, #fffbf2 0%, #f6ebdc 55%, #eddcc7 100%) !important;
}

/* Reopen Envelope Button */
.reopen-envelope-row {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 20px 0 40px;
  position: relative;
  z-index: 20;
}

.btn-reopen-envelope {
  background: #63471c;
  color: #fcf9f2;
  border: 1px solid #d4af37;
  padding: 10px 24px;
  border-radius: 30px;
  font-family: var(--font-arabic-body);
  font-size: 14.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(99, 71, 28, 0.25);
}

.btn-reopen-envelope:hover {
  background: #4a3414;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 71, 28, 0.35);
}

.btn-reopen-envelope i {
  font-size: 15px;
  color: #f3dfaa;
}

@media (max-width: 600px) {
  .envelope-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    aspect-ratio: auto;
    box-shadow: none;
    margin: 0;
  }

  .envelope-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
}


/* ==========================================================
   ROYAL LUXURY DIGITAL WEDDING INVITATION - STYLESHEET
   ========================================================== */

:root {
  --bg-page: #fbf5eb;
  --bg-page-soft: #f5ebd9;
  --bg-card: rgba(253, 250, 243, 0.94);
  --card-white: #ffffff;
  
  --gold-primary: #c59b48;
  --gold-light: #f3dfaa;
  --gold-dark: #8b6b29;
  --gold-accent: #9a7837;
  --gold-border: #d4b267;
  --gold-border-light: #e8d7ae;
  
  --text-main: #2a221b;
  --text-muted: #736455;
  --text-sub: #8c7d6d;
  
  --font-calligraphy: 'Great Vibes', 'Pinyon Script', cursive;
  --font-arabic-heading: 'Amiri', 'Aref Ruqaa', serif;
  --font-arabic-sub: 'Reem Kufi', 'Amiri', sans-serif;
  --font-arabic-body: 'Amiri', serif;
  --font-serif-en: 'Cormorant Garamond', 'Cinzel', serif;
  --font-sans: 'Montserrat', sans-serif;
  
  --shadow-soft: 0 10px 30px rgba(100, 75, 45, 0.07);
  --shadow-card: 0 15px 40px rgba(90, 68, 38, 0.1);
  --shadow-button: 0 6px 18px rgba(160, 125, 60, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html {
  scroll-behavior: smooth;
  background-color: #ffffff;
}

html.autoscrolling,
html.autoscrolling body,
html.autoscrolling .app-container {
  scroll-behavior: auto !important;
}

body {
  font-family: var(--font-arabic-body);
  background: #ffffff;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Floating Fullscreen Background Petals/Sparkles Canvas */
#globalPetalsCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 15;
}

/* ==========================================================
   APP MAIN WRAPPER (Exact Same Width & Height as Video - Not Full Width)
   ========================================================== */
.app-container {
  position: relative;
  width: auto;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  z-index: 10;
}

.app-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

@media (max-width: 600px) {
  .app-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    aspect-ratio: auto;
    box-shadow: none;
    margin: 0;
  }
}

/* ==========================================================
   SECTION 1: HERO SECTION (Continuous Video & Overlay)
   ========================================================== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  max-height: 900px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(250, 240, 220, 0.08) 0%, rgba(30, 22, 14, 0.28) 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-overlay-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 140px;
  background: linear-gradient(to top, var(--bg-page) 0%, rgba(251, 245, 235, 0) 100%);
  z-index: 3;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%;
  margin-top: 5vh;
  animation: fadeInHero 1.8s ease-out;
}

@keyframes fadeInHero {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


.hero-names-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-name {
  font-family: var(--font-calligraphy);
  font-size: clamp(2.6rem, 7.5vw, 3.6rem);
  font-weight: 400;
  color: #63471c;
  background: linear-gradient(180deg, #815e27 0%, #523a13 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.18;
  filter: drop-shadow(0 2px 5px rgba(255, 255, 255, 0.6));
}

.hero-separator {
  font-family: var(--font-calligraphy);
  font-size: clamp(2.2rem, 6.5vw, 2.9rem);
  color: #725220;
  background: linear-gradient(180deg, #8e682d 0%, #5d4217 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: -8px 0;
  line-height: 1;
}

.hero-date {
  font-family: var(--font-serif-en);
  font-size: clamp(1.45rem, 4.2vw, 1.8rem);
  font-weight: 500;
  color: #5c411a;
  letter-spacing: 2.5px;
  margin-top: 14px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.hero-scroll-cue {
  position: absolute;
  bottom: 24px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  animation: bounceSoft 2.2s infinite ease-in-out;
}

.hero-scroll-text {
  font-family: var(--font-arabic-sub);
  font-size: 0.85rem;
  color: #6d4f20;
}

.hero-scroll-icon {
  width: 20px;
  height: 20px;
  fill: #6d4f20;
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ==========================================================
   SECTION 2: ROYAL INVITATION CARD (LUXURY CREAM GOLD FRAME)
   ========================================================== */
.card-section {
  width: 100%;
  padding: 36px 16px 45px 16px;
  display: flex;
  justify-content: center;
}

.royal-invitation-card,
.royal-minimal-gold-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 16px 45px rgba(90, 68, 38, 0.08), 0 2px 10px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(225, 218, 208, 0.45);
  text-align: center;
  overflow: hidden;
}

.minimal-gold-frame-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 1;
}

.royal-minimal-gold-card .card-inner-content {
  position: relative;
  z-index: 2;
  /* Centered padding inside the gold corners and branch */
  padding: 55px 36px 95px 36px;
}

@media (max-width: 420px) {
  .royal-minimal-gold-card .card-inner-content {
    padding: 48px 24px 82px 24px;
  }
}

@media (max-width: 360px) {
  .royal-minimal-gold-card .card-inner-content {
    padding: 42px 18px 72px 18px;
  }
}

/* النجفة الكريستالية الملكية الفاخرة */
.royal-minimal-gold-card .card-chandelier-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -6px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
  transform-origin: top center;
  animation: gentleChandelierSway 6.5s infinite ease-in-out;
}

.royal-minimal-gold-card .card-chandelier-img {
  width: 140px;
  max-width: 50%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(185, 142, 60, 0.24));
}

@keyframes gentleChandelierSway {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(0.6deg);
  }
  75% {
    transform: rotate(-0.6deg);
  }
}

/* ترويسة أفراح آل اليازجي (بدون خطوط جانبية أو سفلية أو علوية، وبخط الأميري المطابق للعداد) */
.royal-minimal-gold-card .card-family-header {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.royal-minimal-gold-card .card-family-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: none !important;
}

.royal-minimal-gold-card .family-header-wing {
  display: none !important;
}

.royal-minimal-gold-card .card-family-title {
  font-family: 'Amiri', serif !important;
  font-size: 1.85rem;
  font-weight: 700;
  color: #3b2e21;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  line-height: 1.35;
  letter-spacing: 0.2px;
  text-align: center;
}

.royal-minimal-gold-card .card-basmalah-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 12px;
}

.royal-minimal-gold-card .card-basmalah-img {
  width: clamp(190px, 56vw, 245px);
  max-width: 88%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 8px rgba(114, 80, 26, 0.12));
  user-select: none;
  pointer-events: none;
}

.royal-minimal-gold-card .card-basmalah {
  font-family: var(--font-arabic-heading);
  font-size: 1.48rem;
  font-weight: 700;
  color: #1f1913;
  margin-bottom: 8px;
  line-height: 1.3;
}

.royal-minimal-gold-card .card-ayah-container {
  margin-top: 2px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.royal-minimal-gold-card .card-ayah-text {
  font-family: 'Amiri', serif;
  font-size: clamp(0.78rem, 2.6vw, 0.96rem);
  font-weight: 700;
  line-height: 1.85;
  color: #1a1510;
  direction: rtl;
  text-align: center;
  margin: 0 auto;
  width: 100%;
}

.royal-minimal-gold-card .card-ayah-text .ayah-line {
  display: block;
  white-space: nowrap;
  text-align: center;
  width: 100%;
}

.royal-minimal-gold-card .card-surah-info {
  font-family: 'Amiri', serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: #72501a;
  margin-top: 4px;
  display: block;
  text-align: center;
}

.royal-minimal-gold-card .card-arabic-body {
  direction: rtl;
  margin-bottom: 0;
}

.royal-minimal-gold-card .card-invitation-lead {
  font-family: var(--font-arabic-heading);
  font-size: 1.34rem;
  font-weight: 700;
  color: #1c1611;
  line-height: 1.45;
}

.royal-minimal-gold-card .card-invitation-sublead {
  font-family: var(--font-arabic-heading);
  font-size: 1.22rem;
  font-weight: 700;
  color: #241d16;
  line-height: 1.45;
}

.royal-minimal-gold-card .card-bride-name {
  font-family: var(--font-arabic-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #72501a;
  line-height: 1.45;
  margin-bottom: 4px;
}

.royal-minimal-gold-card .card-event-date-ar {
  font-family: var(--font-arabic-heading);
  font-size: 1.22rem;
  font-weight: 700;
  color: #1c1611;
  line-height: 1.45;
}

.royal-minimal-gold-card .card-venue-ar {
  font-family: var(--font-arabic-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #231c15;
  line-height: 1.4;
  margin-top: 3px;
}

.royal-minimal-gold-card .card-venue-hall-ar {
  color: #72501a;
  font-weight: 700;
}


.royal-minimal-gold-card .card-arrival-time-ar {
  font-family: var(--font-arabic-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #593c0f;
  margin-top: 4px;
}

/* ==========================================================
   SECTION 3: WEDDING COUNTDOWN TIMER (MINIMAL ROYAL LUXURY)
   ========================================================== */
.countdown-section {
  width: 100%;
  padding: 10px 16px 45px 16px;
  display: flex;
  justify-content: center;
}

.countdown-minimal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 855 / 797;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(225, 218, 208, 0.45);
  box-shadow: 0 16px 45px rgba(90, 68, 38, 0.08), 0 2px 10px rgba(0, 0, 0, 0.02);
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-frame-img {
  position: absolute;
  top: -5%;
  left: -8%;
  width: 116%;
  height: 110%;
  object-fit: fill;
  pointer-events: none;
  z-index: 1;
}

.countdown-minimal-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  /* Comfortable distance inside the gold frame */
  padding: 14% 12% 13% 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 1. Title in classical Amiri font (Enlarged and bold) */
.countdown-minimal-title {
  font-family: 'Amiri', serif;
  font-size: clamp(1.65rem, 5.2vw, 2.15rem);
  font-weight: 700;
  color: #3b2e21;
  letter-spacing: 0.2px;
  margin: 0 0 3px 0;
  line-height: 1.25;
  text-align: center;
}

/* Subtitle in Reem Kufi font (Enlarged) */
.countdown-minimal-sub {
  font-family: 'Reem Kufi', 'Amiri', sans-serif;
  font-size: clamp(0.92rem, 2.9vw, 1.15rem);
  font-weight: 500;
  color: #7f6e5b;
  margin: 0 0 8px 0;
  text-align: center;
  letter-spacing: 0.2px;
}

/* 2. Ultra-thin gold line below the title & subtitle */
.countdown-minimal-gold-line {
  width: 42px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(197, 168, 104, 0.75), transparent);
  margin: 0 auto 12px auto;
}

/* 3. Four numbers in one row with equal distribution (No boxes) - Ordered LTR: Days -> Hours -> Minutes -> Seconds */
.countdown-minimal-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  max-width: 350px;
  direction: ltr;
  margin: 0 auto 12px auto;
  padding: 0 4px;
}

.countdown-minimal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.countdown-minimal-num {
  font-family: 'Cormorant Garamond', 'Cinzel', serif;
  font-size: clamp(2.8rem, 9.2vw, 3.8rem);
  font-weight: 700;
  color: #3b2e21;
  line-height: 1;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.countdown-minimal-unit {
  font-family: 'Reem Kufi', 'Amiri', sans-serif;
  font-size: clamp(0.92rem, 2.9vw, 1.15rem);
  font-weight: 600;
  color: #72604d;
  letter-spacing: 0.2px;
}

/* Ultra-thin soft silver vertical divider */
.countdown-minimal-divider {
  width: 1px;
  height: clamp(34px, 7vw, 44px);
  background: linear-gradient(180deg, transparent, rgba(195, 198, 206, 0.6), transparent);
  flex-shrink: 0;
  margin: 6px 2px 0 2px;
}

/* 4. Blessing prayer in Reem Kufi font (Enlarged) */
.countdown-minimal-blessing {
  font-family: 'Reem Kufi', 'Amiri', sans-serif;
  font-size: clamp(0.92rem, 2.9vw, 1.18rem);
  font-weight: 600;
  color: #5a421a;
  letter-spacing: 0.2px;
  line-height: 1.5;
  direction: rtl;
  text-align: center;
  max-width: 340px;
  margin: 0 auto;
  padding: 0 2px;
}

@media (max-width: 420px) {
  .countdown-minimal-inner {
    padding: 14% 8% 12% 8%;
  }
  .countdown-minimal-title {
    font-size: clamp(1.48rem, 4.8vw, 1.85rem);
  }
  .countdown-minimal-sub {
    font-size: clamp(0.85rem, 2.7vw, 1.05rem);
    margin-bottom: 6px;
  }
  .countdown-minimal-gold-line {
    margin-bottom: 10px;
    width: 36px;
  }
  .countdown-minimal-grid {
    max-width: 310px;
    margin-bottom: 10px;
  }
  .countdown-minimal-num {
    font-size: clamp(2.35rem, 8vw, 3.2rem);
    font-weight: 700;
  }
  .countdown-minimal-unit {
    font-size: clamp(0.85rem, 2.7vw, 1.02rem);
  }
  .countdown-minimal-divider {
    height: clamp(30px, 6.5vw, 38px);
  }
  .countdown-minimal-blessing {
    font-size: clamp(0.85rem, 2.7vw, 1.05rem);
    max-width: 310px;
  }
}

@media (max-width: 360px) {
  .countdown-minimal-inner {
    padding: 13% 6% 11% 6%;
  }
  .countdown-minimal-title {
    font-size: 1.35rem;
  }
  .countdown-minimal-sub {
    font-size: 0.8rem;
    margin-bottom: 5px;
  }
  .countdown-minimal-gold-line {
    margin-bottom: 8px;
    width: 30px;
  }
  .countdown-minimal-grid {
    max-width: 275px;
    margin-bottom: 8px;
  }
  .countdown-minimal-num {
    font-size: 2.15rem;
    font-weight: 700;
  }
  .countdown-minimal-unit {
    font-size: 0.8rem;
  }
  .countdown-minimal-divider {
    height: 26px;
  }
  .countdown-minimal-blessing {
    font-size: 0.8rem;
    max-width: 270px;
  }
}

/* ==========================================================
   SECTION 4: SAVE THE DATE / CALENDAR
   ========================================================== */
.section-wrapper {
  width: 100%;
  padding: 20px 18px 45px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.classical-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 380px;
  margin-bottom: 22px;
}

.classical-section-header .header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c5a059, #c5a059, transparent);
  opacity: 0.7;
}

.classical-section-header .header-title {
  font-family: var(--font-serif-en);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 4px;
  color: #93733a;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ==========================================================
   SAVE THE DATE CARD (BOTANICAL GOLD LUXURY CARD)
   ========================================================== */
.save-the-date-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(225, 218, 208, 0.45);
  box-shadow: 0 16px 45px rgba(90, 68, 38, 0.08), 0 2px 10px rgba(0, 0, 0, 0.02);
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.save-date-frame-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 1;
}

.save-date-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  direction: ltr;
  padding: 8% 8%;
  width: 100%;
  height: 100%;
}

.save-date-tag {
  font-family: var(--font-serif-en);
  font-size: clamp(0.78rem, 2.3vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 4px;
  text-indent: 4px;
  text-transform: uppercase;
  color: #72501a;
  margin-bottom: 6px;
  padding: 0;
  display: block;
  width: 100%;
  text-align: center;
}

.save-date-day {
  font-family: var(--font-serif-en);
  font-size: clamp(3.8rem, 12vw, 4.8rem);
  font-weight: 600;
  color: #2c221a;
  line-height: 0.96;
  letter-spacing: -1px;
  margin: 0;
  display: block;
  width: 100%;
  text-align: center;
}

.save-date-month {
  font-family: 'Great Vibes', 'Alex Brush', cursive;
  font-size: clamp(1.9rem, 6.2vw, 2.5rem);
  font-weight: 400;
  color: #72501a;
  line-height: 1.1;
  margin-top: 4px;
  margin-bottom: 4px;
  display: block;
  width: 100%;
  text-align: center;
}

.save-date-year {
  font-family: var(--font-serif-en);
  font-size: clamp(0.85rem, 2.6vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 5px;
  text-indent: 5px;
  color: #7f6e5b;
  margin-top: 4px;
  padding: 0;
  display: block;
  width: 100%;
  text-align: center;
}

.calendar-sub-date-ar {
  font-family: var(--font-arabic-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #4a3c2e;
  margin-top: 18px;
  direction: rtl;
  text-align: center;
}

.calendar-actions-row {
  display: flex;
  width: 100%;
  max-width: 440px;
  margin-top: 14px;
}

.btn-gold-sm {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  background: #f4ead8;
  color: #785a22;
  border: 1.5px solid #d8c292;
  border-radius: 12px;
  font-family: var(--font-arabic-sub);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(120, 90, 40, 0.08);
  transition: all 0.25s ease;
}

.btn-gold-sm .btn-fa-icon {
  font-size: 1.1rem;
  color: #8c6a28;
  margin-left: 2px;
}

.btn-gold-sm:hover {
  background: #eadbc2;
  border-color: #c5a76c;
  transform: translateY(-1px);
}

/* ==========================================================
   SECTION 5: RSVP SECTION
   ========================================================== */
.rsvp-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 380px;
  margin-bottom: 12px;
}

.rsvp-section-header .header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c5a059, #c5a059, transparent);
  opacity: 0.7;
}

.rsvp-section-header .header-title {
  font-family: var(--font-serif-en);
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: 3px;
  color: #93733a;
}

.rsvp-main-title {
  font-family: var(--font-arabic-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #241d17;
  margin-bottom: 6px;
  direction: rtl;
  text-align: center;
}

.rsvp-description {
  font-family: var(--font-arabic-body);
  font-size: 0.95rem;
  color: #6d5e50;
  margin-bottom: 22px;
  direction: rtl;
  text-align: center;
  max-width: 360px;
  line-height: 1.5;
}

.rsvp-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 20px;
  padding: 26px 20px 24px 20px;
  box-shadow: 0 12px 35px rgba(120, 90, 50, 0.08);
  border: 1px solid rgba(220, 195, 145, 0.45);
  direction: rtl;
  text-align: right;
}

.rsvp-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.rsvp-form-label {
  font-family: var(--font-arabic-sub);
  font-size: 0.88rem;
  color: #726252;
}

.rsvp-input,
.rsvp-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2d2ba;
  background-color: #fcfaf6;
  font-family: var(--font-arabic-body);
  font-size: 0.98rem;
  color: #2c221a;
  outline: none;
  transition: all 0.3s ease;
}

.rsvp-input::placeholder,
.rsvp-textarea::placeholder {
  color: #a89886;
  font-size: 0.92rem;
}

.rsvp-input:focus,
.rsvp-textarea:focus {
  border-color: #bfa163;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(191, 161, 99, 0.18);
}

.rsvp-textarea {
  min-height: 85px;
  resize: vertical;
}

/* RSVP Required star */
.required-star {
  color: #b28235;
  font-weight: bold;
}

/* Inline Arabic field errors */
.rsvp-field-error {
  display: none;
  font-family: var(--font-arabic-sub);
  font-size: 0.82rem;
  color: #b83232;
  margin-top: 3px;
  font-weight: 600;
  line-height: 1.3;
}

.rsvp-field-error.visible {
  display: block;
  animation: fadeInSoft 0.3s ease-out;
}

.rsvp-input.input-error {
  border-color: #b83232 !important;
  background-color: #fff9f9 !important;
}

/* Attendance Choice Pills */
.rsvp-attendance-pills {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 2px;
}

.rsvp-pill-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: #fcfaf6;
  border: 1.5px solid #dfd1bc;
  border-radius: 25px;
  font-family: var(--font-arabic-sub);
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a3b2b;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.rsvp-pill-btn:hover {
  border-color: #b2945a;
  background: #f8f4ec;
}

.rsvp-pill-btn.active {
  background: linear-gradient(135deg, #b9985b 0%, #8e733f 100%);
  border-color: #8e733f;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(142, 115, 63, 0.28);
}

.rsvp-pill-btn .pill-check-icon {
  font-size: 0.82rem;
  display: none;
}

.rsvp-pill-btn.active .pill-check-icon {
  display: inline-block;
}

/* Stepper for Guest Count */
.rsvp-stepper-box {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 180px;
  background: #fcfaf6;
  border: 1.5px solid #dfd1bc;
  border-radius: 25px;
  padding: 4px;
  margin-top: 2px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #d8c8b2;
  border-radius: 50%;
  font-family: var(--font-serif-en);
  font-size: 1.3rem;
  font-weight: 600;
  color: #634b22;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  user-select: none;
}

.stepper-btn:hover:not(:disabled) {
  background: #f4ecdd;
  border-color: #b2945a;
  color: #3d2a0c;
  transform: scale(1.05);
}

.stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper-value {
  font-family: var(--font-serif-en);
  font-size: 1.35rem;
  font-weight: 700;
  color: #2c221a;
  min-width: 40px;
  text-align: center;
}

/* Soft Gold Success Message */
.rsvp-success-message {
  margin-top: 14px;
  padding: 16px 14px;
  background: linear-gradient(135deg, rgba(252, 248, 240, 0.95) 0%, rgba(246, 237, 220, 0.95) 100%);
  border: 1.5px solid #d4af55;
  border-radius: 14px;
  text-align: center;
  animation: fadeInSoft 0.5s ease-out;
  box-shadow: 0 6px 18px rgba(114, 80, 26, 0.08);
}

.rsvp-success-icon {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.rsvp-success-text {
  font-family: var(--font-arabic-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #5c4217;
  line-height: 1.5;
  margin: 0;
}

.btn-brass-submit {
  width: 100%;
  padding: 13px 18px;
  background: #9d814d;
  background: linear-gradient(180deg, #b2945a 0%, #8e733f 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-arabic-sub);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(142, 115, 63, 0.3);
  transition: all 0.3s ease;
}

.btn-brass-submit:hover:not(:disabled) {
  background: linear-gradient(180deg, #be9f63 0%, #997c45 100%);
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(142, 115, 63, 0.4);
}

.btn-brass-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.invitation-footer {
  width: 100%;
  padding: 40px 20px calc(85px + env(safe-area-inset-bottom)) 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-monogram {
  font-family: var(--font-calligraphy);
  font-size: 2.8rem;
  color: #93733a;
  line-height: 1;
}

.footer-family-header {
  font-family: 'Amiri', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #3b2e21;
  margin-top: -4px;
}

.footer-message {
  font-family: var(--font-arabic-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c221a;
  direction: rtl;
}

.footer-sub {
  font-size: 0.9rem;
  color: #7b6c5c;
}

/* Designer Instagram Credit Badge */
.designer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(197, 155, 72, 0.35);
  border-radius: 20px;
  text-decoration: none;
  color: #7b6238;
  font-family: var(--font-arabic-sub);
  font-size: 0.85rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(100, 75, 45, 0.04);
}

.designer-badge:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--gold-primary);
  color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(197, 155, 72, 0.2);
}

.instagram-icon {
  width: 16px;
  height: 16px;
  fill: #c59b48;
  transition: transform 0.3s ease;
}

.designer-badge:hover .instagram-icon {
  transform: scale(1.15);
}

.designer-text strong {
  font-weight: 700;
  color: #5c441c;
}

/* ==========================================================
   FLOATING AUTO-SCROLL CONTROLLER
   ========================================================== */
/* منع السكرول نهائياً طالما الظرف مغلق */
html:not(.envelope-opened),
body:not(.envelope-opened) {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
}

/* إخفاء زر التمرير التلقائي تماماً قبل فتح الظرف (موجود على الجانب الأيمن) */
.autoscroll-control-container {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  left: auto;
  z-index: 100;
  display: none !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* إظهار زر التمرير التلقائي فقط بعد فتح الظرف */
body.envelope-opened .autoscroll-control-container,
html.envelope-opened .autoscroll-control-container {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.autoscroll-toggle-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: rgba(40, 30, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 85, 0.55);
  border-radius: 17px;
  color: #f7eacc;
  font-family: var(--font-arabic-sub);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: all 0.25s ease;
  direction: rtl;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.autoscroll-toggle-btn:hover {
  background: rgba(40, 30, 20, 0.88);
  border-color: var(--gold-primary);
  transform: scale(1.02);
}

.autoscroll-pulse-ring {
  position: absolute;
  inset: -2px;
  border-radius: 19px;
  border: 1.2px solid var(--gold-primary);
  opacity: 0;
  pointer-events: none;
}

.autoscroll-toggle-btn.active .autoscroll-pulse-ring {
  animation: pulseButtonRing 2.5s infinite;
}

@keyframes pulseButtonRing {
  0% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 0; }
  100% { transform: scale(0.98); opacity: 0; }
}

.autoscroll-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.autoscroll-svg-icon {
  width: 14px;
  height: 14px;
  fill: #e8c67c;
  transition: transform 0.2s ease;
}

/* Toggle icon display based on active state */
.autoscroll-toggle-btn.active .icon-pause {
  display: block;
}
.autoscroll-toggle-btn.active .icon-play {
  display: none;
}

.autoscroll-toggle-btn:not(.active) .icon-pause {
  display: none;
}
.autoscroll-toggle-btn:not(.active) .icon-play {
  display: block;
}

.autoscroll-toggle-btn:not(.active) {
  opacity: 0.8;
  background: rgba(40, 30, 20, 0.7);
  border-color: rgba(212, 175, 85, 0.35);
}

/* Toast Alert */
.toast-alert {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: #251e18;
  color: #f7e8cb;
  border: 1px solid var(--gold-primary);
  padding: 14px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  direction: rtl;
  pointer-events: none;
}

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

/* ==========================================================
   ADVANCED MOBILE-FIRST RESPONSIVE MEDIA QUERIES
   ========================================================== */

/* للهواتف المتوسطة والصغيرة (أقل من 420px) */
@media screen and (max-width: 420px) {
  .hero-name {
    font-size: 2.4rem;
  }

  .hero-separator {
    font-size: 2rem;
  }

  .hero-date {
    font-size: 1.35rem;
    letter-spacing: 2px;
  }

  .royal-minimal-gold-card {
    border-radius: 10px !important;
    padding: 0 !important;
  }

  .card-family-title {
    font-size: 1.6rem;
  }

  .card-basmalah {
    font-size: 1.45rem;
  }

  .card-ayah-text {
    font-size: clamp(0.76rem, 2.5vw, 0.88rem);
    line-height: 1.85;
    letter-spacing: -0.2px;
  }

  .card-invitation-lead,
  .card-bride-name {
    font-size: 1.3rem;
  }

  .card-invitation-sublead,
  .card-event-date-ar,
  .card-venue-hall-ar {
    font-size: 1.2rem;
  }

  .card-venue-ar,
  .card-arrival-time-ar {
    font-size: 1.15rem;
  }

  .corner-flourish {
    width: 85px;
  }

  .rsvp-card {
    padding: 20px 14px;
  }

  .save-the-date-card {
    border-radius: 10px !important;
  }

  .rsvp-main-title {
    font-size: 1.75rem;
  }

  .autoscroll-control-container {
    bottom: calc(14px + env(safe-area-inset-bottom));
    right: max(12px, env(safe-area-inset-right));
    left: auto;
  }

  .autoscroll-toggle-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
}

/* للهواتف الصغيرة جداً (أقل من 360px مثل iPhone SE) */
@media screen and (max-width: 360px) {
  .hero-name {
    font-size: 2.1rem;
  }

  .hero-separator {
    font-size: 1.8rem;
  }

  .hero-date {
    font-size: 1.2rem;
    letter-spacing: 1.5px;
  }

  .royal-minimal-gold-card {
    border-radius: 8px !important;
    padding: 0 !important;
  }

  .card-family-title {
    font-size: 1.45rem;
  }

  .card-basmalah {
    font-size: 1.3rem;
  }

  .card-basmalah-img {
    width: 175px;
  }

  .card-ayah-text {
    font-size: 0.72rem !important;
    line-height: 1.85;
    letter-spacing: -0.3px;
  }

  .card-invitation-lead,
  .card-bride-name {
    font-size: 1.18rem;
  }

  .corner-flourish {
    width: 70px;
  }


  .save-the-date-card {
    border-radius: 8px !important;
  }

  .rsvp-main-title {
    font-size: 1.55rem;
  }

  .designer-badge {
    font-size: 0.78rem;
    padding: 6px 12px;
  }
}
