/* Galleries on the website, from the shared CMS core (cms-core). render_blocks()
   loads this only on a page with a gallery. Colours fall back to the site's own. */
:root { --cms-on-dark: var(--on-dark, #f4f1ea); --cms-on-dark-muted: var(--on-dark-muted, #b9b4a8); --cms-accent: var(--accent, var(--gold, #b8860b)); }
.post-galerij { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 30%), 1fr)); gap: 0.5rem; margin: 2rem 0; clear: both; }
.post-galerij a { display: block; }
.article .post-galerij img, .post-galerij img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm, 6px); margin: 0; }

/* ---------- Photo viewer for galleries (main.js) ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(8, 14, 26, 0.94); color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 14, 26, 0.94); }
html.lightbox-open { overflow: hidden; }
.lightbox-figure {
  margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3.5rem 4.5rem 1.5rem; gap: 0.8rem;
}
.lightbox-figure img {
  max-width: 100%; max-height: calc(100dvh - 7rem); width: auto; height: auto; object-fit: contain;
  border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); user-select: none;
}
.lightbox-figure figcaption { color: var(--cms-on-dark); font-size: 0.92rem; text-align: center; max-width: 60ch; }
.lightbox-count {
  position: absolute; top: 1.1rem; inset-inline-start: 1.25rem; margin: 0;
  font-family: "JetBrains Mono", monospace; font-size: 0.85rem; color: var(--cms-on-dark-muted);
}
.lightbox-btn {
  position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-btn:focus-visible { outline: 2px solid var(--cms-accent); outline-offset: 2px; }
.lightbox-btn[hidden] { display: none; }
.lightbox-close { top: 0.75rem; inset-inline-end: 0.75rem; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); }
.lightbox-prev { inset-inline-start: 0.75rem; }
.lightbox-next { inset-inline-end: 0.75rem; }
/* One chevron pointing right; turned around for "previous" in LTR and for
   "next" in RTL, where the order of the photos runs the other way. */
.lightbox-prev svg, [dir="rtl"] .lightbox-next svg { transform: scaleX(-1); }
[dir="rtl"] .lightbox-prev svg { transform: none; }
@media (max-width: 640px) {
  .lightbox-figure { padding: 3.5rem 0.5rem 4.5rem; }
  .lightbox-figure img { max-height: calc(100dvh - 10rem); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 0.75rem; transform: none; }
}
.post-galerij a { cursor: zoom-in; }

/* ---------- Download a file (PDF): a button in the site's colour, with the size (core/blocks.php) ---------- */
.post-bestand { margin: 1em 0; }
.post-bestand .bestand-knop, .post-bestand .bestand-knop:link, .post-bestand .bestand-knop:visited {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 10px 18px; border-radius: var(--radius-sm, 6px);
  background: var(--cms-accent); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.post-bestand .bestand-knop:hover { filter: brightness(1.08); color: #fff; }
.post-bestand .bestand-knop:focus-visible { outline: 2px solid var(--cms-accent); outline-offset: 3px; }
.post-bestand .bestand-tekst { overflow-wrap: anywhere; }
.post-bestand .bestand-info { flex: none; font-weight: 400; font-size: .85em; opacity: .85; }
.post-bestand svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
