/* ══════════════════════════════════════════
   17. TESTIMONIALS (Premium Editorial Redesign)
   ══════════════════════════════════════════ */
.tp-testimonial-area {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--rx-dark);
}

.tp-testimonial-area::before {
    display: none;
}

.tp-testimonial-section-title .tp-section-title-wrapper p {
    margin-inline: auto;
    max-width: 70ch;
    color: var(--rx-type-body-color);
    font-size: var(--rx-type-body-size);
    line-height: var(--rx-type-body-line);
}

/* --------------------------------------------------------------------------
 * Base Typography & Container Overrides 
 * (Migrated from style.css)
 * -------------------------------------------------------------------------- */
.tp-testimonial-area>.rx-container {
    width: min(100%, var(--rx-section-content-max));
    max-width: var(--rx-section-content-max);
    padding-inline: 0;
}

.tp-testimonial-item,
.tp-testimonial-slider,
.tp-testimonial-slider-active {
    max-width: 100%;
}

.rx-testimonials {
    padding-top: var(--rx-home-section-space);
    padding-bottom: var(--rx-home-section-space);
}

/* Keep headline cluster away from viewport edges */
#testimonials .tp-testimonial-section-title {
    padding-inline: clamp(14px, 2.4vw, 34px);
}

#testimonials .tp-testimonial-section-title .tp-section-title-wrapper {
    width: 100%;
    margin-inline: auto;
}

#testimonials .tp-testimonial-section-title .tp-section-title-inner {
    padding-inline: clamp(8px, 1.5vw, 18px);
}

#testimonials .tp-testimonial-section-title .tp-section-subtitle-bg {
    left: 50%;
    transform: translateX(-50%);
    max-width: 100%;
    font-size: clamp(60px, 9vw, 110px);
    opacity: 0.04;
}

#testimonials .tp-testimonial-section-title .tp-section-title {
    max-width: 20ch;
    margin-inline: auto;
    font-size: var(--rx-type-section-title-size);
    font-weight: 700;
}

#testimonials .tp-testimonial-section-title .tp-section-subtitle {
    margin-inline: auto;
}

.rx-testimonials__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 1.5vw, 16px);
    width: 100%;
    margin: 0 auto clamp(28px, 3vw, 38px);
}

/* --------------------------------------------------------------------------
 * Testimonials heading consistency (Migrated from style.css)
 * -------------------------------------------------------------------------- */
.rx-testimonial-card {
    background: rgba(255, 255, 255, 0.03);
}

.rx-testimonial-quote-icon {
    color: rgba(255, 255, 255, 0.1);
    width: 5rem;
    height: 5rem;
}

.tp-testimonial-section-title {
    margin-bottom: var(--rx-home-cluster-gap-loose);
}

.tp-testimonial-section-title .tp-section-title-wrapper,
.tp-testimonial-section-title .tp-section-title-inner {
    overflow: visible;
}

.tp-testimonial-section-title .tp-section-title-inner {
    padding-top: clamp(1.25rem, 2.2vw, 2.25rem);
}

.tp-testimonial-section-title .tp-section-subtitle {
    position: relative;
    top: 0;
    left: 0 !important;
    transform: none;
    display: inline-block;
    margin-bottom: clamp(0.5rem, 1.2vw, 0.9rem);
}

