/* Global Header Styles */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Brand/Logo */
.header-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2d3748;
    transition: color 0.3s ease;
}

.brand-link:hover {
    color: #3182ce;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 20px;
}

.brand-text h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.brand-text p {
    font-size: 12px;
    color: #718096;
    margin: 0;
    line-height: 1;
}

/* Navigation */
.header-nav {
    flex: 1;
    margin: 0 40px;
}

.nav-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: #3182ce;
    background: rgba(49, 130, 206, 0.1);
}

.nav-link.active {
    color: #3182ce;
    background: rgba(49, 130, 206, 0.15);
}

.nav-link i {
    margin-left: 6px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

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

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

.dropdown-content {
    padding: 20px;
}

.dropdown-section {
    margin-bottom: 20px;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #4a5568;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.dropdown-item:hover {
    background: rgba(49, 130, 206, 0.1);
    color: #3182ce;
}

.dropdown-item.active {
    background: rgba(49, 130, 206, 0.15);
    color: #3182ce;
    font-weight: 500;
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Search */
.search-container {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    color: #4a5568;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.search-toggle:hover {
    color: #3182ce;
    background: rgba(49, 130, 206, 0.1);
}

.search-box {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 280px;
    padding: 12px;
    display: none;
    z-index: 1001;
}

.search-box.active {
    display: block;
}

#search-input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: #3182ce;
}

.search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
}

.search-clear:hover {
    color: #4a5568;
}

/* CTA Button */
.header-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: #4a5568;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle:hover span {
    background: #3182ce;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: right 0.3s ease;
    overflow-y: auto;
}

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

.mobile-nav-content {
    padding: 20px;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-nav-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #4a5568;
    cursor: pointer;
    padding: 4px;
}

.mobile-nav-close:hover {
    color: #3182ce;
}

.mobile-nav-item {
    margin-bottom: 8px;
}

.mobile-nav-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle:hover {
    background: rgba(49, 130, 206, 0.1);
    color: #3182ce;
}

.mobile-nav-toggle i {
    transition: transform 0.3s ease;
}

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

.mobile-nav-submenu {
    display: none;
    padding-left: 16px;
    margin-top: 8px;
}

.mobile-nav-submenu.active {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #4a5568;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(49, 130, 206, 0.1);
    color: #3182ce;
}

.mobile-nav-link.active {
    background: rgba(49, 130, 206, 0.15);
    color: #3182ce;
    font-weight: 500;
}

.mobile-nav-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.mobile-nav-footer .mobile-nav-link {
    font-size: 14px;
    color: #718096;
}

/* Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .header-nav {
        margin: 0 20px;
    }
    
    .nav-items {
        gap: 4px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .dropdown-menu {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .search-box {
        width: 260px;
    }
    
    .header-cta {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .brand-text h1 {
        font-size: 16px;
    }
    
    .brand-text p {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .header-content {
        height: 60px;
    }
    
    .brand-logo {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .mobile-nav {
        width: 280px;
        right: -280px;
    }
    
    .search-box {
        width: 220px;
        right: -20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .global-header {
        background: rgba(26, 32, 44, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .brand-link {
        color: #e2e8f0;
    }
    
    .nav-link {
        color: #cbd5e0;
    }
    
    .nav-link:hover {
        color: #63b3ed;
    }
    
    .dropdown-menu {
        background: #2d3748;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .search-box {
        background: #2d3748;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #search-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .mobile-nav {
        background: #1a202c;
    }
}