/* Modern Header Styles */
.site-header {
    background-color: #f5f9ff;
    border-bottom: 1px solid rgba(221, 221, 221, 0.33) !important;
    z-index: 1000;
    padding: 0 0.5rem 0 0.5rem;
}

/* Desktop: disclaimer is part of main header */
.disclaimer-bar {
    display: none;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 1rem 0.3rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    height: 30px;
    width: auto;
    margin-top: -2px;
}

/* Middle section with nav and disclaimer */
.header-middle {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 2rem;
    padding: 0;
}

/* Desktop nav - visible inline */
.header-nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
    margin-left: auto;
}

.header-nav-desktop a {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.header-nav-desktop a:hover {
    color: #2563eb;
}

.nav-separator {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Desktop disclaimer inline */
.header-disclaimer {
    color: #555;
    font-size: 0.85rem;
    flex: 1;
    white-space: nowrap;
    text-align: center;
}

.header-disclaimer a {
    color: inherit;
    text-decoration: underline;
}

.header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 320px;
    background-color: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 4rem 2rem 2rem 2rem;
    gap: 1.25rem;
    transition: right 0.3s ease;
    z-index: 1001;
}

.header-nav.active {
    right: 0;
}

.header-nav a {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    width: 100%;
    padding: 0.75rem 0;
    text-align: left;
}

.header-nav a:hover {
    color: #2563eb;
}

/* Hamburger Menu Button */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none !important; /* Force no background */
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-top: 4px;
    z-index: 1002;
    flex-shrink: 0;
}

/* Prevent any background color changes on button */
.menu-toggle:hover,
.menu-toggle:active,
.menu-toggle:focus {
    background: none !important;
    outline: none;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: #374151;
    transition: all 0.3s ease;
}

.menu-toggle:hover span {
    background-color: #4b5563; /* Subtle lighter gray on hover */
}

.menu-toggle:active span {
    background-color: #6b7280; /* Even more subtle on active */
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 70%; /* Stop where the menu starts */
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease-out;
    z-index: 1000;
}

@media (min-width: 457px) {
    /* When menu hits max-width of 320px */
    .menu-overlay {
        right: 320px;
    }
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Mobile layout */
@media (max-width: 768px) {
    /* Show hamburger on mobile */
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 1rem;
    }
    
    /* Add subtle border between header sections */
    .header-main {
        border-bottom: 1px solid rgba(221, 221, 221, 0.2);
        justify-content: center;
        position: relative;
    }
    
    /* Show disclaimer bar on mobile - below main header */
    .disclaimer-bar {
        display: block;
        background-color: #faf9f7;
        color: #555;
        font-size: 0.75rem;
        text-align: center;
        padding: 0.3rem 0.75rem 0.35rem 0.75rem;
    }
    
    .disclaimer-bar a {
        color: inherit;
        text-decoration: underline;
    }
    
    /* Hide middle section on mobile */
    .header-middle {
        display: none;
    }
    
    .header-main {
        padding: 0.4rem 1rem 0.3rem 1rem;
    }
    
    .header-logo img {
        height: 28px;
    }
    
    .header-nav {
        max-width: 280px;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .header-logo img {
        height: 26px;
    }
    
    .disclaimer-bar {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

