/* Styling voor de "Download Alle Foto's (ZIP)" knop */
.historie-fotos-download-all {
    text-align: center;
    margin-bottom: 20px; /* Ruimte onder de knop */
    width: 100%; /* Zorgt dat de knop de volledige breedte beslaat */
}

.historie-fotos-download-all button {
    background-color: #0073aa; /* WordPress blauw */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.historie-fotos-download-all button:hover {
    background-color: #005187;
}

/* --- Masonry Layout met CSS Columns --- */
.historie-fotos-gallery {
    /* De basis voor de kolommenlay-out */
    column-count: 1; /* Standaard 1 kolom op zeer kleine schermen */
    column-gap: 10px; /* Ruimte tussen de kolommen */
    margin: 0 auto; /* Centreer de galerij */
    max-width: 1200px; /* Maximale breedte, pas aan naar wens */
}

/* Media Queries om het aantal kolommen aan te passen per schermgrootte */
@media screen and (min-width: 480px) { /* Voor smartphones in landscape of kleine tablets */
    .historie-fotos-gallery {
        column-count: 2;
    }
}

@media screen and (min-width: 768px) { /* Voor tablets */
    .historie-fotos-gallery {
        column-count: 3;
    }
}

@media screen and (min-width: 1024px) { /* Voor laptops */
    .historie-fotos-gallery {
        column-count: 4;
    }
}

@media screen and (min-width: 1200px) { /* Voor grotere schermen */
    .historie-fotos-gallery {
        column-count: 5; /* Zoals in je voorbeeld, pas aan naar wens */
    }
}


/* Styling voor individuele foto-items */
.historie-foto-item {
    box-sizing: border-box; /* Zorgt dat padding binnen de breedte valt */
    break-inside: avoid-column; /* Voorkomt dat een item over twee kolommen wordt gesplitst */
    padding: 5px; /* Ruimte rondom elk item */
    margin-bottom: 10px; /* Ruimte tussen items binnen een kolom */
    /* Geen vaste breedte of float meer nodig; column-count regelt dit */
}

/* Afbeeldingen in de galerij */
.historie-foto-item img {
    display: block; /* Voorkom extra ruimte onder de afbeelding */
    width: 100%; /* Zorg dat de afbeelding de breedte van zijn container vult */
    height: auto; /* Behoud de aspect ratio */
    object-fit: cover; /* Zorgt dat de afbeelding het vlak vult zonder te vervormen */
    vertical-align: middle; /* Voorkomt extra witruimte onder afbeeldingen */
    border: none; /* Verwijder eventuele standaard witranden */
    box-shadow: none; /* Verwijder eventuele schaduwen */
    padding: 0;
}

/* Verberg de individuele downloadknop in het overzicht */
.historie-foto-item .download-single-photo {
    display: none;
}

/* --- Lightbox Styling (ongewijzigd) --- */

/* Achtergrond van de Lightbox */
.historie-lightbox {
    display: none; /* Standaard verborgen */
    position: fixed; /* Blijft op zijn plek scrollen */
    z-index: 9999; /* Zorg dat het boven alles ligt */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Scrollen indien nodig */
    background-color: rgba(0, 0, 0, 0.9); /* Zwarte, transparante achtergrond */
    -webkit-animation: fadeIn 0.5s;
    animation: fadeIn 0.5s;
}

/* Lightbox inhoud (de afbeelding) */
.historie-lightbox-content {
    margin: auto; /* Centreer de afbeelding horizontaal */
    display: block;
    max-width: 90%; /* Maximale breedte */
    max-height: 90vh; /* Maximale hoogte (viewport height) */
    object-fit: contain; /* Zorg dat de hele afbeelding zichtbaar is */
    -webkit-animation: zoomIn 0.5s;
    animation: zoomIn 0.5s;
    border: none; /* Geen rand om de lightbox afbeelding */
    padding: 0;
}

/* Sluitknop */
.historie-lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000; /* Hoger dan de afbeelding */
}

.historie-lightbox-close:hover,
.historie-lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Navigatieknoppen (vorige/volgende) */
.historie-lightbox-prev,
.historie-lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 10000;
}

.historie-lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.historie-lightbox-prev {
    left: 0;
    border-radius: 0 3px 3px 0; /* Kleine aanpassing voor esthetiek */
}

/* Navigatieknoppen hover */
.historie-lightbox-prev:hover,
.historie-lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Bijschrift */
#lightboxCaption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px; /* Geef de caption wat ruimte */
    overflow-y: auto; /* Zodat lange captions kunnen scrollen */
}

/* Downloadknop in lightbox */
#lightboxDownload {
    display: block; /* Maak het een blok-element */
    width: fit-content; /* Past breedte aan content aan */
    margin: 10px auto 0 auto; /* Centreer de knop onder de caption */
    background-color: #4CAF50; /* Groene kleur */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
    z-index: 10000;
}

#lightboxDownload:hover {
    background-color: #45a049;
}

/* Optionele animaties */
@-webkit-keyframes zoomIn {
    from {
        -webkit-transform: scale(0);
    }
    to {
        -webkit-transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}