.section--gallery {
    padding: 0;
}

.gallery {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #e5e5e5;
}

.gallery__track {
    width: 100%;
    height: 100%;
}

.gallery__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 300ms ease-out;
}

.gallery__slide.is-active {
    opacity: 1;
}

.gallery__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .gallery {
        min-height: 60vh;
        height: auto;
        align-items: stretch;
    }
}



.gallery__controls {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 66px;
}

.gallery__arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    color: rgba(0, 0, 0, 0.4);
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.gallery__dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 33px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.gallery__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, 0.12);
    cursor: pointer;
    padding: 0;
}

.gallery__dot.is-active {
    background: rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
    .gallery__controls {
        width: 95dvw;
        /* растягиваем элементы по ширине */
        justify-content: space-between;
        gap: 0;

        /* опционально: чтобы стрелки не прилипали к краям */
        padding-inline: 8px;
        box-sizing: border-box;
        bottom: 20px;
    }
}

.gallery-small {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
}

.gallery__item {
    margin: 0;
    max-width: 100%;
}

.gallery__img {
    display: block;
    width: 100%;
    height: auto;        /* важно: на мобилке НЕ фиксируем высоту */
    max-width: 100%;
    border-radius: 4px;
    object-fit: cover;
}

/* DESKTOP ONLY */
@media (min-width: 1024px) {
    .gallery-small {
        flex-direction: row;
        align-items: stretch;
    }

    .gallery__item {
        flex: 1 1 0;
        min-width: 0;      /* чтобы флекс-дети не раздували контейнер */
    }

    .gallery__img {
        height: 320px;     /* подгони под дизайн */
        width: 100%;
        object-fit: cover;
    }
}