/* ============================================================
   Hero section — layered composition for the homepage.
   Layers (back to front):
     1. .hero                 — starry night sky (CSS gradient)
     2. .hero-header          — logos + temple name + address
     3. .hero-nav             — gold ornamental nav band (mural bg)
     4. .hero-stage           — temple-left slideshow + temple-right fixed
     5. .hero-deity           — Guruvayurappan figure, centered overlay
   ============================================================ */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f0e8d0;
    background: url("../assets/hero-assets/sky.jpg") center top / cover no-repeat,
                #04081a;
    isolation: isolate;
}

.hero-header,
.hero-nav { flex-shrink: 0; }

/* ---- Layer 2: header (logos + temple name) ---- */
.hero-header {
    position: relative;
    z-index: 4;
    padding: 22px 24px 18px;
}
.hero-header-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.hero-wordmark-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.hero-wordmark {
    width: 100%;
    max-width: 900px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
}

/* ---- Layer 3: ornamental gold nav band ---- */
.hero-nav {
    position: relative;
    z-index: 5;
    overflow: hidden;
    background: linear-gradient(90deg, #b85812 0%, #d67a1f 50%, #b85812 100%);
    border-top: 3px solid #5a2a08;
    border-bottom: 3px solid #5a2a08;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.hero-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../assets/hero-assets/mural.jpg") center/cover no-repeat;
    opacity: 0.55;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 0;
}
.hero-nav-inner { position: relative; z-index: 1; }
.hero-nav-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.hero-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
}
.hero-nav-list a {
    display: block;
    padding: 9px 30px;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(60, 25, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.5);
    transition: background 0.2s, color 0.2s;
}
.hero-nav-list a:hover,
.hero-nav-list a:focus {
    background: rgba(255, 255, 255, 0.15);
    color: #fff8e0;
}

/* Mobile nav hamburger */
.hero-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 16px;
    flex-direction: column;
    gap: 5px;
    margin-right: auto;
}
.hero-nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ---- Layer 4: temple stage (overlapping halves behind centered deity) ---- */
.hero-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
}
.hero-temple {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    pointer-events: none;
}
.hero-temple-left  { left: 0; }
.hero-temple-right { right: 0; }
.hero-temple-fixed {
    position: absolute;
    bottom: 0;
    height: 100%;
    width: auto;
    max-width: none;
}
.hero-temple-left  .hero-temple-fixed { right: 0; left: auto; }
.hero-temple-right .hero-temple-fixed { left: 0; right: auto; }
.hero-event-box {
    display: none;
    position: absolute;
    left: 32px;
    bottom: 32px;
    width: auto;
    max-width: 360px;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 22px;
    color: #f0e8d0;
    text-align: left;
    background: rgba(8, 14, 38, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(200, 169, 110, 0.45);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    z-index: 2;
    pointer-events: auto;
}
.hero-event-eyebrow {
    margin: 0 0 18px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #f5c25b;
}
.hero-event-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease;
}
.hero-event-link:hover { transform: translateY(-2px); }
.hero-event-image {
    display: block;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid rgba(200, 169, 110, 0.5);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}
.hero-event-title {
    margin: 16px 0 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.hero-event-title sup { font-size: 0.55em; }

/* ---- Layer 5: deity overlay, centered ---- */
.hero-deity {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 75vh;
    max-height: 800px;
    width: auto;
    max-width: 60%;
    object-fit: contain;
    object-position: center bottom;
    pointer-events: none;
    filter: drop-shadow(0 6px 26px rgba(0, 0, 0, 0.6));
    z-index: 3;
}

/* ---- Mobile / Tablet ---- */
@media (max-width: 900px) {
    .hero-header { padding: 14px 16px 12px; }
    .hero-header-inner { gap: 14px; }
    .hero-wordmark { max-width: 100%; }
    .hero-event-box { padding: 24px 20px; }
    .hero-event-image { max-width: 260px; }

    /* Lift the whole stage above the deity's stacking context */
    .hero-stage { z-index: 5; }

    /* Hide the left temple; pin the right-temple image to the BOTTOM, full width */
    .hero-temple-left { display: none; }
    .hero-temple-right {
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: auto;
        z-index: 4; /* sit above the deity */
        pointer-events: none;
    }
    .hero-temple-right .hero-temple-fixed {
        position: relative;
        left: 0;
        right: auto;
        top: auto;
        bottom: 0;
        width: 100%;
        height: auto;
        max-width: 100%;
        display: block;
    }

    /* Deity anchored to the BOTTOM, behind the temple — head pokes just above the temple */
    .hero-deity {
        top: auto;
        bottom: 10%;
        left: 53%;
        right: auto;
        transform: translateX(-50%);
        height: 65vh;
        max-height: 65vh;
        max-width: 100%;
        width: auto;
        object-position: center bottom;
    }
}

@media (max-width: 900px) {
    .hero-nav { overflow: visible; }
    .hero-nav-inner { justify-content: flex-end; padding: 0 16px; }
    .hero-nav-toggle {
        display: flex;
        margin-right: 0;
        margin-left: auto;
    }
    .hero-nav { z-index: 1000; }
    .hero-nav.open { z-index: 1001; }
    .hero-nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: linear-gradient(180deg, #b85812, #8a3f08);
        border-top: 2px solid #5a2a08;
        border-bottom: 2px solid #5a2a08;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        z-index: 1001;
    }
    .hero-nav.open .hero-nav-list { display: flex; }
    .hero-nav-list a {
        padding: 14px 22px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.22);
        font-size: 0.82rem;
        letter-spacing: 2px;
    }
    .hero-nav-list li:last-child a { border-bottom: none; }
    .hero-nav.open .hero-nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .hero-nav.open .hero-nav-toggle span:nth-child(2) { opacity: 0; }
    .hero-nav.open .hero-nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

@media (max-width: 480px) {
    .hero-header-inner { flex-wrap: wrap; justify-content: center; }
    .hero-wordmark-wrap { order: 3; flex-basis: 100%; margin-top: 8px; }
}

/* ============================================================
   Reusable site-bar — same logo + gold nav as the homepage hero,
   used on inner pages without the full-screen hero stage.
   ============================================================ */
.site-bar {
    position: relative;
    width: 100%;
    background: url("../assets/hero-assets/sky.jpg") center top / cover no-repeat,
                #04081a;
    color: #f0e8d0;
    isolation: isolate;
    z-index: 1000;
}
.site-bar .hero-header { padding: 16px 24px 14px; }
.site-bar .hero-wordmark { max-width: 720px; }
.site-bar .hero-nav { z-index: 5; }
@media (max-width: 900px) {
    .site-bar .hero-header { padding: 12px 16px 10px; }
    .site-bar .hero-wordmark { max-width: 100%; }
}
