/**
 * GLOBAL HEADER SYSTEM - SHARED ACROSS ALL PAGES
 */

header {
    height: var(--nav-height);
    background: rgba(10, 25, 47, 0.85); /* Semi-transparent primary */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed; /* Changed from absolute to fixed for modern sticky behavior */
    top: var(--top-offset, 44px);
    left: 0;
    width: 100%;
    z-index: 10000; /* Highest priority */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 5%; /* Built-in padding for logo/nav spacing */
    max-width: var(--container-width);
    margin: 0 auto;
}

/* --- LOGO STYLING --- */
.logo { display: flex; flex-direction: column; text-decoration: none; }
.logo-main {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Libre Baskerville', serif;
    color: #ffffff !important;
}
.logo-sub {
    font-size: 0.65rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-top: 4px;
}

/* --- DESKTOP NAVIGATION --- */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

/* --- MOBILE CONTROLS --- */
.mobile-toggle {
    display: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 5px;
    line-height: 1;
}

/* --- RESPONSIVE LOGIC --- */
@media (max-width: 1024px) {
    .nav-links { gap: 1.2rem; }
    .nav-links a { font-size: 0.75rem; }
}

@media (max-width: 900px) {
    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        display: none; /* Hidden by default in mobile */
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--primary);
        padding: 40px 0;
        gap: 20px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.3);
        border-top: 1px solid rgba(255,255,255,0.1);
        z-index: 9998;
    }

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

    .nav-links li { width: 100%; text-align: center; }
    .nav-links a { font-size: 1rem; width: 100%; padding: 10px 0; display: block; }
}
