/* Tokens: light by default, dark when the system asks for it */
.site, .site-preview {
  --bg: #ffffff; --panel-2: #f4f6f9; --text: #161b22; --muted: #5d6673; --line: #e2e6ec;
  --accent: #e5322d; --accent-text: #ffffff; --warn: #b7791f; --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  .site, .site-preview {
    --bg: #0e1116; --panel-2: #171b22; --text: #e8ebf0; --muted: #9aa3ae; --line: #262c35;
    --accent: #ff5a52; --accent-text: #ffffff; --warn: #f0ad4e;
  }
}
.site { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.site main { max-width: 960px; margin: 0 auto; padding: 32px 16px 64px; }
.site-preview { background: var(--bg); color: var(--text); font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: 16px; border-radius: 8px; }
.blocks .btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; font-weight: 650; text-decoration: none; }
.blocks .btn.primary { background: var(--accent); color: var(--accent-text); }
.blocks .btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.blocks .btn:hover { filter: brightness(1.06); }

/* Blocks on the public page and in the admin preview */
.blocks {
  --b-gap: 22px;
  --b-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --b-soft-line: color-mix(in srgb, var(--accent) 30%, transparent);
  container-type: inline-size;
  display: flex; flex-direction: column; gap: var(--b-gap);
  color: var(--text); line-height: 1.6; min-width: 0;
}
.blocks > * { min-width: 0; margin: 0; }
.blocks, .blocks *, .b-lightbox * { box-sizing: border-box; }
.blocks .b-title { margin: 0 0 12px; font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -.005em; color: var(--text); }
.blocks .b-text p { margin: 0 0 10px; overflow-wrap: anywhere; color: inherit; }
.blocks .b-text p:last-child { margin-bottom: 0; }
.blocks .b-muted { color: var(--muted); }
.blocks img { display: block; max-width: 100%; height: auto; }
.blocks .b-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.blocks a:not(.btn) { color: var(--accent); text-underline-offset: 2px; }

/* hero */
.blocks .b-hero { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent) 3%, transparent) 60%), var(--panel-2);
  padding: 26px 24px; }
