/* SCENES.CSS - Revised */

/* 1. Opening Scene */
#scene-opening {
    background: radial-gradient(circle at center, #fffcf5 0%, #f0ebd8 100%);
    z-index: 10000;
    /* High z-index but below loader (200000) */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    /* Allow scrolling within the welcome scene if content overflows */
}

.opening-title {
    font-family: 'Aref Ruqaa', serif;
    font-size: 4rem;
    color: var(--color-gold-dark);
    margin-bottom: 3rem;
    text-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 10;
}

#opening-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--color-gold-light);
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.fade-out {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 1s ease;
}

/* Loader Styles */
/* Loader Styles - Joyful & Celebratory */
.loader-container {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    /* Fallback */
    background: radial-gradient(circle at center, #fff1eb 0%, #ace0f9 100%);
    /* Soft celebratory gradient */
    z-index: 200000;
    /* Ensure it covers everything including navbar */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    /* Allow scroll from top if needed */
    align-items: center;
    flex-direction: column;
    text-align: center;
    overflow-y: auto;
    /* Scrollbar on viewport edge */
    padding-top: 2rem;
}

/* Background decorations for loader - Removed static text, using dynamic JS instead */

.loader-content {
    background: transparent;
    padding: 1rem;
    padding-top: 15vh;
    /* Push content down slightly since image is gone */
    box-shadow: none;
    backdrop-filter: none;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    height: auto;
    /* Let content dictate height */
    overflow: visible;
    /* No inner scrollbar */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    /* Center vertically */
}

.loader-image {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: none;
    box-shadow: none;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6));
    margin-bottom: 0.5rem;
    /* Significantly reduced to move verse up */
    animation: fadeIn 2s ease-out;
    flex-shrink: 0;
}

.quran-intro {
    font-family: 'Amiri', serif;
    /* Classic Quranic Naskh Style */
    color: var(--color-text-main);
    font-size: 2.4rem;
    /* Adjusted for Amiri readability */
    font-weight: 700;
    /* Bold for calligraphic effect */
    margin-bottom: 2rem;
    line-height: 2.2;
    /* Taller line height for diacritics */
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    min-height: 1.5em;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

/* Cursor Effect */
.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--color-gold-dark);
    margin-right: 2px;
    animation: blink 0.7s infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.loader-title {
    color: var(--color-gold-dark);
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'El Messiri', sans-serif;
}

.marriage-icons {
    font-size: 2rem;
    margin-top: 1.5rem;
    letter-spacing: 1rem;
    animation: fadePulse 2s infinite;
}

.loader-timer {
    font-size: 2.5rem;
    color: var(--color-gold-dark);
    margin-top: 2rem;
    font-family: 'El Messiri', sans-serif;
    border: 2px solid var(--color-gold-dark);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    animation: pulseText 1s infinite;
}

#floating-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-item {
    position: absolute;
    bottom: -50px;
    font-size: 2rem;
    animation: floatUp 6s linear infinite;
    opacity: 0.2;
    /* Very transparent as requested */
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes fadePulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.heart-icon {
    display: inline-block;
    color: #e63946;
    animation: heartBeat 1.5s infinite;
    font-size: 1.2em;
}

.loader-subtitle {
    color: #8d6e63;
    font-size: 1.5rem;
    letter-spacing: 2px;
    font-weight: 500;
    animation: pulseText 2s infinite;
}

@media (max-width: 600px) {
    .quran-intro {
        font-size: 1.6rem;
        line-height: 1.8;
        margin-bottom: 1rem;
    }
    .loader-title {
        font-size: 2.5rem;
    }
    .loader-timer {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 1.8rem;
    }
}

@keyframes floatAround {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.2);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}


/* 2. Hero Scene */
#scene-hero {
    background: transparent;
    /* Use body radial gradient */
    position: relative;
    overflow: hidden;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* 2. Swiper Hero Slider (10 Slides) */
#scene-hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    display: block;
    /* Override .full-screen flex properties to prevent Swiper collapse */
    z-index: 100;
}

.heroSwiper,
.heroSwiper .swiper-wrapper {
    width: 100%;
    height: 100vh;
    /* Force full viewport height */
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Force full viewport height on slides */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Background Image with slow zoom (Ken Burns) */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transform: scale(1);
    transition: transform 10s ease-out;
    /* Slow zoom out on activate */
}

.swiper-slide-active .slide-bg {
    transform: scale(1.1);
    /* Zoom in slowly while active */
}

