/* ============================================================
   MXNN MEDIA — HEADER / NAVIGATION STYLES
   Extracted from min_styles.css
   Covers: glass panels, mega menu, dropdowns, bento cards,
           shimmer CTA, blur overlay, mobile menu, scrollbar
   ============================================================ */

/* Advanced Glassmorphism Base */
.glass-panel {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.7) 0%, rgba(10, 10, 10, 0.5) 100%);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.01);
    box-shadow: 0 40px 80px -12px rgba(0, 0, 0, 0.9), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-dropdown {
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.9) 0%, rgba(8, 8, 8, 0.98) 100%);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 1), 
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Nav Fluid Highlight Pill (Global) */
#nav-highlight {
    position: absolute;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.25, 1.2, 0.3, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 0 20px rgba(255,255,255,0.05);
}

/* Nav Item Buttons */
.nav-btn {
    position: relative;
    z-index: 10;
    transition: color 0.3s ease;
}

/* Invisible bridge to prevent hover dead zones */
.nav-btn::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 35px;
}

/* Mega Menu Core structural styles */
.nav-item-group { position: relative; }
.nav-item-group.is-mega { position: static; }

.dropdown-wrapper {
    position: absolute;
    top: 100%;
    padding-top: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.98) rotateX(-8deg);
    transform-origin: top center;
    transition: all 0.45s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
    z-index: 50;
    perspective: 1000px;
}

/* Standard small dropdowns */
.dropdown-standard { width: max-content; left: 0; }
.dropdown-right { width: max-content; left: auto; right: 0; }
.dropdown-center {
    width: max-content;
    left: 50%;
    transform: translate(-50%, 16px) scale(0.98) rotateX(-8deg);
}

/* Full Width Dropdown Modifier */
.dropdown-full {
    left: 0;
    right: 0;
    width: 100%;
}

/* Hover Triggers */
.nav-item-group:hover .dropdown-wrapper {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1) rotateX(0);
    pointer-events: auto;
}
.nav-item-group:hover .dropdown-center {
    transform: translate(-50%, 0) scale(1) rotateX(0);
}

/* Bento Box Ultimate Hover Effects */
#main-nav .bento-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
#main-nav .bento-card:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.8), 
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Dynamic Right Panel Item Animations */
.stagger-item {
    opacity: 0;
    transform: translateX(15px) translateY(10px) scale(0.95);
    animation: slideInFade 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
@keyframes slideInFade {
    to { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}

/* Left Panel Magnetic Pill */
#left-panel-highlight {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 0 15px rgba(255,255,255,0.03);
    transition: all 0.4s cubic-bezier(0.25, 1.2, 0.3, 1);
    pointer-events: none;
    z-index: 0;
}

/* Left Panel Button Base */
.left-panel-btn {
    position: relative;
    z-index: 10;
}

/* Shimmer CTA Button */
.btn-shimmer {
    background: linear-gradient(90deg, #ffffff 0%, #d4d4d4 25%, #ffffff 50%);
    background-size: 200% auto;
    color: #000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-shimmer:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5), inset 0 0 15px rgba(255,255,255,1);
    transform: scale(1.03);
}

/* Global Blur Overlay */
#global-blur {
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.8s ease;
    background: radial-gradient(circle at 50% 15%, rgba(5,5,5,0.3) 0%, rgba(0,0,0,0.7) 100%);
}
body.nav-hovered #global-blur {
    opacity: 1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Micro-graphics: Noise & High-Tech Grid */
.noise-bg {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: inherit;
    z-index: -1;
}
.tech-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse at top left, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at top left, black 20%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    border-radius: inherit;
}

/* Thin Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* Responsive & Mobile Enhancements */
@media (min-width: 1024px) and (max-width: 1280px) {
    .nav-btn { padding-left: 0.75rem !important; padding-right: 0.75rem !important; font-size: 13px !important; }
    #desktop-nav-list { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
}

/* Mobile Menu State */
#mobile-menu {
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.mobile-nav-open #mobile-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
}
.mobile-category-list {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.mobile-category-list.open {
    grid-template-rows: 1fr;
}
.mobile-category-list-inner {
    overflow: hidden;
}

@media (max-width: 1024px) {
    #nav-container { border-radius: 20px; }
    .nav-btn::after { display: none; }
}
/* Breathing room below the fixed header (skips index.html via body#home) */
body:not(#home) {
    padding-top: 120px;
}
@media (max-width: 1024px) {
    body:not(#home) {
        padding-top: 90px;
    }
}
