/* Frontend-stijl. Alle kleuren/lettertypes/afronding komen uit CSS-variabelen die site.js zet
   vanuit de huisstijlinstellingen in de backend - pas daar de kleuren aan, niet hier. */
:root {
  --primary: #1a7c4b;
  --on-primary: #ffffff;
  --accent: #ef6b35;
  --on-accent: #ffffff;
  --bg: #f5f4ef;
  --surface: #ffffff;
  --text: #231f20;
  --text-soft: color-mix(in srgb, var(--text) 68%, var(--bg));
  --line: color-mix(in srgb, var(--text) 12%, var(--surface));
  --header-bg: #fcfbfa;
  --header-text: #231f20;
  --radius: 12px;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --primary-soft: color-mix(in srgb, var(--primary) 10%, var(--surface));
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--surface));
  --content-width: 820px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0; font-weight: 600; }
a { color: var(--primary); }
a:hover { color: color-mix(in srgb, var(--primary) 75%, var(--text)); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.muted { color: var(--text-soft); }
.small { font-size: 13px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); color: var(--header-text);
  border-bottom: 1px solid color-mix(in srgb, var(--header-text) 10%, var(--header-bg));
}
.header-inner { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-height: 64px; }
/* Hoofdmenu in een eigen rij onder logo/zoeken: het aantal menu-items bepaalt de beheerder zelf,
   dus het moet niet tussen logo en zoekbalk geperst worden. */
.nav-top .header-nav-slot { order: 10; flex-basis: 100%; margin: 0 -12px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--font-heading); font-weight: 600; font-size: 18px; flex-shrink: 0; }
.brand:hover { color: inherit; }
.brand img { height: 40px; width: auto; display: block; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-form { position: relative; }
.search-form input {
  font: inherit; font-size: 14px; color: var(--header-text); background: color-mix(in srgb, var(--header-text) 5%, var(--header-bg));
  border: 1px solid color-mix(in srgb, var(--header-text) 14%, var(--header-bg)); border-radius: 999px; padding: 7px 14px; width: 190px;
}
.search-form input::placeholder { color: color-mix(in srgb, var(--header-text) 55%, var(--header-bg)); }
.icon-btn { background: none; border: 1px solid transparent; color: inherit; cursor: pointer; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 14px; }
.icon-btn:hover { background: color-mix(in srgb, var(--header-text) 7%, transparent); }
.menu-toggle { display: none; font-size: 22px; line-height: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: calc(var(--radius) * .75); padding: 10px 18px;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { color: var(--on-primary); filter: brightness(1.08); }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-soft); }
.btn-small { padding: 6px 12px; font-size: 14px; }

/* Gebruikersmenu */
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 6px; display: none;
}
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 8px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--primary-soft); color: var(--text); }
.dropdown .dropdown-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; }

