/* ============================================
   Basisthema — basisstijlen (= "Site Settings")
   Tokens, reset, typografie, knoppen, header, mobiel menu, footer, kruimelpad,
   paginakop, tekstinhoud, kaarten en formulieren. Secties: secties.css.

   Mobile-first met min-width. Omslagpunten (custom properties werken niet in @media):
     768 px  — tablet: twee kolommen
     1024 px — desktop: volledig menu in de header
   Testbreedtes: 360, 390, 768, 1024, 1280, 1440, 1920.

   Kleuren en maten zijn instelbaar in Site-instellingen → Huisstijl (inc/instellingen.php);
   de standaardwaarden hieronder moeten gelijk zijn aan vb_instellingen_standaard().
   Geen losse hex-waarden buiten dit blok.
   ============================================ */

:root {
  /* Kleuren (Site-instellingen → Huisstijl) */
  --primair:        #1d4f7a;
  --primair-donker: #14304a;
  --accent:         #f2c46d;
  --inkt:           #16202a;
  --inkt-zacht:     #3a4754;
  --inkt-stil:      #556270;
  --achtergrond:    #ffffff;
  --vlak:           #f3f5f8;
  --tint:           #e3ecf5;
  --lijn:           #dce3ea;

  /* Afgeleid */
  --op-donker:      rgba(255, 255, 255, 0.88);
  --op-donker-stil: rgba(255, 255, 255, 0.72);
  --lijn-donker:    rgba(255, 255, 255, 0.16);
  --fout:           #b3261e;
  --goed:           #2e7d32;

  /* Typografie */
  --kop:   "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tekst: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tekst-grootte: 17px;
  --kop-gewicht-display: 700;
  --kop-gewicht: 700;
  --display-max: 64px;
  --h2-max: 40px;

  /* Knoppen */
  --knop-radius: 8px;
  --knop-py: 13px;
  --knop-px: 22px;
  --knop-grootte: 16px;
  --knop-gewicht: 600;
  --knop-spatiering: 0em;
  --knop-case: none;

  /* Layout */
  --wrap-max: 1280px;
  --wrap-pad: 20px;
  --sectie-ruimte: clamp(56px, 8vw, 112px);
  --radius: min(var(--knop-radius), 12px);
  --schaduw: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --kop-hoogte: 72px;
}

@media (min-width: 768px) {
  :root { --wrap-pad: 32px; --kop-hoogte: 84px; }
}
@media (min-width: 1280px) {
  :root { --wrap-pad: 48px; }
}

/* ===== Reset ===== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--kop-hoogte) + 16px);
}

body {
  background: var(--achtergrond);
  color: var(--inkt);
  font-family: var(--tekst);
  font-size: var(--tekst-grootte);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-wrap: break-word;
  hyphens: manual; /* lange woorden breken via overflow-wrap; koppen mogen afbreken */
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 2px solid var(--primair);
  outline-offset: 3px;
}
.is-donker :focus-visible,
.voet :focus-visible,
.lade :focus-visible { outline-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skiplink {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  background: var(--primair);
  color: var(--achtergrond);
  padding: 12px 18px;
  border-radius: var(--radius);
}
.skiplink:focus { top: 16px; }

/* ===== Layout ===== */

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}
.wrap--smal { max-width: calc(760px + 2 * var(--wrap-pad)); }

.sectie { padding: var(--sectie-ruimte) 0; }
.sectie--vlak { background: var(--vlak); }
.sectie--donker,
.is-donker { background: var(--primair-donker); color: var(--op-donker); }
.sectie--donker h1, .sectie--donker h2, .sectie--donker h3,
.is-donker h1, .is-donker h2, .is-donker h3 { color: var(--achtergrond); }
.sectie--donker em, .is-donker em { color: var(--accent); }
.sectie:not(.sectie--vlak):not(.sectie--donker) + .sectie:not(.sectie--vlak):not(.sectie--donker) { padding-top: 0; }
.sectie--vlak + .sectie--vlak { padding-top: 0; }

