/* ==========================================================================
   NAVIGATION BAR COMPONENT (SHREEDHAM108)
   ========================================================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 250, 243, 0.95); /* Semi-transparent off-white match */
    backdrop-filter: blur(10px); /* Premium glassy effect */
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(45, 31, 19, 0.05);
    z-index: 9999;
    transition: all 0.3s ease;
}

.main-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Branding Elements --- */
.logo-area .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.site-logo {
    height: 108px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 1140px) {
    .site-logo {
        height: 76px;
    }
}

/* --- Navigation Links --- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav a {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #665544;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

/* Hover & Active Animated Baseline underlines */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #d97706; /* Spiritual Amber Highlight */
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.main-nav a:hover,
.main-nav a.active {
    color: #d97706;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* --- Donate CTA Button --- */
.main-nav a.nav-donate-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff !important;
    padding: 9px 20px !important;
    border-radius: 30px;
    text-transform: none;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.main-nav a.nav-donate-btn::after {
    display: none;
}

.main-nav a.nav-donate-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35);
    color: #fff !important;
}

/* --- Search Toggle + Overlay Bar --- */
.nav-search-toggle {
    background: none;
    border: none;
    color: #665544;
    font-size: 17px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    transition: color 0.25s ease;
}

.nav-search-toggle:hover {
    color: #d97706;
}

.nav-search-bar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fffaf3;
    border-top: 1px solid rgba(217, 119, 6, 0.15);
    box-shadow: 0 10px 25px rgba(45, 31, 19, 0.08);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.nav-search-bar.is-open {
    max-height: 90px;
}

.nav-search-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 18px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-search-form > i {
    color: #d97706;
    font-size: 16px;
}

.nav-search-form input {
    flex: 1;
    border: 1.5px solid #eedecc;
    border-radius: 30px;
    padding: 10px 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #2d1f13;
}

.nav-search-form input:focus {
    outline: none;
    border-color: #d97706;
}

.nav-search-form button[type="submit"] {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.nav-search-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
}

.nav-search-close:hover {
    color: #2d1f13;
}

/* --- Language Toggle (site-wide) --- */
.nav-lang-toggle {
    display: flex;
    align-items: center;
    border: 1.5px solid #eedecc;
    border-radius: 30px;
    padding: 3px;
    gap: 2px;
}

.nav-lang-btn {
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #94806a;
    padding: 5px 11px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nav-lang-btn.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.nav-lang-btn:hover:not(.active) {
    color: #d97706;
}

/* Site-wide bilingual content blocks — any page can wrap content in
   .lang-hi / .lang-en and it responds to the navbar toggle automatically.
   display:contents (not block) so this works whether the wrapped element
   is a block (a div of paragraphs) or inline (a span inside a nav link/button) —
   the wrapper itself produces no box, the children keep their natural display. */
.lang-en { display: none; }
.lang-hi { display: contents; }
body.show-en .lang-en { display: contents; }
body.show-en .lang-hi { display: none; }

/* --- Hamburger Icon Trigger Layout --- */
.mobile-toggle {
    display: none; /* Hidden on Desktop viewports */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    z-index: 10001;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #2d1f13;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: left center;
}

/* ==========================================================================
   RESPONSIVE LAYOUT (MOBILE & TABLET BREAKPOINTS)
   ========================================================================== */

@media (max-width: 1140px) {
    .site-title {
        font-size: 19px;
    }
    
    .mobile-toggle {
        display: flex;
    }

    /* Transform Main Nav container to full overlay on mobile devices */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Off-screen right default state */
        width: 300px;
        height: 100vh;
        background: #fffaf3;
        box-shadow: -5px 0 30px rgba(45, 31, 19, 0.1);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 10000;
    }

    /* Trigger Class to pull view inward */
    .main-nav.nav-active {
        right: 0;
    }

    .main-nav a {
        font-size: 18px;
        letter-spacing: 2px;
    }

    /* Transform hamburger straight lines into an 'X' close indicator */
    .mobile-toggle.toggle-active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .mobile-toggle.toggle-active span:nth-child(2) {
        width: 0%;
        opacity: 0;
    }

    .mobile-toggle.toggle-active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .nav-search-toggle {
        font-size: 20px;
        color: #2d1f13;
    }

    .nav-search-form {
        padding: 14px 16px;
        flex-wrap: wrap;
    }

    .nav-search-bar.is-open {
        max-height: 140px;
    }

    .nav-search-form button[type="submit"] {
        order: 3;
        flex: 1;
    }
}