/* Top Bar Styles for QROVER Headers */

/* General Top Bar Styles */
.top-bar, .glass-top-bar {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

/* Contact Info Animations */
.contact-info a, .glass-contact-info a {
    position: relative;
    overflow: hidden;
}

.contact-info a::before, .glass-contact-info a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-gold);
    transition: width 0.3s ease;
}

.contact-info a:hover::before, .glass-contact-info a:hover::before {
    width: 100%;
}

/* Dropdown Animations */
.dropdown-menu, .glass-dropdown-menu {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

.dropdown-menu.show, .glass-dropdown-menu.show {
    animation-name: dropdownFadeIn;
}

.dropdown-menu.hide, .glass-dropdown-menu.hide {
    animation-name: dropdownFadeOut;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes dropdownFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* Dropdown Item Hover Effects */
.dropdown-menu a, .glass-dropdown-menu a {
    position: relative;
    overflow: hidden;
}

.dropdown-menu a::before, .glass-dropdown-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.dropdown-menu a:hover::before, .glass-dropdown-menu a:hover::before {
    left: 100%;
}

/* Icon Animations */
.dropdown-menu i, .glass-dropdown-menu i {
    transition: all 0.3s ease;
}

.dropdown-menu a:hover i, .glass-dropdown-menu a:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Button Pulse Effect */
.dropdown-toggle, .glass-dropdown-toggle {
    position: relative;
}

.dropdown-toggle::after, .glass-dropdown-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.dropdown-toggle:hover::after, .glass-dropdown-toggle:hover::after {
    width: 100%;
    height: 100%;
}

/* RTL Support */
[dir="rtl"] .contact-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .glass-dropdown-menu {
    right: 0;
    left: auto;
}

/* Loading Animation for Contact Info */
@keyframes contactPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.contact-info.loading, .glass-contact-info.loading {
    animation: contactPulse 1.5s infinite;
}

/* Accessibility Improvements */
.dropdown-toggle:focus, .glass-dropdown-toggle:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

.dropdown-menu a:focus, .glass-dropdown-menu a:focus {
    background: rgba(255, 215, 0, 0.2) !important;
    outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .top-bar, .glass-top-bar {
        background: rgba(0, 0, 0, 0.8) !important;
        border-bottom: 2px solid var(--primary-gold) !important;
    }
    
    .contact-info a, .glass-contact-info a {
        color: white !important;
    }
    
    .dropdown-menu, .glass-dropdown-menu {
        background: rgba(0, 0, 0, 0.9) !important;
        border: 2px solid var(--primary-gold) !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .top-bar, .glass-top-bar,
    .dropdown-menu, .glass-dropdown-menu,
    .contact-info a, .glass-contact-info a,
    .dropdown-toggle, .glass-dropdown-toggle {
        transition: none !important;
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    .top-bar, .glass-top-bar {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .top-bar {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .dropdown-menu {
        background: rgba(10, 10, 10, 0.95) !important;
    }
}

/* Mobile Landscape Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .top-bar, .glass-top-bar {
        padding: 0.25rem 0 !important;
        font-size: 0.8rem !important;
    }
    
    .contact-info, .glass-contact-info {
        gap: 0.5rem !important;
    }
    
    .dropdown-toggle, .glass-dropdown-toggle {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .dropdown-toggle, .glass-dropdown-toggle {
        padding: 0.75rem 1rem !important;
        min-height: 44px;
    }
    
    .dropdown-menu a, .glass-dropdown-menu a {
        padding: 1rem !important;
        min-height: 44px;
    }
}

/* Ultra-wide Screen Support */
@media (min-width: 1920px) {
    .top-bar .container, .glass-top-bar .container {
        max-width: 1400px;
    }
}

/* Small Height Screens */
@media (max-height: 600px) {
    .top-bar, .glass-top-bar {
        padding: 0.25rem 0 !important;
    }
    
    .dropdown-menu, .glass-dropdown-menu {
        max-height: 200px;
        overflow-y: auto;
    }
}
