/* Image gallery of single news, events and adopted springs (oc:8869): template-parts/gallery_scroller.php */

/* Thumbnails in a grid like the default WordPress gallery, instead of the horizontal scroller of main.css */
.notizia-slider-container {
    overflow: visible;
}
.notizia-slider {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 0;
}
.notizia-slider a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}
.notizia-slider img {
    display: block;
    width: 100%;
    max-width: none;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: none;
    transition: opacity 0.2s;
}
.notizia-slider a:hover img {
    opacity: 0.85;
}
.notizia-slider a:focus-visible {
    outline: 3px solid #254A9F;
    outline-offset: 2px;
}
@media (max-width: 480px) {
    .notizia-slider {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

/* Lightbox, see js/lightbox.js */
.as-lightbox {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
}
.as-lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.as-lightbox::backdrop {
    background: rgba(15, 23, 42, 0.92);
}
.as-lightbox__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.as-lightbox__image {
    max-width: min(90vw, 1400px);
    max-height: 82vh;
    width: auto;
    height: auto;
    border-radius: 8px;
}
.as-lightbox__counter {
    color: #ffffff;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}
.as-lightbox button {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 0;
    border-radius: 9999px;
    width: 48px;
    height: 48px;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}
.as-lightbox button:hover {
    background: rgba(255, 255, 255, 0.3);
}
.as-lightbox button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}
.as-lightbox button[hidden] {
    display: none;
}
.as-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
}

/* On phones the arrows go over the photo, at the sides */
@media (max-width: 640px) {
    .as-lightbox__nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
    }
    .as-lightbox__prev {
        left: 8px;
    }
    .as-lightbox__next {
        right: 8px;
    }
    .as-lightbox__image {
        max-width: 100vw;
        border-radius: 0;
    }
}
