.custom-slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.custom-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.custom-slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    /*will-change: transform;*/
}

.custom-slide {
    min-width: 80%; /* Одинаковая ширина для всех слайдов */
    margin: 0px;
    opacity: 0.5;
    transform: scale(0.9);
    transition: transform 0.5s ease, opacity 0.5s ease;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
     flex-shrink: 0;
}

.custom-slide.active {
    opacity: 1;
    transform: scale(1); /* Убираем изменение ширины, оставляем только масштаб */
}

/* Добавляем градиент на изображение активного слайда */
.custom-slide.active .custom-slide-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(38,52,70);
    background: linear-gradient(0deg, rgba(38,52,70,1) 0%, rgba(38,52,70,0) 67%);
    z-index: 1;
}

/* Стиль для заголовка и текста на фоне градиента */
.custom-slide-caption {
    position: absolute;
    bottom: 20px;
    left: 50px;
    right: 50px;
    z-index: 2;
    margin: auto;
    color: white;
    text-align: center;
}

.custom-slide-caption h5 a {
    font-size: 3rem;
    margin: 0;
    color: #fff !important;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 300;
}
.custom-slide-content img {
    border-radius: 12px;
}

/* Удаляем абзац на мобильных устройствах */
@media (max-width: 768px) {
    .custom-slide-caption p {
        display: none;
    }
}

.custom-slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 2;
}

.custom-slider-prev {
    left: 10px;
}

.custom-slider-next {
    right: 10px;
}

.custom-slide-content img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}