/* =====================================================
   DIVINE TEMPLE — The Sacred Kanjeevaram
   Color: Turmeric #E8B534, Kumkum #C0392B, Bronze #B8860B
   ===================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --turmeric: #E8B534;
    --kumkum: #C0392B;
    --bronze: #B8860B;
    --saffron-dark: #1A0A00;
    --saffron-mid: #2A1500;
    --cream: #FFF8E7;
    --muted: #B89A6A;
    --font-display: 'Tiro Devanagari Hindi', serif;
    --font-body: 'Noto Serif', serif;
    --font-script: 'Great Vibes', cursive;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--saffron-dark);
    color: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Base Interactions */
* { -webkit-tap-highlight-color: transparent; }
button, a, .event-row { outline: none !important; user-select: none; }

/* --- LOADER & LANG --- */
.lang-switch {
    position: fixed; top: 16px; right: 16px; z-index: 1000;
    background: rgba(184, 134, 11, 0.25); backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 181, 52, 0.3); border-radius: 20px;
    padding: 6px 16px; cursor: pointer; font-size: 0.7rem;
    color: var(--turmeric); font-weight: 600;
    transition: all 0.3s ease;
}
.lang-switch:active { transform: scale(0.92); }

.loader-overlay {
    position: fixed; inset: 0; z-index: 9999; background: var(--saffron-dark);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.diya-spinner {
    width: 120px; height: 120px; object-fit: contain;
    animation: diya-flicker 1.5s ease-in-out infinite alternate;
}
@keyframes diya-flicker {
    0% { filter: drop-shadow(0 0 20px rgba(232, 181, 52, 0.4)) brightness(0.9); }
    100% { filter: drop-shadow(0 0 40px rgba(232, 181, 52, 0.8)) brightness(1.1); }
}
.loading-text { font-family: var(--font-display); color: var(--turmeric); letter-spacing: 0.15em; opacity: 0; }

/* --- HERO SECTION --- */
.hero-section {
    position: relative; min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0; background: url('images/temple-bg.webp') center/cover no-repeat; opacity: 0;
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(26, 10, 0, 0.7) 0%, rgba(26, 10, 0, 0.4) 40%, rgba(26, 10, 0, 0.8) 100%);
}

.hero-content { position: relative; z-index: 10; text-align: center; padding: 30px 20px; opacity: 0; }

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
    margin-top: 50px; /* Forces it to sit below the border naturally */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0.8;
    animation: gentle-bounce 2.5s infinite ease-in-out;
}

.scroll-indicator .bell-icon {
    font-size: 1.2rem;
    color: var(--turmeric);
    animation: bell-ring 3s infinite; transform-origin: top center;
}

.scroll-indicator span {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--muted);
    text-transform: uppercase;
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--turmeric), transparent);
}

/* Updated animation since we removed absolute positioning */
@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.temple-border {
    border: 2px solid var(--bronze); border-radius: 12px;
    padding: 70px 40px 50px; position: relative;
    background: rgba(26, 10, 0, 0.7); backdrop-filter: blur(12px);
    width: 95%; max-width: 650px; margin: 0 auto;
    box-shadow: 0 0 60px rgba(232, 181, 52, 0.25);
}
.temple-border::before {
    content: '🪔'; position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    font-size: 1.8rem; filter: drop-shadow(0 0 10px rgba(232, 181, 52, 0.6));
}

.auspicious-symbol { font-family: var(--font-display); font-size: 0.85rem; color: var(--kumkum); margin-bottom: 20px; text-shadow: 0 0 15px rgba(192, 57, 43, 0.4); }
.couple-names { font-family: var(--font-script); font-size: clamp(3.5rem, 10vw, 5.5rem); color: var(--turmeric); text-shadow: 0 4px 50px rgba(232, 181, 52, 0.4); margin-bottom: 25px; line-height: 1.1; }
.intro-tag, .date-loc { color: var(--muted); letter-spacing: 0.15em; font-size: 0.85rem; }
.venue-link { color: var(--turmeric); text-decoration: none; }

/* --- TIMELINE --- */
.timeline-section {
    position: relative; padding: 120px 20px 80px;
    background: linear-gradient(180deg, rgba(26, 10, 0, 1) 0%, rgba(42, 21, 0, 1) 50%, rgba(26, 10, 0, 1) 100%);
}
.section-title { font-family: var(--font-display); font-size: 1.8rem; text-align: center; color: var(--turmeric); margin-bottom: 50px; letter-spacing: 0.1em; }

.timeline-container { max-width: 600px; margin: 0 auto; position: relative; }
.timeline-line { position: absolute; left: 50%; top: 0; width: 2px; height: 100%; background: linear-gradient(180deg, var(--bronze), var(--turmeric), var(--bronze)); transform: translateX(-50%); opacity: 0.4; }

.event-row { display: flex; align-items: flex-start; margin-bottom: 40px; position: relative; cursor: pointer; transition: transform 0.2s; }
.event-row:active { transform: scale(0.98); }
.event-row.left { padding-right: 55%; }
.event-row.right { padding-left: 55%; justify-content: flex-end; }

