/* ===== EZMUSCLE GLOBAL HEADER STYLES ===== */
/* These styles are used sitewide for consistent navigation */

:root {
    --ezm-bg-dark: #0b0b0b;
    --ezm-bg-light: #f7f7f7;
    --ezm-accent-blue: #3b82f6;
    --ezm-accent-cyan: #22d3ee;
    --ezm-text-muted: #afb6c0;
    --ezm-border-light: rgba(255,255,255,.1);
    --ezm-speed: 0.3s;
    --ezm-easing: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== HEADER RESET & CONTAINMENT ===== */
.ezm-header *,
.ezm-header *::before,
.ezm-header *::after {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    line-height: 1.5 !important;
}

.ezm-header {
    all: initial !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: linear-gradient(180deg, rgba(11,11,11,.98) 0%, rgba(11,11,11,.92) 50%, rgba(11,11,11,.85) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid var(--ezm-border-light) !important;
    display: block !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    box-shadow: 0 4px 30px rgba(0,0,0,.4) !important;
    transition: box-shadow var(--ezm-speed) ease !important;
    width: 100% !important;
}

/* ===== CONTAINER ===== */
.ezm-header .container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 12px clamp(16px, 4vw, 32px) !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== LOGO ===== */
.ezm-logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: var(--ezm-bg-light) !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    font-size: clamp(20px, 2.2vw, 24px) !important;
    position: relative !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(59,130,246,.1), rgba(34,211,238,.05)) !important;
    border: 1px solid var(--ezm-border-light) !important;
    transition: all var(--ezm-speed) ease !important;
    cursor: pointer !important;
}

.ezm-logo:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 0 20px rgba(59,130,246,.3) !important;
}

.ezm-logo svg {
    width: 32px !important;
    height: 32px !important;
    display: block !important;
}

/* ===== NAVIGATION ===== */
.ezm-nav {
    margin-left: auto !important;
    display: flex !important;
}

.ezm-nav > ul {
    display: flex !important;
    align-items: center !important;
    gap: clamp(8px, 1.2vw, 16px) !important;
    list-style: none !important;
}

.ezm-link,
.ezm-toggle {
    appearance: none !important;
    background: none !important;
    border: 0 !important;
    color: var(--ezm-bg-light) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all var(--ezm-speed) ease !important;
    font-size: 15px !important;
}

.ezm-link:hover,
.ezm-toggle:hover {
    color: white !important;
    background: rgba(255,255,255,.05) !important;
    transform: translateY(-2px) !important;
}

.ezm-link:active,
.ezm-toggle:active {
    transform: translateY(0) !important;
}

.ezm-toggle .chev {
    width: 12px !important;
    height: 12px !important;
    display: inline-block !important;
    border-right: 2px solid currentColor !important;
    border-bottom: 2px solid currentColor !important;
    transform: rotate(45deg) !important;
    transition: all var(--ezm-speed) var(--ezm-easing) !important;
    margin-top: -2px !important;
}

.ezm-toggle[aria-expanded="true"] .chev {
    transform: rotate(-135deg) !important;
}

/* ===== MEGA MENU ===== */
.ezm-mega {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
    margin-top: 8px !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transform: translateY(-12px) scale(.95) !important;
    transition: all 0.4s var(--ezm-easing) !important;
    width: 100vw !important;
    box-sizing: border-box !important;
}

