/* ===============================================
   RAUMAMBIENTE AACHEN – REFERENZGALERIE
   Contao 5.7 / Swiper
   =============================================== */
.ra-reference-gallery {
    --ra-gallery-radius: var(--radius-medium, 8px);
    width: 100%;
    min-width: 0;
}
.ra-reference-gallery__stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--ra-gallery-radius);
    background: var(--color-gray-extra-light, #f7f9fa);
}
.ra-reference-gallery__stage .swiper-slide {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
    height: auto;
}
.ra-reference-gallery__stage figure {
    width: 100%;
    margin: 0;
    aspect-ratio: 7 / 4;
    overflow: hidden;
}
.ra-reference-gallery__stage picture,
.ra-reference-gallery__stage img {
    display: block;
    width: 100%;
    height: 100%;
}
.ra-reference-gallery__stage img {
    object-fit: cover;
    object-position: center;
}
.ra-reference-gallery__stage figcaption {
    position: absolute;
    left: 20px;
    bottom: 18px;
    padding: 7px 12px;
    border-radius: 4px;
    color: #fff;
    background: rgba(0, 40, 47, .8);
    font-size: 14px;
}
.ra-reference-gallery__prev,
.ra-reference-gallery__next {
    position: absolute;
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 79, 89, .88);
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}
.ra-reference-gallery__prev { left: 16px; }
.ra-reference-gallery__next { right: 16px; }
.ra-reference-gallery__prev:hover,
.ra-reference-gallery__next:hover {
    background: var(--color-petrol-hover, #008494);
}
.ra-reference-gallery__prev:focus-visible,
.ra-reference-gallery__next:focus-visible,
.ra-reference-gallery__thumb:focus-visible {
    outline: 3px solid var(--color-petrol, #006e7b);
    outline-offset: 3px;
}
.ra-reference-gallery__counter {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 4;
    color: #fff;
    background: rgba(0, 40, 47, .85);
    border-radius: 5px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.ra-reference-gallery__thumbs {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 4px 2px 10px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}
.ra-reference-gallery__thumb {
    position: relative;
    flex: 0 0 clamp(92px, 14vw, 168px);
    aspect-ratio: 8 / 5;
    display: block;
    padding: 0;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: 6px;
    background: #e8edef;
    cursor: pointer;
    scroll-snap-align: start;
    opacity: .74;
    transition: opacity .2s ease, border-color .2s ease;
}
.ra-reference-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ra-reference-gallery__thumb:hover { opacity: 1; }
.ra-reference-gallery__thumb.is-active {
    opacity: 1;
    border-color: var(--color-petrol, #006e7b);
}
.ra-reference-gallery__stage .swiper-button-disabled {
    opacity: .35;
    cursor: default;
}
@media (max-width: 767px) {
    .ra-reference-gallery__stage figure { aspect-ratio: 4 / 3; }
    .ra-reference-gallery__prev,
    .ra-reference-gallery__next {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    .ra-reference-gallery__prev { left: 8px; }
    .ra-reference-gallery__next { right: 8px; }
    .ra-reference-gallery__counter {
        right: 10px;
        bottom: 10px;
        padding: 5px 8px;
        font-size: 12px;
    }
    .ra-reference-gallery__thumbs { gap: 8px; }
    .ra-reference-gallery__thumb { flex-basis: 94px; }
}