.event-dot { position: absolute; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; background: var(--saffron-dark); border: 2px solid var(--bronze); display: flex; align-items: center; justify-content: center; color: var(--turmeric); font-size: 0.7rem; z-index: 2; }

.event-card {
    background: rgba(42, 21, 0, 0.6); backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 134, 11, 0.25); border-radius: 10px; padding: 20px;
    transition: all 0.4s ease;
}
/* Point 6 Fix: Mobile breath/glow class injected via JS */
.event-card.mobile-glow, .event-card:hover { border-color: var(--turmeric); box-shadow: 0 0 30px rgba(232, 181, 52, 0.2); }
.event-card.highlight { border-color: var(--kumkum); background: rgba(192, 57, 43, 0.08); }

.event-card h3 { font-family: var(--font-display); color: var(--turmeric); font-size: 1.1rem; margin-bottom: 6px; }
.event-card .time { font-size: 0.75rem; color: var(--kumkum); letter-spacing: 0.08em; margin-bottom: 8px; }
.event-card .desc { font-size: 0.85rem; color: var(--muted); }
.tap-hint { margin-top: 10px; font-size: 0.7rem; color: var(--bronze); opacity: 0.6; transition: opacity 0.3s; }
.event-card:hover .tap-hint, .event-card.mobile-glow .tap-hint { opacity: 1; }

/* Point 4 Fix: Petals start strictly from the top and fall smoothly */
.falling-petal {
    position: absolute; top: -20px; left: 0; pointer-events: none;
    width: 10px; height: 10px; border-radius: 50% 50% 50% 0;
    background: var(--turmeric); opacity: 0.6; z-index: 1;
}
.falling-petal:nth-child(odd) { background: #E67E22; }

/* Point 2 Fix: Clear visual divider before footer */
.sacred-divider {
    width: 100%; height: 4px;
    background: linear-gradient(90deg, transparent, var(--bronze), transparent);
    opacity: 0.6;
}

/* --- FOOTER / SHAGUN --- */
.footer-section {
    padding: 80px 20px 60px; 
    text-align: center; 
    position: relative;
    /* A deep, velvety radial glow instead of a repeated image */
    background: radial-gradient(circle at top, #2A0800 0%, #0D0400 100%);
    border-top: 2px solid rgba(184, 134, 11, 0.3);
}

.shagun-box {
    max-width: 400px; 
    margin: 0 auto 50px; 
    padding: 45px 30px;
    border-radius: 16px;
    /* A rich, dark interior with a double-gold border effect */
    background: linear-gradient(145deg, #220B00, #140500);
    border: 1px solid var(--turmeric);
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), 
                inset 0 0 0 2px rgba(232, 181, 52, 0.15), 
                inset 0 0 30px rgba(184, 134, 11, 0.1);
    position: relative;
    overflow: hidden;
}

/* Adds a glowing golden bar to the top edge of the Shagun box */
.shagun-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--turmeric), transparent);
}

.gold-icon { 
    font-size: 2.2rem; 
    color: var(--turmeric); 
    margin-bottom: 15px; 
    filter: drop-shadow(0 0 15px rgba(232, 181, 52, 0.5)); 
}

.shagun-box h3 { 
    font-family: var(--font-display); 
    color: var(--turmeric); 
    font-size: 1.4rem; 
    margin-bottom: 12px; 
}

/* Mobile Tap interactions */
.shagun-trigger-btn {
    background: linear-gradient(135deg, var(--turmeric), var(--bronze));
    color: #1A0A00; 
    border: none; 
    padding: 14px 35px; 
    border-radius: 30px;
    font-family: var(--font-body); 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s ease;
    letter-spacing: 0.05em; 
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(232, 181, 52, 0.3);
}

.shagun-trigger-btn:hover {
    box-shadow: 0 8px 25px rgba(232, 181, 52, 0.5);
    transform: translateY(-2px);
}

.shagun-trigger-btn:active { transform: scale(0.95); }

/* Thematic WhatsApp Button */
.whatsapp-btn.theme-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, var(--kumkum), #8B0000);
    border: 1px solid rgba(184, 134, 11, 0.4); color: var(--cream);
    padding: 14px 30px; border-radius: 30px; text-decoration: none;
    font-size: 0.9rem; font-weight: 600; transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(192, 57, 43, 0.3);
}

.whatsapp-btn.theme-btn:active { transform: scale(0.95); box-shadow: 0 2px 10px rgba(192, 57, 43, 0.5); }

.hashtag {
    font-family: var(--font-display);
    color: var(--turmeric);
    font-size: 1.3rem;
    margin: 45px 0 15px;
    letter-spacing: 0.15em;
    text-shadow: 0 0 20px rgba(232, 181, 52, 0.3);
}

