.ebgp-gallery {
    width: 100%;
}

.ebgp-gallery__grid {
    --ebgp-columns: 4;
    display: grid;
    grid-template-columns: repeat(var(--ebgp-columns), minmax(0, 1fr));
    gap: 10px;
}

.ebgp-gallery__item {
    margin: 0;
    overflow: hidden;
}

.ebgp-gallery__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ebgp-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ebgp-gallery__caption {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.ebgp-gallery__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.ebgp-gallery--pagination-left .ebgp-gallery__pagination {
    justify-content: flex-start;
}

.ebgp-gallery--pagination-center .ebgp-gallery__pagination {
    justify-content: center;
}

.ebgp-gallery--pagination-right .ebgp-gallery__pagination {
    justify-content: flex-end;
}

.ebgp-gallery__page {
    min-width: 38px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #d5d5d5;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 3px;
    line-height: 1;
}

.ebgp-gallery__page:hover,
.ebgp-gallery__page.is-active {
    background: #333;
    border-color: #333;
    color: #fff;
}

.ebgp-gallery.is-loading .ebgp-gallery__grid {
    opacity: 0.45;
    pointer-events: none;
}

@media (max-width: 767px) {
    .ebgp-gallery__grid {
        --ebgp-columns: 2;
    }
}
