/* Explain: Styles for the image gallery and lightbox functionality. */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    transition: transform 700ms ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.06);
}

.gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 30, 23, 0.32);
    color: #ffffff;
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

.gallery-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.6rem 1rem 1rem;
    background: linear-gradient(to top, rgba(20, 30, 23, 0.82), rgba(20, 30, 23, 0));
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-zoom,
.gallery-item:focus-visible .gallery-zoom,
.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
    opacity: 1;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(17, 25, 19, 0.88);
    backdrop-filter: blur(6px);
}

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

.gallery-lightbox img {
    max-width: min(100%, 1100px);
    max-height: 86vh;
    width: auto;
    height: auto;
    border-radius: 1.5rem;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    object-fit: contain;
}

.gallery-lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 300ms ease;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.26);
}