/* Spreekkamerwijzer - layout en vormgeving.
   Eén stylesheet, geen frameworks, geen externe fonts (privacy en snelheid). */

:root {
  --bg: #f3f7f4;
  --surface: #ffffff;
  --surface-2: #e7f2ea;
  --ink: #14241b;
  --ink-soft: #3d5346;
  --ink-faint: #6a8073;
  --line: #d3e4d8;
  --line-strong: #b3cfbb;
  --brand: #0d6b3d;
  --brand-ink: #08522e;
  --brand-soft: #d7f0e1;
  --accent: #d62828;
  --accent-ink: #9d1515;
  --accent-soft: #fde8e8;
  --header-bg: #0b5c35;
  --header-ink: #ffffff;
  --patient-ink: #0d6b3d;
  --patient-bg: #d7f0e1;
  --pro-ink: #9d1515;
  --pro-bg: #fde8e8;
  --regio-ink: #8a5210;
  --regio-bg: #fbf0e0;
  --shadow-1: 0 1px 2px rgba(16, 40, 24, .07), 0 1px 3px rgba(16, 40, 24, .05);
  --shadow-2: 0 4px 10px rgba(16, 40, 24, .1), 0 12px 24px rgba(16, 40, 24, .08);
  --radius: 14px;
  --radius-sm: 9px;
  --maxwidth: 1220px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101612;
    --surface: #18211b;
    --surface-2: #1f2b23;
    --ink: #e7f0ea;
    --ink-soft: #a9bfb2;
    --ink-faint: #8ba394;
    --line: #2a3a30;
    --line-strong: #3a4e40;
    --brand: #5dcf8c;
    --brand-ink: #8fe0b0;
    --brand-soft: #163022;
    --accent: #f06a6a;
    --accent-ink: #ffb0b0;
    --accent-soft: #3a1818;
    --header-bg: #0a3d24;
    --header-ink: #f3fff7;
    --patient-ink: #8fd9ab;
    --patient-bg: #16301f;
    --pro-ink: #ffb0b0;
    --pro-bg: #3a1818;
    --regio-ink: #e8c48b;
    --regio-bg: #33260f;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 6px 18px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-synthesis-weight: none;
}

