/* ============================================================
   SHARED MOBILE NAV — used by both index.php and header.php
   ============================================================ */

/* Lock body scroll when mobile nav is open */
body.mobile-nav-open { overflow: hidden; }

/* Hidden on desktop */
.mobile-nav-overlay { display: none; }
.mobile-toggle { display: none; }

/* Hamburger button — must be above .mobile-nav-overlay (10004) so user can close */
.mobile-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 10005;
  position: relative;
}
.mobile-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s;
}
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

@media (max-width: 991px) {
  .mobile-toggle { display: block; }
  .mobile-toggle span { background: #fe5900; }
  .mobile-toggle.active span { background: #fff; }

  /* Hide desktop nav and meanmenu bar on mobile — we use our own overlay */
  .desktop-nav-new,
  .mean-bar,
  .mean-nav,
  .mean-push { display: none !important; }

  /* Overlay — z-index must beat #header (10002 on homepage) and .mobile-toggle (10003) */
  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #0a1628;
    z-index: 10004;
    padding: 100px 30px 30px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .mobile-nav-overlay.open { transform: translateX(0); }

  /* Close button — top right, orange box matching toggle style */
  .mobile-nav-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: #fe5900;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
  }
  .mobile-nav-close span {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
  }

  /* Menu list */
  .mobile-nav-overlay ul { list-style: none; padding: 0; margin: 0; }
  .mobile-nav-overlay > ul > li { border-bottom: 1px solid rgba(255,255,255,0.15); }
  .mobile-nav-overlay > ul > li > a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    text-decoration: none;
  }

  /* Parent items with submenus */
  .mobile-nav-overlay .has-sub {
    position: relative;
  }

  /* Toggle button */
  .mobile-nav-overlay .sub-toggle {
    position: absolute;
    top: 8px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }
  .mobile-nav-overlay .sub-toggle span {
    font-size: 22px;
    font-weight: 700;
    color: #0a1628;
    line-height: 1;
  }

  /* Sub-menu — override desktop .sub-menu styles that leak in from style.css,
     homepage.css, and font-override.css */
  .mobile-nav-overlay .sub-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: none;
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: auto !important;
  }
  .mobile-nav-overlay .sub-menu.open { display: block; }
  .mobile-nav-overlay .sub-menu li { border-top: 1px solid rgba(255,255,255,0.15); }
  .mobile-nav-overlay .sub-menu li a {
    display: block !important;
    padding: 14px 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    text-decoration: none;
    background: none !important;
  }
  .mobile-nav-overlay .sub-menu li a:hover {
    color: #f7941d !important;
    padding-left: 0 !important;
    background: none !important;
  }
}