/* Dark transparent overlay (30-40%) to ensure text is readable */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(30, 20, 15, 0.3), rgba(30, 20, 15, 0.5));
}

/* Slide Content Container */
.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 30px));
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
    width: 90%;
    opacity: 0;
    transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-slide-active .slide-content {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* Typographic Elements for Slides */
.slide-quran {
    font-family: 'Amiri', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--color-bg-deep);
    /* Ivory / off-white text for contrast */
    line-height: 2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    margin-bottom: 1rem;
}

.slide-ref {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--color-gold-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.slide-msg {
    font-family: 'Aref Ruqaa', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-gold-light);
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
}

.slide-names {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--color-gold-light);
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(to bottom, var(--color-bg-deep), var(--color-gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Swiper Pagination */
.swiper-pagination-bullet {
    background: var(--color-bg-deep);
    /* Ivory */
    opacity: 0.5;
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--color-gold-primary);
    /* Rose Gold / Gold */
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(230, 183, 169, 0.8);
}

/* Google Map Embed */
.map-container {
    width: 100%;
    max-width: 800px;
    margin: 2.5rem auto 0;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(201, 149, 108, 0.35);
    box-shadow:
        0 20px 60px rgba(74, 55, 40, 0.15),
        0 0 0 1px rgba(212, 175, 55, 0.1);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.map-container:hover {
    box-shadow:
        0 25px 70px rgba(74, 55, 40, 0.2),
        0 0 0 2px rgba(212, 175, 55, 0.25);
    transform: translateY(-4px);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 380px;
    border: 0;
}

.delay-4s { animation-delay: 4s; transition-delay: 4s; }

/* 3. Timeline (The Story) - Premium Professional Design */
#scene-timeline {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #fff8f0 0%, #fef0e8 50%, #fff8f0 100%);
    position: relative;
    overflow: hidden;
}

#scene-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(244, 194, 194, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(230, 183, 169, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.timeline-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

/* Vertical Center Line */
.timeline-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(230, 183, 169, 0.6) 10%,
            #e6b7a9 30%,
            #d4af37 50%,
            #e6b7a9 70%,
            rgba(230, 183, 169, 0.6) 90%,
            transparent 100%);
    border-radius: 3px;
}

.timeline-events {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    width: 100%;
}

/* Each timeline row */
.timeline-item {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 3.5rem;
    position: relative;
}

/* Alternating: odd items push card to LEFT, even items to RIGHT */
.timeline-item:nth-child(odd) {
    flex-direction: row;
    /* card on left, dot in center, empty right */
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
    /* card on right, dot in center, empty left */
}

/* The card itself */
.timeline-item .timeline-card {
    width: calc(50% - 50px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 8px 32px rgba(230, 183, 169, 0.18),
        0 2px 8px rgba(212, 175, 55, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(230, 183, 169, 0.4);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.timeline-item .timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f4c2c2, #e6b7a9, #d4af37, #e6b7a9, #f4c2c2);
    border-radius: 24px 24px 0 0;
}

.timeline-item .timeline-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(230, 183, 169, 0.3),
        0 8px 20px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(255, 255, 255, 0.98);
}

/* Center dot */
.timeline-item .timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #fff5f0, #fff);
    border: 3px solid #e6b7a9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    z-index: 3;
    box-shadow:
        0 0 0 6px rgba(230, 183, 169, 0.2),
        0 4px 20px rgba(230, 183, 169, 0.4);
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.timeline-item:hover .timeline-dot {
    border-color: #d4af37;
    box-shadow:
        0 0 0 10px rgba(212, 175, 55, 0.12),
        0 4px 25px rgba(212, 175, 55, 0.35);
    transform: translateX(-50%) scale(1.15);
}

/* Small connector line from card to dot */
.timeline-item:nth-child(odd) .timeline-card::after {
    content: '';
    position: absolute;
    right: -42px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 2px;
    background: linear-gradient(90deg, rgba(230, 183, 169, 0.6), rgba(230, 183, 169, 0.2));
}

.timeline-item:nth-child(even) .timeline-card::after {
    content: '';
    position: absolute;
    left: -42px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 2px;
    background: linear-gradient(90deg, rgba(230, 183, 169, 0.2), rgba(230, 183, 169, 0.6));
}

.timeline-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 8px rgba(244, 194, 194, 0.6));
    display: block;
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: #c9956c;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #c9956c, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-text {
    font-size: 1.1rem;
    color: #8c6d5a;
    line-height: 1.7;
    font-family: var(--font-body);
}

