/* ============================================================
   Shared header styles — used by every page in the site.
   Source of truth for: top-bar, header logos, nav bar, hamburger.
   ============================================================ */

/* ---- Top utility bar (mantras + phone + temple hours) ---- */
.top-bar {
    background: #04081a;
    color: rgba(200, 169, 110, 0.85);
    font-size: 0.7rem;
    letter-spacing: 0.9px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(200, 169, 110, 0.2);
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.top-bar-left,
.top-bar-right {
    display: flex;
    gap: 22px;
    align-items: center;
}
.top-bar a {
    color: rgba(200, 169, 110, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}
.top-bar a:hover { color: #fff; }
.top-bar-sep { color: rgba(200, 169, 110, 0.3); }

@media (max-width: 600px) {
    .top-bar { display: none; }
}

/* ---- Header (logos + temple name) ---- */
header {
    background: linear-gradient(135deg, #07111f 0%, #1e3a8a 50%, #4a8cd6 100%);
    border-bottom: none;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden;
}
header::before {
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c8a96e 15%, #f0d890 50%, #c8a96e 85%, transparent 100%);
}
header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpolygon points='10,1 19,10 10,19 1,10' fill='none' stroke='%23c8a96e' stroke-width='0.7'/%3E%3C/svg%3E") center/20px 20px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%, black 70%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0%, black 30%, black 70%, transparent 100%);
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-start;
}
.logo-area-right {
    display: flex;
    align-items: center;
}

.logo-area img,
.logo-area-right img {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}
.navbar-logo {
    transition: transform 0.3s ease;
}
.navbar-logo:hover { transform: scale(1.05); }

.temple-name h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #f0e8d0;
    font-size: 1.35rem;
    letter-spacing: 0;
    line-height: 1.2;
    font-weight: 700;
    margin: 0;
}
.temple-name h2 {
    font-family: 'Anek Malayalam', sans-serif;
    color: #f0e8d0;
    font-size: 1.2rem;
    font-weight: 500;
    font-style: normal;
    margin: 0;
}
.temple-name h3 {
    font-family: 'Anek Devanagari', sans-serif;
    color: #f0e8d0;
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
}
.temple-name p {
    color: #f0e8d0;
    letter-spacing: 2px;
    font-size: 0.67rem;
    margin: 0;
}

/* ---- Navigation bar ---- */
.site-nav {
    background: #0a1a3a;
    border-top: 1px solid rgba(200, 169, 110, 0.22);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.28);
    position: sticky;
    top: 0;
    z-index: 999;
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    justify-content: center;
    flex: 1;
}
.site-nav ul::-webkit-scrollbar { display: none; }

.site-nav ul li a {
    display: block;
    padding: 12px 20px;
    color: rgba(224, 210, 185, 0.85);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
    border-right: 1px solid rgba(200, 169, 110, 0.1);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.site-nav ul li:last-child a { border-right: none; }
.site-nav ul li a:hover,
.site-nav ul li a:focus {
    background: rgba(200, 169, 110, 0.11);
    color: #c8a96e;
}

/* ---- Panchang banner (rendered between header and nav, dynamic) ---- */
#panchang-banner {
    background: linear-gradient(90deg, #fdf8f0, #fffef9, #fdf8f0);
    border-bottom: 2px solid rgba(200, 169, 110, 0.4);
}

/* ---- Hamburger (mobile) ---- */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Anchor scroll offset so links don't hide content under the sticky header */
section[id] { scroll-margin-top: 110px; }

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .header-inner {
        justify-content: flex-start;
        padding: 12px 20px 10px;
    }
    .logo-area img,
    .logo-area-right img { height: 54px; }
    .temple-name h1 {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }
    .temple-name h2 { font-size: 0.78rem; }
    .temple-name h3 { display: none; }

    .site-nav { position: relative; }
    .nav-hamburger { display: flex; }
    .site-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, #0a1a3a, #4a8cd6);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
        z-index: 999;
        justify-content: flex-start;
    }
    .site-nav.open ul { display: flex; }
    .site-nav ul li a {
        padding: 14px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        font-size: 0.82rem;
    }
    .site-nav.open .nav-hamburger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .site-nav.open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .site-nav.open .nav-hamburger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}
