/* Einzige Quelle für die Navbar-Styles auf ALLEN Seiten (Startseite + alle Unterseiten).
   Bitte Änderungen an der Navigation ausschliesslich hier vornehmen, nicht pro Seite
   duplizieren – genau das hat frühere Bugs verursacht (siehe README, Abschnitt
   "Bekannte Stolperfallen").

   Voraussetzung: --font-accent, --text, --accent und --border sind als CSS-Variablen
   definiert (siehe :root in index.html bzw. subpages/shared.css). */

#nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 200;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 8%; background: rgba(250,250,250,0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s, top 0.3s ease;
}
#nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.nav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-accent); font-size: 2rem; font-weight: 400;
  letter-spacing: 0.3px; color: var(--text);
}
.nav-logo { width: 38px; height: auto; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 0.88rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.1px; color: var(--text); opacity: 0.75;
  transition: opacity 0.2s, color 0.2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 1.5px; background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover { opacity: 1; color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--accent); opacity: 1; }
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  padding: 4px; background: none; border: none; cursor: pointer; color: var(--text);
}
.nav-burger span { width: 26px; height: 2px; background: currentColor; transition: 0.3s; }

@media(max-width: 768px) {
  #nav { padding: 12px 5%; }
  .nav-burger { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: rgba(250,250,250,0.98); flex-direction: column;
    padding: 28px 5%; gap: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.05rem; }
}
