/* === Карусель — mobile-first === */

/* Базовые стили для мобильных (маленькие экраны) */
.carousel {
    position: relative;
    width: 100%;
    margin: 0 auto 30px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    overflow: hidden;
    box-sizing: border-box;
}

.carousel-clip {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-out;
}

.carousel-item {
    flex: 0 0 100%;
    background: #fff;
}

.carousel-img-wrap img {
    width: 100%;
    height: clamp(180px, 50vw, 300px);
    object-fit: cover;
    display: block;
}

.carousel-content {
    padding: 16px;
    text-align: center;
}

/* Кнопка "Подробнее" */
.carousel-detail-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background-color: #010185;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 12px 12px;
    transition: background-color 0.25s ease;
    margin-top: 12px;
}

.carousel-detail-btn:hover {
    background-color: #0a0aa8;
}

/* Кнопки навигации */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 28px;
    color: rgba(0,0,0,0.5);
    transition: color 0.25s ease, transform 0.25s ease;
    z-index: 10;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    color: #000;
    transform: translateY(-50%) scale(1.15);
}

.carousel-btn.prev {
    left: 8px;
}

.carousel-btn.next {
    right: 8px;
}

/* Расширение для более широких экранов */

@media (min-width: 768px) {
    .carousel {
        max-width: 600px;
        margin: 0 auto 40px;
        border: 1px solid rgba(0,0,0,.15);
    }

    .carousel-img-wrap img {
        height: clamp(180px, 35vw, 360px);
    }

    .carousel-content {
        padding: 20px;
    }

    .carousel-btn {
        font-size: 40px;
        width: 52px;
        height: 52px;
    }

    .carousel-btn.prev {
        left: 12px;
    }

    .carousel-btn.next {
        right: 12px;
    }
}

/* Очень большие экраны */
@media (min-width: 1200px) {
    .carousel {
        max-width: 600px;
    }
}