body .global-header {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #0028BC;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    will-change: transform, opacity;
}

body .global-header.header-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

body .global-header.header-hidden {
    transform: translateY(-100%);
}

body .header-container {
    width: 100%;
    max-width: 1200px;
    position: relative; /* Add positioning context for absolute children */
}

body .header-logo-link {
    display: block;
    text-decoration: none;
}

body .header-logo {
    height: 48px;
    width: auto;
    transition: transform 0.3s ease;
}

body .header-logo:hover {
    transform: scale(1.05);
}

body .header-nav {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

body .nav-item {
    text-align: center;
    display: flex;
    justify-content: center;
    margin: 0 1rem;
}

body .nav-item-narrow {
    flex: 1;
}

body .nav-item-wide {
    flex: 1;
}

body .nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0.8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    text-align: center;
    display: inline-block;
}

body .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

body .nav-link:hover {
    opacity: 1;
}

body .nav-link:hover::after {
    width: 100%;
}

/* Chevron icon styling for dropdown */
body .nav-link i {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

body .dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

/* Dropdown Styles */
body .dropdown {
    position: relative;
    display: inline-block;
}

body .dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 200px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    z-index: 10000;
    border-radius: 12px;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    pointer-events: none;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Create a hidden area to prevent dropdown from closing too quickly */
body .dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* Instead of relying only on hover, let's use a class that gets added/removed with a delay */
body .dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Add JavaScript to handle the dropdown behavior with delay */
body .dropdown-visible {
    display: block !important;
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
}

/* Extend the hover area of the dropdown */
body .dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

body .dropdown-content a {
    color: #1d1d1f;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px 8px;
    width: calc(100% - 16px);
}

body .dropdown-content a:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #0028BC;
}

/*--------------------------------------------------------------
# Mobile Hamburger Menu
--------------------------------------------------------------*/

/* Hide mobile menu elements on desktop */
body .mobile-menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10003;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin-right: 1rem;
    position: relative; /* Add this to ensure proper stacking */
}

body .hamburger-line {
    width: 28px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Hide hamburger button when menu is open (close button is in the menu) */
body .mobile-menu-toggle.active {
    opacity: 0;
    pointer-events: none;
}

/* Mobile Navigation Drawer */
body .mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 10004;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

body .mobile-nav.active {
    left: 0;
}

body .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #0028BC;
    color: #fff;
}

body .mobile-nav-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

body .mobile-nav-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

body .mobile-nav-close:hover {
    transform: rotate(90deg);
}

body .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

body .mobile-nav-list > li {
    border-bottom: 1px solid #e5e7eb;
}

body .mobile-nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #1A1A1A;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
}

body .mobile-nav-link:hover,
body .mobile-nav-link:active {
    background: #f3f4f6;
    color: #0028BC;
    padding-left: 2rem;
}

/* Mobile Navigation Accordion for Resources */
body .mobile-nav-accordion {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: #1A1A1A;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    min-height: 44px;
}

body .mobile-nav-accordion:hover {
    background: #f3f4f6;
    color: #0028BC;
}

body .mobile-nav-accordion i {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

body .mobile-nav-accordion.active i {
    transform: rotate(180deg);
}

body .mobile-nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9fafb;
}

body .mobile-nav-submenu.active {
    max-height: 500px;
}

body .mobile-nav-submenu .mobile-nav-link {
    padding-left: 2.5rem;
    font-size: 0.9375rem;
}

body .mobile-nav-submenu .mobile-nav-link:hover {
    padding-left: 3rem;
}

/* Mobile Navigation Overlay */
body .mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10003;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body .mobile-nav-overlay.active {
    opacity: 1;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    body .global-header {
        padding: 1rem;
        justify-content: flex-start;
        position: fixed; /* Fixed positioning on mobile */
        top: 0;
        left: 0;
        right: 0;
        z-index: 10005; /* Increase from 10002 to 10005 */
        width: 100%;
    }

    body .header-container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        position: relative; /* Add this */
        z-index: 10005; /* Add this */
    }

    body .header-nav {
        display: none; /* Hide desktop navigation on mobile */
    }

    body .mobile-menu-toggle {
        display: flex !important; /* Use !important to ensure it overrides */
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        z-index: 10006; /* Increase to be above everything */
        pointer-events: auto; /* Ensure clicks work */
        touch-action: manipulation; /* Add this for better touch response */
    }

    body .mobile-nav,
    body .mobile-nav-overlay {
        display: block; /* Enable mobile nav and overlay */
    }
    
    /* Add padding to body to compensate for fixed header */
    body {
        padding-top: 80px;
    }
}

@media (max-width: 480px) {
    body .header-logo {
        height: 40px;
    }
    
    body .mobile-nav {
        width: 100%;
        max-width: 320px;
    }
} 