/* ================================================
   SECTION: GALLERY
   ================================================ */
.section-gallery {
    padding: 60px 0;
}

.section-gallery__masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.section-gallery__masonry-item {
    overflow: hidden;
    height: 178px;
}

.section-gallery__masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.section-gallery__masonry-item--wide {
    grid-column: span 2;
}

.section-gallery__masonry-item--tall {
    grid-row: span 2;
    height: 100%;
}

.section-gallery__carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin-top: 135px;
}

.section-gallery__carousel-wrapper::before,
.section-gallery__carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.section-gallery__carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.section-gallery__carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0));
}

.section-gallery__carousel .swiper-slide {
    width: 322px;
    height: 455px;
}

.section-gallery__carousel .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-gallery__carousel{
    position: relative;
}

.section-gallery__carousel-prev,
.section-gallery__carousel-next {
    width: 43px;
    height: 43px;
    border: none;
    outline: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
}

.section-gallery__carousel-prev{
    left: 0;
}

.section-gallery__carousel-next{
    right: 0;
}

.section-gallery__carousel-prev:hover,
.section-gallery__carousel-next:hover {
    border-color: var(--aniro-color-primary);
    color: var(--aniro-color-primary);
}

/* ================================================
   LIGHTBOX
   ================================================ */
.aniro-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.aniro-lightbox--active {
    display: flex;
}

.aniro-lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

.aniro-lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    transition: opacity 0.2s;
}

.aniro-lightbox__close:hover {
    opacity: 0.7;
}

.aniro-lightbox__nav {
    display: contents;
}

.aniro-lightbox__prev,
.aniro-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1;
    padding: 10px;
    transition: opacity 0.2s;
}

.aniro-lightbox__prev {
    left: 30px;
}

.aniro-lightbox__next {
    right: 30px;
}

.aniro-lightbox__prev:hover,
.aniro-lightbox__next:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .aniro-lightbox--active {
        flex-direction: column;
    }

    .aniro-lightbox__img {
        max-height: 70vh;
    }

    .aniro-lightbox__nav {
        display: flex;
        justify-content: space-between;
        width: 90vw;
        margin-top: 20px;
    }

    .aniro-lightbox__prev,
    .aniro-lightbox__next {
        position: static;
        transform: none;
    }
}

[data-lightbox] {
    cursor: pointer;
}
