/* Modern Responsive Header with Glassmorphism */

/* Base header styles */
#sticky-menu {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced glassmorphism effect */
#sticky-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border-radius: 0;
    pointer-events: none;
    z-index: -1;
}

/* Header sections */
#sticky-menu > div {
    position: relative;
    z-index: 1;
}

/* Top section styling */
#sticky-menu > div:first-child {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Bottom section styling */
#sticky-menu > div:last-of-type {
    background: rgba(255, 255, 255, 0.03);
}

/* Logo styling */
#sticky-menu .flex-shrink-0 img {
    transition: all 0.3s ease;
}

#sticky-menu .flex-shrink-0 img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Navigation links */
#sticky-menu nav a {
    position: relative;
    overflow: hidden;
}

#sticky-menu nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

#sticky-menu nav a:hover::before {
    width: 100%;
}

/* Dropdown styling */
#sticky-menu .group:hover .group-hover\:opacity-100 {
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button and interactive element styling */
#sticky-menu button,
#sticky-menu .bg-white\/10 {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#sticky-menu button:hover,
#sticky-menu .bg-white\/10:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Ripple effect for buttons */
#sticky-menu button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#sticky-menu button:active::before {
    width: 300px;
    height: 300px;
}

/* Mobile menu styling */
#mobile-menu-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#mobile-menu-panel {
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mobile menu animations */
#mobile-menu-panel {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-panel.-translate-x-full {
    transform: translateX(-100%);
}

/* Hamburger menu animation */
#hamburger-line-1,
#hamburger-line-2,
#hamburger-line-3 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Search bar styling */
#search-bar {
    transition: all 0.3s ease;
}

#search-bar.hidden {
    display: none;
}

/* Mobile menu content styling */
#mobile-menu-panel nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

#mobile-menu-panel nav a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    transform: translateX(4px);
}

/* Mobile menu header styling */
#mobile-menu-panel .bg-gradient-to-r {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    #sticky-menu .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    #sticky-menu {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    #sticky-menu .h-32 {
        height: 6rem;
    }
    
    #sticky-menu .lg\:h-40 {
        height: 6rem;
    }
    
    /* Ensure mobile menu trigger is always visible */
    #sticky-menu button[onclick="toggleMobileMenu()"] {
        display: flex !important;
    }
}

@media (max-width: 640px) {
    #sticky-menu .max-w-7xl {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    #sticky-menu .space-x-4 > * + * {
        margin-left: 0.5rem;
    }
    
    #sticky-menu .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #sticky-menu .py-2\.5 {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* Mobile menu panel width adjustment */
    #mobile-menu-panel {
        width: 100%;
        max-width: 320px;
    }
}

/* Focus states for accessibility */
#sticky-menu button:focus,
#sticky-menu a:focus,
#sticky-menu select:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for mobile menu */
#mobile-menu-panel::-webkit-scrollbar {
    width: 4px;
}

#mobile-menu-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

#mobile-menu-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

#mobile-menu-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Loading states */
#sticky-menu.loading {
    opacity: 0.8;
    pointer-events: none;
}

/* Enhanced glassmorphism for modern browsers */
@supports (backdrop-filter: blur(20px)) {
    #sticky-menu {
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
    }
}

/* Fallback for older browsers */
@supports not (backdrop-filter: blur(10px)) {
    #sticky-menu {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #sticky-menu {
        background: rgba(0, 0, 0, 0.3);
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }
    
    #sticky-menu::before {
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.05) 100%
        );
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    #sticky-menu {
        background: rgba(0, 0, 0, 0.9);
        border-bottom: 3px solid #ffffff;
    }
    
    #sticky-menu button,
    #sticky-menu .bg-white\/10 {
        border: 2px solid #ffffff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    #sticky-menu,
    #sticky-menu *,
    #mobile-menu-panel {
        transition: none !important;
        animation: none !important;
    }
}

/* Body scroll lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Ensure mobile menu is above all other content */
#mobile-menu-overlay {
    z-index: 9999;
}

#mobile-menu-panel {
    z-index: 10000;
}
