[data-gallery] .gallery-lightbox-trigger {
    cursor: zoom-in;
}

[data-gallery] .gallery-lightbox-trigger:focus {
    outline: none;
}

[data-gallery] .gallery-lightbox-trigger:focus-visible {
    outline: none;
}

.avalliance-gallery-section .gallery-scroller {
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
}

.avalliance-gallery-section .gallery-grid {
    --gallery-cell-width: clamp(230px, 34vw, 442px);
    --gallery-row-height: clamp(150px, 21vw, 216px);
    display: grid;
    grid-auto-flow: column dense;
    grid-auto-columns: var(--gallery-cell-width);
    grid-template-rows: repeat(3, var(--gallery-row-height));
    gap: 16px;
    width: max-content;
}

.avalliance-gallery-section .gallery-tile {
    min-width: 0;
    overflow: hidden;
    grid-column: span 1;
    grid-row: span 1;
    margin: 0;
}

/* One large tile followed by three small tiles, repeating. */
.avalliance-gallery-section .gallery-tile:nth-child(4n + 1) {
    grid-column: span 2;
    grid-row: 1 / -1;
}

.avalliance-gallery-section .gallery-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--secondary-background-color);
}

#showcases > .avalliance-gallery-section {
    margin-top: 64px;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 88px;
    background: rgb(0 0 0 / 94%);
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

.gallery-lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 128px);
    object-fit: contain;
    border: 0;
    outline: none;
    box-shadow: none;
}

.gallery-lightbox-caption {
    max-width: 720px;
    margin: 16px 0 0;
    color: #fff;
    text-align: center;
}

.gallery-lightbox-close,
.gallery-lightbox-previous,
.gallery-lightbox-next {
    position: absolute;
    z-index: 1;
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    color: #fff;
    background: rgb(0 0 0 / 55%);
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 50%;
    cursor: pointer;
    line-height: 0;
    text-decoration: none;
    appearance: none;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible,
.gallery-lightbox-previous:hover,
.gallery-lightbox-previous:focus-visible,
.gallery-lightbox-next:hover,
.gallery-lightbox-next:focus-visible {
    background: rgb(255 255 255 / 16%);
    border-color: rgb(255 255 255 / 75%);
    text-decoration: none;
}

.gallery-lightbox-close:focus-visible,
.gallery-lightbox-previous:focus-visible,
.gallery-lightbox-next:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.gallery-lightbox-close svg,
.gallery-lightbox-previous svg,
.gallery-lightbox-next svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.gallery-lightbox-close {
    top: 24px;
    right: 24px;
}

.gallery-lightbox-previous,
.gallery-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-previous {
    left: 24px;
}

.gallery-lightbox-next {
    right: 24px;
}

.gallery-lightbox-counter {
    position: absolute;
    right: 0;
    bottom: 24px;
    left: 0;
    margin: 0;
    color: #fff;
    text-align: center;
}

@media (max-width: 700px) {
    .avalliance-gallery-section .gallery-grid {
        --gallery-cell-width: 240px;
        --gallery-row-height: 150px;
    }

    .gallery-lightbox {
        padding: 56px 16px 48px;
    }

    .gallery-lightbox-close {
        top: 12px;
        right: 12px;
    }

    .gallery-lightbox-previous,
    .gallery-lightbox-next {
        width: 40px;
        height: 40px;
    }

    .gallery-lightbox-previous {
        left: 8px;
    }

    .gallery-lightbox-next {
        right: 8px;
    }

    .gallery-lightbox-image {
        max-height: calc(100vh - 104px);
    }
}
