/*
 * navigation.css — Header, sidebar, breadcrumb, search bar
 * Minecraft Master Guide
 */

/* ════════════════════════════════════════
   SITE HEADER
   Nielsen H1: Visibility of system status
════════════════════════════════════════ */
.site-header {
  grid-column: 1 / -1;
  background: var(--bg-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 0;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--header-h);
  padding: 0 24px;
  text-decoration: none;
  background: rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.08);
  width: var(--sidebar-w);
  flex-shrink: 0;
}
.brand-icon { font-size: 1.4rem; flex-shrink: 0; }
.brand-text { margin-left: 10px; }
.brand-name { display: block; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; color: #fff; letter-spacing: 0.5px; line-height: 1.2; }
.brand-sub  { display: block; font-size: 0.65rem; color: rgba(255,255,255,0.4); letter-spacing: 0.3px; }

.header-center {
  flex: 1;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ════════════════════════════════════════
   SEARCH BAR
   Nielsen H7: Flexibility & efficiency (/ shortcut)
════════════════════════════════════════ */
.search-wrap {
  position: relative;
  max-width: 380px;
  width: 100%;
}
.search-input {
  width: 100%;
  padding: 7px 14px 7px 34px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  display: block;
  box-sizing: border-box;
}
.search-input::placeholder { color: rgba(255,255,255,0.35); }
.search-input:focus { background: rgba(255,255,255,0.12); border-color: var(--green-light); }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  line-height: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
  z-index: 2;
  user-select: none;
}
.search-hint {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
  font-family: var(--font-mono);
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hbadge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.hbadge-check { background: rgba(45,106,32,0.8); color: #d1ffd6; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

/* ════════════════════════════════════════
   SIDEBAR NAVIGATION
   Nielsen H1: Active state always visible
   Nielsen H6: Recognition over recall
════════════════════════════════════════ */
.sidebar {
  background: var(--bg-sidebar);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.sidebar::-webkit-scrollbar       { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-section-label {
  padding: 20px 16px 6px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.25);
  font-family: var(--font-mono);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--sidebar-inactive);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  position: relative;
  min-height: 44px; /* Touch target */
}
.nav-item:focus-visible { outline: 2px solid var(--green-light); outline-offset: -2px; }
.nav-item:hover { color: rgba(255,255,255,0.95); background: rgba(255,255,255,0.05); }
.nav-item.active { color: #fff; background: rgba(74,158,42,0.18); }

/* Active indicator strip */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--green-light);
  border-radius: 0 2px 2px 0;
}
.nav-icon  { font-size: 1.05rem; flex-shrink: 0; width: 22px; text-align: center; }
.nav-label { flex: 1; }

/* Reading progress — Nielsen H6 */
.sidebar-progress {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.progress-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.progress-bar-wrap {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #7ed461);
  border-radius: 4px;
  transition: width 0.6s ease;
  width: 0%;
}
.progress-text {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  text-align: right;
  font-family: var(--font-mono);
}

/* ════════════════════════════════════════
   BREADCRUMB
   Nielsen H1: System status / location awareness
════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 32px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-2);
  font-size: 0.8rem;
  color: var(--ink-3);
  position: sticky;
  top: var(--header-h);
  z-index: 100;
}
.breadcrumb a { color: var(--green); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-cur { color: var(--ink-2); font-weight: 600; }
.breadcrumb-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.meta-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* ════════════════════════════════════════
   MOBILE SCRIM + RESPONSIVE NAV
════════════════════════════════════════ */
.mobile-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 140;
  backdrop-filter: blur(2px);
  animation: scrimIn 0.2s ease;
}
.mobile-scrim.active { display: block; }
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-h) auto 1fr;
  }
  .sidebar {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: min(280px, 85vw);
    bottom: 0;
    z-index: 150;
    height: auto;
    max-height: calc(100vh - var(--header-h));
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.mobile-open { display: flex; }
  .menu-toggle         { display: flex; }
  .header-brand        { width: auto; border-right: none; }
  .search-hint         { display: none; }
  .breadcrumb          { padding: 8px 16px; }
}
@media (max-width: 480px) {
  .header-badges { display: none; }
}

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
  background: var(--bg-header);
  color: rgba(255,255,255,0.4);
  padding: 28px 32px;
  font-size: 0.8rem;
}
.footer-inner { max-width: 860px; display: flex; flex-direction: column; gap: 8px; }
.footer-title { font-family: var(--font-mono); color: rgba(255,255,255,0.7); font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.footer-corrections { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.correction-chip {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  background: rgba(217,119,6,0.15);
  color: #fbbf24;
  border: 1px solid rgba(217,119,6,0.25);
  font-family: var(--font-mono);
}
