/* ImageSliderItems OverlayTiles
   Desktop (>=1024): three equal photo tiles, ~12px white gutters.
   Tablet (878–1023): one focused tile with a peek of each neighbour
   and a 2px hairline gutter (878 design comp).
   Mobile (<878 / 408 design): 332px × 270px tile, centered, no peek.
   Carousel chrome (wrapper/container/indicators) comes from card-carousel.css. */

.overlay-tiles-section {
    padding: 0;
    margin-top: 0;
    overflow: hidden;
}

/* Wrapper stays overflow:visible so the dots (positioned below the row) show.
   Peek clipping is owned by .overlay-tiles-viewport. */
.overlay-tiles-section .card-carousel-wrapper {
    margin-bottom: 48px;
    overflow: visible;
}

.overlay-tiles-viewport {
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

.overlay-tiles-section .card-carousel-container {
    gap: 12px;
}

.overlay-tiles-section .card-carousel-item {
    min-width: 0;
    max-width: none;
}

/* Design-mode / no-JS fallback: three equal tiles on desktop. */
@media (min-width: 1024px) {
    .overlay-tiles-section .card-carousel-item {
        width: calc((100% - 24px) / 3);
        min-width: calc((100% - 24px) / 3);
        max-width: calc((100% - 24px) / 3);
    }
}

@media (max-width: 1023px) {
    .overlay-tiles-section .card-carousel-container {
        gap: 2px;
    }
}

/* 408 design: 332px tile, centered. */
@media (max-width: 877px) {
    .overlay-tiles-section .card-carousel-container {
        gap: 0;
    }

    .overlay-tiles-viewport {
        width: 332px;
        max-width: 100%;
        margin: 0 auto;
    }

    .overlay-tiles-section .card-carousel-item {
        width: 332px;
        min-width: 332px;
        max-width: 332px;
    }
}

.overlay-tile {
    position: relative;
    width: 100%;
    height: 385px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-tile__link {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.overlay-tile__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.overlay-tile__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(61, 57, 53, 1);
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

.overlay-tile__title {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 24px 20px;
    width: 100%;
    color: var(--color-white);
    font-family: var(--font-family-bold);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    pointer-events: none;
}

/* Dots only — arrows stay in the DOM for CJCarousel init / keyboard. */
.overlay-tiles-section .carousel-control.card-carousel-prev,
.overlay-tiles-section .carousel-control.card-carousel-next {
    display: none;
}

.overlay-tiles-section .card-carousel-indicators {
    bottom: -32px;
}

.overlay-tiles-section .card-carousel-indicators .carousel-indicator.active,
.overlay-tiles-section .card-carousel-indicators .carousel-indicator:hover {
    background: var(--color-dark-blue);
    border-color: var(--color-dark-blue);
}

/* 878 design: title wraps on the focused tile; peeks clip neighbour titles. */
@media (min-width: 878px) and (max-width: 1023px) {
    .overlay-tile {
        height: 385px;
    }

    .overlay-tile__title {
        font-size: 22px;
        padding: 20px 16px;
    }
}

@media (max-width: 877px) {
    .overlay-tile {
        width: 332px;
        max-width: 100%;
        height: 270px;
    }

    .overlay-tile__title {
        font-size: 28px;
        line-height: 1.2;
        padding: 24px 40px;
    }
}