.raster { display: grid; gap: clamp(20px, 3vw, 32px); }
@media (min-width: 768px) {
  .raster--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .raster--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== Typografie ===== */

h1, h2, h3, h4 {
  font-family: var(--kop);
  font-weight: var(--kop-gewicht);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--inkt);
  text-wrap: balance;
  hyphens: auto;
}
h1 { font-size: clamp(36px, 5.5vw, calc(var(--display-max) * 0.8)); font-weight: var(--kop-gewicht-display); }
h2 { font-size: clamp(28px, 4vw, var(--h2-max)); }
h3 { font-size: clamp(20px, 2.2vw, 24px); }
h4 { font-size: 19px; }

h1 em, h2 em, h3 em { font-style: normal; color: var(--primair); }

p { text-wrap: pretty; }

.label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primair);
  margin-bottom: 14px;
}
.is-donker .label, .sectie--donker .label { color: var(--accent); }

.intro {
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--inkt-zacht);
  max-width: 62ch;
}
.sectie--donker .intro, .is-donker .intro { color: var(--op-donker); }

.sectiekop { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.sectiekop h2 { margin-bottom: 14px; }
.sectiekop--midden { margin-inline: auto; text-align: center; }

/* Lopende tekst uit de editor (juridische pagina's, artikelen) */
.tekstinhoud { max-width: 72ch; }
.tekstinhoud > * + * { margin-top: 1em; }
.tekstinhoud h2 { margin-top: 1.8em; font-size: clamp(26px, 3vw, 34px); }
.tekstinhoud h3 { margin-top: 1.5em; }
.tekstinhoud ul, .tekstinhoud ol { padding-left: 1.3em; }
.tekstinhoud li + li { margin-top: 0.35em; }
.tekstinhoud a { color: var(--primair); }
.tekstinhoud img { border-radius: var(--radius); }
.tekstinhoud table { width: 100%; border-collapse: collapse; font-size: 0.94em; display: block; overflow-x: auto; }
.tekstinhoud th, .tekstinhoud td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--lijn); vertical-align: top; }
.tekstinhoud th { font-weight: 600; background: var(--vlak); }
.tekstinhoud blockquote { border-left: 3px solid var(--primair); padding-left: 20px; color: var(--inkt-zacht); }

/* ===== Knoppen ===== */

.knoppen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: var(--knop-py) var(--knop-px);
  border: 1px solid var(--primair);
  border-radius: var(--knop-radius);
  background: var(--primair);
  color: var(--achtergrond);
  font-family: var(--tekst);
  font-size: var(--knop-grootte);
  font-weight: var(--knop-gewicht);
  letter-spacing: var(--knop-spatiering);
  text-transform: var(--knop-case);
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.knop:hover { background: var(--primair-donker); border-color: var(--primair-donker); }
.knop__pijl { transition: transform 180ms ease; }
.knop:hover .knop__pijl { transform: translateX(3px); }

.knop--rand { background: transparent; color: var(--inkt); border-color: var(--inkt); }
.knop--rand:hover { background: var(--inkt); color: var(--achtergrond); border-color: var(--inkt); }

.knop--licht { background: var(--achtergrond); color: var(--primair-donker); border-color: var(--achtergrond); }
.knop--licht:hover { background: var(--accent); border-color: var(--accent); color: var(--inkt); }

.is-donker .knop--rand, .sectie--donker .knop--rand { color: var(--achtergrond); border-color: var(--op-donker-stil); }
.is-donker .knop--rand:hover, .sectie--donker .knop--rand:hover { background: var(--achtergrond); color: var(--primair-donker); }

.tekstlink {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--primair);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  min-height: 44px;
}
.tekstlink:hover { text-decoration-thickness: 2px; }

/* ===== Header ===== */

.kop {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--achtergrond);
  border-bottom: 1px solid var(--lijn);
}
.admin-bar .kop { top: 46px; }
@media (min-width: 783px) { .admin-bar .kop { top: 32px; } }

.kop__binnen {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--kop-hoogte);
}

