/* [gci_gallery]: grid and masonry layouts, captions, "Load more", and the lightbox (js/galleries.js). */

.gci-gallery {
    --gci-cols: 3;
    --gci-cols-md: 2;
    --gci-cols-sm: 1;
    --gci-gap: 20px;
    --gci-radius: 10px;
    --gci-ratio: 4 / 3;
    --gci-c: var(--gci-cols-sm);
    width: 100%;
}

@media (min-width: 768px) {
    .gci-gallery {
        --gci-c: var(--gci-cols-md);
    }
}

@media (min-width: 1024px) {
    .gci-gallery {
        --gci-c: var(--gci-cols);
    }
}

.gci-gallery__item {
    margin: 0;
    min-width: 0;
}

.gci-gallery__item[hidden] {
    display: none !important;
}

.gci-gallery__media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--gci-radius);
    color: inherit;
}

.gci-gallery__media img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

a.gci-gallery__media {
    cursor: zoom-in;
}

a.gci-gallery__media:focus-visible {
    outline: 3px solid #F69320;
    outline-offset: 3px;
}

.gci-gallery.has-hover-zoom .gci-gallery__media:hover img {
    transform: scale(1.04);
}

/* Grid: every image the same shape */
.gci-gallery--grid .gci-gallery__items {
    display: grid;
    grid-template-columns: repeat(var(--gci-c), minmax(0, 1fr));
    gap: var(--gci-gap);
}

.gci-gallery--grid .gci-gallery__media {
    aspect-ratio: var(--gci-ratio);
}

.gci-gallery--grid .gci-gallery__media img {
    height: 100%;
    object-fit: cover;
}

/* Masonry: images keep their own shape */
.gci-gallery--masonry .gci-gallery__items {
    column-count: var(--gci-c);
    column-gap: var(--gci-gap);
}

.gci-gallery--masonry .gci-gallery__item {
    break-inside: avoid;
    margin-bottom: var(--gci-gap);
}

/* Captions */
.gci-gallery__caption {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.4;
    color: #555;
}

.gci-gallery__overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 30px 15px 12px;
    background: linear-gradient(0deg, rgba(30, 30, 30, .8), rgba(30, 30, 30, 0));
    color: #fff;
    font-size: 15px;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s, transform .3s;
}

.gci-gallery__media:hover .gci-gallery__overlay,
.gci-gallery__media:focus-visible .gci-gallery__overlay {
    opacity: 1;
    transform: none;
}

@media (hover: none) {
    .gci-gallery__overlay {
        opacity: 1;
        transform: none;
    }
}

.gci-gallery__more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.gci-gallery-missing {
    padding: 10px 15px;
    border: 1px dashed #c00;
    color: #c00;
}

/* Lightbox */
.gci-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 24, 18, .94);
    color: #fff;
    opacity: 0;
    transition: opacity .25s;
    touch-action: pan-y;
}

.gci-lightbox.is-open {
    opacity: 1;
}

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

.gci-lightbox__figure {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    max-width: calc(100vw - 140px);
    max-height: calc(100vh - 60px);
}

.gci-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 130px);
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
    user-select: none;
    transition: opacity .2s;
}

.gci-lightbox.is-loading .gci-lightbox__img {
    opacity: .25;
}

.gci-lightbox__caption {
    max-width: 800px;
    margin-top: 14px;
    text-align: center;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .9);
}

.gci-lightbox__counter {
    position: absolute;
    top: 20px;
    left: 24px;
    font-size: 14px;
    letter-spacing: .05em;
    color: rgba(255, 255, 255, .75);
}

.gci-lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}

.gci-lightbox__btn:hover,
.gci-lightbox__btn:focus-visible {
    background: #F69320;
    border-color: #F69320;
    outline: none;
}

.gci-lightbox__close {
    top: 14px;
    right: 18px;
}

.gci-lightbox__prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

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

.gci-lightbox.is-single .gci-lightbox__prev,
.gci-lightbox.is-single .gci-lightbox__next,
.gci-lightbox.is-single .gci-lightbox__counter {
    display: none;
}

@media (max-width: 767px) {
    .gci-lightbox__figure {
        max-width: calc(100vw - 20px);
    }

    .gci-lightbox__prev,
    .gci-lightbox__next {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .gci-lightbox__img {
        max-height: calc(100vh - 170px);
    }
}

html.gci-lightbox-open {
    overflow: hidden;
}
