/* ==========================================================================
   Header & Sub-Navigation Header Bar Styles
   ========================================================================== */

.site-header--glass {
    background: linear-gradient(135deg, #7a0016, #b3122e);
    padding: 2.2rem 1.2rem 1.8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.site-header--glass::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.header-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.kn-heading {
    font-family: 'Noto Serif Kannada', serif;
    font-size: 2.2rem;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.subheading-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 5px 16px;
    border-radius: 30px;
    margin-top: 0.6rem;
    color: #ffeb3b;
    font-size: 0.95rem;
    font-family: 'Noto Sans Kannada', sans-serif;
}

.subheading-pill .dot {
    width: 5px;
    height: 5px;
    background-color: #ffeb3b;
    border-radius: 50%;
}

/* Header Sub-Sections Shortcuts */
.header-subsections {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.header-subsections a {
    color: #fff8e7;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: 'Noto Sans Kannada', sans-serif;
    text-decoration: none;
    transition: all 0.25 ease;
}

.header-subsections a:hover,
.header-subsections a.active {
    background: #ffeb3b;
    color: #7a0016;
    border-color: #ffeb3b;
    font-weight: 600;
}

/* Responsive Scaling */
@media (max-width: 600px) {
    .kn-heading {
        font-size: 1.6rem;
    }
    .subheading-pill {
        font-size: 0.85rem;
    }
    .header-subsections a {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}
/* Ensure Header Container distributes left image, center text, and right image */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 15px;
    box-sizing: border-box;
}

/* Header Text Container */
.header-text-content {
    flex: 1;
    text-align: center;
}

/* Header layout */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.header-text-content {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.header-text-content .kn-heading {
    font-size: clamp(1.1rem, 4vw, 1.75rem);
    line-height: 1.3;
    margin: 0 0 6px;
}

/* Subheading: tagline • location */
.subheading-pill {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.location-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

/* Header photos: no borders, fill the frame */
.header-photo {
    width: 110px;
    height: 160px;
    object-fit: cover;
    object-position: center;
    border: none;
    border-radius: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    display: block;
    transition: transform 0.3s ease;
}

/* Only apply hover zoom on devices that actually hover */
@media (hover: hover) {
    .header-photo:hover {
        transform: scale(1.05);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .header-container {
        padding: 8px 10px;
        gap: 8px;
    }

    .header-photo {
        width: 64px;
        height: 100px;
    }

    .header-text-content .kn-heading {
        font-size: 1.1rem;
    }

    .subheading-pill {
        font-size: 0.75rem;
        gap: 4px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .header-photo {
        width: 52px;
        height: 68px;
    }

    .header-text-content .kn-heading {
        font-size: 1rem;
    }
}

/* Subheading Pill Flex Layout */
.subheading-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.25);
}

.subheading-pill .location-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap; /* Prevents "ಮೇಲಂಗಡಿ, ಕಳಸ" from breaking into 2 lines */
}

.subheading-pill .eng {
    white-space: nowrap; /* Prevents "Amgel Devasthana" from breaking into 2 lines */
}

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
    .subheading-pill {
        flex-direction: column; /* Stacks Amgel Devasthana on top, Location below */
        gap: 4px;
        padding: 8px 16px;
        border-radius: 14px;
    }

    .subheading-pill .dot {
        display: none; /* Hides the separator dot when stacked vertically */
    }
}

/* ==========================================================================
   Sticky Top Navbar Language Selector Bar
   ========================================================================== */

.top-language-bar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #111827; /* Dark slate matching header theme */
    color: #f9fafb;
    border-bottom: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-family: 'Noto Sans Kannada', sans-serif;
    font-size: 0.88rem;
}

.lang-bar-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.lang-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #ffeb3b;
    letter-spacing: 0.3px;
}

.lang-brand .temple-om {
    font-size: 1.1rem;
    color: #f59e0b;
}

.lang-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-label {
    display: inline-flex;
    align-items: center;
    color: #e5e7eb;
    font-size: 0.82rem;
    cursor: pointer;
}

.lang-selector-select {
    background-color: #1f2937;
    color: #ffffff;
    border: 1px solid #f59e0b;
    border-radius: 16px;
    padding: 4px 10px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.lang-selector-select:hover,
.lang-selector-select:focus {
    background-color: #374151;
    border-color: #ffeb3b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

@media (max-width: 600px) {
    .lang-bar-container {
        padding: 5px 10px;
    }
    .lang-brand-text {
        font-size: 0.78rem;
    }
    .lang-label-text {
        display: none; /* Keep dropdown compact on small screens */
    }
    .lang-selector-select {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
}