.tp-testimonial-section-title .tp-section-subtitle-bg {
    top: clamp(0rem, 0.6vw, 0.9rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(5.25rem, 10vw, 10.5rem);
    line-height: 0.98;
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
}

.tp-testimonial-section-title .tp-section-title {
    line-height: 1.02;
    position: relative;
    z-index: 1;
}

.rx-testimonials__meta-item {
    border: 1px solid var(--rx-home-pill-border);
    background: var(--rx-home-pill-fill);
    border-radius: 999px;
    padding: 10px 18px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
}

.rx-testimonials__meta-value {
    font-family: var(--rx-font-heading);
    font-size: var(--rx-type-feature-title-size);
    line-height: var(--rx-type-feature-title-line);
    color: var(--rx-type-heading-color);
    letter-spacing: var(--rx-type-feature-title-track);
}

.rx-testimonials__meta-label {
    font-size: var(--rx-type-meta-size);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: var(--rx-type-meta-track);
    color: var(--rx-type-muted-color);
}

.rx-testimonials__slider-shell {
    width: 100%;
    margin-inline: auto;
    position: relative;
    padding-top: 8px;
}

.rx-testimonials__controls {
    position: absolute;
    right: 10px;
    top: -8px;
    display: inline-flex;
    gap: 8px;
    z-index: 4;
}

.rx-testimonials__arrow {
    width: max(47px, var(--rx-home-control-size));
    height: max(47px, var(--rx-home-control-size));
    border-radius: 999px;
    border: 1px solid var(--rx-home-pill-border);
    color: var(--rx-cream);
    background: var(--rx-home-control-fill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        border-color 0.22s ease,
        background-color 0.22s ease,
        color 0.22s ease,
        opacity 0.22s ease;
}

.rx-testimonials__arrow:hover {
    color: var(--rx-accent);
    border-color: var(--rx-accent);
    background: rgba(231, 34, 101, 0.1);
}

.rx-testimonials__arrow.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.rx-testimonials__arrow:focus-visible {
    outline: 2px solid var(--rx-accent);
    outline-offset: 2px;
}

.tp-testimonial-slider-active {
    overflow: hidden;
    border-radius: 20px;
}

.tp-testimonial-slider-active .swiper-slide {
    height: auto;
    display: flex;
}

.tp-testimonial-item.rx-testimonial-card {
    width: 100%;
    min-height: clamp(320px, 31vw, 430px);
    border-radius: 20px;
    border: 1px solid var(--rx-home-surface-border);
    background:
        var(--rx-home-surface-grad-soft),
        color-mix(in srgb, var(--rx-dark) 98%, var(--rx-white) 2%);
    padding: clamp(24px, 3.2vw, 44px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tp-testimonial-item.rx-testimonial-card::after {
    display: none;
}

.rx-testimonial-card__quote-mark {
    position: absolute;
    top: 14px;
    right: 14px;
    color: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.rx-testimonial-quote-icon {
    width: clamp(52px, 6.6vw, 80px);
    height: auto;
}

.rx-testimonial-card__rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.rx-testimonial-stars {
    display: inline-flex;
    gap: 4px;
}

.rx-testimonial-star {
    color: rgba(255, 255, 255, 0.25);
    display: inline-flex;
}

.rx-testimonial-star.is-active {
    color: var(--rx-accent);
}

.rx-testimonial-card__rating-value {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rx-muted);
}

.rx-testimonial-card__quote {
    margin: 0 0 clamp(20px, 2.6vw, 30px);
}

.rx-testimonial-card__quote p {
    margin: 0;
    font-family: var(--rx-font-heading);
    font-size: clamp(22px, 2.4vw, 34px);
    line-height: 1.35;
    letter-spacing: -0.012em;
    color: var(--rx-cream);
}

.rx-testimonial-card__author {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--rx-home-surface-border);
}

.tp-testimonial-user-thumb img,
.rx-testimonial-card__avatar img,
.rx-testi-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.rx-testi-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rx-dark);
    background: var(--rx-accent);
    font-weight: 700;
    font-size: 20px;
}

.rx-testimonial-card__name {
    margin: 0;
    font-size: 20px;
    line-height: 1.1;
    color: var(--rx-cream);
}

.rx-testimonial-card__role {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--rx-muted);
}

.tp-testimonial-thumb-slider {
    margin-top: clamp(16px, 2.3vw, 24px);
}

.tp-testimonial-nav {
    overflow: hidden;
}

.tp-testimonial-nav .swiper-slide {
    height: auto;
    cursor: pointer;
}

.tp-testimonial-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--rx-home-surface-border);
    border-radius: 14px;
    padding: 12px;
    min-height: 84px;
    transition:
        border-color 0.22s ease,
        background-color 0.22s ease,
        color 0.22s ease,
        transform 0.22s ease;
    background: var(--rx-home-surface-fill-soft);
}

.tp-testimonial-user-content {
    min-width: 0;
}