.logo { display: inline-flex; align-items: center; text-decoration: none; margin-right: auto; min-height: 44px; }
.logo__beeld { height: 40px; width: auto; }
.logo__tekst { font-family: var(--kop); font-size: 24px; line-height: 1; color: var(--inkt); }
/* Merkteken (demo): vierkant in Primair met een vinkje in Accent, naam ernaast als tekst. */
.logo--merk { display: inline-flex; align-items: center; gap: 10px; }
.logo__teken { flex: none; width: 36px; height: 36px; }
.logo__teken-vlak { fill: var(--primair); }
.logo__teken-vink { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.logo--merk .logo__tekst { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.logo__klein { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--inkt-stil); margin-bottom: 3px; }
.voet .logo__teken-vlak, .app__logo .logo__teken-vlak { fill: var(--achtergrond); }
.voet .logo__teken-vink, .app__logo .logo__teken-vink { stroke: var(--primair); }
.voet .logo__klein, .app__logo .logo__klein { color: var(--op-donker-stil); }

.kop__menu, .kop__knop { display: none; }

.kop__links { display: flex; gap: 4px; }
.kop__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  text-decoration: none;
  font-weight: 500;
  color: var(--inkt-zacht);
  border-radius: var(--radius);
}
.kop__links a:hover { color: var(--inkt); background: var(--vlak); }
.kop__links a[aria-current] { color: var(--inkt); text-decoration: underline; text-decoration-color: var(--primair); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }

.kop__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* oudere Chromium (131) zet anders flex-start: de streepjes worden 0 px breed */
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}
.kop__toggle span { display: block; width: 24px; height: 2px; background: var(--inkt); border-radius: 2px; }

@media (min-width: 1024px) {
  .kop__menu { display: block; }
  .kop__knop { display: block; }
  .kop__toggle { display: none; }
  .logo { margin-right: 0; }
  .kop__menu { margin-left: auto; }
}

/* ===== Mobiel menu (lade) ===== */

.lade {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  width: min(420px, 100%);
  background: var(--primair-donker);
  color: var(--achtergrond);
  padding: 20px var(--wrap-pad) 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 260ms ease;
}
.lade.is-open { transform: none; }
.lade[hidden] { display: flex; visibility: hidden; }
.lade.is-open[hidden] { visibility: visible; }

.lade__sluit { align-self: flex-end; position: relative; width: 44px; height: 44px; }
.lade__sluit span { position: absolute; left: 11px; right: 11px; top: 21px; height: 2px; background: currentColor; border-radius: 2px; }
.lade__sluit span:first-child { transform: rotate(45deg); }
.lade__sluit span:last-child { transform: rotate(-45deg); }

.lade__links { display: grid; }
.lade__links a {
  display: block;
  padding: 14px 0;
  font-family: var(--kop);
  font-size: 28px;
  line-height: 1.2;
  text-decoration: none;
  border-bottom: 1px solid var(--lijn-donker);
}
.lade__links a[aria-current] { color: var(--accent); }

.lade__voet { margin-top: auto; display: grid; gap: 14px; }
.lade__tel { color: var(--op-donker); min-height: 44px; display: inline-flex; align-items: center; }

.lade__scherm {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 260ms ease;
}
.lade__scherm.is-open { opacity: 1; }

/* ===== Paginakop + kruimelpad ===== */

.paginakop { padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 6vw, 72px); background: var(--vlak); }
.paginakop__titel { max-width: 22ch; }
.paginakop__intro { margin-top: 18px; font-size: clamp(18px, 1.6vw, 21px); color: var(--inkt-zacht); max-width: 60ch; }

.kruimelpad { margin-bottom: clamp(20px, 3vw, 32px); font-size: 14px; color: var(--inkt-stil); }
.kruimelpad ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; padding: 0; }
.kruimelpad li:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--inkt-stil); }
.kruimelpad a { color: var(--inkt-zacht); }
.kruimelpad a:hover { color: var(--primair); }

/* ===== Kaarten ===== */

.kaart {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--achtergrond);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background 180ms ease, box-shadow 180ms ease;
}
.kaart:hover { box-shadow: var(--schaduw); }
.kaart__foto { aspect-ratio: 4 / 3; overflow: hidden; background: var(--vlak); }
.kaart__foto img { width: 100%; height: 100%; object-fit: cover; }
.kaart__tekst { padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kaart__titel { font-size: clamp(21px, 2vw, 24px); }
.kaart__titel a { text-decoration: none; }
.kaart__titel a::after { content: ""; position: absolute; inset: 0; } /* hele kaart klikbaar */
.kaart__tekst p { color: var(--inkt-zacht); }
.kaart__meer { margin-top: auto; padding-top: 8px; color: var(--primair); font-weight: 600; }

/* ===== Lijsten ===== */

.linklijst { display: grid; gap: 0; max-width: 560px; }
.linklijst a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--lijn);
  text-decoration: none;
  font-weight: 500;
}
.linklijst a::after { content: "→"; color: var(--primair); }
.linklijst a:hover { color: var(--primair); }

