.gallery-item > span {
    left: 10px;
    right: auto;
    bottom: 10px;
    width: auto;
    max-width: calc(100% - 20px);
    gap: 12px;
    padding: 8px 11px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.2;
}

.gallery-item > span i {
    font-size: 12px;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 50px 80px;
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 23, 33, .94);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.gallery-lightbox__figure {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: min(1200px, calc(100vw - 160px));
    max-height: calc(100vh - 100px);
    margin: 0;
    flex-direction: column;
    align-items: center;
}

.gallery-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 155px);
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.gallery-lightbox__caption {
    margin-top: 12px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.gallery-lightbox__button {
    position: fixed;
    z-index: 2;
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 22px;
    transition: background-color .2s ease, border-color .2s ease;
}

.gallery-lightbox__button:hover,
.gallery-lightbox__button:focus-visible {
    border-color: #fff;
    background: #1c6a98;
    color: #fff;
}

.gallery-lightbox__close {
    top: 24px;
    right: 24px;
}

.gallery-lightbox__previous {
    top: 50%;
    left: 24px;
    transform: translateY(-50%);
}

.gallery-lightbox__next {
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
}

@media (max-width: 767px) {
    .gallery-lightbox {
        padding: 65px 16px 50px;
    }

    .gallery-lightbox__figure {
        max-width: 100%;
        max-height: calc(100vh - 115px);
    }

    .gallery-lightbox__image {
        max-height: calc(100vh - 155px);
    }

    .gallery-lightbox__button {
        width: 42px;
        height: 42px;
        font-size: 19px;
    }

    .gallery-lightbox__close {
        top: 12px;
        right: 12px;
    }

    .gallery-lightbox__previous {
        left: 10px;
    }

    .gallery-lightbox__next {
        right: 10px;
    }
}