.ezm-item.open > .ezm-mega {
    pointer-events: auto !important;
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.ezm-mega .panel {
    max-width: 1400px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 1.3fr 1.3fr 1.2fr 1fr !important;
    gap: clamp(12px, 1.5vw, 18px) !important;
    background: linear-gradient(135deg, #161a1f, #111318) !important;
    border: 1px solid var(--ezm-border-light) !important;
    border-radius: 20px !important;
    padding: clamp(20px, 2.5vw, 28px) !important;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px rgba(255,255,255,.05) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
}

.ezm-section h4 {
    font-size: 13px !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    color: var(--ezm-text-muted) !important;
    margin-bottom: 16px !important;
    font-weight: 700 !important;
}

.ezm-list {
    list-style: none !important;
    display: grid !important;
    gap: 8px !important;
}

.ezm-list a {
    display: grid !important;
    gap: 4px !important;
    text-decoration: none !important;
    color: var(--ezm-bg-light) !important;
    padding: 12px !important;
    border-radius: 10px !important;
    background: transparent !important;
    transition: all var(--ezm-speed) ease !important;
    border: 1px solid transparent !important;
}

.ezm-list a:hover {
    background: rgba(255,255,255,.05) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 0 20px rgba(59,130,246,.3) !important;
    border-color: var(--ezm-border-light) !important;
}

.ezm-list a .sub {
    color: var(--ezm-text-muted) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
}

.ezm-list.scroll {
    max-height: 340px !important;
    overflow-y: auto !important;
    padding-right: 8px !important;
}

.ezm-cta {
    background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(34,211,238,.08)) !important;
    border: 1px solid var(--ezm-border-light) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    display: grid !important;
    gap: 12px !important;
    align-content: start !important;
}

.ezm-cta .badge {
    font-size: 13px !important;
    color: var(--ezm-text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.ezm-cta .badge::before {
    content: '⭐' !important;
    font-size: 16px !important;
}

.ezm-cta .btn {
    text-align: center !important;
    padding: 14px 16px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all var(--ezm-speed) ease !important;
    font-size: 15px !important;
    border: 0 !important;
    cursor: pointer !important;
}

.ezm-cta .btn.primary {
    background: linear-gradient(135deg, var(--ezm-accent-blue), var(--ezm-accent-cyan)) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(59,130,246,.3) !important;
}

.ezm-cta .btn.primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(59,130,246,.4) !important;
}

.ezm-cta .btn.ghost {
    background: rgba(255,255,255,.08) !important;
    color: var(--ezm-bg-light) !important;
    border: 1px solid rgba(255,255,255,.15) !important;
}

.ezm-cta .btn.ghost:hover {
    background: rgba(255,255,255,.12) !important;
    transform: translateY(-2px) !important;
}

/* ===== SCRIM (Backdrop) ===== */
.ezm-scrim {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.6) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.4s ease !important;
    backdrop-filter: blur(8px) !important;
    z-index: 9998 !important;
}

.ezm-scrim.show {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ===== MOBILE BURGER MENU ===== */
.ezm-burger {
    margin-left: auto !important;
    appearance: none !important;
    border: 0 !important;
    background: rgba(255,255,255,.08) !important;
    color: var(--ezm-bg-light) !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    display: none !important;
    place-items: center !important;
    position: relative !important;
    transition: all var(--ezm-speed) ease !important;
    cursor: pointer !important;
}

.ezm-burger:hover {
    background: rgba(255,255,255,.12) !important;
    transform: scale(1.05) !important;
}

.ezm-burger span,
.ezm-burger::before,
.ezm-burger::after {
    content: "" !important;
    width: 22px !important;
    height: 2px !important;
    background: currentColor !important;
    display: block !important;
    border-radius: 2px !important;
    transition: all 0.4s var(--ezm-easing) !important;
    position: absolute !important;
}

.ezm-burger::before {
    transform: translateY(-8px) !important;
}

.ezm-burger::after {
    transform: translateY(8px) !important;
}

.ezm-header.mobile-open .ezm-burger span {
    opacity: 0 !important;
}

.ezm-header.mobile-open .ezm-burger::before {
    transform: translateY(0) rotate(45deg) !important;
}

.ezm-header.mobile-open .ezm-burger::after {
    transform: translateY(0) rotate(-45deg) !important;
}

/* ===== MOBILE DRAWER ===== */
.ezm-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: min(90vw, 400px) !important;
    background: linear-gradient(135deg, #111318, #161a1f) !important;
    transform: translateX(100%) !important;
    transition: transform 0.4s var(--ezm-easing) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    border-left: 1px solid var(--ezm-border-light) !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    visibility: hidden !important;
    pointer-events: none !important;
    box-shadow: -20px 0 40px rgba(0,0,0,.3) !important;
    z-index: 10000 !important;
}

.ezm-header.mobile-open .ezm-drawer {
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
}

.ezm-drawer-header {
    padding: 20px 24px 16px !important;
    border-bottom: 1px solid var(--ezm-border-light) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: rgba(11,11,11,.5) !important;
    backdrop-filter: blur(10px) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.ezm-drawer-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--ezm-bg-light) !important;
    margin: 0 !important;
}

.ezm-drawer-close {
    appearance: none !important;
    border: none !important;
    background: rgba(255,255,255,.1) !important;
    color: var(--ezm-bg-light) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all var(--ezm-speed) ease !important;
    font-size: 20px !important;
    font-weight: bold !important;
}

.ezm-drawer-close:hover {
    background: rgba(255,255,255,.15) !important;
    transform: scale(1.1) !important;
}

.ezm-drawer-content {
    padding: 20px 24px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
}

.ezm-drawer details {
    border-radius: 12px !important;
    background: rgba(255,255,255,.05) !important;
    border: 1px solid var(--ezm-border-light) !important;
    overflow: hidden !important;
}

.ezm-drawer summary {
    cursor: pointer !important;
    list-style: none !important;
    padding: 16px !important;
    font-weight: 700 !important;
    color: var(--ezm-bg-light) !important;
    position: relative !important;
    transition: all var(--ezm-speed) ease !important;
}

.ezm-drawer summary::after {
    content: '+' !important;
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: transform var(--ezm-speed) ease !important;
}

.ezm-drawer details[open] summary::after {
    transform: translateY(-50%) rotate(45deg) !important;
}

.ezm-drawer summary:hover {
    background: rgba(255,255,255,.08) !important;
}

.ezm-drawer ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 8px !important;
    display: grid !important;
    gap: 4px !important;
}

.ezm-drawer a {
    color: var(--ezm-bg-light) !important;
    text-decoration: none !important;
    padding: 12px !important;
    display: block !important;
    border-radius: 8px !important;
    transition: all var(--ezm-speed) ease !important;
}

.ezm-drawer a:hover {
    background: rgba(255,255,255,.08) !important;
    transform: translateX(4px) !important;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 1024px) {
    .ezm-nav {
        display: none !important;
    }
    .ezm-burger {
        display: grid !important;
    }
}

@media (min-width: 1025px) {
    .ezm-nav {
        display: block !important;
    }
    .ezm-drawer,
    .ezm-scrim {
        display: none !important;
    }
    .ezm-burger {
        display: none !important;
    }
}

/* ===== LOCK BODY WHEN DRAWER OPEN ===== */
html.ezm-lock {
    overflow: hidden !important;
}

body.ezm-lock {
    position: fixed !important;
    width: 100% !important;
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ezm-header {
    animation: slideDown 0.5s ease-out;
}

/* ===== SCROLLBAR STYLING ===== */
.ezm-drawer::-webkit-scrollbar {
    width: 8px !important;
}

.ezm-drawer::-webkit-scrollbar-track {
    background: rgba(255,255,255,.05) !important;
}

.ezm-drawer::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.1) !important;
    border-radius: 4px !important;
}

.ezm-drawer::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,.15) !important;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .ezm-header *,
    .ezm-header *::before,
    .ezm-header *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.ezm-link:focus-visible,
.ezm-toggle:focus-visible,
.ezm-drawer a:focus-visible {
    outline: 2px solid var(--ezm-accent-blue) !important;
    outline-offset: 2px !important;
}
