/* DexScanr Mobile Nav — single source of truth for all 32 pages */
/* Targets body > header (homepage) and body > nav (all other pages) separately */

@media (max-width: 1024px) {

  /* ============================================
     PILL CONTAINER — homepage uses <header>,
     all other pages use <nav> as direct body child
     ============================================ */
  body > header,
  body > nav {
    position: fixed !important;
    height: 52px !important;
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100% - 20px) !important;
    margin: 0 !important;
    border-radius: 50px !important;
    padding: 0 10px 0 14px !important;
    background: #000 !important;
    border: 1px solid rgba(249,115,22,0.12) !important;
    box-shadow: 0 6px 18px 2px rgba(249,115,22,0.30) !important;
  }

  /* Override style.css body > header.header { box-shadow: none } */
  body > header.header {
    box-shadow: 0 6px 18px 2px rgba(249,115,22,0.30) !important;
    backdrop-filter: none !important;
    overflow: visible !important;
    gap: 0 !important;
    justify-content: space-between !important;
    display: flex !important;
    align-items: center !important;
    z-index: 9999 !important;
  }

  /* Override style.css body > header.header .h-logo size rules — higher specificity needed */
  body > header.header .h-logo {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    object-fit: contain !important;
    filter: none !important;
    flex-shrink: 0 !important;
    display: block !important;
  }

  /* ============================================
     LOGO
     homepage: header .h-logo (img inside .header-left)
     other pages: nav .nav-logo img
     ============================================ */
  body > header .h-logo,
  body > nav .nav-logo img,
  body > nav .nav-logo-img {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    object-fit: contain !important;
    filter: none !important;
    flex-shrink: 0 !important;
    display: block !important;
  }

  /* ============================================
     HIDE — desktop-only elements
     ============================================ */
  body > header .header-scan-box,
  body > header .header-nav,
  body > header .h-name,
  body > header #home-pro-status,
  body > header #mobile-pro-status,
  body > nav .nav-links,
  body > nav .nav-logo span,
  body > nav .nav-logo-name,
  body > header .nav-cta,
  body > nav .nav-cta {
    display: none !important;
  }

  /* ============================================
     LEFT SIDE WRAPPER
     ============================================ */
  body > header .header-left,
  body > nav .nav-logo {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    gap: 0 !important;
    text-decoration: none !important;
  }

  /* ============================================
     HAMBURGER BUTTON
     ============================================ */
  body > header .hamburger,
  body > nav .hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    position: relative !important;
  }

  body > header .hamburger span,
  body > nav .hamburger span {
    display: block !important;
    width: 18px !important;
    height: 2px !important;
    background: #f0f0f0 !important;
    border-radius: 2px !important;
    pointer-events: none !important;
  }

  /* ============================================
     MOBILE DROPDOWN MENUS
     homepage: .mobile-nav (default display:none, toggled by .open)
     other pages: .mobile-menu (toggled by toggleMenu())
     Position below pill
     ============================================ */
  body > header .mobile-nav,
  .mobile-menu {
    display: none !important;
    position: fixed !important;
    top: 76px !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100% - 20px) !important;
    background: #0d1117 !important;
    border: 1px solid rgba(249,115,22,0.15) !important;
    border-radius: 16px !important;
    padding: 12px 16px !important;
    z-index: 9998 !important;
    margin: 0 !important;
    border-top: none !important;
  }

  /* ============================================
     BODY PADDING — account for fixed pill
     ============================================ */
  body {
    padding-top: 72px !important;
  }



  /* DROPDOWN LINKS — override global a{color} */
  body > header .mobile-nav a,
  .mobile-menu a {
    color: #f0f0f0 !important;
    text-decoration: none !important;
    font-family: 'Space Mono', monospace !important;
    font-size: 14px !important;
    padding: 8px 4px !important;
    display: block !important;
  }

  body > header .mobile-nav .nav-cta,
  .mobile-menu .nav-cta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    color: #fff !important;
    background: linear-gradient(135deg,#FB923C 0%,#F97316 50%,#EA6C00 100%) !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-family: Inter, sans-serif !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    margin-top: 4px !important;
  }

  /* SHOW dropdown when open */
  body > header .mobile-nav.open,
  .mobile-menu.open {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  /* Override body max-width constraints on pages with centered layouts */
  body > nav,
  body > header {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100% - 20px) !important;
  }

}
