/* Основные стили слайдера */
.cases-slider {
    /* position: relative; */
    z-index: 2;
    max-width: 100%;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

/* Базовые стили для карточек кейсов */
.case-card {
    width: 100%;
    background: #f8f9ff;
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.case-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
}

.case-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d2d2d;
}

.case-text {
    color: #666;
    line-height: 1.5;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.case-result {
    color: #8b5cf6;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.4;
}

.slider-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible; /* позволяем стрелкам выходить за пределы слайдера */
    border-radius: 15px;
    /* position: relative; для позиционирования кнопок навигации */
}

.swiper-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    align-items: center;
    width: 100%;
}

/* Swiper специфичные стили */
.swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100% !important;
    flex-shrink: 0;
    transform: scale(1) !important;
    /* position: relative; */
}

/* Центральная карточка - крупнее */
.swiper-slide-active {
    transform: scale(1.3) !important;
    z-index: 10 !important;
}
    
/* Боковые карточки - меньше */
.swiper-slide-prev,
.swiper-slide-next {
    transform: scale(0.9) !important;
}

/* Убираем position: relative у .swiper */
.swiper {
    position: static !important;
}

/* Стили для карточек кейсов в слайдере */
.swiper-wrapper .case-card {
    /* padding: 2.5rem; */
    height: 600px; /* Фиксированная высота для всех карточек */
    overflow-y: auto; /* Скролл если контент не помещается */
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    opacity: 1;
    animation: none;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* .swiper-wrapper .case-card:hover {
    transform: translateY(-5px);
} */

.swiper-wrapper .case-card .case-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d2d2d;
    flex-shrink: 0;
}

