/* local/frontslider/css/styles.css */

/* Контейнер всех слайдеров */
.front-sliders-container {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 3600px;
    margin: 80px auto 0;
    padding: 0 20px;
    z-index: 1049;
}

/* Левая колонка с фиксированной шириной */
.slider-col {
    flex: 0 0 335px;
    width: 335px;
    border-radius: 7px;
}

/* Правая колонка - резиновая */
.slider-col-large {
    flex: 1;
    min-width: 0;
    border-radius: 7px;
    padding: 12px 0;
}

/* Hero слайдер */
.hero-slider {
    position: relative;
    width: 335px;
    height: 270px;
    overflow: hidden;
    border-radius: 7px;
    background: #ccc;
    box-shadow: rgb(0 0 0 / .05) 0 1px 0, rgb(0 0 0 / .08) 0 4px 8px, rgb(0 0 0 / .14) 0 10px 10px;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    padding: 12px;

    background: transparent;
    border: none;

    cursor: pointer;
    z-index: 20;

    height: 100%;
    width: 50px;

}

/* Рисуем стрелки */
.hero-btn::before {
    content: '';

    display: block;

    width: 18px;
    height: 18px;

    border-top: 2px solid rgba(255,255,255,.95);
    border-right: 2px solid rgba(255,255,255,.95);

    filter:
            drop-shadow(0 0 2px rgba(0,0,0,.7))
            drop-shadow(0 0 6px rgba(0,0,0,.4));
}

/* Левая */
.hero-prev {
    left: 0;
}
.hero-prev:hover {
    background: linear-gradient(to right, #0000005c, #00000000);
}

.hero-prev::before {
    transform: rotate(-135deg);
}

/* Правая */
.hero-next {
    right: 0;
}

.hero-next:hover {
    background: linear-gradient(to right, #00000000, #0000005c);
}

.hero-next::before {
    transform: rotate(45deg);
}

/* Hover */
.hero-btn:hover::before {
    border-color: #fff;
}

.hero-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    cursor: pointer;
}

.hero-dot.active {
    background: #004077;
    width: 20px;
    border-radius: 4px;
}

/* Текстовый блок */
.text-block {
    text-align: center;
    margin-bottom: 10px;
    padding: 5px 20px;
}

.text-block h2 {
    color: #004077;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.text-block p {
    color: #555;
}

/* Карусель курсов */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 10px;
    transition: transform 0.4s ease;
    will-change: transform;
}

.carousel-slide {
    flex-shrink: 0;
    overflow: hidden;
    position: relative;

    border-radius: 7px;
}

.carousel-slide img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    border-radius: 7px;
    position: relative;
    z-index: 1;
}


/* Затемнение */
.carousel-caption-text {
    position: absolute;
    inset: 0;

    background: rgba(0,0,0,.45);

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 12px;

    z-index: 2;
}

.carousel-caption-text h5 {
    margin: 0 0 5px;
    font-size: 0.95rem;
    font-weight: 400;
    color: #fff;
}

.carousel-caption-text p {
    margin: 0;
    font-size: 0.8rem;
}

/* Кнопки карусели */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    padding: 12px;

    background: transparent;
    border: none;

    cursor: pointer;
    z-index: 20;

    height: 50px;
    width: 50px;

}

/* Рисуем стрелки */
.carousel-btn::before {
    content: '';

    display: block;

    width: 18px;
    height: 18px;

    border-top: 2px solid rgba(255,255,255,.95);
    border-right: 2px solid rgba(255,255,255,.95);

    filter:
            drop-shadow(0 0 2px rgba(0,0,0,.7))
            drop-shadow(0 0 6px rgba(0,0,0,.4));
}

/* Левая */
.carousel-prev {
    left: 0;
}

.carousel-prev::before {
    transform: rotate(-135deg);
}

/* Правая */
.carousel-next {
    right: 0;
}


.carousel-next::before {
    transform: rotate(45deg);
}

/* Hover */
.carousel-next:hover::before {
    border-color: #fff;
}


/* Адаптивность - колонки становятся вертикальными */
@media (max-width: 1200px) {
    .front-sliders-container {
        flex-direction: column;
        align-items: center;
    }

    .slider-col {
        flex: 0 0 auto;
        display: flex;
        gap: 30px;
        width: auto;
        margin-bottom: 20px;
    }

    .slider-col-large {
        width: 100%;
        padding: 10px;
    }
}

@media (max-width: 640px) {
    .slider-col {
        flex-direction: column;
        align-items: center;
    }
}


/* Описание - скрыто по умолчанию */
.text-slider-block {
    display: none;
}

/* При наведении на слайд показываем описание поверх */
.carousel-slide:hover {
    position: relative;
}

.carousel-slide:hover .text-slider-block {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
    height: 100%;
    overflow-y: auto;
    border-top: 1px solid #eee;
    animation: slideUp 0.3s ease;
}

/* Анимация появления */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Стили для скроллбара */
.text-slider-block::-webkit-scrollbar {
    width: 4px;
}

.text-slider-block::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.text-slider-block::-webkit-scrollbar-thumb {
    background: #004077;
    border-radius: 4px;
}