/* ---------- Hoofdmenu: boven ---------- */
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-top .main-nav > ul { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.nav-top .main-nav > ul > li { position: relative; }
.main-nav a, .main-nav .nav-group {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; color: var(--header-text);
  text-decoration: none; font-size: 15px; font-weight: 500; background: none; border: 0; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.main-nav a:hover, .main-nav .nav-group:hover { background: color-mix(in srgb, var(--header-text) 7%, transparent); color: var(--header-text); }
.main-nav a.active { color: var(--primary); background: var(--primary-soft); }
.main-nav .lock { font-size: 11px; opacity: .55; }
.nav-top .submenu {
  position: absolute; left: 0; top: 100%; min-width: 240px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 6px; display: none; z-index: 60;
}
.nav-top .submenu a { color: var(--text); }
.nav-top .submenu a:hover { color: var(--text); background: var(--primary-soft); }
.nav-top li:hover > .submenu, .nav-top li:focus-within > .submenu, .nav-top li.open > .submenu { display: block; }
.caret { font-size: 10px; opacity: .6; }

/* ---------- Hoofdmenu: zijbalk ---------- */
.layout { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.nav-side .layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; }
.nav-side .side-nav { position: sticky; top: 80px; align-self: start; padding: 32px 0; max-height: calc(100vh - 80px); overflow-y: auto; }
.nav-side .side-nav a, .nav-side .side-nav .nav-group { color: var(--text); width: 100%; white-space: normal; text-align: left; }
.nav-side .side-nav a:hover, .nav-side .side-nav .nav-group:hover { color: var(--text); background: var(--primary-soft); }
.nav-side .side-nav .nav-group { font-weight: 600; font-family: var(--font-heading); margin-top: 10px; cursor: default; }
.nav-side .side-nav .nav-group:hover { background: none; }
.nav-side .side-nav .submenu { padding-left: 8px; border-left: 2px solid var(--line); margin-left: 12px; }
.nav-side .header-nav-slot { display: none; }

/* ---------- Inhoud ---------- */
main { padding: 32px 0 80px; min-height: 60vh; }
.page { max-width: var(--content-width); margin: 0 auto; }
.nav-side .page { margin: 0; }
.page-hero { margin-bottom: 28px; }
.page-hero h1 { font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -.01em; }
.page-hero .summary { font-size: 19px; color: var(--text-soft); margin: 12px 0 0; max-width: 680px; }
.page-hero .hero-img { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; display: block; background: var(--surface); }
.page-hero .hero-img.contain { object-fit: contain; }
.draft-banner { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--surface)); color: var(--text); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; margin-bottom: 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.edit-link { font-size: 14px; }

.block { margin: 0 0 24px; }
.block-heading { margin-top: 40px; font-size: 26px; }
h3.block-heading { font-size: 20px; margin-top: 28px; }
.block-heading-wrap { margin-bottom: 12px; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 12px; }
.rich ul, .rich ol { padding-left: 22px; margin: 0 0 12px; }
/* Altijd een gewone bullet, ook binnen het stappenplan (een <ul> in een <ol> wordt anders een open rondje). */
.rich ul { list-style-type: disc; }
/* Ingesprongen lijstitems uit de editor (Tab in een lijst). */
.rich .ql-indent-1 { margin-left: 1.5em; }
.rich .ql-indent-2 { margin-left: 3em; }
.rich .ql-indent-3 { margin-left: 4.5em; }
.rich ul .ql-indent-1, .rich ul .ql-indent-3 { list-style-type: circle; }
.rich ul .ql-indent-2 { list-style-type: square; }
.rich li { margin-bottom: 4px; }
.rich blockquote { border-left: 4px solid var(--accent); margin: 0 0 12px; padding: 4px 16px; color: var(--text-soft); }
.rich .ql-align-center { text-align: center; }
.rich .ql-align-right { text-align: right; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.block-cards { display: grid; gap: 16px; }
.block-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.block-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.block-cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
.block-cards .card { overflow: hidden; display: flex; flex-direction: column; color: var(--text); text-decoration: none; }
.block-cards .card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.block-cards h3 { font-size: 18px; }
.block-cards p { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.55; }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.card-link { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.08); border-color: color-mix(in srgb, var(--primary) 40%, var(--surface)); color: var(--text); }
.card-more { margin-top: auto; padding-top: 6px; color: var(--primary); font-weight: 600; font-size: 14px; }

.block-image { margin: 0; }
.block-image img { display: block; border-radius: var(--radius); margin: 0 auto; }
.block-image.size-small img { max-width: 320px; }
.block-image.size-medium img { max-width: 520px; }
.block-image.size-wide img, .block-image.size-full img { width: 100%; }
figcaption { font-size: 14px; color: var(--text-soft); text-align: center; margin-top: 8px; }
.video-frame { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-file { width: 100%; border-radius: var(--radius); background: #000; display: block; }
.block-video { margin: 0; }

.block-callout { border-radius: var(--radius); padding: 16px 20px; border-left: 5px solid; }
.callout-title { display: block; font-family: var(--font-heading); font-size: 17px; margin-bottom: 4px; }
.callout-info { background: var(--primary-soft); border-color: var(--primary); }
.callout-tip { background: color-mix(in srgb, #efc502 16%, var(--surface)); border-color: #d9b302; }
.callout-warning { background: var(--accent-soft); border-color: var(--accent); }
.callout-success { background: color-mix(in srgb, #5aa16c 14%, var(--surface)); border-color: #5aa16c; }

.block-checklist { padding: 20px 22px; }
.checklist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.checklist-head h3 { font-size: 18px; }
.checklist-count { font-size: 14px; color: var(--text-soft); white-space: nowrap; }
.progress-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 12px 0 8px; }
.progress-bar span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .25s ease; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.checklist label { cursor: pointer; }
.checklist input:checked + label { color: var(--text-soft); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); }

.block-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.block-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-family: var(--font-heading); font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.block-faq summary::-webkit-details-marker { display: none; }
.block-faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--primary); transition: transform .2s; }
.block-faq details[open] summary::after { transform: rotate(45deg); }
.block-faq details .rich { padding: 0 18px 16px; }

/* Alleen de stappen zelf (> li) nummeren - niet de opsommingen in de uitlegtekst van een stap. */
.block-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.block-steps > li { counter-increment: step; display: flex; gap: 16px; padding-bottom: 18px; position: relative; }
.block-steps > li::before {
  content: counter(step); flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; font-weight: 700; font-family: var(--font-heading); position: relative; z-index: 1;
}
.block-steps > li:not(:last-child)::after { content: ''; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line); }
.step-body { padding-top: 4px; flex: 1; min-width: 0; }
.step-title { display: block; font-family: var(--font-heading); font-size: 17px; margin-bottom: 2px; }

.block-files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.file-link { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; text-decoration: none; color: var(--text); font-weight: 500; }
.file-link:hover { border-color: var(--primary); color: var(--text); }
.file-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }

.block-contacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.contact { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.contact-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.contact-photo.initials { background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-family: var(--font-heading); font-size: 18px; }
.contact-name { font-family: var(--font-heading); font-size: 17px; }
.contact-role { font-size: 13px; color: var(--accent); font-weight: 600; }
.contact-text { margin: 6px 0 4px; font-size: 14px; color: var(--text-soft); line-height: 1.5; }
.contact-line { display: block; font-size: 14px; }
.block-divider { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---------- Login / meldingen ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.login-panel { max-width: 420px; margin: 20px auto; }
.login-panel h1 { font-size: 26px; margin-bottom: 6px; }
.field { margin-top: 14px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.field input { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.form-error { color: #b42318; font-size: 14px; margin-top: 12px; }
.form-ok { color: var(--primary); font-size: 14px; margin-top: 12px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: 14px; padding: 0; text-decoration: underline; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state h1 { font-size: 32px; margin-bottom: 8px; }

.progress-list { display: grid; gap: 12px; }
.progress-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; text-decoration: none; color: var(--text); }
.progress-item:hover { border-color: var(--primary); color: var(--text); }
.progress-item .progress-bar { flex: 1; margin: 0; }
.progress-item strong { min-width: 200px; font-family: var(--font-heading); }

.welcome-strip { background: var(--primary); color: var(--on-primary); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.welcome-strip a { color: var(--on-primary); font-weight: 600; }

.search-results { display: grid; gap: 10px; }
.search-results a { display: block; padding: 14px 18px; text-decoration: none; color: var(--text); }
.search-results a:hover { border-color: var(--primary); color: var(--text); }
.search-results strong { font-family: var(--font-heading); font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; font-size: 14px; color: var(--text-soft); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-menu { display: flex; gap: 18px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-menu a { color: var(--text-soft); text-decoration: none; }
.footer-menu a:hover { color: var(--primary); text-decoration: underline; }

.loading { text-align: center; padding: 80px 0; color: var(--text-soft); }

/* ---------- Mobiel ---------- */
@media (max-width: 980px) {
  .menu-toggle { display: inline-block; }
  .header-inner { flex-wrap: wrap; }
  .header-nav-slot, .nav-side .side-nav { display: none; }
  body.nav-open .header-nav-slot, body.nav-open.nav-side .header-nav-slot { display: block; width: 100%; order: 10; padding-bottom: 10px; }
  .nav-side .header-nav-slot { display: none; }
  .header-nav-slot .main-nav > ul { flex-direction: column; align-items: stretch; }
  .header-nav-slot .submenu { position: static !important; display: block !important; box-shadow: none !important; border: 0 !important; padding: 0 0 0 14px !important; background: transparent !important; min-width: 0 !important; }
  .header-nav-slot .submenu a { color: var(--header-text) !important; }
  .nav-side .layout { display: block; }
  .search-form input { width: 140px; }
  .block-cards.cols-3, .block-cards.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .header-inner { padding: 8px 16px; gap: 10px; }
  .layout { padding: 0 16px; }
  .brand span { display: none; }
  .search-form { display: none; }
  .block-cards.cols-2, .block-cards.cols-3, .block-cards.cols-4, .block-contacts { grid-template-columns: 1fr; }
  .progress-item { flex-wrap: wrap; }
  .progress-item strong { min-width: 0; width: 100%; }
  main { padding-top: 20px; }
}
@media print {
  .site-header, .site-footer, .side-nav { display: none; }
  .block-faq details { break-inside: avoid; }
}
