:root {
    /* Primary Blue Palette */
    --primary-blue: #007bff;                     /* Standard/Active Blue */
    --primary-blue-hover: #0069d9;               /* Slightly darker for general hovers on blue elements */
    --primary-blue-dark: #0056b3;                /* Darker Blue - New default for Contact button */

    /* Shadows for Blue Elements */
    --primary-blue-shadow-light: rgba(0, 123, 255, 0.2);  /* For standard/active blue */
    --primary-blue-shadow-medium: rgba(0, 123, 255, 0.3); /* For standard/active blue hover */
    --primary-blue-dark-shadow: rgba(0, 86, 179, 0.25); /* For darker blue (contact default) */

    /* Navbar General */
    --navbar-bg: rgba(255, 255, 255, 0.97);
    --navbar-text-color: #333940;
    --navbar-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --header-fixed-top-offset: 20px;
    --logo-nav-font: 'Times New Roman', Times, serif;
    --nav-link-font: 'Roboto', sans-serif;
    --nav-link-hover-underline-color: var(--primary-blue);

    /* Desktop Active State (Unified for all nav-links) */
    --navbar-active-link-bg: var(--primary-blue);
    --navbar-active-link-text: #ffffff;
    --navbar-active-link-shadow: var(--primary-blue-shadow-light);
    --navbar-active-link-font-weight: 700; /* Increased for prominence */
    --navbar-active-link-padding-horizontal: 18px; /* Standardized padding */

    /* Contact Button Specific - Default State (Darker) */
    --contact-btn-default-bg: var(--primary-blue-dark);
    --contact-btn-default-text: #ffffff;
    --contact-btn-default-shadow: var(--primary-blue-dark-shadow);

    /* Contact Button Specific - Hover State (Standard Blue) */
    --contact-btn-hover-bg: var(--primary-blue);
    --contact-btn-hover-shadow: var(--primary-blue-shadow-medium);

    /* Mobile Menu */
    --mobile-menu-box-bg: #ffffff;
    --mobile-menu-box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    --mobile-menu-link-color: #4A5568;
    --mobile-menu-link-hover-color: #2D3748;
    --mobile-active-link-pill-bg: var(--primary-blue); /* Consistent blue for mobile active */
    --mobile-active-link-pill-text: #ffffff;
    --hamburger-active-blue: var(--primary-blue);
}

html {
    scroll-behavior: smooth;
}

.site-header {
    position: fixed;
    top: var(--header-fixed-top-offset);
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100% - 40px);
    z-index: 1000;
    transition: box-shadow 0.3s ease-in-out;
}

.navbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--navbar-bg);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: var(--navbar-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
    font-family: var(--logo-nav-font);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-family: var(--nav-link-font);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--navbar-text-color);
    text-decoration: none;
    padding: 8px 15px; /* Default padding for non-active, non-contact links */
    border-radius: 30px;
    display: block;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, padding 0.25s ease; /* Added padding to transition */
}

/* Default Nav Link Hover (Underline) - Not for Contact Button */
.nav-link:not(.contact-btn)::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--nav-link-hover-underline-color);
    transition: width 0.3s ease, left 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:not(.contact-btn):hover::after {
    width: 70%;
    left: 50%;
}

.nav-link:not(.contact-btn):hover {
    transform: translateY(-1px);
}

/* --- Contact Button Styling --- */
.contact-btn {
    /* Default (darker blue) state */
    background-color: var(--contact-btn-default-bg);
    color: var(--contact-btn-default-text) !important;
    font-weight: 700; /* Contact button is always bolder */
    box-shadow: var(--contact-btn-default-shadow);
    padding: 8px var(--navbar-active-link-padding-horizontal); /* Use consistent horizontal padding */
}

.contact-btn:hover {
    /* Hover (standard blue) state */
    background-color: var(--contact-btn-hover-bg);
    box-shadow: var(--contact-btn-hover-shadow);
    transform: translateY(-1px) scale(1.02); /* Slight lift on hover */
}

/* --- UNIFIED ACTIVE LINK STYLING (for ALL nav-links including Contact) --- */
.nav-link.active {
    background-color: var(--navbar-active-link-bg);
    color: var(--navbar-active-link-text) !important;
    font-weight: var(--navbar-active-link-font-weight);
    box-shadow: var(--navbar-active-link-shadow);
    /* Use consistent padding for the active "pill" state */
    padding-left: var(--navbar-active-link-padding-horizontal);
    padding-right: var(--navbar-active-link-padding-horizontal);
    transform: translateY(0); /* Reset any hover transform */
}
.nav-link.active:hover { /* Keep active style on hover, maybe slightly darker background */
    background-color: var(--primary-blue-hover); /* Darken active link slightly on hover */
    transform: translateY(0); /* Prevent hover transform if it's already active */
}
.nav-link.active::after { /* Remove underline if link is active */
    width: 0 !important;
}


