/* ========= STABILIZED NAVBAR (NO HOVER HIGHLIGHTS) ========= */

:root {
    --primary: #15803d;
    /* Deep Forest */
    --secondary: #10b981;
    /* Vibrant Emerald */
    --text-dark: #1e293b;
    /* Professional Slate */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

header {
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 5%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* --- NAVIGATION LINKS --- */
.nav-links {
    display: flex;
    list-style: none;
    margin-left: auto;
    /* Fluid gap that gracefully shrinks on smaller screens instead of breaking layout */
    gap: clamp(8px, 1.5vw, 25px); 
    align-items: center;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem; /* Slightly refined size to fit all 8 items beautifully */
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px; /* Clean, subtle rounding for a modern feel */
    transition: all 0.2s ease-in-out;
    white-space: nowrap; /* CRITICAL: Prevents long text from ever squishing or wrapping */
    display: block;
}

/* Bulletproof hover/active state - no layout shifting, pure color change */
.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background-color: rgba(21, 128, 61, 0.08); /* A very elegant, subtle green background */
    font-weight: 500; /* Stays locked at 500 */
}

/* --- Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    margin-left: 0;
}



/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

/* --- TABLET (481px to 1024px): Condensed Horizontal Menu --- */
@media (min-width: 481px) and (max-width: 1024px) {
    .navbar {
        height: 70px;
        padding: 0 4%;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .logo img {
        height: 40px;
    }

    .logo-text {
        font-size: 1.1rem;
    }
}

/* --- MOBILE (Up to 480px): Hamburger Menu Strictly --- */
@media (max-width: 480px) {
    .navbar {
        height: 70px;
        padding: 0 15px;
        position: relative;
    }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .logo {
        order: 1;
    }

    .logo-text {
        display: none;
        /* Keep it clean on small screens */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px 0;
        border-bottom: 2px solid var(--secondary);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 15px 20px;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a::after {
        display: none;
        /* No underlines on mobile dropdown */
    }
}