/* Mobile-first quick navigation for the strategic screens (task-17).
   Hidden on desktop; the header navigation keeps the full section list so nothing
   becomes unreachable. Fixed to the viewport bottom with safe-area padding and a
   matching body offset so it never covers page content. */
.bottom-nav { display: none; }

@media (max-width: 768px) {
  body.waz-theme {
    --bottom-nav-height: 4.35rem;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 0.5rem);
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid rgba(223, 183, 119, 0.45);
    background: linear-gradient(180deg, rgba(13, 31, 38, 0.98), rgba(6, 18, 24, 0.99));
    box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.4);
    isolation: isolate;
  }

  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 2.75rem;
    min-width: 0;
    padding: 0.5rem 0.15rem 0.45rem;
    color: #c5d3cd;
    text-decoration: none;
    text-align: center;
    font-size: 0.56rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
  }

  .bottom-nav a svg {
    width: 1.3rem;
    height: 1.3rem;
    flex: none;
    display: block;
  }

  .bottom-nav a span {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .bottom-nav a:hover { color: #f0eee5; }
  .bottom-nav a[aria-current="page"] {
    color: #f3d298;
    background: rgba(214, 163, 84, 0.13);
    box-shadow: inset 0 2px 0 var(--color-amber);
  }
  .bottom-nav a[aria-current="page"] svg { color: var(--color-amber); }
}

/* Very narrow phones: keep all six targets >=44 px tall without horizontal scroll. */
@media (max-width: 360px) {
  .bottom-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bottom-nav a { font-size: 0.5rem; padding-left: 0.08rem; padding-right: 0.08rem; }
  .bottom-nav a svg { width: 1.15rem; height: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav, .bottom-nav * { transition: none !important; animation: none !important; }
}

@media print {
  .bottom-nav { display: none !important; }
  body.waz-theme { padding-bottom: 0 !important; }
}