/* Mobile: Single column */
@media (max-width: 768px) {
    .timeline-line {
        left: 28px;
        transform: none;
    }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        flex-direction: row !important;
        align-items: flex-start;
        padding-right: 0;
    }

    .timeline-item .timeline-card {
        width: calc(100% - 80px);
        margin-right: 0;
        margin-left: auto;
        text-align: right;
    }

    .timeline-item .timeline-dot {
        left: 28px;
        top: 28px;
        transform: translateX(-50%);
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        position: absolute;
    }

    .timeline-item .timeline-card::after,
    .timeline-item:nth-child(even) .timeline-card::after {
        display: none;
    }
}



/* ==============================
   PREMIUM COUNTDOWN TIMER
   ============================== */

#scene-countdown {
    padding: 6rem 2rem;
    background: linear-gradient(160deg, #FDF6EE 0%, #F2E4D0 40%, #FAF0E4 70%, #FDF6EE 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
}

#scene-countdown::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201,149,108,0.1) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 50%, rgba(212,175,55,0.08) 0%, transparent 55%);
    pointer-events: none;
}

/* Decorative gold border top */
#scene-countdown::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #C9956C, #D4AF37, #C9956C, transparent);
}

.countdown-wrapper {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.countdown-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--color-gold-dark);
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #A07050, #D4AF37, #C9956C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 3.5rem;
    font-family: var(--font-body);
    letter-spacing: 0.08em;
}

.countdown-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.countdown-card {
    background: rgba(255, 250, 245, 0.85);
    border: 1.5px solid rgba(201, 149, 108, 0.4);
    border-radius: 20px;
    padding: 2rem 1.8rem 1.5rem;
    min-width: 130px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 30px rgba(160, 112, 80, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transition: all 0.4s ease;
}

.countdown-card::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    border-radius: 2px;
}

.countdown-card:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow:
        0 15px 45px rgba(160, 112, 80, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.95);
    transform: translateY(-5px);
}

.countdown-number {
    font-family: 'Courier New', monospace;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #A07050 0%, #D4AF37 45%, #C9956C 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.countdown-label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    font-family: var(--font-body);
}

.countdown-colon {
    font-size: 3.5rem;
    color: rgba(201, 149, 108, 0.5);
    font-weight: 300;
    line-height: 1;
    margin-bottom: 1.8rem;
    animation: colonBlink 1s ease-in-out infinite;
}

@keyframes colonBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.countdown-ring {
    font-size: 3rem;
    margin-top: 3rem;
    animation: float 3s ease-in-out infinite;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(201,149,108,0.35));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* Mobile */
@media (max-width: 600px) {
    .countdown-cards { gap: 0.5rem; }
    .countdown-card { min-width: 75px; padding: 1.2rem 0.8rem 1rem; border-radius: 14px; }
    .countdown-colon { font-size: 2rem; margin-bottom: 1.2rem; }
}


/* 4. Quran Verse */


#scene-quran {
    min-height: 60vh;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quran-container {
    border-top: 1px solid var(--color-gold-primary);
    border-bottom: 1px solid var(--color-gold-primary);
    padding: 3rem;
    max-width: 800px;
    position: relative;
}

.quran-container::before,
.quran-container::after {
    content: "❖";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-gold-primary);
    font-size: 1.5rem;
}

.quran-container::before {
    top: -1.2rem;
}

.quran-container::after {
    bottom: -1.7rem;
}

.quran-text {
    font-size: 1.8rem;
    line-height: 2.2;
    color: var(--color-text-main);
}

/* 5. Details Cards */
#scene-details {
    padding: var(--spacing-xl) 0;
}

.cards-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    perspective: 1000px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: var(--border-gold);
    box-shadow: var(--shadow-soft), inset 0 0 20px rgba(244, 194, 194, 0.1);
    width: 280px;
    padding: 3rem 1.5rem;
    border-radius: 16px;
    /* softer elegant edges */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-card::before {
    content: "";
    /* Rose Gold Overlay on Hover */
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(230, 183, 169, 0.15), transparent);
    transition: left 0.6s ease;
}

.detail-card:hover::before {
    left: 100%;
}

.detail-card:hover {
    box-shadow: 0 20px 45px rgba(230, 183, 169, 0.25);
}

.detail-card h3 {
    margin-bottom: 0.5rem;
    color: var(--color-gold-dark);
    font-size: 1.8rem;
}

