.testimonials-hscroll {
    background: var(--iphtech-surface);
    padding: 70px 0 50px;
    overflow: hidden;
}

.testimonials-hscroll .container {
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.th-viewport {
    overflow: hidden;
    width: 100%;
}

.th-track {
    display: flex;
    gap: 24px;
    width: max-content;
    padding: 4px 6% 40px 6%;
    will-change: transform;
}

.th-card {
    position: relative;
    flex: 0 0 400px;
    width: 400px;
    min-height: 420px;
    border-radius: 20px;
    background: #fff;
    border: 1.5px solid var(--border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}

.th-card:hover {
    border-color: var(--iphtech-orange-border);
}

.th-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    transition: opacity 0.35s ease;
}

.th-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--border);
}

.th-quote {
    position: relative;
    z-index: 2;
    font-size: 0.92rem;
    color: var(--text2);
    line-height: 1.75;
    font-style: italic;
    margin-top: 1rem;
    transition: opacity 0.3s ease;
}

.th-footer {
    position: relative;
    z-index: 2;
    margin-top: 1.5rem;
    transition: color 0.35s ease;
}

.th-name {
    font-family: var(--fh);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.th-role {
    font-size: 0.78rem;
    color: var(--text3);
    margin-top: 2px;
    transition: color 0.35s ease;
}

.th-media {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: var(--th-media);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transition:
        opacity 0.4s ease,
        transform 0.5s ease;
}

.th-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #fff0 35%, rgb(0 0 0 / 0.78) 100%);
    pointer-events: none;
}

.th-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.th-card:hover .th-media {
    opacity: 1;
    transform: scale(1);
}

.th-card:hover .th-quote {
    opacity: 0;
    pointer-events: none;
}

.th-card:hover .th-name,
.th-card:hover .th-role {
    color: #fff;
}

.th-card:hover .th-avatar {
    border-color: #fff;
}

.th-card.th-playing .th-media {
    opacity: 1;
    transform: scale(1);
}

.th-card.th-playing .th-quote {
    opacity: 0;
    pointer-events: none;
}

.th-card.th-playing .th-name,
.th-card.th-playing .th-role {
    color: #fff;
}

.th-card.th-playing .th-avatar {
    border-color: #fff;
}

.th-card.th-playing .th-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.th-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    transition:
        opacity 0.4s ease 0.08s,
        transform 0.4s ease 0.08s;
    border: none;
    cursor: pointer;
}

.th-card:hover .th-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.th-play svg {
    width: 16px;
    height: 16px;
    fill: var(--iphtech-orange);
    margin-left: 2px;
}

@media (max-width: 768px) {
    .testimonials-hscroll {
        padding: 60px 0;
    }

    .th-viewport {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .th-track {
        padding: 4px 6% 24px 5%;
    }

    .th-card {
        scroll-snap-align: start;
        width: 82vw;
        flex-basis: 82vw;
        min-height: 380px;
    }


}

.th-avatar-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.th-testimonial-avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}