/* Enhanced Header Styles */
.header-enhanced {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Top Bar */
.header-top-bar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.top-bar-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement {
    color: #6b7280;
    font-weight: 500;
}

.quick-links {
    display: flex;
    gap: 1.5rem;
}

.quick-links a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.quick-links a:hover {
    color: #1e40af;
}

/* Header Container */
.header-container {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.header-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #111827;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.logo .accent {
    color: #1e40af;
}

/* Main Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #1e40af;
}

.nav-link.highlight {
    background: #fef3c7;
    color: #92400e;
}

.nav-link.highlight:hover {
    background: #fde68a;
}

.nav-link.btn-search {
    background: #1e40af;
    color: white;
    padding: 0.75rem 1.5rem;
}

.nav-link.btn-search:hover {
    background: #1e3a8a;
}

.arrow {
    font-size: 0.625rem;
    transition: transform 0.2s;
}

.nav-item:hover .arrow {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.dropdown-menu,
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    z-index: 1100;
    display: none;
}

.nav-item:hover .dropdown-menu,
.nav-item:hover .mega-menu,
.nav-item.active .dropdown-menu,
.nav-item.active .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

.dropdown-menu {
    min-width: 220px;
    padding: 0.5rem 0;
}

.dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.625rem 1.25rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.dropdown-menu a:hover {
    background: #f9fafb;
    color: #1e40af;
    padding-left: 1.5rem;
}

.dropdown-menu .divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* Mega Menu */
.mega-menu {
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 900px;
    max-width: calc(100vw - 2rem);
}

.nav-item:hover .mega-menu,
.nav-item.active .mega-menu {
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.mega-column {
    min-width: 0;
}

.mega-column h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.mega-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-column li {
    margin-bottom: 0.5rem;
}

.mega-column a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9375rem;
    display: block;
    padding: 0.25rem 0;
    transition: all 0.2s;
}

.mega-column a:hover {
    color: #1e40af;
    padding-left: 0.5rem;
}

.mega-column .view-all {
    color: #1e40af;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Featured Column in Mega Menu */
.mega-column.featured {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.quick-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quick-search input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.quick-search button {
    padding: 0.5rem 0.75rem;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}

.featured-card {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.featured-card h4 {
    font-size: 0.9375rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.featured-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.btn-primary-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #1e40af;
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-primary-small:hover {
    background: #1e3a8a;
}

/* Countries Menu */
.countries-menu {
    width: 600px;
    padding: 1.5rem;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.country-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.country-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.country-column li {
    margin-bottom: 0.5rem;
}

.country-column a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    transition: all 0.2s;
}

.country-column a:hover {
    color: #1e40af;
    padding-left: 0.5rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #374151;
    transition: all 0.3s;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .mega-menu {
        width: 700px;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mega-column.featured {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .header-top-bar {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        transition: left 0.3s;
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .dropdown-menu,
    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        width: 100%;
        display: none;
        margin-top: 0;
        background: #f9fafb;
    }
    
    .nav-item.active .dropdown-menu,
    .nav-item.active .mega-menu {
        display: block;
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-item:hover .dropdown-menu,
    .nav-item:hover .mega-menu {
        transform: none;
    }
}

/* Animation for dropdown appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active state for current page */
.nav-link.active {
    background: #eff6ff;
    color: #1e40af;
}

/* Accessibility */
.nav-link:focus,
.dropdown-menu a:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .header-enhanced {
        background: #1f2937;
        border-bottom-color: #374151;
    }
    
    .nav-link {
        color: #d1d5db;
    }
    
    .nav-link:hover {
        background: #374151;
        color: #60a5fa;
    }
    
    .dropdown-menu,
    .mega-menu {
        background: #1f2937;
        border: 1px solid #374151;
    }
}