/**
 * mobile-nav.css — Mobile navigation system (hamburger + slide-out menu)
 * Owns: hamburger button, off-canvas overlay, menu panel, and their transitions
 * Does NOT own: nav branding/logo styles (those live in the page-specific CSS)
 */

/* ── Overlay backdrop ── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mobile-nav-overlay.is-open {
  display: block;
  opacity: 1;
}

/* ── Hamburger button ── */
.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-right: -10px; /* optical alignment with nav padding */
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 4px;
  transition: background 0.15s;
}
.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus {
  background: rgba(0,0,0,0.08);
  outline: none;
}
.mobile-nav-toggle:focus-visible {
  outline: 2px solid var(--green, #43B02A);
  outline-offset: 2px;
}
.mobile-nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #333F48;
  border-radius: 2px;
  position: relative;
  transition: background 0.2s;
}
.mobile-nav-toggle-bar::before,
.mobile-nav-toggle-bar::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #333F48;
  border-radius: 2px;
  transition: transform 0.25s ease, top 0.25s ease, bottom 0.25s ease;
}
.mobile-nav-toggle-bar::before { top: -7px; }
.mobile-nav-toggle-bar::after  { bottom: -7px; }

/* Active / open state */
.mobile-nav-toggle.is-open .mobile-nav-toggle-bar { background: transparent; }
.mobile-nav-toggle.is-open .mobile-nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}
.mobile-nav-toggle.is-open .mobile-nav-toggle-bar::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* ── Menu panel ── */
.mobile-nav-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: #fff;
  z-index: 999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
.mobile-nav-panel.is-open {
  display: block;
  transform: translateX(0);
}

/* Panel header with close button */
.mobile-nav-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #D0D3D4;
  background: #F5F5F0;
}
.mobile-nav-panel-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.mobile-nav-panel-logo-name {
  font-size: 15px;
  font-weight: 700;
  color: #333F48;
  letter-spacing: 0.04em;
}
.mobile-nav-panel-logo-tag {
  font-size: 9px;
  font-weight: 600;
  color: #BD9A51;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mobile-nav-close {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.mobile-nav-close:hover { background: rgba(0,0,0,0.06); }
.mobile-nav-close svg { display: block; }

/* Panel links */
.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-nav-links li {
  border-bottom: 1px solid #E8EAEB;
}
.mobile-nav-links li:last-child { border-bottom: none; }
.mobile-nav-links a {
  display: block;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #333F48;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav-links a:hover {
  background: #F0F7EC;
  color: #43B02A;
}
.mobile-nav-links a.active {
  color: #43B02A;
  background: #F0F7EC;
}
.mobile-nav-links a.mobile-nav-cta-btn {
  background: #43B02A;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-align: center;
  padding: 16px 20px;
  display: block;
  border-radius: 0;
}
.mobile-nav-links a.mobile-nav-cta-btn:hover {
  background: #3a9d23;
  color: #fff;
}

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
  /* Show hamburger, hide desktop links */
  .mobile-nav-toggle { display: flex; }
  .nav-links-desktop { display: none !important; }
  .hiw-nav-links { display: none !important; }
  .pr-nav-links { display: none !important; }
  .vl-nav-links { display: none !important; }
}

/* Extra-small (iPhone SE 375px) */
@media (max-width: 375px) {
  .mobile-nav-panel { width: 100vw; }
}