.detail-card p {
    color: var(--color-text-muted);
}

.highlight-text {
    color: var(--color-text-main) !important;
    font-weight: bold;
    font-size: 1.3rem;
    margin-top: 0.8rem;
    display: block;
    text-shadow: none;
}

/* 6. Countdown */
.countdown-container {
    font-family: 'Amiri', serif;
    /* Or a number font */
    color: var(--color-gold-primary);
    gap: 2rem;
}

.countdown-unit span:first-child {
    font-size: 4rem;
    font-weight: 700;
}


/* 7. Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem;
}

.gallery-item {
    aspect-ratio: 1/1;
    /* Square photos */
    border-radius: 4px;
    background-color: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--color-gold-primary);
}


/* 8. RSVP Form - Envelope Style */
#scene-rsvp {
    background-color: #fdfbf7;
    color: #fcfbf4;
    padding: var(--spacing-xl) 0;
    overflow: hidden;
}

#scene-rsvp .section-title {
    color: #fcfbf4;
}

/* Base Envelope Container */
.rsvp-manuscript {
    background: transparent;
    width: 100%;
    max-width: 500px;
    position: relative;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 4rem auto 2rem;
    /* Give space for flap */
    transition: transform 0.4s ease;
}

/* The Envelope Back (Inside) - shows the texture */
.envelope-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/assets/paper-texture.png'), #e6dec3;
    background-blend-mode: multiply;
    border-radius: 4px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* The Envelope Front (Outside pocket) */
.envelope-front {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(135deg, var(--color-gold-dark) 0%, #a67c00 100%);
    border-radius: 0 0 4px 4px;
    z-index: 3;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    /* Create a V shape for the pocket using clip-path */
    clip-path: polygon(0 0, 50% 30%, 100% 0, 100% 100%, 0 100%);
    pointer-events: none;
    /* Let clicks pass through to the form */
}

/* The Top Flap */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(135deg, #e3c45b 0%, #bfa028 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 4;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Form Container (The Letter) */
.rsvp-letter {
    position: relative;
    background: url('/assets/paper-texture.png'), #fffcf5;
    background-blend-mode: multiply;
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 3rem 2rem 5rem 2rem;
    width: 90%;
    margin: 0 auto;
    border-radius: 4px;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.8s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Open Envelope State (Triggered on hover or active class via scroll) */
.rsvp-manuscript:hover .envelope-flap,
.rsvp-manuscript.active .envelope-flap {
    transform: rotateX(180deg);
    z-index: 0;
    /* Fall behind everything when open */
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.1);
}

.rsvp-manuscript:hover .rsvp-letter,
.rsvp-manuscript.active .rsvp-letter {
    transform: translateY(-40px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    z-index: 5;
    /* Come above the front pocket so inputs are clickable */
}

/* Ensure inputs in the form group sit correctly */

.form-group {
    margin-bottom: 1.5rem;
    text-align: right;
}

.form-group label {
    color: #fcfbf4;
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #fdfdfd;
    border: 1px solid var(--color-text-muted);
    border-radius: 4px;
    color: #333;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-gold-dark);
    background: #fff;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
    outline: none;
}

#scene-rsvp .cta-btn {
    border-color: #fcfbf4;
    color: #fcfbf4;
}

#scene-rsvp .cta-btn:hover {
    background: #fcfbf4;
    color: #fff;
}

/* --- Premium Welcome Cards Styles --- */
/* --- Premium Welcome Cards Styles --- */
.welcome-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    /* More breathing room */
    flex-wrap: wrap;
    margin-bottom: 3rem;
    perspective: 1200px;
    padding: 1rem;
}

.welcome-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 240, 0.9));
    backdrop-filter: blur(20px);
    border: var(--border-gold);
    box-shadow: var(--shadow-soft),
        inset 0 0 20px rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 3rem 2rem;
    width: 320px;
    max-width: 100%;
    /* Slightly wider */
    text-align: center;
    color: var(--color-text-main);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* Add a shimmer effect */
.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: 0.5s;
}

.welcome-card:hover::before {
    left: 100%;
}

.welcome-card:hover {
    transform: translateY(-15px) rotateX(2deg);
    box-shadow: 0 30px 60px rgba(230, 183, 169, 0.2);
    border-color: var(--color-gold-dark);
}

.card-icon {
    font-size: 4.5rem;
    /* Larger */
    margin-bottom: 1rem;
    filter: drop-shadow(0 5px 15px rgba(244, 194, 194, 0.4));
    transition: transform 0.3s ease;
}

