/* ═══════════════════════════════════════════════════════════
   🔧 ENHANCED HEADER COLOR FIX - COMPREHENSIVE SOLUTION
   ═══════════════════════════════════════════════════════════ */

/* Force header background with maximum specificity */
.top-bar,
header.top-bar,
body .top-bar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #b45309 100%) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.1) inset !important;
}

/* Ensure all header text stays white with high specificity */
.top-bar *,
.top-bar .container *,
.top-bar .header-layout *,
.top-bar .brand *,
.top-bar nav *,
.top-bar .header-left *,
.top-bar .header-right * {
    color: white !important;
}

/* Brand section styling */
.top-bar .brand .logo,
.top-bar .logo {
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
}

/* Tagline golden color */
.top-bar .tagline,
.top-bar .brand .tagline {
    color: #d4af37 !important;
    background: none !important;
    -webkit-text-fill-color: #d4af37 !important;
}

/* Navigation links styling */
.top-bar nav a,
.top-bar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
}

/* Active and hover states for navigation */
.top-bar nav a:hover,
.top-bar nav a.active,
.top-bar .nav-link:hover,
.top-bar .nav-link.active {
    color: #d4af37 !important;
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2) !important;
}

/* Language switcher styling */
.top-bar .language-switcher,
.top-bar .language-dropdown,
.top-bar #language-select {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px) !important;
}

.top-bar .language-dropdown option,
.top-bar #language-select option {
    background: #1e293b !important;
    color: white !important;
}

/* CTA button styling */
.top-bar .cta-btn,
.top-bar .btn.primary {
    background: linear-gradient(135deg, #b45309 0%, #d4af37 100%) !important;
    color: #0f172a !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.3), 0 4px 12px rgba(212, 175, 55, 0.2) !important;
}

.top-bar .cta-btn:hover,
.top-bar .btn.primary:hover {
    background: linear-gradient(135deg, #d4af37 0%, #b45309 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 32px rgba(180, 83, 9, 0.4), 0 6px 16px rgba(212, 175, 55, 0.3) !important;
}

/* Brand logo container */
.top-bar .brand-logo {
    background: transparent !important;
    border-radius: 50% !important;
    padding: 0.5rem !important;
    box-shadow: none !important;
}

.top-bar .brand-logo img {
    border-radius: 50% !important;
}

/* Navigation indicator */
.top-bar .nav-indicator {
    background: #d4af37 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5) !important;
}

/* Condensed header state */
.top-bar.is-condensed {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #b45309 100%) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    padding: 0.8rem 0 !important;
}

/* Glass morphism effects */
.top-bar::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.top-bar .container {
    position: relative !important;
    z-index: 1 !important;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .top-bar {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #b45309 100%) !important;
        padding: 1rem 0 !important;
    }
    
    .top-bar .header-layout {
        background: rgba(15, 23, 42, 0.95) !important;
        border-radius: 12px !important;
        padding: 1rem !important;
        margin: 0.5rem !important;
        backdrop-filter: blur(20px) !important;
    }
    
    .top-bar .header-nav {
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        padding: 0.75rem !important;
        margin-top: 0.5rem !important;
    }
    
    .top-bar nav a {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .top-bar .cta-btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.85rem !important;
        min-height: 44px !important;
    }
    
    .top-bar .language-dropdown {
        padding: 0.6rem 2rem 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        min-height: 44px !important;
    }
}

/* Tablet responsive fixes */
@media (max-width: 1024px) and (min-width: 769px) {
    .top-bar {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #b45309 100%) !important;
    }
    
    .top-bar nav a {
        padding: 0.7rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .top-bar {
        background: #000000 !important;
        border-bottom: 2px solid #ffffff !important;
    }
    
    .top-bar * {
        color: #ffffff !important;
    }
    
    .top-bar .tagline {
        color: #ffff00 !important;
    }
    
    .top-bar nav a:hover,
    .top-bar nav a.active {
        color: #ffff00 !important;
        background: #333333 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .top-bar,
    .top-bar *,
    .top-bar::before {
        animation: none !important;
        transition: none !important;
    }
}

/* Print styles */
@media print {
    .top-bar {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        border-bottom: 2px solid #000000 !important;
    }
    
    .top-bar * {
        color: #000000 !important;
    }
}

/* Force visibility and positioning */
.top-bar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 120 !important;
    width: 100% !important;
}

/* Ensure proper stacking context */
.top-bar,
.top-bar .container,
.top-bar .header-layout {
    position: relative !important;
    z-index: auto !important;
}

/* Fix any potential overflow issues */
.top-bar {
    overflow: visible !important;
}

.top-bar .container {
    overflow: visible !important;
}

/* Ensure smooth transitions when not in reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .top-bar {
        transition: all 0.3s ease !important;
    }
    
    .top-bar nav a {
        transition: all 0.3s ease !important;
    }
    
    .top-bar .cta-btn {
        transition: all 0.3s ease !important;
    }
}