.swiper-wrapper .case-card .case-text {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.swiper-wrapper .case-card .case-result {
    color: #8b5cf6;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: auto;
    flex-shrink: 0;
}

.swiper-wrapper .case-card .case-avatar {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.swiper-wrapper .case-card .avatar-image {
    width: 120px;
    height: 120px;
}

/* Стили для аватаров в слайдере */
.cases-slider .case-card .case-avatar {
    width: 150px;
    height: 150px;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.cases-slider .case-card .avatar-image {
    width: 135%;
    height: 135%;
    object-fit: cover;
    background: transparent;
    border-radius: 50%;
}

/* Кнопки навигации */
.prev,
.next {
    cursor: pointer;
    z-index: 1000;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: 0.2s;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev:hover,
.next:hover {
    opacity: 1;
}

.prev svg,
.next svg {
    width: 20px;
    height: 20px;
}

.prev svg path,
.next svg path {
    fill: #8b5cf6; /* фиолетовый цвет для лучшей видимости */
}

.prev {
    left: -100px; /* позиционируем левую стрелку */
}

.next {
    right: -100px; /* позиционируем правую стрелку */
}

/* Пагинация */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center; /* центрируем */
    width: auto; /* автоматическая ширина вместо 100% */
    margin: 100px auto 0; /* по центру контейнера */
    z-index: 100;
    position: relative;
    left: 8%!important;
    transform: translateX(-50%);
}

.pagination span {
    font-size: 0;
    opacity: 1;
    margin: 0px 6px !important;
    
    border: 1px solid #fff;
}

.pagination span.swiper-pagination-bullet-active {
    background-color: transparent;
    transform: scale(1.5);
}

/* Swiper пагинация */
.swiper-pagination-bullet {
    width: 30px !important; /* одинаковая ширина для всех точек */
    height: 8px !important; /* делаем капсулу */
    border-radius: 8px !important;
    background: #ddd !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
    margin: 0 4px !important; /* уменьшаем отступы между точками */
    display: inline-block !important;
}

.swiper-pagination-bullet-active {
    background: #8b5cf6 !important;
    width: 30px !important; /* такая же ширина как у обычных */
}

/* Мобильные корректировки для стрелок и пагинации */
@media (max-width: 767px) {
    .prev { left: 10px; }
    .next { right: 10px; }
    .swiper-pagination-bullet { 
        width: 30px !important; 
        height: 6px !important; 
    }
    .swiper-pagination-bullet-active { 
        width: 30px !important; 
    }
    .pagination {
        left: -15%!important;
    }
}

/* Динамические буллеты */
.swiper-pagination-bullet-dynamic-main {
    background: #8b5cf6;
    transform: scale(1.2);
}

.swiper-pagination-bullet-dynamic-prev,
.swiper-pagination-bullet-dynamic-next {
    background: #ddd;
    transform: scale(0.8);
}

/* Адаптивность для слайдера */
@media (max-width: 767px) {

    .case-card{
        width: 100% !important;
    }

    .slider-container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    /* Отключаем масштабирование */
    .swiper-slide-active,
    .swiper-slide-prev,
    .swiper-slide-next {
        transform: scale(1) !important;
    }
    
    /* Для мобильных: 1 слайд */
    .swiper-slide {
        width: 100% !important;
    }
    
    .swiper-wrapper .case-card {
        padding: 1rem;
        height: 600px; /* Фиксированная высота для планшетов */
    }
    
    .swiper-wrapper .case-card .case-name {
        font-size: 1rem;
    }
    
    .swiper-wrapper .case-card .case-text {
        font-size: 0.9rem;
    }
    
    .swiper-wrapper .case-card .case-result {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .slider-container {
        max-width: 320px;
        padding: 0;
    }
    
    /* Показ по одному слайду фиксированной ширины 320px */
    .swiper {
        width: 320px !important;
        margin: 0 auto;
    }
    .swiper-slide {
        width: 320px !important;
    }
    /* Отключаем масштабирование на мобильных */
    .swiper-slide-active,
    .swiper-slide-prev,
    .swiper-slide-next {
        transform: scale(1) !important;
    }
    
    .swiper-wrapper .case-card {
        padding: 1rem;
        height: 450px; /* Увеличенная высота для мобильных */
    }
    
    .swiper-wrapper .case-card .case-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 0.75rem;
    }
    
    .swiper-wrapper .case-card .avatar-image {
        width: 80px;
        height: 80px;
    }
    
    .swiper-wrapper .case-card .case-name {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .swiper-wrapper .case-card .case-text {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .swiper-wrapper .case-card .case-result {
        font-size: 0.8rem;
    }
    
    /* Пагинация и кнопки на мобильных */
    .pagination {
        left: 30% !important;
    }
    .prev,
    .next {
        display: none;
    }
}

/* Tablet: показываем 1 карточку в ряд */
@media (min-width: 768px) and (max-width: 1023px) {
    .slider-container { 
        max-width: 560px; 
        padding: 0 12px;
    }
    
    .swiper-slide {
        width: 100% !important;
    }

    .swiper-slide-active,
    .swiper-slide-prev,
    .swiper-slide-next {
        transform: scale(1) !important;
    }

    .swiper-wrapper .case-card {
        height: 520px;
        padding: 1.25rem;
    }

    .swiper-wrapper .case-card .case-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }

    .swiper-wrapper .case-card .avatar-image {
        width: 100px;
        height: 100px;
    }

    .swiper-wrapper .case-card .case-name {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .swiper-wrapper .case-card .case-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .swiper-wrapper .case-card .case-result {
        font-size: 0.85rem;
    }

    .prev { left: 10px; }
    .next { right: 10px; }

    .pagination {
        left: 0 !important;
        transform: none !important;
        margin: 40px auto 0;
    }
}

@media (min-width: 1024px) {
    .slider-container { 
        max-width: 1200px; 
    }
    
    .swiper-slide {
        width: calc(33.333% - 25px) !important;
    }
}

@media (min-width: 1200px) {
    .slider-container { 
        max-width: 1200px; 
    }
    
    .swiper-slide {
        width: calc(33.333% - 30px) !important;
    }
}

@media (min-width: 1400px) {
    .slider-container { 
        max-width: 1200px; 
    }
    
    .swiper-slide {
        width: calc(33.333% - 35px) !important;
    }
}

/* Анимация загрузки страницы */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

