/*
 * eHealify Navigation CSS — v7 Premium Redesign (Definitive Fix)
 */

:root {
    --nav-bg:        #1A2E1C; /* SOLID forest green */
    --nav-glass:     rgba(15,26,16,0.98);
    --nav-link:      #C8DDB8;
    --nav-hover:     #F0C27F;
    --nav-active:    #A8D88A;
    --nav-border:    rgba(255,255,255,0.08);
}

/* ══════════════════════════════════════════════════════════
   DESKTOP NAV — No Fade Stability
   ══════════════════════════════════════════════════════════ */

nav.main-navigation,
nav#site-navigation {
    background: #1A2E1C !important; /* SOLID — no transparency, no fade */
    border-bottom: 1px solid var(--nav-border) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
    /* Force GPU layer to prevent repaint flicker */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Scrolled state — Solid darker background, no transparency */
nav.main-navigation.eh-header-scrolled {
    background: #0A140C !important; /* Fully opaque dark */
    box-shadow: 0 6px 28px rgba(0,0,0,0.35) !important;
}

.inside-navigation {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 32px !important;
    min-height: 72px !important;
    flex-wrap: nowrap !important;
    transition: min-height 0.4s ease !important;
}

nav.main-navigation.eh-header-scrolled .inside-navigation {
    min-height: 64px !important;
}

/* ── Logo ────────────────────────────────────────────────── */
.main-navigation .site-title a {
    font-family: var(--font-head) !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #FDFBF7 !important;
    letter-spacing: -0.01em !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    white-space: nowrap !important;
}

/* ── Nav Links ───────────────────────────────────────────── */
.main-navigation .menu > li > a {
    font-family: var(--font-body) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--nav-link) !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    transition: all 0.25s ease !important;
}

.main-navigation .menu > li > a:hover {
    color: var(--nav-hover) !important;
    background: rgba(255,255,255,0.06) !important;
}



/* ── Hide GP mobile elements ────────────────────────────── */
.menu-toggle,
button.menu-toggle,
#mobile-menu-control-wrapper {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════
   MOBILE & TABLET
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .inside-navigation { padding: 0 24px !important; }
}

@media (max-width: 768px) {
    nav.main-navigation,
    nav#site-navigation {
        background: var(--nav-bg) !important;
    }
    .main-navigation .main-nav,
    .main-navigation #primary-menu,
    .main-navigation .menu-bar-items {
        display: none !important;
    }
    .inside-navigation { min-height: 60px !important; }
    .main-navigation .site-title a { font-size: 1.35rem !important; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE DRAWER
   ══════════════════════════════════════════════════════════ */
#eh-mob-btn {
    display: none;
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 100001;
    align-items: center;
    gap: 10px;
    padding: 11px 18px 11px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 40px;
    background: var(--nav-bg);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    -webkit-tap-highlight-color: transparent;
}

#eh-mob-btn:active { transform: scale(0.92); }
#eh-mob-btn[aria-expanded="true"] { background: #000; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.admin-bar #eh-mob-btn { top: 60px; }

.eh-ham { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.eh-ham span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--nav-active);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.eh-ham span:nth-child(2) { width: 14px; }
.eh-ham span:nth-child(3) { width: 10px; }
#eh-mob-btn[aria-expanded="true"] .eh-ham span:nth-child(1) { width: 18px; transform: translateY(6px) rotate(45deg); }
#eh-mob-btn[aria-expanded="true"] .eh-ham span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#eh-mob-btn[aria-expanded="true"] .eh-ham span:nth-child(3) { width: 18px; transform: translateY(-6px) rotate(-45deg); }

#eh-mob-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10,20,12,0.7);
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#eh-mob-backdrop.active { display: block; opacity: 1; }

#eh-mob-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    width: min(340px, 90vw);
    flex-direction: column;
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, #111C12 0%, #0A140C 100%);
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    -webkit-overflow-scrolling: touch;
}
#eh-mob-drawer.open { transform: translateX(0); }

.eh-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.eh-drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FDFBF7;
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
}
.eh-drawer-brand svg { color: var(--nav-active); }
#eh-mob-close {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: var(--nav-active);
    cursor: pointer;
    transition: all 0.2s;
}
#eh-mob-close:active { background: rgba(255,255,255,0.1); transform: scale(0.9); }

.eh-drawer-nav { flex: 1; padding: 20px 0; }
#eh-mob-menu { margin: 0 !important; padding: 0 !important; list-style: none !important; }
#eh-mob-menu li {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
#eh-mob-drawer.open #eh-mob-menu li { opacity: 1; transform: translateX(0); }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(1) { transition-delay: 0.15s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(2) { transition-delay: 0.20s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(3) { transition-delay: 0.25s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(4) { transition-delay: 0.30s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(5) { transition-delay: 0.35s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(6) { transition-delay: 0.40s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(7) { transition-delay: 0.45s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(8) { transition-delay: 0.50s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(9) { transition-delay: 0.55s; }
#eh-mob-drawer.open #eh-mob-menu li:nth-child(10) { transition-delay: 0.60s; }
#eh-mob-menu li a {
    display: block !important;
    padding: 16px 24px !important;
    border-bottom: 1px solid rgba(255,255,255,0.03) !important;
    color: #C8DDB8 !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}
#eh-mob-menu li a:active,
#eh-mob-menu li.current-menu-item > a {
    padding-left: 32px !important;
    background: rgba(255,255,255,0.05) !important;
    color: var(--nav-hover) !important;
}

.eh-drawer-footer {
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
}
.eh-drawer-pinterest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 30px;
    background: #BD081C;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}
.eh-drawer-tagline {
    margin: 0;
    color: rgba(168,216,138,0.4);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-align: center;
}

@media (max-width: 782px) {
    .admin-bar #eh-mob-btn { top: 52px; }
}

@media (max-width: 768px) {
    #eh-mob-btn { display: flex !important; }
}