.credit-link {
    color: var(--muted);
    font-size: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.1em;
    opacity: 0.6;
    transition: all 0.3s ease;
    display: inline-block;
}
.credit-link:hover {
    opacity: 1;
    color: var(--turmeric);
}
/* --- SHAGUN ENVELOPE MODAL --- */
/* Point 5 Fix: Contextual blurred background and textured silk envelope */
.shagun-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(26, 10, 0, 0.85) url('images/temple-bg.webp') center/cover;
    background-blend-mode: multiply; backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9100; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.shagun-modal-overlay.active { opacity: 1; pointer-events: all; }

.envelope-container { perspective: 1500px; width: 340px; height: 240px; position: relative; cursor: pointer; }

/* Adding Silk Texture to Envelope parts */
.kanjeevaram-envelope { 
    width: 100%; height: 100%; position: relative; transform-style: preserve-3d;
    background: linear-gradient(rgba(62, 14, 14, 0.9), rgba(62, 14, 14, 0.9)), url('images/temple-bg.webp');
    background-size: cover; box-shadow: 0 30px 60px rgba(0,0,0,0.8); 
}
.envelope-flap-wrapper {
    position: absolute; top: 0; left: 0; width: 100%; height: 50%;
    transform-origin: top; transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1); z-index: 6;
}
.envelope-flap-triangle {
    width: 100%; height: 100%;
    background: linear-gradient(rgba(74, 18, 18, 0.95), rgba(74, 18, 18, 0.95)), url('images/temple-bg.webp');
    background-size: cover; clip-path: polygon(0 0, 50% 100%, 100% 0);
    border-top: 1px solid rgba(232, 181, 52, 0.4);
}
.envelope-pocket { 
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(rgba(62, 14, 14, 0.95), rgba(62, 14, 14, 0.95)), url('images/temple-bg.webp'); 
    background-size: cover; clip-path: polygon(0 100%, 50% 50%, 100% 100%); z-index: 5; 
}
.envelope-sides { 
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; 
    background: #2b0a0a; clip-path: polygon(0 0, 0 100%, 60% 50%); z-index: 4; 
}
.envelope-sides.right { transform: scaleX(-1); }

.envelope-card { 
    position: absolute; width: 90%; height: 95%; background: var(--cream); left: 5%; bottom: 0; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1); z-index: 2; border: 2px solid var(--bronze); color: var(--saffron-dark); 
}

/* Flap Opens */
.envelope-container.open .envelope-flap-wrapper { transform: rotateX(180deg); z-index: 1; }
.envelope-container.open .envelope-card { transform: translateY(-140px); z-index: 7; }

/* Point 5 Fix: Seal is now outside the clip-path, and counter-rotates when opened so it stays upright! */
.wax-seal { 
    position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); 
    width: 45px; height: 45px; background: var(--kumkum); border-radius: 50%; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); z-index: 10; display: flex; 
    justify-content: center; align-items: center; border: 3px double #8B4513; 
    color: white; transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.envelope-container.open .wax-seal { 
    /* Counter rotate so Om stays upright when flap falls backward */
    transform: translateX(-50%) rotateX(-180deg); 
    opacity: 0; /* Fades out smoothly like a broken seal */
}

/* --- CALENDAR MODAL --- */
#calendar-modal {
    display: none; /* Hides it from the footer by default */
    position: fixed;
    inset: 0;
    background: rgba(26, 10, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 9200;
}

.modal-card {
    background: linear-gradient(rgba(42, 21, 0, 0.95), rgba(42, 21, 0, 0.95)), url('images/temple-bg.webp') center/cover;
    border: 1px solid var(--turmeric);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    max-width: 90%;
    width: 350px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.modal-card h3 {
    font-family: var(--font-display);
    color: var(--turmeric);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-card p {
    color: var(--muted);
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
}

.cal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    color: var(--saffron-dark);
    font-size: 0.9rem;
    transition: transform 0.2s;
    background: linear-gradient(135deg, var(--bronze), var(--turmeric));
}

.cal-btn:active {
    transform: scale(0.95);
}

.close-btn {
    background: transparent;
    border: 1px solid var(--muted);
    color: var(--turmeric);
    padding: 8px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(184, 134, 11, 0.15);
}

/* Modals & Media Queries */
.modal-close-area { position: absolute; top: 20px; right: 25px; color: var(--cream); font-size: 2.5rem; cursor: pointer; z-index: 10; }

@media (max-width: 768px) {
    /* Gave the box more top and bottom padding for breathing room */
    .temple-border { 
        padding: 60px 25px 45px; 
    }
    
    /* Added more space below the top Sanskrit line */
    .auspicious-symbol { 
        margin-bottom: 25px; 
    }
    
    /* Pushed the names away from the intro and date */
    .couple-names { 
        font-size: 2.8rem; 
        margin-top: 15px;
        margin-bottom: 30px; 
    }
    
    .intro-tag {
        margin-bottom: 5px;
    }

    /* Existing timeline fixes */
    .event-row.left, .event-row.right { 
        padding: 0 0 0 50px; 
        justify-content: flex-start; 
    }
    .timeline-line, .event-dot { 
        left: 20px; 
    }
}