/* --- СТРУКТУРА КОНТЕЙНЕРА --- */
.ats-carousel-wrapper {
    position: relative; /* Важно для абсолютного позиционирования стрелок на десктопе */
}

.ats-swiper-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
}

.ats-swiper-container .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.ats-carousel-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
    display: block;
    -webkit-tap-highlight-color: transparent;
}

/* --- СТИЛИ КАРТОЧЕК --- */
.ats-master-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    /*box-shadow: 0 4px 20px rgba(0,0,0,0.05);*/
}
.ats-master-card__img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.ats-master-card__content {
    padding: 20px;
    text-align: center;
}

.ats-master-card__title {
    margin: 0 0 5px;
    font-size: 1.2rem;
    font-weight: 600;
}

.ats-master-card__spec {
    color: #888;
    font-size: 0.9rem;
}

.ats-testimonial-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ats-testimonial-card__title {
    display: block;
    text-align: center;
    text-indent: -10000px;
    margin-top: 10px;
}

.ats-testimonial-card__title.t-icon.t-icon--gis {
    background: center center url("/wp-content/uploads/images/icons/gis2.png") no-repeat;
}

.ats-testimonial-card__text {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
}

.ats-testimonial-card__author-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: auto;
    width: 100%;
}

.ats-testimonial-card__author-info {
    flex: 0 1 75%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}
.ats-testimonial-card__meta {
    flex: 0 1 20%;
}

.ats-testimonial-card .ats-testimonial-card__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    overflow: hidden;
}

.ats-testimonial-card__author {
    font-weight: bold;
    color: #333;
}

.ats-testimonial-card__date {
    font-size: 0.85rem;
    color: #999;
    text-align: right;
}

/* --- НАВИГАЦИЯ: ОБЩИЕ СТИЛИ --- */

/* Кнопки (Стрелки) */
.ats-carousel-prev,
.ats-carousel-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #E5E5E5;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
    z-index: 10;
}

.ats-carousel-prev:hover,
.ats-carousel-next:hover {
    border-color: #D4C6B0;
    color: #D4C6B0;
}

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

/* Пагинация (Точки) */
.ats-carousel-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.ats-carousel-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E5E5E5;
    opacity: 1;
    margin: 0 !important;
    transition: all 0.3s;
    cursor: pointer;
}
.ats-carousel-pagination .swiper-pagination-bullet-active {
    background: #333;
    transform: scale(1.2);
}

/* --- МОБИЛЬНАЯ ВЕРСИЯ (По умолчанию) --- */
/* Все элементы внизу в ряд: Стрелка < Точки > Стрелка */
.ats-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 0 10px;
    gap: 20px;
}

/* --- ДЕСКТОП ВЕРСИЯ (min-width: 1024px) --- */
/* Перестраиваем layout: Стрелки по бокам, точки внизу */
@media (min-width: 1025px) {

    .ats-carousel-controls {
        display: block; /* Сбрасываем Flex */
        margin-top: 0;
        position: static;
    }

    /* Стрелки улетают на свои "классические" места */
    .ats-carousel-prev,
    .ats-carousel-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        /* Добавляем тень для красоты на десктопе */
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-color: transparent; /* Можно убрать рамку на десктопе или оставить */
    }

    /* Смещаем влево/вправо */
    /* Значение -22px выносит половину кнопки за пределы контейнера */
    /* Если контейнер обрезан overflow:hidden родителя, поменяйте на 10px (внутрь) */
    .ats-carousel-prev { left: -25px; }
    .ats-carousel-next { right: -25px; }

    /* Пагинация остается внизу, но центрируется */
    .ats-carousel-pagination {
        position: relative;
        margin-top: 30px;
        width: 100%;
    }

    .ats-testimonial-card {
        padding: 30px 20px;
    }
}

/* --- СЕТКА (ЕСЛИ СВАЙПЕР ВЫКЛЮЧЕН) --- */
.ats-carousel-disabled { display: grid; gap: 30px; }
.ats-carousel-disabled .swiper-wrapper { display: contents; }
.ats-carousel-disabled .swiper-slide { width: auto; height: auto; }
.ats-swiper-container.ats-carousel-disabled + .ats-carousel-controls { display: none; }