/* Base: drawer controls exist only below the mobile breakpoint.
   Without this, a phone-width page widened to desktop leaves the
   cloned drawer sitting at the bottom of the page over the footer. */
.mobile-menu-toggle,
.mobile-drawer,
.mobile-drawer-overlay {
  display: none !important;
}

/* ============================================
   HOSTEL DETROIT — MOBILE NAV OVERRIDE
   Loads last with !important — wins all cascade battles
   ============================================ */

/* ============================================
   SECTION 1: MOBILE HAMBURGER HEADER
   ============================================ */
/* Hide mobile hamburger on desktop by default */
.mobile-menu-toggle {
  display: none;
}

@media screen and (max-width: 991px) {
  .mobile-drawer,
  .mobile-drawer-overlay {
    display: block !important;
  }

  /* ---- Simplified Header: Logo + Hamburger ---- */
  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    background: #fff !important;
    border-bottom: 3px solid #000 !important;
    padding: 12px 0 !important;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1) !important;
  }

  /* Bump fixed header below WP admin bar on mobile */
  .admin-bar .site-header {
    top: 46px !important;
  }

  body.home .site-header {
    background: #fff !important;
    border-bottom: 3px solid #000 !important;
    padding: 12px 0 !important;
  }

  /* ---- Header Layout ---- */
  .site-header .container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 0 16px !important;
    max-width: 100% !important;
  }

  /* ---- Logo ---- */
  .site-branding {
    text-align: left !important;
    width: auto !important;
  }

  .site-logo {
    height: 50px !important;
    width: auto !important;
    max-width: 220px !important;
  }

  /* ---- Hide Regular Nav ---- */
  .main-navigation .nav-menu {
    display: none !important;
  }

  /* ---- Hamburger Button ---- */
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 32px !important;
    height: 24px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 102 !important;
  }

  .mobile-menu-toggle span {
    display: block !important;
    width: 100% !important;
    height: 4px !important;
    background: #000 !important;
    border: 2px solid #000 !important;
    box-shadow: 2px 2px 0 0 #000 !important;
    transition: all 0.2s ease !important;
    transform-origin: center !important;
  }

  /* Hamburger X animation */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg) !important;
    box-shadow: none !important;
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0 !important;
    transform: scaleX(0) !important;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg) !important;
    box-shadow: none !important;
  }

  .mobile-menu-toggle:hover span {
    background: #CF4527 !important;
  }

  /* ---- Full-Screen Drawer ---- */
  .mobile-drawer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #fff !important;
    z-index: 101 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease !important;
    overflow-y: auto !important;
    padding: 90px 16px 100px !important;
  }

  .mobile-drawer.active {
    transform: translateX(0) !important;
  }

  /* ---- Drawer Menu ---- */
  .mobile-drawer .nav-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .mobile-drawer .nav-menu li {
    width: 100% !important;
  }

  /* ---- Big Drawer Buttons ---- */
  .mobile-drawer .nav-menu a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 64px !important;
    padding: 16px 24px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: 4px solid #000 !important;
    box-shadow: 6px 6px 0 0 #000 !important;
    color: #fff !important;
    transition: all 0.15s ease !important;
  }

  .mobile-drawer .nav-menu a:hover {
    transform: translate(-3px, -3px) !important;
    box-shadow: 9px 9px 0 0 #000 !important;
  }

  /* ---- Drawer Colors — Full Theme Palette ---- */
  .mobile-drawer .nav-menu li:nth-child(1) a { background: #0076AF !important; } /* Stay - Blue */
  .mobile-drawer .nav-menu li:nth-child(2) a { background: #E85D9A !important; } /* Groups - Pink */
  .mobile-drawer .nav-menu li:nth-child(3) a { background: #4eaaa7 !important; } /* Local Guides - Teal */
  .mobile-drawer .nav-menu li:nth-child(4) a { background: #CF4527 !important; } /* About - Orange */
  .mobile-drawer .nav-menu li:nth-child(5) a { background: #0076AF !important; } /* Contact - Blue */

  /* Book Now — Big Orange */
  .mobile-drawer .nav-menu li:nth-child(6) a,
  .mobile-drawer .nav-menu a.nav-cta {
    background: #CF4527 !important;
    min-height: 72px !important;
    font-size: 22px !important;
    border: 5px solid #000 !important;
    box-shadow: 8px 8px 0 0 #000 !important;
  }

  .mobile-drawer .nav-menu li:nth-child(6) a:hover,
  .mobile-drawer .nav-menu a.nav-cta:hover {
    box-shadow: 12px 12px 0 0 #000 !important;
  }

  /* ---- Drawer Submenu — Vertical Stack ---- */
  .mobile-drawer .sub-menu {
    display: none !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 12px !important;
    margin-bottom: 4px !important;
    padding: 0 8px !important;
    list-style: none !important;
  }

  .mobile-drawer .menu-item-has-children.active .sub-menu {
    display: flex !important;
  }

  /* Submenu items — full width, smaller */
  .mobile-drawer .sub-menu li {
    width: 100% !important;
  }

  /* Submenu items — AGGRESSIVE reset, force identical sizing */
  .mobile-drawer .sub-menu li a,
  .mobile-drawer .sub-menu li a.nav-cta,
  .mobile-drawer .sub-menu li:nth-child(6) a {
    all: initial !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 16px !important;
    margin: 0 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    text-decoration: none !important;
    color: #fff !important;
    background: #4eaaa7 !important;
    border: 3px solid #000 !important;
    box-shadow: 3px 3px 0 0 #000 !important;
    animation: none !important;
    transform: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  }

  /* Submenu colors — alternating */
  .mobile-drawer .sub-menu li:nth-child(odd) a { background: #0076AF !important; color: #fff !important; }
  .mobile-drawer .sub-menu li:nth-child(even) a { background: #4eaaa7 !important; color: #fff !important; }

  /* Hover — identical for ALL submenu items */
  .mobile-drawer .sub-menu li a:hover,
  .mobile-drawer .sub-menu li a.nav-cta:hover,
  .mobile-drawer .sub-menu li a[href*="donate"]:hover {
    transform: translate(-2px, -2px) !important;
    box-shadow: 5px 5px 0 0 #000 !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    line-height: 44px !important;
  }

  /* ---- Plus/minus indicator ---- */
  .mobile-drawer .menu-item-has-children > a {
    position: relative !important;
  }

  .mobile-drawer .menu-item-has-children > a::after {
    content: "+" !important;
    margin-left: 12px !important;
    font-weight: 400 !important;
    font-size: 28px !important;
    line-height: 1 !important;
    opacity: 0.9 !important;
    transition: transform 0.2s ease !important;
  }

  .mobile-drawer .menu-item-has-children.active > a::after {
    content: "−" !important;
    transform: rotate(0deg) !important;
  }

  /* ---- Overlay ---- */
  .mobile-drawer-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 100 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
  }

  .mobile-drawer-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* ---- Body spacing ---- */
  .site-main {
    padding-top: 77px !important;
  }

  /* ---- Hero padding: push content below fixed 77px header ---- */
  .hero-rebuild {
    margin-top: 0 !important;
  }

  /* ---- Hero padding ---- */
  .hero-section,
  .rooms-hero,
  .groups-hero,
  .about-hero,
  .contact-hero,
  .corktown-hero,
  .neighborhood-hero,
  .detroit-guide-hero,
  .yoga-hero,
  .donate-hero,
  .press-hero,
  .residency-hero,
  .tshirts-hero,
  .apartment-hero,
  .page-hero,
  .news-hero,
  .yoga-page .yoga-hero,
  .yoga-page .hero-section {
    margin-top: 0 !important;
    padding-top: 100px !important;
  }

  /* ---- Enhance floating CTA ---- */
  .sticky-cta {
    bottom: 16px !important;
    right: 16px !important;
  }

  .sticky-cta-btn {
    min-height: 56px !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    border-width: 4px !important;
    box-shadow: 5px 5px 0 0 #000 !important;
  }
}

/* ============================================
   SECTION 2: TINY SCREENS (400px and under)
   ============================================ */
@media screen and (max-width: 400px) {
  .site-logo {
    height: 48px !important;
  }

  .nav-menu {
    gap: 5px !important;
  }

  .nav-menu li a,
  .nav-menu a {
    font-size: 12px !important;
    padding: 10px 1px !important;
    min-height: 44px !important;
    border-width: 2px !important;
    box-shadow: 3px 3px 0 0 #000 !important;
  }
}

/* ============================================
   SECTION 3: MICRO SCREENS (350px and under)
   ============================================ */
@media screen and (max-width: 350px) {
  .nav-menu li a,
  .nav-menu a {
    font-size: 11px !important;
    letter-spacing: -0.2px !important;
    padding: 8px 1px !important;
  }
}

/* ============================================
   TEMPORARY: HIDE LOCAL GUIDES NAV ITEM
   Hidden for production launch while guides
   section is incomplete. Re-enable by deleting
   this block when guides are ready.
   ============================================ */
.nav-menu li:has(a[href="/guides/"]) {
  display: none !important;
}

