.testimonials-component {
    --tc-lime: #c6ff33;
    --tc-violet: #7d53eb;
    --card-bg: #ffffff;

    position: relative;
    overflow: hidden;
    padding: clamp(60px, 6vw, 85px) 0;
    background: #ffffff;
    color: #111111;
    text-align: center;
    font-family: Inter, system-ui, sans-serif;
}

.testimonials-component * {
    box-sizing: border-box;
}

.testimonials-component__container {
    position: relative;
    z-index: 2;
    width: calc(100% - 9vw);
    max-width: 1480px;
    margin: 0 auto;
    padding: 0;
}

.testimonials-component__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.testimonials-component__shape {
    position: absolute;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.04));
    opacity: 0.32;
}

.testimonials-component__shape path {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: testimonialsMarkerDraw 7s ease-in-out infinite;
}

.testimonials-component__shape--1 {
    top: 4%;
    left: -6%;
    width: 360px;
    transform: rotate(-10deg);
}

.testimonials-component__shape--1 path {
    stroke: var(--tc-lime);
    stroke-width: 8;
    animation-delay: 0s;
}

.testimonials-component__shape--2 {
    top: 14%;
    right: 4%;
    width: 160px;
    transform: rotate(14deg);
}

.testimonials-component__shape--2 path {
    stroke: rgba(125, 83, 235, 0.7);
    stroke-width: 7;
    animation-delay: 1.4s;
}

.testimonials-component__shape--3 {
    bottom: 8%;
    left: 8%;
    width: 250px;
    transform: rotate(8deg);
}

.testimonials-component__shape--3 path {
    stroke: rgba(198, 255, 51, 0.75);
    stroke-width: 8;
    animation-delay: 2.8s;
}

.testimonials-component__shape--4 {
    top: 52%;
    right: 18%;
    width: 130px;
    transform: rotate(-12deg);
}

.testimonials-component__shape--4 path {
    stroke: rgba(125, 83, 235, 0.55);
    stroke-width: 6;
    animation-delay: 4.2s;
}

.testimonials-component__shape--5 {
    right: -2%;
    bottom: 12%;
    width: 170px;
    transform: rotate(18deg);
}

.testimonials-component__shape--5 path {
    stroke: var(--tc-lime);
    stroke-width: 7;
    animation-delay: 5.6s;
}

.testimonials-component__title {
    margin: 0 0 10px;
    font-family: Montserrat, Inter, sans-serif;
    font-size: clamp(1.8rem, 1.875vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.testimonials-component__rating-summary {
    margin-bottom: clamp(30px, 5vw, 60px);
}

.testimonials-component__stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
    color: #ffb800;
    font-size: 1.1rem;
}

.testimonials-component__viewport {
    width: 100%;
    margin: 0;
    overflow: hidden;
    padding: 10px 0 10px;
}

.testimonials-component__track {
    display: flex;
    align-items: flex-start;
    width: max-content;
    gap: 18px;
    will-change: transform;
    animation: testimonialsMarquee 72s linear infinite;
}

.testimonials-component__set {
    display: flex;
    flex: none;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 0 20px;
}

.testimonials-component__card {
    position: relative;
    flex: 0 0 clamp(300px, 23vw, 360px);
    width: clamp(300px, 23vw, 360px);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    padding:
        clamp(18px, 1.7vw, 22px)
        clamp(16px, 1.4vw, 18px);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 20px;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fafc 100%
        );
    text-align: left;
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.03);
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

