/* =====================================================
   OHC Labs — Mobile Navigation System
   Applies globally to all pages
   ===================================================== */

/* ──────────────────────────────────────────────────
   HAMBURGER OVERLAY DRAWER (tablet & below)
────────────────────────────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--primary-dark);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.nav-drawer.open { right: 0; }

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.nav-drawer-header .brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
}
.nav-drawer-close {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.nav-drawer-close:hover { background: rgba(255,255,255,0.2); }
.nav-drawer-close svg { width: 20px; height: 20px; }

/* Drawer sections */
.nav-drawer-body { padding: 16px; flex: 1; }

.nav-drawer-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 12px 8px 6px;
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  color: rgba(255,255,255,0.8);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-bottom: 2px;
}
.nav-drawer-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-drawer-link:hover, .nav-drawer-link.active {
  background: rgba(255,255,255,0.1);
  color: white;
}
.nav-drawer-link .drawer-link-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.nav-drawer-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 12px 0;
}

/* Drawer footer CTA */
.nav-drawer-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.nav-drawer-footer .btn { width: 100%; justify-content: center; }

/* ──────────────────────────────────────────────────
   BOTTOM NAVIGATION BAR (mobile only, ≤ 640px)
────────────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 996;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (max-width: 640px) {
  .bottom-nav { display: flex; }
  /* Add padding to body so content isn't hidden under bottom nav */
  body { padding-bottom: 72px; }
  /* Hide topbar on mobile */
  .topbar { display: none !important; }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(255,255,255,0.5);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 0;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
}
.bottom-nav-item svg { width: 22px; height: 22px; transition: transform 0.2s; }
.bottom-nav-item.active { color: white; }
.bottom-nav-item.active svg { transform: scale(1.1); }
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%; height: 2px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}
/* Highlight "Book" button in accent color */
.bottom-nav-item.nav-book-btn {
  color: var(--accent);
}
.bottom-nav-item.nav-book-btn svg { color: var(--accent); }
.bottom-nav-item .bnav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  background: var(--accent);
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--primary-dark);
}

/* ──────────────────────────────────────────────────
   BOTTOM SHEET "More" Menu (slides up on mobile)
────────────────────────────────────────────────── */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 997;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.bottom-sheet-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: -100%;
  left: 0; right: 0;
  background: var(--surface);
  z-index: 998;
  border-radius: 24px 24px 0 0;
  padding: 0 16px 32px;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 80vh;
  overflow-y: auto;
}
.bottom-sheet.open { bottom: 0; }

.bottom-sheet-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 20px;
}

.bottom-sheet-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.bottom-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.sheet-item:hover, .sheet-item:active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.sheet-item svg { width: 22px; height: 22px; }

.bottom-sheet-links { display: flex; flex-direction: column; gap: 4px; }

.sheet-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s;
}
.sheet-link svg { width: 18px; height: 18px; color: var(--primary-text); }
.sheet-link:hover { background: var(--surface-2); }
.sheet-link-arrow { margin-left: auto; color: var(--text-muted); width: 14px; height: 14px; }

/* ──────────────────────────────────────────────────
   Quick Access Section (below hero)
────────────────────────────────────────────────── */
.quick-access {
  background: var(--surface);
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
@media (max-width: 900px) { .quick-access-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .quick-access-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

.qa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid rgba(27,46,107,0.15);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(27,46,107,0.07);
}
.qa-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
  opacity: 0;
  transition: opacity 0.25s;
}
.qa-card:hover::before, .qa-card:focus::before { opacity: 1; }
.qa-card:hover, .qa-card:focus {
  color: white;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(27,46,107,0.25);
}
.qa-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #1B2E6B, #2A4099);
  transition: background 0.25s;
}
.qa-card:hover .qa-icon { background: rgba(255,255,255,0.18); }
.qa-icon svg { width: 22px; height: 22px; color: white; transition: color 0.25s; }
.qa-card:hover .qa-icon svg { color: white; }
.qa-label { position: relative; z-index: 1; line-height: 1.3; }

/* ──────────────────────────────────────────────────
   Responsive nav adjustments for inner pages
────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .mobile-menu-btn { display: flex !important; }
}

/* dark mode handled globally via --primary-text in design-system.css */
