.testimonial p {
    order: 3;
    margin: 0;
    font-size: 14.5px;
    line-height: 1.65;
    color: rgba(231, 231, 234, .66);
    text-wrap: pretty;

    /* фиксированная высота блока текста */
    max-height: 150px;
    /* подстрой под нужное кол-во строк */
    overflow-y: auto;
    padding-right: 2px;
    /* чтобы текст не подлезал под скроллбар */

    /* скрываем сам скроллбар, но оставляем возможность скролла */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge legacy */

    /* градиентное затухание снизу — сигнал, что текста больше */
    -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 85%, transparent 100%);
}

/* Chrome / Safari / Edge (Chromium) */
.testimonial p::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}


.testimonials {
    --card-w: 380px;
    --card-gap: 26px;
    --speed: 46s;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    padding: 8px 0;
    overflow: hidden;
}

/* одна горизонтальная лента */
.tm-row {
    display: flex;
    overflow: hidden;
}

/* движущийся трек — карточки внутри, задублированы для бесшовной прокрутки */
.tm-track {
    display: flex;
    flex: 0 0 auto;
    width: max-content;
    will-change: transform;
}

.tm-track--ltr {
    animation: tm-scroll-left var(--speed) linear infinite;
    padding: 10px;

}

.tm-track--rtl {
    animation: tm-scroll-right var(--speed) linear infinite;
    padding: 10px;
}

/* наведение на ленту — пауза всей ленты */
.tm-row:hover .tm-track {
    animation-play-state: paused;
}

@keyframes tm-scroll-left {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes tm-scroll-right {
    from {
        transform: translate3d(-50%, 0, 0);
    }

    to {
        transform: translate3d(0, 0, 0);
    }
}

/* карточка отзыва (существующая структура .testimonial) */
.testimonial {
    flex: 0 0 auto;
    width: var(--card-w);
    margin-right: var(--card-gap);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 26px 26px;
    border-radius: 18px;
    background: #f0f4fb;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .35s ease, box-shadow .35s ease;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.testimonial:hover {
    transform: translateY(-6px) scale(1.025);

}

/* порядок: имя + звёзды сверху, текст снизу */
.testimonial strong {
    order: 1;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .01em;
    color: #667197;
}

.testimonial .stars {
    order: 2;
    font-size: 15px;
    letter-spacing: 2px;
    line-height: 1;
    color: #ffb347;
    filter: drop-shadow(0 1px 4px rgba(255, 150, 40, .35));
}

.testimonial p {
    order: 3;
    margin: 0;
    font-size: 14.5px;
    line-height: 1.65;
    color: #667197;
    text-wrap: pretty;

    max-height: 150px;
    overflow-y: auto;
    padding-right: 2px;

    scrollbar-width: none;
    -ms-overflow-style: none;

    -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 85%, transparent 100%);
}

.testimonial p::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* адаптивность */
@media (max-width:640px) {
    .testimonials {
        --card-w: 78vw;
        --card-gap: 16px;
        --speed: 34s;
    }

    .testimonial {
        padding: 20px 20px 22px;
        border-radius: 16px;
        height: 200px;
    }

    .testimonial strong {
        font-size: 16px;
    }

    .testimonial p {
        font-size: 13.5px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .tm-track {
        animation: none !important;
        transform: none !important;
    }

    .tm-row {
        overflow-x: auto;
    }
}

.wrap-max-width {
    max-width: fit-content;
    padding: 0;
}


section.section-pad {
    margin-bottom: 120px
}