.hamburger {
    display: none;
    cursor: pointer;
    padding: 8px;
    background-color: transparent;
    border: none;
    z-index: 1002;
    position: relative;
}

.hamburger .bar {
    display: block;
    width: 20px;
    height: 2.5px;
    margin: 4px auto;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hamburger.active .bar:nth-child(1),
.hamburger.active .bar:nth-child(3) {
    background-color: var(--hamburger-active-blue);
}
.hamburger.active .bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* --- MOBILE VIEW STYLES --- */
@media (max-width: 991.98px) {
    .site-header {
        width: 100%;
    }

    .navbar {
        padding: 8px 15px;
        width: 100%;
        justify-content: space-between;
    }

    .nav-logo {
        font-size: 1.2rem;
        margin-right: 0;
    }

    .nav-menu { /* Hidden in the pill on mobile */
        display: none;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }

    /* Mobile Menu Overlay Styles */
    .nav-menu.mobile-active {
        display: flex; /* This makes it visible as the overlay */
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        position: fixed;
        top: calc(var(--header-fixed-top-offset) + 45px + 15px);
        left: 50%;
        transform: translateX(-50%) scale(0.95);
        width: clamp(270px, 80vw, 360px);
        background-color: var(--mobile-menu-box-bg);
        border-radius: 16px;
        box-shadow: var(--mobile-menu-box-shadow);
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0s 0.25s;
        z-index: 1001;
    }

    .nav-menu.mobile-active.active { /* When hamburger is clicked, and overlay is active */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) scale(1);
        transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0s 0s;
    }

    /* Links inside the mobile overlay */
    .nav-menu.mobile-active .nav-item {
        width: 100%;
        opacity: 0;
        transform: translateY(15px);
    }

    .nav-menu.mobile-active.active .nav-item {
        opacity: 1;
        transform: translateY(0);
        transition-property: opacity, transform;
        transition-duration: 0.2s;
        transition-timing-function: ease-out;
    }
    .nav-menu.mobile-active.active .nav-item:nth-child(1) { transition-delay: 0.10s; }
    .nav-menu.mobile-active.active .nav-item:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.mobile-active.active .nav-item:nth-child(3) { transition-delay: 0.20s; }
    .nav-menu.mobile-active.active .nav-item:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.mobile-active.active .nav-item:nth-child(5) { transition-delay: 0.30s; }
    .nav-menu.mobile-active.active .nav-item:nth-child(6) { transition-delay: 0.35s; }

    .nav-menu.mobile-active .nav-link { /* General link style in mobile overlay */
        padding: 12px 15px;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--mobile-menu-link-color);
        border-bottom: none;
        text-align: center;
        width: 100%;
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    .nav-menu.mobile-active .nav-link:not(.active):hover { /* Hover for non-active links in mobile overlay */
        background-color: #f7f7f7;
        color: var(--mobile-menu-link-hover-color);
    }

    /* ACTIVE LINK in mobile overlay - Blue Pill */
    .nav-menu.mobile-active .nav-link.active {
        background-color: var(--mobile-active-link-pill-bg) !important;
        color: var(--mobile-active-link-pill-text) !important;
        font-weight: bold;
        border-radius: 30px; /* Pill shape */
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    /* Contact Button specifically in mobile overlay (if it needs special treatment beyond general .nav-link) */
    .nav-menu.mobile-active .contact-btn {
        margin-top: 10px; /* Add some space above it if it's the last item */
        /* If it's not active, it should look like other mobile links */
        /* The .nav-link.active style above will handle it when it's the active section */
    }
    /* If the contact button is NOT active in the mobile menu, it might look better like other text links: */
    .nav-menu.mobile-active .contact-btn:not(.active) {
        background-color: transparent;
        color: var(--mobile-menu-link-color) !important;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    .nav-menu.mobile-active .contact-btn:not(.active):hover {
        background-color: #f7f7f7;
        color: var(--mobile-menu-link-hover-color) !important;
        border-color: #ccc;
    }
}

body.no-scroll {
    overflow: hidden;
}