/* Header Styles */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-item {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-item:hover {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}

.nav-item.active {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background: var(--bg-gray);
    color: var(--primary-orange);
}

.hamburger-btn:active {
    transform: scale(0.95);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1400;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* .mobile-menu-overlay.show {
    display: block;
    opacity: 1;
} */

/* Mobile Navigation */
@media (max-width: 1024px) {
    .hamburger-btn {
        display: flex !important;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 60%;
        max-width: 400px;
        min-width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 2rem 1.5rem;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
        z-index: 1500;
        gap: 0;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.mobile-open {
        display: flex;
        transform: translateX(0);
    }

    .nav-menu::before {
        content: '✕';
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        color: var(--text-primary);
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        transition: all 0.2s;
        background: var(--bg-gray);
    }

    .nav-menu::before:hover {
        background: var(--primary-blue);
        color: white;
    }

    .nav-item {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
        border-left: 3px solid transparent;
        padding-left: 1rem;
        transition: all 0.2s;
    }

    .nav-item:first-child {
        margin-top: 3rem;
    }

    .nav-item:hover {
        border-bottom-color: transparent;
        border-left-color: var(--primary-orange);
        background: var(--bg-gray);
        padding-left: 1.5rem;
        color: var(--primary-blue);
    }

    .nav-item.active {
        border-bottom-color: transparent;
        border-left-color: var(--primary-orange);
        background: var(--light-blue);
        font-weight: 700;
        color: var(--primary-orange);
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem 1rem;
    }

    .logo-container img {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.625rem 0.75rem;
    }

    .logo-container img {
        height: 32px;
    }

    .hamburger-btn {
        font-size: 1.375rem;
        min-width: 40px;
        min-height: 40px;
        padding: 0.375rem;
    }
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.75rem;
    margin-left: 0.375rem;
    transition: transform 0.3s;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    list-style: none;
    min-width: 180px;
    margin-top: 0.5rem;
    z-index: 1100;
    border: 2px solid var(--border);
}

/* Desktop hover - keep dropdown open */
@media (min-width: 1025px) {
    .nav-dropdown:hover .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .nav-dropdown:hover .dropdown-menu,
    .dropdown-menu:hover {
        display: block;
        animation: fadeInDropdown 0.2s ease-out;
    }
    
    /* Add padding area to prevent dropdown from closing */
    .nav-dropdown::after {
        content: '';
        position: absolute;
        bottom: -0.5rem;
        left: 0;
        right: 0;
        height: 0.5rem;
    }
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 500;
}

.dropdown-item i {
    color: var(--primary-orange);
    font-size: 0.875rem;
    width: 16px;
}

.dropdown-item:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.dropdown-item:hover i {
    transform: translateX(3px);
}

.dropdown-item.active {
    background: var(--light-blue);
    color: var(--primary-blue);
    font-weight: 700;
    border-left: 3px solid var(--primary-orange);
}

.dropdown-item:active {
    background: var(--primary-blue);
    color: white;
}

.dropdown-item:active i {
    color: white;
}

/* Mobile Navigation Dropdown */
@media (max-width: 1024px) {
    .nav-dropdown {
        border-left: 3px solid transparent;
        background: transparent;
        padding-left: 1rem;
        padding-right: 3rem; /* Make room for arrow */
        cursor: pointer;
        pointer-events: all; /* Allow clicking */
        position: relative;
        /* Don't use flex here - it breaks the vertical layout */
    }
    
    .dropdown-arrow {
        position: absolute;
        right: 1rem;
        top: 1rem; /* Position from top instead of center */
        transform: rotate(0deg);
        font-size: 0.875rem;
        transition: transform 0.3s;
        display: inline-block;
        color: var(--primary-blue);
        margin-left: 0;
        line-height: 1;
    }
    
    /* Rotate arrow when open */
    .nav-dropdown.mobile-open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* Highlight parent only when closed AND it's the active page */
    .nav-dropdown.active:not(.mobile-open) {
        background: var(--light-blue);
        border-left-color: var(--primary-orange);
        font-weight: 700;
        color: var(--primary-orange);
    }
    
    /* Don't highlight parent when dropdown is open */
    .nav-dropdown.mobile-open {
        background: transparent;
        border-left-color: transparent;
        font-weight: 600;
        color: var(--primary-blue);
    }
    
    .nav-dropdown:hover {
        background: var(--bg-gray);
    }
    
    .nav-dropdown.mobile-open:hover {
        background: var(--bg-gray);
    }
    
    /* Dropdown menu - hidden by default in mobile */
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0.25rem 0 0.5rem 0;
        background: transparent;
        animation: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    /* Show dropdown when open */
    .nav-dropdown.mobile-open .dropdown-menu {
        display: block;
        max-height: 500px;
    }
    
    /* Dropdown items styling in mobile */
    .dropdown-item {
        padding: 0.875rem 1rem 0.875rem 3.5rem;
        border-bottom: 1px solid rgba(226, 232, 240, 0.5);
        border-left: 3px solid transparent;
        font-size: 0.9375rem;
        background: white;
        pointer-events: all;
        position: relative;
        transition: all 0.2s;
    }
    
    /* Bullet point before each dropdown item */
    .dropdown-item::before {
        content: '';
        position: absolute;
        left: 2.25rem;
        top: 50%;
        transform: translateY(-50%);
        width: 8px;
        height: 8px;
        background: var(--primary-orange);
        border-radius: 50%;
        opacity: 0.6;
        transition: all 0.2s;
    }
    
    /* Icon positioning */
    .dropdown-item i {
        position: absolute;
        left: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.8;
        font-size: 0.875rem;
    }
    
    .dropdown-item:hover {
        background: var(--bg-gray);
        border-left-color: var(--primary-orange);
        padding-left: 3.75rem;
    }
    
    .dropdown-item:hover::before {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
    
    .dropdown-item:hover i {
        opacity: 1;
        transform: translateY(-50%) translateX(3px);
    }
    
    /* Active dropdown item - always highlighted when it's the current page */
    .dropdown-item.active {
        background: var(--light-blue);
        border-left-color: var(--primary-orange);
        font-weight: 600;
        color: var(--primary-blue);
    }
    
    .dropdown-item.active::before {
        opacity: 1;
        background: var(--primary-blue);
    }
    
    .dropdown-item.active i {
        color: var(--primary-blue);
        opacity: 1;
    }
    
    .dropdown-item:last-child {
        border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    }
}