.wrap {
  width: 100%;
  max-width: var(--maxwidth);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

a { color: var(--brand-ink); }
a:hover { color: var(--brand); }

:where(a, button, input, summary):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skiplink {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff;
  padding: 10px 16px; z-index: 50; border-radius: 0 0 var(--radius-sm) 0;
}
.skiplink:focus { left: 0; }

/* Zonder JavaScript blijven zoekbalk en filters verborgen: de volledige
   lijst staat al statisch in de HTML en blijft dan gewoon leesbaar. */
.js-only { display: none; }
.has-js .js-only { display: block; }
.has-js .naar-boven.js-only { display: inline-flex; }

/* ---------- Header ---------- */

.site-header {
  background: #e4f3f7;
}

.hero {
  position: relative;
  overflow: hidden;
  background-color: #e4f3f7;
  background-image: url(plus-bg.svg);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 34%);
  align-items: center;
  gap: 12px;
  padding-block: 6px 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding-block: 4px 6px;
  min-width: 0;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.hero-title {
  margin: 0;
  flex: 1 1 220px;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.12;
  color: var(--brand);
  text-transform: uppercase;
}
.hero-title span {
  display: block;
  margin-top: .18em;
  font-size: .72em;
  font-weight: 750;
  letter-spacing: -.02em;
  text-transform: none;
  color: var(--ink);
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, #e4f3f7 0%, rgba(228, 243, 247, 0) 30%);
}

.header-hero {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  object-position: right center;
}

.header-stick {
  position: sticky; top: 0; z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(13, 92, 53, .06);
}

.brand {
  display: flex; flex-direction: row; align-items: center;
  gap: 12px; min-width: 0;
  text-decoration: none; color: inherit;
}
.brand-logo {
  flex: none; width: 170px; height: 76px;
  object-fit: contain;
  background: transparent;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; color: var(--brand-ink); }
.brand-text strong {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  letter-spacing: -.035em; line-height: 1.05;
  color: var(--brand-ink); font-weight: 800;
}
.brand-text span {
  font-size: clamp(.95rem, 1.6vw, 1.12rem);
  color: var(--ink-faint);
}

.header-nav { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.header-pill {
  font: 700 .82rem/1 inherit;
  padding: 9px 14px; border-radius: 999px;
  text-decoration: none; color: #fff;
}
.header-pill--pro { background: var(--accent); }
.header-pill--pat { background: var(--brand); }
.header-pill:hover { filter: brightness(1.06); color: #fff; }
.header-pill.is-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px currentColor; }

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-block: 6px 0;
  }
  .hero-copy { padding-block: 2px 4px; gap: 8px; }
  .hero-visual { justify-content: center; }
  .hero-visual::before {
    background: linear-gradient(180deg, #e4f3f7 0%, rgba(228, 243, 247, 0) 35%);
  }
  .header-hero { max-height: 160px; }
  .brand-logo { width: 132px; height: 59px; }
}

.toolbar { background: #f7fbf8; border-top: 1px solid var(--line); }
.toolbar-inner { display: flex; flex-direction: column; gap: 10px; padding-block: 12px 14px; }

.searchbox {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  box-shadow: var(--shadow-1);
  transition: border-color .15s, box-shadow .15s;
}
.searchbox:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.searchbox-icon { color: var(--ink-faint); flex: none; }
.searchbox input {
  flex: 1 1 auto; min-width: 0;
  border: 0; background: none; color: inherit;
  font: inherit; padding: 8px 0;
}
.searchbox input::placeholder { color: var(--ink-faint); }
.searchbox input:focus { outline: none; }
.searchbox input::-webkit-search-cancel-button { display: none; }
.searchbox-clear {
  flex: none; border: 0; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-soft);
}
.searchbox-clear:hover { background: var(--line); color: var(--ink); }
.searchbox-kbd {
  flex: none; font: 600 .72rem/1 inherit; color: var(--ink-faint);
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 5px; padding: 4px 6px; margin-right: 6px;
}
@media (max-width: 720px) { .searchbox-kbd { display: none; } }

.filters {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 20px;
}

.chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 600 .86rem/1 inherit;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--ink-soft);
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip.is-active {
  background: var(--brand); border-color: var(--brand);
  color: #fff;
}
.chip[data-doelgroep="zorgverlener"].is-active {
  background: var(--accent); border-color: var(--accent);
}
.chip[data-doelgroep="patient"].is-active {
  background: var(--brand); border-color: var(--brand);
}
@media (prefers-color-scheme: dark) {
  .chip.is-active { color: #fff; }
  .site-header { background: #152228; }
  .hero {
    background: #152228;
  }
  .hero-visual::before {
    background: linear-gradient(90deg,
      #152228 0%,
      rgba(21, 34, 40, .82) 22%,
      rgba(21, 34, 40, 0) 58%);
  }
  .toolbar { background: var(--surface-2); }
  .header-stick { background: var(--surface); }
  .brand-text strong { color: var(--brand); }
  .hero-title { color: var(--brand); }
  .hero-title span { color: var(--ink); }
}

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-soft); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }

.resultaat { margin: 0; font-size: .85rem; color: var(--ink-soft); min-height: 1.2em; }
.resultaat strong { color: var(--ink); }

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  padding-block: 28px 56px;
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 18px 40px; }
}

.sidenav { position: sticky; top: 148px; }
@media (max-width: 1000px) { .sidenav { position: static; top: auto; } }

.nav-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.nav-details > summary {
  cursor: pointer; padding: 13px 16px;
  font-weight: 650; font-size: .92rem;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  list-style: none;
}
.nav-details > summary::-webkit-details-marker { display: none; }
.nav-details > summary::after {
  content: ""; flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg); transition: transform .15s;
}
.nav-details[open] > summary::after { transform: rotate(-135deg); }
@media (min-width: 1001px) {
  .nav-details > summary { cursor: default; border-bottom: 1px solid var(--line); }
  .nav-details > summary::after { display: none; }
}