.tp-testimonial-user-title {
    margin: 0 0 2px;
    font-size: 16px;
    line-height: 1.2;
    color: var(--rx-cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-testimonial-user-designation {
    display: block;
    font-size: 13px;
    color: var(--rx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-testimonial-nav .swiper-slide:hover .tp-testimonial-user-item {
    border-color: color-mix(in srgb, var(--rx-accent) 35%, var(--rx-border));
    background: color-mix(in srgb, var(--rx-accent) 7%, var(--rx-home-pill-fill));
}

.tp-testimonial-nav .swiper-slide.swiper-slide-thumb-active .tp-testimonial-user-item {
    border-color: var(--rx-accent);
    background: color-mix(in srgb, var(--rx-accent) 11%, var(--rx-home-pill-fill));
}

.tp-testimonial-nav .swiper-slide.swiper-slide-thumb-active .tp-testimonial-user-title {
    color: var(--rx-white);
}

@media (max-width: 991px) {
    .rx-testimonials__meta {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .rx-testimonials__controls {
        top: -2px;
    }
}

@media (max-width: 767px) {
    .rx-testimonials__slider-shell {
        padding-top: 0;
    }

    .rx-testimonials__controls {
        position: static;
        margin-bottom: 12px;
        justify-content: flex-end;
    }

    .rx-testimonials__arrow {
        width: 47px;
        height: 47px;
    }

    .tp-testimonial-item.rx-testimonial-card {
        padding: 20px;
        min-height: 300px;
        border-radius: 16px;
    }

    .rx-testimonial-card__quote p {
        font-size: clamp(19px, 5.2vw, 24px);
        line-height: 1.45;
    }

    .tp-testimonial-user-item {
        min-height: 74px;
        padding: 10px;
    }

    .tp-testimonial-user-thumb img,
    .rx-testimonial-card__avatar img,
    .rx-testi-placeholder {
        width: 46px;
        height: 46px;
    }
}

/* --------------------------------------------------------------------------
 * Testimonials Refresh & Mobile Adjustments (Migrated from style.css)
 * -------------------------------------------------------------------------- */
.rx-testimonials {
    padding-top: var(--rx-home-section-space);
    padding-bottom: var(--rx-home-section-space);
}

#testimonials .tp-testimonial-section-title {
    padding-inline: 0;
}

#testimonials .tp-testimonial-section-title .tp-section-title-inner {
    padding-top: clamp(0.35rem, 0.9vw, 0.65rem);
}

#testimonials .tp-testimonial-section-title .tp-section-subtitle-bg {
    display: none;
}

#testimonials .tp-testimonial-section-title .tp-section-title {
    max-width: 18ch;
    font-size: clamp(2rem, 3.8vw, 3rem);
    margin-bottom: clamp(0.45rem, 1vw, 0.8rem);
}

.tp-testimonial-section-title .tp-section-title-wrapper p,
.rx-testimonials__summary {
    max-width: 64ch;
    font-size: clamp(0.95rem, 1.05vw, 1.08rem);
    line-height: 1.65;
}

.rx-testimonials__meta {
    margin-bottom: var(--rx-home-cluster-gap-loose);
}

.rx-testimonials__meta-item {
    min-height: 2.85rem;
    padding: 0.55rem 0.95rem;
}

.rx-testimonials__slider-shell {
    padding-top: 0.15rem;
}

.rx-testimonials__controls {
    top: -2px;
}

.tp-testimonial-item.rx-testimonial-card {
    min-height: 0;
    padding: clamp(1.05rem, 2vw, 1.45rem);
    border-radius: 0.95rem;
}

.rx-testimonial-card__quote-mark {
    display: none;
}

.rx-testimonial-card__rating-row {
    margin-bottom: 0.7rem;
}

.rx-testimonial-card__quote {
    margin: 0 0 clamp(0.75rem, 1.4vw, 1rem);
}

.rx-testimonial-card__quote p {
    font-size: clamp(1.28rem, 2vw, 1.75rem);
    line-height: 1.42;
}

.rx-testimonial-card__author {
    margin-top: 0;
    padding-top: 0.75rem;
}

.tp-testimonial-thumb-slider {
    margin-top: clamp(0.65rem, 1.3vw, 1rem);
}

.tp-testimonial-user-item {
    min-height: 4.15rem;
    padding: 0.65rem 0.7rem;
    border-radius: 0.75rem;
}

.tp-testimonial-user-title {
    font-size: 1.02rem;
}

.tp-testimonial-user-designation {
    font-size: 0.86rem;
}

@media (max-width: 61.9375rem) {
    #testimonials .tp-testimonial-section-title .tp-section-title {
        font-size: clamp(1.8rem, 6.2vw, 2.45rem);
    }

    .rx-testimonials__meta {
        gap: 0.55rem;
    }

    .rx-testimonials__meta-item {
        border-radius: 0.8rem;
        justify-content: space-between;
    }

    .rx-testimonial-card__quote p {
        font-size: clamp(1.18rem, 3.8vw, 1.5rem);
    }
}

@media (max-width: 47.9375rem) {
    .rx-testimonials {
        padding-top: var(--rx-home-section-space);
        padding-bottom: var(--rx-home-section-space);
    }

    #testimonials .tp-testimonial-section-title,
    #testimonials .tp-testimonial-section-title .tp-section-title-inner {
        padding-inline: 0;
    }

    .rx-testimonials__meta-item {
        min-height: 0;
        padding: 0.55rem 0.7rem;
    }

    .rx-testimonials__meta {
        margin-bottom: var(--rx-home-cluster-gap);
    }

    .rx-testimonials__meta-value {
        font-size: 1.2rem;
    }

    .rx-testimonials__meta-label {
        font-size: 0.68rem;
    }

    .tp-testimonial-item.rx-testimonial-card {
        padding: 0.95rem;
        border-radius: 0.8rem;
    }

    .rx-testimonial-card__quote {
        margin-bottom: 0.7rem;
    }

    .rx-testimonial-card__quote p {
        font-size: clamp(1.05rem, 5vw, 1.25rem);
        line-height: 1.34;
    }

    .rx-testimonial-card__name {
        font-size: 1.15rem;
    }

    .rx-testimonial-card__role {
        font-size: 0.9rem;
    }

    .tp-testimonial-user-item {
        min-height: 0;
    }
}


/* ==========================================
   MIGRATED TESTIMONIALS STYLES
   ========================================== */

/* Migrated from pricing.css */
/* ══════════════════════════════════════════
   TESTIMONIALS — SWIPER OVERFLOW FIX
   Defensive rule: ensures Swiper containers
   clip overflowing slides (prevents overlap)
   ══════════════════════════════════════════ */
/* Testimonials section: prevent bleed into next pagepiling section */
.rx-testimonials {
    isolation: isolate;
}