.vinklijst { display: grid; gap: 10px; }
.vinklijst li { position: relative; padding-left: 30px; }
.vinklijst li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.45em;
  width: 14px; height: 8px;
  border-left: 2px solid var(--primair);
  border-bottom: 2px solid var(--primair);
  transform: rotate(-45deg);
}

/* ===== Formulieren ===== */

.veld { display: grid; gap: 6px; }
.veld + .veld { margin-top: 18px; }
.veld label, .veld legend { font-weight: 600; font-size: 15px; }
.veld__uitleg { font-size: 14px; color: var(--inkt-stil); }
.veld input[type="text"],
.veld input[type="email"],
.veld input[type="tel"],
.veld input[type="url"],
.veld input[type="number"],
.veld select,
.veld textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px; /* geen zoom op iOS */
  background: var(--achtergrond);
  border: 1px solid var(--inkt-stil);
  border-radius: var(--radius);
}
.veld textarea { min-height: 140px; resize: vertical; }
.veld input:focus-visible, .veld select:focus-visible, .veld textarea:focus-visible { outline-offset: 0; border-color: var(--primair); }
.veld--fout input, .veld--fout textarea, .veld--fout select { border-color: var(--fout); }
.veld__fout { color: var(--fout); font-size: 14px; font-weight: 600; }
.veld--honing { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.formulier { position: relative; }
.formulier .melding { margin-bottom: 24px; }
.formulier .melding ul { margin: 8px 0 0; padding-left: 1.2em; }
.formulier .melding a { color: inherit; }
.veld--vink label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 16px; }
.veld--vink input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--primair); }
.veld--vink a { color: var(--primair); }
.veld__verplicht { color: var(--fout); }
.formulier__knop { margin-top: 28px; }
.formulier__noot { margin-top: 14px; font-size: 14px; color: var(--inkt-stil); }

.melding { padding: 14px 18px; border-radius: var(--radius); border-left: 4px solid var(--primair); background: var(--tint); }
.melding--fout { border-color: var(--fout); background: #fbeceb; }

/* ===== Footer ===== */

.voet {
  background: var(--primair-donker);
  color: var(--op-donker);
  padding: clamp(48px, 7vw, 88px) 0 28px;
  font-size: 16px;
}
.voet a { text-decoration: none; }
.voet a:hover { color: var(--accent); }
.voet .logo__tekst { color: var(--achtergrond); }

.voet__raster { display: grid; gap: 36px; }
@media (min-width: 768px) {
  .voet__raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .voet__raster { grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); }
}

.voet__tagline { margin-top: 16px; max-width: 36ch; color: var(--op-donker-stil); }
.voet__kop { font-family: var(--tekst); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.voet__lijst { display: grid; gap: 4px; }
.voet__lijst a { display: inline-flex; min-height: 32px; align-items: center; }

.voet__onder {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--lijn-donker);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--op-donker-stil);
}
.voet__copy { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.voet__maker { display: inline-flex; align-items: center; gap: 6px; }
.voet__maker-merk { width: 18px; height: 18px; color: currentColor; }
.voet__maker-letters { fill: var(--primair-donker); }
.voet__links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.voet__links a { display: inline-flex; min-height: 44px; align-items: center; }
.voet__links a:hover { text-decoration: underline; }

/* ===== Gegevenslijst (/llm-info/, contact) ===== */

.llm-gegevens { display: grid; gap: 0; max-width: 72ch; }
.llm-gegevens dt { font-weight: 600; padding-top: 12px; }
.llm-gegevens dd { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--lijn); color: var(--inkt-zacht); }
@media (min-width: 768px) {
  .llm-gegevens { grid-template-columns: 220px minmax(0, 1fr); }
  .llm-gegevens dt, .llm-gegevens dd { padding: 12px 0; border-bottom: 1px solid var(--lijn); }
}

/* Demo: balk boven elke pagina (demo.cjwebdesign.nl) */
.demobalk { background: var(--inkt); color: var(--achtergrond); font-size: 14px; line-height: 1.45; }
.demobalk__binnen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-block: 8px; }
.demobalk p { margin: 0; }
.demobalk__link { color: var(--achtergrond); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.demobalk__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