.nav-list {
  list-style: none; margin: 0; padding: 6px;
  max-height: min(64vh, 720px); overflow-y: auto;
  counter-reset: none;
}
.nav-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink-soft);
  font-size: .89rem; line-height: 1.35;
}
.nav-list a:hover { background: var(--surface-2); color: var(--ink); }
.nav-list a.is-current { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
.nav-list .telling { flex: none; font-size: .78rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ---------- Inhoud ---------- */

.intro {
  margin: 0 0 24px;
  font-size: 1.02rem; color: var(--ink-soft);
  max-width: 68ch;
}

.leeg {
  background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); padding: 20px; margin: 0 0 24px;
  color: var(--ink-soft);
}

.sectie { margin: 0 0 40px; scroll-margin-top: 150px; }
.sectie[hidden] { display: none; }

.sectie-kop {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 4px; padding-bottom: 8px;
  border-bottom: 3px solid var(--brand);
  box-shadow: inset 0 -3px 0 var(--accent);
}
.sectie-kop h2 {
  margin: 0; font-size: 1.22rem; letter-spacing: -.01em;
  color: var(--ink);
}
.sectie-kop .telling {
  font-size: .78rem; font-weight: 600; color: var(--brand-ink);
  background: var(--brand-soft); border-radius: 999px; padding: 3px 9px;
  font-variant-numeric: tabular-nums;
}
.sectie-uitleg { margin: 8px 0 16px; font-size: .92rem; color: var(--ink-soft); max-width: 72ch; }

.kaarten {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
}

.kaart {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius);
  padding: 15px 17px 14px;
  box-shadow: var(--shadow-1);
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.kaart[hidden] { display: none; }
.kaart:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--brand); border-left-color: var(--accent); }
.kaart:focus-within { border-color: var(--accent); }

.kaart h3 { margin: 0 0 2px; font-size: 1.02rem; line-height: 1.3; letter-spacing: -.005em; }
.kaart h3 a { color: var(--brand-ink); text-decoration: none; }
.kaart h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.kaart:hover h3 a { text-decoration: underline; text-underline-offset: 2px; }

.kaart .domein {
  display: block; font-size: .78rem; color: var(--ink-faint);
  margin-bottom: 7px; word-break: break-word;
}
.kaart p { margin: 0 0 10px; font-size: .93rem; line-height: 1.52; color: var(--ink-soft); }
.kaart .opmerking {
  font-size: .82rem; color: var(--ink-faint);
  border-left: 3px solid var(--line-strong); padding-left: 9px; margin-bottom: 10px;
}

.labels { display: flex; flex-wrap: wrap; gap: 5px; }
.label {
  font-size: .72rem; font-weight: 650; letter-spacing: .01em;
  padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-soft);
}
.label--patient { background: var(--patient-bg); color: var(--patient-ink); }
.label--zorgverlener { background: var(--pro-bg); color: var(--pro-ink); }
.label--regio { background: var(--regio-bg); color: var(--regio-ink); }

mark {
  background: #ffe08a; color: inherit;
  border-radius: 3px; padding: 0 1px;
}
@media (prefers-color-scheme: dark) { mark { background: #6b5a1e; color: #fff4d2; } }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 4px solid var(--brand);
  background: var(--surface);
  padding-block: 28px 40px;
}
.footer-inner p { margin: 0 0 10px; font-size: .9rem; color: var(--ink-soft); max-width: 78ch; }
.footer-meta { font-size: .83rem !important; color: var(--ink-faint) !important; }

.naar-boven {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 .84rem/1 inherit; cursor: pointer;
  padding: 11px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-2);
}
.naar-boven:hover { border-color: var(--accent); color: var(--accent-ink); }
.has-js .naar-boven[hidden] { display: none; }

/* ---------- Print ---------- */

@media print {
  :root { --surface: #fff; --bg: #fff; --ink: #000; --ink-soft: #222; --line: #bbb; }
  body { font-size: 10.5pt; }
  .site-header, .header-hero, .sidenav, .naar-boven, .skiplink, .leeg { display: none !important; }
  .layout { display: block; padding: 0; }
  .kaart { box-shadow: none; break-inside: avoid; page-break-inside: avoid; border-color: #ccc; }
  .kaarten { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kaart h3 a { color: #000; }
  .kaart h3 a::after { display: none; }
  .sectie { break-before: auto; }
  .sectie-kop { border-bottom: 1px solid #000; }
}
