/* ===== HEADER STYLES ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 20, 43, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.logo span { color: var(--blue-grad); }
.logo-icon i { font-size: 1.6rem; }

/* Desktop Navigation */
.main-nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: 8px 4px;
}

.main-nav a:hover { color: var(--blue-grad); }

/* Dropdown Menu - Base */
.dropdown {
    position: relative;
}

.dropdown-toggle i {
    font-size: 0.7rem;
    transition: transform 0.3s;
    opacity: 0.7;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background: var(--bg-darker);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-width: 240px;
    border-radius: 16px;
    padding: 12px 0;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
    list-style: none;
    display: block !important;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background: var(--bg-darker);
    border-left: 1px solid var(--border-light);
    border-top: 1px solid var(--border-light);
    transform: rotate(45deg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    padding: 12px 24px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 400;
    white-space: normal;
    display: block;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: rgba(0,174,239,0.1);
    color: var(--blue-grad);
    border-left-color: var(--blue-grad);
    padding-left: 28px;
}

/* Nav CTA Button */
.nav-cta {
    background: linear-gradient(135deg, var(--blue-grad), #0099cc);
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,174,239,0.2);
}
.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,174,239,0.3);
    color: #fff !important;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}
.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}
.mobile-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ===== RESPONSIVE HEADER (Mobile) ===== */
@media (max-width: 992px) {
    .mobile-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-darker);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 20px;
        border-bottom: 1px solid var(--border-light);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid var(--border-light);
    }
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav > ul > li > a {
        padding: 16px 10px;
        font-size: 1.1rem;
        justify-content: space-between;
    }
    
    /* Dropdown on mobile */
    .dropdown-menu {
        position: static;
        background: rgba(0,0,0,0.25);
        border-radius: 0;
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        border-left: 3px solid var(--blue-grad);
        margin: 0 10px;
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 600px;
    }
    
    .dropdown-menu a {
        padding: 14px 20px 14px 30px;
        border-left: none;
        font-size: 0.95rem;
    }
    
    .dropdown-menu a:hover {
        padding-left: 35px;
    }
    
    .dropdown-toggle i {
        transition: transform 0.3s;
    }
    
    .dropdown.active .dropdown-toggle i {
        transform: rotate(180deg);
    }
    
    .nav-cta {
        display: inline-block;
        margin: 10px 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo { font-size: 1.5rem; }
    .header-container { height: 60px; }
    .main-nav { top: 60px; max-height: calc(100vh - 60px); }
    .main-nav > ul > li > a {
        padding: 14px 8px;
        font-size: 1rem;
    }
}

/* Small screen optimization */
@media (max-width: 1200px) and (min-width: 993px) {
    .main-nav ul {
        gap: 16px;
    }
    .main-nav a {
        font-size: 0.85rem;
    }
}