.welcome-card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    /* Much larger */
    margin-bottom: 1.5rem;
    color: var(--color-gold-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(230, 183, 169, 0.3);
    padding-bottom: 1rem;
    display: inline-block;
}

.welcome-message {
    font-family: 'Amiri', serif;
    /* Switch to Amiri for better legibility */
    font-size: 1.4rem;
    line-height: 1.8;
    color: #4e342e;
    font-weight: 600;
}

/* Typing Indicator Animation - Enhanced */
.typing-indicator {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 2rem;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.typing-indicator span {
    width: 10px;
    height: 10px;
    background-color: var(--color-gold-dark);
    border-radius: 50%;
    margin: 0 4px;
    opacity: 0.4;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-6px);
        opacity: 1;
        image-rendering: pixelated;
    }
}

/* Utility to hide elements initially */
.hidden {
    display: none !important;
}

.fade-text {
    opacity: 0;
    animation: fadeIn 2s forwards;
    font-family: 'Aref Ruqaa', serif;
    font-size: 1.8rem;
    color: var(--color-text-main);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Premium CTA Button */
#start-btn {
    background: linear-gradient(135deg, var(--color-gold-dark) 0%, var(--color-gold-light) 100%);
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    letter-spacing: 0;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(230, 183, 169, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 1rem;
}

#start-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(230, 183, 169, 0.6);
}

@media (max-width: 600px) {
    .welcome-container {
        gap: 1.5rem;
        margin-bottom: 0.6rem;
        padding: 0.5rem;
    }
    .welcome-card {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 340px;
    }
    .card-icon {
        font-size: 3rem;
    }
    .card-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
        padding-bottom: 0.5rem;
    }
    .welcome-message {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    #start-btn {
        margin-top: -1rem;
        padding: 0.8rem 2rem;
        font-size: 1.2rem;
    }
}

/* --- End Welcome Cards --- */

/* ==============================
   PREMIUM RSVP SECTION
   ============================== */

#scene-rsvp {
    padding: 6rem 2rem;
    background: linear-gradient(160deg, #FDF6EE 0%, #F2E4D0 40%, #FAF0E4 70%, #FDF6EE 100%);
    position: relative;
    text-align: center;
}

#scene-rsvp::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(201,149,108,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(212,175,55,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.rsvp-wrapper {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.rsvp-header {
    margin-bottom: 2.5rem;
}

.rsvp-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(201,149,108,0.35));
    animation: float 3s ease-in-out infinite;
}

.rsvp-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    background: linear-gradient(135deg, #A07050, #D4AF37, #C9956C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
}

.rsvp-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    font-family: var(--font-body);
}

.rsvp-card {
    background: rgba(255, 252, 248, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    border: 1.5px solid rgba(201, 149, 108, 0.3);
    box-shadow:
        0 15px 50px rgba(160, 112, 80, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    position: relative;
    overflow: hidden;
}

.rsvp-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4AF37, #C9956C, #D4AF37, transparent);
    border-radius: 3px;
}

.rsvp-form-group {
    margin-bottom: 1.8rem;
    text-align: right;
}

.rsvp-form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-gold-dark, #A07050);
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.rsvp-form-group input,
.rsvp-form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid rgba(201, 149, 108, 0.35);
    border-radius: 14px;
    background: rgba(255, 250, 245, 0.7);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-main);
    direction: rtl;
    transition: all 0.3s ease;
    outline: none;
}

.rsvp-form-group input:focus,
.rsvp-form-group textarea:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12), 0 4px 15px rgba(201, 149, 108, 0.1);
    background: #FFFDF9;
}

.rsvp-form-group input::placeholder,
.rsvp-form-group textarea::placeholder {
    color: rgba(154, 123, 104, 0.5);
}

.rsvp-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.rsvp-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #A07050, #C9956C, #D4AF37);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(160, 112, 80, 0.25);
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.rsvp-submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(160, 112, 80, 0.35);
    background: linear-gradient(135deg, #8D5F42, #B88458, #C9A030);
}

.rsvp-success {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(138, 158, 122, 0.15);
    border: 1px solid rgba(138, 158, 122, 0.4);
    border-radius: 12px;
    color: #5A7A48;
    font-family: var(--font-body);
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .rsvp-card {
        padding: 2rem 1.5rem;
        border-radius: 18px;
    }
}
