/* ========================= SFLB GALLERY - FIX CAPTIONS + COMPACT GRID ========================= */

.sflb-gallery {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(4, 1fr) !important;
    max-width: 100%;
    margin: 0 auto;
margin-bottom: 20px;
}

/* reset wrappers */
.sflb-gallery figure,
.sflb-gallery .wp-block-image {
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}

/* image */
.sflb-gallery img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* link */
.sflb-gallery a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* =========================
   ITEM + ROUNDED CORNERS
   ========================= */

.sflb-item-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

/* =========================
   CAPTION OP FOTO (ONDERAAN)
   ========================= */

.sflb-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    background: rgba(0,0,0,0.40);
    color: #fff;

    font-size: 12px;
    line-height: 1.3;
    text-align: center;

    padding: 6px 8px;
    margin: 0;

    z-index: 2;

    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* TABLET */
@media (max-width: 900px) {
    .sflb-gallery {
        grid-template-columns: repeat(3, 1fr) !important;
        max-width: 850px;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .sflb-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px;
    }

    .sflb-caption {
        font-size: 11px;
    }
}