/* Foto's in artikelen: diavoorstelling en lightbox */

.post-content img { cursor: zoom-in; }

/* ---------- Diavoorstelling ---------- */

.slideshow { margin: 1.5rem 0; }
.slideshow-stage { position: relative; }
.slideshow-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.slideshow-track::-webkit-scrollbar { display: none; }
.slideshow-slide {
    position: relative;
    flex: 0 0 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    scroll-snap-align: start;
    background: #2a2a2a;        /* zolang de foto nog laadt */
}
/* Vervaagde kopie van de foto als achtergrond (zichtbaar naast staande foto's) */
.slideshow-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--slide-bg) center / cover no-repeat;
    filter: blur(28px) saturate(1.2) brightness(.85);
    transform: scale(1.15);     /* voorkomt lichte randen door de blur */
}
.slideshow-slide img {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;          /* liggende foto's vullen de dia */
}
.slideshow-slide.is-portrait img { object-fit: contain; }   /* staande foto's helemaal zichtbaar */

.slideshow-stage > button {
    z-index: 2;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgb(0 0 0 / .55);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.slideshow-prev { left: .5rem; }
.slideshow-next { right: .5rem; }
.slideshow-stage > button:disabled { opacity: 0; pointer-events: none; }
.slideshow-caption {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: .5rem 0 0;
    font-size: .875rem;
    opacity: .8;
}

/* ---------- Lightbox ---------- */

.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
}
.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox::backdrop { background: rgb(0 0 0 / .88); }
.lightbox figure { margin: 0; }
.lightbox img {
    display: block;
    max-width: 90vw;
    max-height: 84vh;
    object-fit: contain;
    cursor: zoom-out;
}
.lightbox figcaption {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0 0;
    font-size: .875rem;
}
.lightbox button {
    position: absolute;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / .15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox button:hover:not(:disabled) { background: rgb(255 255 255 / .3); }
.lightbox button:disabled { opacity: .25; cursor: default; }
.lightbox button[hidden] { display: none; }
.lightbox-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-close { right: 1rem; top: 1rem; }

@media (prefers-reduced-motion: reduce) {
    .slideshow-track { scroll-behavior: auto; }
}