/* ============================================
   HEADER & NAVIGATION STYLES
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
}

.logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

/* Navigation */
.navbar {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    position: relative;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-2) var(--space-3);
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

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

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

.nav-cta {
    background: var(--primary-orange);
    color: white;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: var(--secondary-navy);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 98, 0, 0.3);
}

/* Dropdown Menu Styles */
.nav-item {
    position: relative;
}

.nav-item.has-dropdown {
    position: relative;
}

.nav-link.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-link.dropdown-toggle i {
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: var(--space-2);
    padding: var(--space-3) 0;
    overflow: hidden;
}

[data-theme="dark"] .dropdown-menu {
    background: var(--bg-secondary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Organized Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.dropdown-item i {
    color: var(--primary-orange);
    font-size: 1.1em;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-item span {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(255, 98, 0, 0.08);
    border-left-color: var(--primary-orange);
    padding-left: calc(var(--space-5) + 5px);
    color: var(--primary-orange);
}

.dropdown-item:hover i {
    transform: scale(1.1);
}

/* Add subtle dividers between items */
.dropdown-item:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .dropdown-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

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

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

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

/* Dark Theme Adjustments */
[data-theme="dark"] .header {
    background: rgba(26, 32, 44, 0.95);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 98, 0, 0.15);
}

/* ============================================
   RESPONSIVE - HEADER
   ============================================ */

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .navbar {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--space-4);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
    }

    .navbar.active {
        max-height: 600px;
        opacity: 1;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: var(--space-4);
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        display: block;
    }

    .nav-link::after {
        display: none;
    }

    /* Mobile Dropdown - Accordion Style */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.02);
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.3s ease;
        border-radius: 0;
    }

    [data-theme="dark"] .dropdown-menu {
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-item.has-dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: var(--space-2) 0;
        border-top: 1px solid var(--border-color);
    }

    .dropdown-item {
        padding: var(--space-3) var(--space-6);
        font-size: 0.9em;
        border-left: none;
        border-bottom: none;
    }

    .dropdown-item:hover {
        padding-left: calc(var(--space-6) + 5px);
    }

    .nav-cta {
        margin-top: var(--space-4);
        text-align: center;
    }
}