.blocks .b-hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.blocks .b-hero.align-center { text-align: center; }
.blocks .b-hero.align-center::before { display: none; }
.blocks .b-hero-title { margin: 0; font-size: clamp(22px, 5cqi, 30px); line-height: 1.2; font-weight: 750; letter-spacing: -.01em; color: var(--text); }
.blocks .b-hero-sub { margin: 8px 0 0; color: var(--muted); font-size: clamp(15px, 2.6cqi, 17px); }
.blocks .b-hero.align-center .b-hero-sub { margin-left: auto; margin-right: auto; max-width: 60ch; }
.blocks .b-hero.has-img { display: flex; align-items: flex-end; min-height: clamp(180px, 38cqi, 340px); padding: 0; border: 0; background: #0b1015; }
.blocks .b-hero.has-img::before { display: none; }
.blocks .b-hero.has-img .b-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto !important; object-fit: cover; }
.blocks .b-hero.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,12,16,0) 25%, rgba(8,12,16,.55) 60%, rgba(8,12,16,.88)); }
.blocks .b-hero.has-img .b-hero-body { position: relative; z-index: 1; width: 100%; padding: 24px; }
.blocks .b-hero.has-img.align-center { align-items: center; }
.blocks .b-hero.has-img.align-center::after { background: rgba(8,12,16,.58); }
.blocks .b-hero.has-img .b-hero-title { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.blocks .b-hero.has-img .b-hero-sub { color: rgba(255,255,255,.86); }

/* richtext (gesaneerde HTML) */
.blocks .b-rich-body { overflow-wrap: anywhere; }
.blocks .b-rich-body > :first-child { margin-top: 0; }
.blocks .b-rich-body > :last-child { margin-bottom: 0; }
.blocks .b-rich-body p { margin: 0 0 10px; color: inherit; }
.blocks .b-rich-body h2 { font-size: 20px; margin: 18px 0 8px; line-height: 1.3; }
.blocks .b-rich-body h3 { font-size: 17px; margin: 16px 0 6px; line-height: 1.3; }
.blocks .b-rich-body h4 { font-size: 15px; margin: 14px 0 6px; }
.blocks .b-rich-body ul, .blocks .b-rich-body ol { margin: 0 0 10px; padding-left: 1.4em; }
.blocks .b-rich-body li { margin: 2px 0; }
.blocks .b-rich-body blockquote { margin: 0 0 10px; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: 0 6px 6px 0; color: var(--muted); }
.blocks .b-rich-body img { border-radius: 8px; margin: 6px 0; }

/* infoblok: foto naast tekst (smal: foto boven) */
.blocks .b-info { display: grid; gap: 16px; align-items: center; }
.blocks .b-info-media { margin: 0; }
.blocks .b-info-media img { width: 100%; border-radius: 8px; object-fit: cover; max-height: 420px; }
@container (min-width: 560px) {
  .blocks .b-info { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; }
  .blocks .b-info.img-right { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .blocks .b-info.img-right .b-info-media { order: 2; }
}

/* afbeelding */
.blocks .b-figure { margin: 0; }
.blocks .b-figure img { width: 100%; border-radius: 8px; }
.blocks .b-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

/* galerij */
.blocks .b-gallery-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (min-width: 520px) {
  .blocks .b-gallery-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blocks .b-gallery-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 720px) { .blocks .b-gallery-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.blocks .b-gallery-item { display: block; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--panel-2); cursor: zoom-in; aspect-ratio: 4 / 3; }
.blocks .b-gallery-item img { width: 100%; height: 100%; aspect-ratio: auto !important; object-fit: cover; transition: transform .25s ease, opacity .25s; }
.blocks .b-gallery-item:hover img { transform: scale(1.03); }
.blocks .b-gallery-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* lightbox (outside .blocks, see site.js) */
.b-lightbox { position: fixed; inset: 0; z-index: 2500; background: rgba(5,8,11,.94); display: flex; align-items: center; justify-content: center;
  padding: calc(56px + env(safe-area-inset-top)) 56px calc(24px + env(safe-area-inset-bottom)); }
.b-lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.b-lb-fig img { max-width: 100%; max-height: calc(100dvh - 140px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.b-lb-fig figcaption { margin-top: 12px; color: #d6dee6; font-size: 14px; display: flex; gap: 14px; justify-content: center; text-align: center; }
.b-lb-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.b-lb-btn { position: absolute; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.b-lb-btn:hover { background: rgba(255,255,255,.2); }
.b-lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.b-lb-close { top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); }
.b-lb-prev { left: calc(6px + env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); }
.b-lb-next { right: calc(6px + env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .b-lightbox { padding-left: 8px; padding-right: 8px; }
  .b-lb-prev, .b-lb-next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); transform: none; }
  .b-lb-prev { left: calc(50% - 56px); } .b-lb-next { right: calc(50% - 56px); }
  .b-lb-fig img { max-height: calc(100dvh - 190px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}

/* programma: tijdlijn */
.blocks .b-prog-list { list-style: none; margin: 0; padding: 0; }
.blocks .b-prog-item { display: grid; grid-template-columns: 58px 14px minmax(0, 1fr); column-gap: 12px; position: relative; padding-bottom: 16px; }
.blocks .b-prog-item:last-child { padding-bottom: 0; }
.blocks .b-prog-time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); text-align: right; font-size: 14px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blocks .b-prog-dot { position: relative; }
.blocks .b-prog-dot::before { content: ''; position: absolute; left: 2px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-sizing: border-box; z-index: 1; }
.blocks .b-prog-item:not(:last-child) .b-prog-dot::after { content: ''; position: absolute; left: 6px; top: 18px; bottom: -6px; width: 2px; background: var(--line); }
.blocks .b-prog-title { font-weight: 600; }
.blocks .b-prog-body .b-text { margin-top: 2px; font-size: 14px; }
@container (max-width: 380px) { .blocks .b-prog-item { grid-template-columns: 48px 14px minmax(0, 1fr); column-gap: 8px; } .blocks .b-prog-time { font-size: 13px; } }

/* sprekers */
.blocks .b-speakers-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 520px) { .blocks .b-speakers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 860px) { .blocks .b-speakers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blocks .b-speaker { display: flex; gap: 14px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.blocks .b-speaker-photo { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--bg); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.blocks .b-speaker-photo img { width: 100%; height: 100%; aspect-ratio: auto !important; object-fit: cover; object-position: 50% 25%; }
.blocks .b-speaker-photo .b-icon { width: 30px; height: 30px; }
.blocks .b-speaker-body { min-width: 0; }
.blocks .b-speaker-name { font-weight: 700; line-height: 1.35; }
.blocks .b-speaker-role { color: var(--accent); font-size: 13px; font-weight: 600; margin-top: 1px; }
.blocks .b-speaker-bio { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* tip */
.blocks .b-tip { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); background: var(--b-soft); border: 1px solid var(--b-soft-line); }
.blocks .b-tip-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.blocks .b-tip-title { font-weight: 700; margin-bottom: 2px; }
.blocks .b-tip-body { min-width: 0; }
.blocks .b-tip.warn { background: rgba(240,173,78,.10); border-color: rgba(240,173,78,.38); }
.blocks .b-tip.warn .b-tip-icon { background: rgba(240,173,78,.18); color: var(--warn); }

/* kaarten */
.blocks .b-cards-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 480px) { .blocks .b-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 820px) { .blocks .b-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blocks .b-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.blocks .b-card-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--b-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.blocks .b-card-title { font-weight: 700; margin-bottom: 4px; }
.blocks .b-card .b-text { font-size: 14px; }

/* cta */
.blocks .b-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; border-radius: var(--radius); }
.blocks .b-cta.primary { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 6%, transparent)); border: 1px solid var(--b-soft-line); }
.blocks .b-cta.secondary { background: var(--panel-2); border: 1px solid var(--line); }
.blocks .b-cta .b-title { margin-bottom: 4px; }
.blocks .b-cta-body { min-width: 0; }
.blocks .b-cta-btn { text-decoration: none; max-width: 100%; }
.blocks .b-cta-btn .b-icon { width: 18px; height: 18px; }
@container (min-width: 600px) {
  .blocks .b-cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .blocks .b-cta-btn { flex: none; }
}
@container (max-width: 420px) { .blocks .b-cta-btn { width: 100%; } }

/* contact */
.blocks .b-contact { padding: 18px 20px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.blocks .b-contact > .b-text { margin-bottom: 12px; }
.blocks .b-contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.blocks .b-contact-list li { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.blocks .b-contact-icon { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--b-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.blocks .b-contact-icon .b-icon { width: 17px; height: 17px; }
.blocks .b-contact-list a { font-weight: 600; text-decoration: none; }
.blocks .b-contact-list a:hover { text-decoration: underline; }

/* help */
.blocks .b-help { display: flex; gap: 14px; align-items: flex-start; }
.blocks .b-help-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.blocks .b-help-body { min-width: 0; padding-top: 1px; }
.blocks .b-help-title { font-weight: 700; margin-bottom: 2px; }
/* opeenvolgende help-items dichter bij elkaar */
.blocks > .blk-help + .blk-help { margin-top: -8px; }

/* downloads */
.blocks .b-dl-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); }
.blocks .b-dl-list li + li { border-top: 1px solid var(--line); }
.blocks a.b-dl { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; min-height: 48px; }
.blocks a.b-dl:hover { background: rgba(255,255,255,.03); }
.blocks a.b-dl:hover .b-dl-label { color: var(--accent); }
.blocks .b-dl-icon { flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--b-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.blocks .b-dl-icon .b-icon { width: 17px; height: 17px; }
.blocks .b-dl-label { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.blocks .b-dl-arrow { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* scheiding (gap van .blocks telt mee) */
.blocks .b-sep { display: flex; align-items: center; }
.blocks .b-sep.size-s { height: 0; }
.blocks .b-sep.size-m { height: 12px; }
.blocks .b-sep.size-l { height: 36px; }
.blocks .b-sep hr { flex: 1; border: 0; border-top: 1px solid var(--line); margin: 0; }

/* telefoon: iets minder binnenruimte */
@container (max-width: 420px) {
  .blocks .b-hero:not(.has-img) { padding: 20px 18px; }
  .blocks .b-hero.has-img .b-hero-body { padding: 18px; }
  .blocks .b-tip, .blocks .b-contact, .blocks .b-cta { padding: 14px 16px; }
}
.b-lightbox[hidden], .b-lb-btn[hidden] { display: none; }
