/* ─────────────────────────────────────────────────────────────
   menu.css — verticale glas-navigatierail + uitleg-pagina's
   Rail: groot scherm = icoon + tekst · kleiner = alleen iconen · mobiel = balk onder.
   Sluit aan op de variabelen uit style.css (--glass-*, --radius, accenten).
   ───────────────────────────────────────────────────────────── */

:root { --rail-w: 196px; }

/* Content krijgt ruimte naast de (fixed) rail. */
body { padding-left: var(--rail-w); }

/* ── Rail ── */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 12px;
  background: rgba(8, 14, 24, 0.66);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  overflow-y: auto;
  overflow-x: hidden;
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .rail { background: #0c1422; }
}

.rail-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 16px;
  font-size: 1.18rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--txt); text-decoration: none; white-space: nowrap;
}
.rail-brand .brand-dot { color: var(--grid-in); }
.rail-brand-mark { width: 28px; height: 28px; flex: none; color: var(--grid-in); display: inline-flex; }
.rail-brand-mark .logo-mark { width: 100%; height: 100%; }

.rail-nav { display: flex; flex-direction: column; gap: 4px; }

.rail-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--txt-dim);
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}
.rail-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--txt); }
.rail-item.is-inactive { cursor: pointer; }   /* nog niet actief: klikbaar, maar geen navigatie */
.rail-ico { width: 22px; height: 22px; flex: none; color: var(--accent, var(--grid-in)); display: inline-flex; }
.rail-ico svg { width: 100%; height: 100%; }
.rail-lbl { font-size: 0.95rem; font-weight: 500; white-space: nowrap; }
.rail-item.is-active {
  color: var(--txt);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .rail-item.is-active { background: rgba(96, 165, 250, 0.16); }
}

/* Sub-items (children, bv. onder 'Uitleg') */
.rail-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 2px 18px; }
.rail-item.is-sub { min-height: 36px; padding: 7px 12px; }
.rail-item.is-sub .rail-ico { width: 18px; height: 18px; }
.rail-item.is-sub .rail-lbl { font-size: 0.88rem; }

.rail-foot { margin-top: auto; padding-top: 12px; }
.lang-btn {
  width: 100%;
  min-height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--txt);
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.1); }

/* ── Uitleg-/contentpagina ── */
.page-body { min-height: 100vh; }
.page { padding: clamp(20px, 4vw, 40px) 16px 64px; }
.page-inner { max-width: 860px; margin: 0 auto; }

.doc {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: clamp(22px, 4vw, 40px);
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .doc { background: #0e1828; }
}
.doc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.doc-ico { width: 30px; height: 30px; color: var(--accent, var(--grid-in)); display: inline-flex; flex: none; }
.doc-ico svg { width: 100%; height: 100%; }
.doc-head h1, .doc-shead h2 { margin: 0; font-weight: 600; }
.doc-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); }

.doc-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--glass-border); }
.doc-shead { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.doc-shead h2 { font-size: 1.3rem; }

/* Markdown-typografie */
.md { color: var(--txt); line-height: 1.7; font-size: 1rem; }
.md h2 { font-size: 1.25rem; font-weight: 600; margin: 1.4em 0 0.5em; }
.md h3 { font-size: 1.08rem; font-weight: 600; margin: 1.2em 0 0.4em; }
.md p, .md li { margin: 0.6em 0; color: #d4dceb; }
.md ul, .md ol { margin: 0.7em 0; padding-left: 1.4em; }
.md strong { color: var(--txt); font-weight: 600; }
.md em { font-style: italic; color: #c2cde0; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 6px; }
.md a { color: var(--grid-in); }
.md hr { border: 0; border-top: 1px solid var(--glass-border); margin: 1.6em 0; }
.doc-live { margin-top: 28px; }
.doc-live a { color: var(--grid-in); text-decoration: none; font-weight: 500; }
.doc-live a:hover { text-decoration: underline; }

/* ── Tweetalig: toon de tekst van de actieve taal (html[lang] door i18n gezet) ── */
[data-lang-content] { display: none; }
html[lang="en"] [data-lang-content="en"] { display: block; }
html:not([lang="en"]) [data-lang-content="nl"] { display: block; }

/* ── Responsive: kleiner scherm → alleen iconen ── */
@media (max-width: 1100px) {
  :root { --rail-w: 64px; }
  .rail { padding: 14px 8px; align-items: center; }
  .rail-brand { justify-content: center; gap: 0; padding: 2px 0 14px; }
  .rail-brand-full { display: none; }
  .rail-nav { align-self: stretch; }
  .rail-item { justify-content: center; gap: 0; padding: 11px 0; }
  .rail-lbl { display: none; }
  .rail-sub { margin-left: 0; }
}

/* ── Mobiel → navigatiebalk onderaan ── */
@media (max-width: 640px) {
  :root { --rail-w: 0px; }
  body { padding-left: 0; padding-bottom: 60px; }
  .rail {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto; height: 60px;
    flex-direction: row; align-items: center;
    gap: 0; padding: 0 6px;
    border-right: 0; border-top: 1px solid var(--glass-border);
    overflow: visible;
  }
  .rail-brand { display: none; }
  .rail-nav { flex-direction: row; flex: 1; justify-content: space-around; gap: 0; }
  .rail-group, .rail-sub { display: contents; }
  .rail-item { flex-direction: column; gap: 3px; min-height: 0; padding: 6px 8px; }
  .rail-foot { margin: 0; padding: 0; }
  .lang-btn { width: auto; min-width: 44px; height: 44px; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .rail-item, .lang-btn { transition: none; }
}
