/* Header Styles - Consolidated from bootstrap-override.css and style.css */
/* High specificity to ensure priority over other CSS files */
body .header {
    background-color: var(--light) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    padding: 10px 0 !important;
}

.header-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0px 15px !important;
}

/* Logo Styles */
.logo {
    height: 80px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 60px;
    width: auto;
    margin-right: 10px;
}

/* Navigation Wrapper */
.navigation-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    position: relative;
}

/* Navigation Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    z-index: 1001;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    padding: 8px;
}

/* Main Navigation */
.nav {
    display: flex;
    align-items: center;
    /* width: 100%; */
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 1.5rem;
    position: relative;
}

/* Secondary Menu within Wrapper */
.secondary-menu-list {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
    background: whitesmoke;
}

.secondary-menu-item {
    margin-left: 1rem;
    margin-right: 0.5rem;
}

.secondary-menu-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.secondary-menu-link:hover,
.secondary-menu-link.active {
    color: #f47321;
}

/* Mobile Secondary Menu Items - Hidden on Desktop */
.mobile-secondary {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .navigation-wrapper {
        align-items: center;
    }

    .nav-menu,
    .secondary-menu-list {
        justify-content: center;
    }

    .header-container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px !important;
    }
}

@media (max-width: 768px) {

    /* Show mobile toggle button */
    .nav-toggle {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        right: 15px !important;
        transform: translateY(-50%) !important;
        z-index: 1002 !important;
    }

    /* Ensure header container has relative positioning for absolute burger menu */
    .header-container {
        position: relative !important;
    }

    /* Hide desktop secondary menu */
    .secondary-menu-list {
        display: none !important;
    }

    /* Mobile navigation styles */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--light);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 80px 0 20px 0;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

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

    .nav-item {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 15px 20px;
        color: var(--dark);
        text-decoration: none;
        font-size: 1rem;
        transition: background-color 0.2s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: #f8f9fa;
        color: var(--primary);
    }

    /* Show mobile secondary menu items */
    .mobile-secondary {
        display: block !important;
        border-top: 2px solid #eee;
        margin-top: 10px;
    }

    .mobile-secondary:first-of-type {
        margin-top: 20px;
        padding-top: 10px;
    }

    .mobile-secondary .nav-link {
        font-size: 0.9rem;
        color: #6c757d;
        text-transform: uppercase;
        font-weight: 500;
    }

    /* Submenu styles for mobile */
    .submenu {
        position: static !important;
        display: none;
        background-color: #f8f9fa;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
    }

    .has-submenu.active .submenu {
        display: block;
    }

    .submenu-item {
        border-bottom: 1px solid #eee;
    }

    .submenu-link {
        display: block;
        padding: 12px 30px;
        color: #666;
        text-decoration: none;
        font-size: 0.9rem;
    }

    .submenu-link:hover,
    .submenu-link.active {
        background-color: #e9ecef;
        color: var(--primary);
    }

    /* Mobile overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 10px !important;
    }

    .logo {
        height: 50px !important;
        margin-left: 5px !important;
    }

    .logo-image {
        height: 45px !important;
    }

    .nav-menu {
        width: 100%;
        right: -100%;
    }
}