/* ARCHITECTURAL NAV - PRECISION ALIGNMENT */

#nav-placeholder {
    width: 100%;
}

.pill-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding-top: 40px;
    background-color: #f9f7f5;
}

.nav-container {
    width: 75%; 
    max-width: 1250px; 
    margin: 0 auto;
    background: #ffffff; 
    padding: 25px 50px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid #18453B;
    position: relative; /* Anchor for mobile absolute positioning */
}

.nav-logo {
    font-weight: 800;
    text-decoration: none;
    color: #18453B; 
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
    padding-right: 10px; 
}

.nav-logo span {
    font-weight: 200;
    color: #a0a0a0; 
}

/* DESKTOP LINKS */
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    text-decoration: none;
    color: #18453B;
    margin-left: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover, 
.nav-links a.active-page {
    color: #7a8d80;
}

/* HIDE HAMBURGER ON DESKTOP */
.menu-toggle {
    display: none;
}

/* --- MOBILE NAV REFACTOR (1024px and Down) --- */
@media (max-width: 1024px) {
    .pill-nav {
        padding-top: 0; /* Remove top gap on mobile for tighter header */
    }

    .nav-container {
        width: 100%; /* Full width on mobile for better touch targets */
        padding: 20px 25px;
        border-bottom: 3px solid #18453B;
    }

    .nav-logo {
        font-size: 1.1rem; /* Scale down logo slightly */
    }

    /* THE HAMBURGER */
    .menu-toggle {
        display: flex; 
        flex-direction: column;
        justify-content: space-between;
        width: 25px;
        height: 18px;
        cursor: pointer;
        z-index: 10000;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #18453B;
        transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    }

    /* ANIMATING TO 'X' */
    .menu-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }
    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* MOBILE ACCORDION DRAWER */
    .nav-links {
        display: none; /* Controlled by JS class 'active' */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Sits right under the nav-container */
        left: 0;
        width: 100%;
        background-color: #18453B; /* Solid Tenor Green Wash */
        padding: 0; /* Reset for mobile */
        text-align: center;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        color: #ffffff !important;
        margin-left: 0;
        padding: 20px 0;
        font-size: 1rem;
        letter-spacing: 3px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Active Page Mobile State */
    .nav-links a.active-page {
        background-color: rgba(255, 255, 255, 0.08);
        color: #f9f7f5 !important;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }
}