/* ==========================================================================
   Bouwblokken van de page builder (secties, kolommen, knoppen, ...).
   style.css levert de basis (header, menu, typografie, galerij, lightbox).
   ========================================================================== */

.kw-page { display: block; min-height: 40vh; }

/* sectie = volle breedte band; kw-inner = gecentreerde inhoud van max. 1140px */
.kw-section { position: relative; padding: 40px 20px; }
.kw-section + .kw-section { padding-top: 0; }
.kw-section[style*="background"] + .kw-section,
.kw-section + .kw-section[style*="background"] { padding-top: 40px; }
.kw-inner { max-width: var(--container); margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.kw-inner.kw-full { max-width: 1330px; }
.kw-narrow .kw-inner { max-width: 560px; }

/* rijen en kolommen */
.kw-row { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 0; align-items: stretch; }
.kw-inner.kw-row { gap: 0; }
.kw-col { display: flex; flex-direction: column; gap: 20px; flex: 1 1 0; min-width: 0; padding: 10px; }
.kw-col.kw-row { flex-direction: row; }
.kw-col:empty { min-height: 60px; }

/* tekst op een gekleurde achtergrond */
.kw-on-color, .kw-on-color .rich, .kw-on-color .rich p, .kw-on-color .kw-heading { color: #fff; }

.kw-heading { margin: 0; font-size: 30px; font-weight: 600; line-height: 1.3; color: var(--blue); }
h1.kw-heading { font-size: 34px; }
h3.kw-heading { font-size: 24px; }
h4.kw-heading { font-size: 20px; }
.kw-heading a { color: inherit; text-decoration: none; }
.kw-heading a:hover { text-decoration: underline; }

.rich > :first-child { margin-top: 0; }
.rich img { max-width: 100%; }
.rich table { display: block; overflow-x: auto; max-width: 100%; }
.rich td, .rich th { min-width: 40px; }

/* knoppen */
.kw-buttons { margin: 0; }
.btn-blue { color: #fff; background: var(--blue); }
.btn-blue:hover { color: #fff; background: var(--blue-dark); }
a.btn { text-decoration: none; }

/* afbeeldingen */
.kw-image { margin: 0; }
.kw-image img { max-width: 100%; height: auto; }
.kw-image figcaption { margin-top: 8px; font-size: 14px; color: var(--text); }

/* galerij: style.css doet de opmaak; leeg in de builder toch zichtbaar */
.gallery:empty { min-height: 120px; border: 2px dashed #c9d6e2; border-radius: 6px; }
.gallery:empty::before { content: 'Lege fotogalerij — kies "Foto\'s toevoegen"'; display: block; padding: 40px 16px; color: #8aa0b4; text-align: center; }

/* ingesloten inhoud (YouTube, Strava, Google-formulier, kaart) */
.kw-embed { max-width: 100%; overflow: hidden; }
.kw-embed iframe, .kw-video iframe, iframe.kw-iframe { max-width: 100%; border: 0; }
.kw-video { position: relative; aspect-ratio: 16 / 9; }
.kw-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* PDF */
.kw-pdf .pdf-embed { width: 100%; max-width: 900px; height: 80vh; min-height: 420px; padding: 0; overflow: hidden; }
.kw-pdf .pdf-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* scheidingslijn en witruimte */
.kw-divider { border: 0; border-top: 1px solid var(--line); margin: 10px 0; width: 100%; }
.kw-spacer { height: 40px; }

/* footer (sponsors + blauwe balk) */
.kw-footer .kw-section { padding: 30px 20px; }
.kw-footer .kw-section + .kw-section { padding-top: 14px; padding-bottom: 14px; }
.kw-footer .kw-image { text-align: center; }
.kw-footer .kw-image img { max-height: 120px; width: auto; object-fit: contain; }
.kw-footer .kw-heading { font-size: 20px; }
.kw-footer .kw-col { justify-content: center; }
.kw-footer .rich a { color: inherit; }

/* formulieren (aanmelden, wachtwoord) */
.kw-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.kw-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; color: var(--ink); }
.kw-form input { font: inherit; padding: 11px 12px; border: 1px solid #c7d0da; border-radius: 6px; }
.kw-form input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.kw-form .btn { align-self: flex-start; cursor: pointer; border: 0; }
.kw-alert { padding: 12px 14px; color: #8a1f11; background: #fdecea; border-radius: 6px; }
.kw-alert-info { color: #0b3a5c; background: #e8f3fb; }
.kw-alert-info p { margin: 0 0 10px; }
.kw-alert-info form { margin: 0; }
.kw-muted { font-size: 14px; color: var(--text); }

/* balk voor beheerders bovenaan de site */
.kw-adminbar { display: flex; align-items: center; gap: 18px; padding: 8px 16px; font-size: 14px; color: #fff; background: #1d2327; }
.kw-adminbar a { color: #fff; }
.kw-adminbar-user { margin-left: auto; opacity: .75; }
.kw-adminbar form, .kw-memberbar form { display: inline; margin: 0; }
.kw-adminbar button, .kw-memberbar button { padding: 0; font: inherit; color: inherit; text-decoration: underline; background: none; border: 0; cursor: pointer; }
.kw-memberbar { padding: 6px 16px; font-size: 13px; text-align: right; color: var(--text); background: #f3f6f9; }

@media (max-width: 767px) {
  .kw-section { padding: 28px 14px !important; }
  .kw-section + .kw-section:not([style*="background"]) { padding-top: 0 !important; }
  .kw-row { flex-direction: column; }
  .kw-col { flex-basis: auto !important; padding: 6px 0 !important; }
  .kw-heading { font-size: 24px; }
  h1.kw-heading { font-size: 28px; }
  .kw-footer .kw-section { padding: 20px 14px !important; }
  .kw-adminbar { flex-wrap: wrap; gap: 10px; }
  .kw-adminbar-user { margin-left: 0; }
}

/* zichtbaarheid per toestel (overgenomen uit Elementor) */
@media (min-width: 1025px) { .kw-hide-d { display: none !important; } }
@media (min-width: 768px) and (max-width: 1024px) { .kw-hide-t { display: none !important; } }
@media (max-width: 767px) { .kw-hide-m { display: none !important; } }

/* foto + tekst */
.image-box img { max-width: 100%; height: auto; }
.image-box--side { display: flex; align-items: center; gap: 20px; }
.image-box--side .image-box-media { flex: 0 0 auto; max-width: 50%; }
.image-box--right { flex-direction: row-reverse; }
.kw-section img { max-width: 100%; height: auto; }
@media (max-width: 767px) {
  .image-box--side { flex-direction: column; }
  .image-box--side .image-box-media { max-width: 100%; width: auto !important; }
}
.kw-on-color .image-box-title, .kw-on-color .image-box-desc { color: #fff; }
.kw-consent { margin: 0; padding: 6px 16px 10px; text-align: center; font-size: 12px; background: inherit; }
.kw-consent a { color: inherit; opacity: .75; }