@media (min-width: 1025px) {
    .testimonials-component__viewport {
        position: relative;
    }

    .testimonials-component__track {
        position: relative;
        z-index: 1;
    }

    .testimonials-component__viewport::before,
    .testimonials-component__viewport::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        z-index: 20;
        width: clamp(110px, 9vw, 180px);
        pointer-events: none;
    }

    .testimonials-component__viewport::before {
        left: 0;
        background: linear-gradient(
            90deg,
            #ffffff 0%,
            rgba(255, 255, 255, 1) 18%,
            rgba(255, 255, 255, 0.94) 36%,
            rgba(255, 255, 255, 0.72) 58%,
            rgba(255, 255, 255, 0.32) 78%,
            rgba(255, 255, 255, 0) 100%
        );
    }

    .testimonials-component__viewport::after {
        right: 0;
        background: linear-gradient(
            270deg,
            #ffffff 0%,
            rgba(255, 255, 255, 1) 18%,
            rgba(255, 255, 255, 0.94) 36%,
            rgba(255, 255, 255, 0.72) 58%,
            rgba(255, 255, 255, 0.32) 78%,
            rgba(255, 255, 255, 0) 100%
        );
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(1) {
        margin-top: 30px;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(2) {
        margin-top: 0;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(3) {
        margin-top: 46px;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(4) {
        margin-top: 16px;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(5) {
        margin-top: 54px;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(6) {
        margin-top: 24px;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(7) {
        margin-top: 42px;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(8) {
        margin-top: 8px;
    }
}

.testimonials-component__card:hover {
    z-index: 10;
    transform: translateY(-8px);
    border-color: var(--tc-lime);
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.08);
}

.testimonials-component__card--featured {
    background:
        linear-gradient(
            180deg,
            #f5ffe0 0%,
            #f7fbef 100%
        );
    border-color: rgba(198, 255, 51, 0.6);
}

.testimonials-component__mini-stars {
    margin-bottom: 12px;
    color: #ffb800;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.testimonials-component__quote-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: #111827;
    color: #ffffff;
    font-size: 0.85rem;
}

.testimonials-component__quote-badge--featured {
    background:
        linear-gradient(
            135deg,
            #111827 0%,
            #29420f 100%
        );
}

.testimonials-component__card p {
    flex-grow: 1;
    margin: 0 0 18px;
    color: #4b5563;
    font-size: clamp(0.82rem, 0.7vw, 0.92rem);
    line-height: 1.55;
}

.testimonials-component__user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.testimonials-component__user-info picture {
    flex: 0 0 38px;
}

.testimonials-component__user-info img {
    display: block;
    width: 38px;
    height: 38px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    object-fit: cover;
}

.testimonials-component__user-meta {
    min-width: 0;
}

.testimonials-component__user-meta span {
    display: block;
    color: #111827;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.25;
}

.testimonials-component__user-meta small {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 0.7rem;
    line-height: 1.35;
}

@keyframes testimonialsMarquee {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(
            calc(-50% - 9px),
            0,
            0
        );
    }
}

@keyframes testimonialsMarkerDraw {
    0% {
        stroke-dashoffset: 1400;
        opacity: 0;
    }

    14% {
        opacity: 1;
    }

    42% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    74% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    92% {
        stroke-dashoffset: 0;
        opacity: 0;
    }

    100% {
        stroke-dashoffset: 1400;
        opacity: 0;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .testimonials-component__card {
        flex-basis: 300px;
        width: 300px;
    }

    .testimonials-component__track,
    .testimonials-component__set {
        gap: 16px;
    }
}

@media (max-width: 1024px) {
    .testimonials-component__container {
        width: 100%;
        max-width: none;
        padding: 0 16px;
    }

    .testimonials-component__viewport {
        width: 100%;
        margin: 0;
        overflow: visible;
        padding: 0;
    }

    .testimonials-component__track {
        display: block;
        width: 100%;
        animation: none;
        transform: none;
    }

    .testimonials-component__set {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        overflow-y: visible;
        padding: 20px 4px 18px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .testimonials-component__set::-webkit-scrollbar {
        display: none;
    }

    .testimonials-component__set--duplicate {
        display: none;
    }

    .testimonials-component__card {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        min-height: 0;
        margin-top: 0 !important;
        padding: 18px 14px;
        border-radius: 22px;
        scroll-snap-align: center;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(1) {
        margin-top: 18px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(2) {
        flex-basis: 310px;
        width: 310px;
        min-width: 310px;
        max-width: 310px;
        margin-top: 0 !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(3) {
        margin-top: 14px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(4) {
        margin-top: 28px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(5) {
        margin-top: 10px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(6) {
        margin-top: 24px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(7) {
        margin-top: 12px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(8) {
        margin-top: 22px !important;
    }

    .testimonials-component__shape--1 {
        width: 280px;
    }

    .testimonials-component__shape--3 {
        width: 200px;
    }

    .testimonials-component__shape--5 {
        width: 140px;
    }
}

@media (max-width: 767px) {
    .testimonials-component {
        padding: 72px 0;
    }

    .testimonials-component__container {
        width: 100%;
        padding: 0 14px;
    }

    .testimonials-component__title {
        font-size: 2rem;
    }

    .testimonials-component__rating-summary {
        margin-bottom: 28px;
    }

    .testimonials-component__set {
        gap: 14px;
        padding: 16px 2px 14px;
        scroll-padding-left: 8px;
        scroll-padding-right: 8px;
    }

    .testimonials-component__card {
        flex: 0 0 84%;
        width: 84%;
        min-width: 84%;
        max-width: 84%;
        padding: 18px 16px;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(1) {
        margin-top: 10px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(2) {
        flex-basis: 88%;
        width: 88%;
        min-width: 88%;
        max-width: 88%;
        margin-top: 0 !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(3) {
        margin-top: 10px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(4) {
        margin-top: 22px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(5) {
        margin-top: 8px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(6) {
        margin-top: 18px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(7) {
        margin-top: 8px !important;
    }

    .testimonials-component__set
    .testimonials-component__card:nth-child(8) {
        margin-top: 18px !important;
    }

    .testimonials-component__mini-stars {
        margin-bottom: 10px;
        font-size: 0.78rem;
    }

    .testimonials-component__quote-badge {
        width: 34px;
        height: 34px;
        margin-bottom: 12px;
    }

    .testimonials-component__card p {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .testimonials-component__user-info {
        padding-top: 10px;
    }

    .testimonials-component__shape {
        opacity: 0.16;
    }

    .testimonials-component__shape--2,
    .testimonials-component__shape--4 {
        display: none;
    }

    .testimonials-component__shape--1 {
        top: 2%;
        left: -18%;
        width: 220px;
    }

    .testimonials-component__shape--3 {
        bottom: 6%;
        left: -10%;
        width: 170px;
    }

    .testimonials-component__shape--5 {
        right: -10%;
        bottom: 18%;
        width: 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .testimonials-component__track {
        animation: none;
    }

    .testimonials-component__shape path {
        animation: none;
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) and (min-width: 1025px) {
    .testimonials-component__viewport {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .testimonials-component__viewport::-webkit-scrollbar {
        display: none;
    }

    .testimonials-component__set--duplicate {
        display: none;
    }
}
