/* =========================================================================
 * Attorna — Testimonials Section (RTL)
 * Design tokens mirror assets/css/lawyer-team.css ("Our Team") so the two
 * adjacent sections read as one visual family.
 * ========================================================================= */

.ts-section {
    --ts-ink:        #1c1c1c;
    --ts-ink-soft:   #5c564c;
    --ts-gold:       #a38753;
    --ts-gold-dark:  #8a7143;
    --ts-bg:         #fbf8f2;
    --ts-star:       #f0a32a;
    --ts-line:       rgba(30, 28, 24, 0.12);
    --ts-shadow-soft:  0 18px 40px -26px rgba(23, 20, 14, 0.28);
    --ts-shadow-crisp: 0 30px 60px -24px rgba(23, 20, 14, 0.42);
    --ts-ease:       cubic-bezier(0.22, 0.61, 0.36, 1);

    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg,
            rgba(251, 248, 242, 0.99) 0%,
            rgba(251, 248, 242, 0.92) 100%
        );
    color: var(--ts-ink);
    direction: rtl;
    text-align: right;
    padding: 88px 0 96px;
    font-family: var(--font-family-base, 'IRANSans', Tahoma, sans-serif);
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
}

/* Soft gold glow behind the header (matches .lt-section) */
.ts-section::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 480px;
    background: radial-gradient(closest-side, rgba(163, 135, 83, 0.08), transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* ---------- Watermark ---------- */
.ts-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(40px, 8vw, 96px);
    font-family: 'Jost', 'IRANSans', Tahoma, sans-serif;
    font-size: clamp(80px, 15vw, 190px);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(29, 29, 29, 0.04);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    z-index: 1;
}

.ts-watermark--img {
    background: center / contain no-repeat;
    opacity: 0.06;
    justify-content: center;
    align-items: center;
    padding-top: 0;
}

/* ---------- Container ---------- */
.ts-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- Header ---------- */
.ts-header {
    text-align: center;
    margin-bottom: 52px;
}

.ts-accent {
    display: block;
    width: 64px;
    height: 3px;
    margin: 0 auto 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--ts-gold) 20%, var(--ts-gold) 80%, transparent);
}

.ts-title {
    margin: 0;
    font-family: var(--font-family-heading, 'Jost', 'IRANSans', Tahoma, sans-serif);
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.4;
    font-weight: var(--font-weight-bold, 700);
    color: var(--ts-ink);
    letter-spacing: -0.01em;
}

/* ---------- Carousel ---------- */
.ts-carousel {
    position: relative;
    padding: 8px 0;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
}

.ts-swiper,
.ts-swiper .swiper-wrapper {
    width: 100%;
}

.ts-swiper {
    overflow: visible;
    /* Vertical room so the scaled-up active card (1.08) isn't clipped */
    padding: 24px 0 8px;
}

.ts-swiper .swiper-wrapper {
    transition: transform 0.65s var(--ts-ease);
}

.ts-card {
    width: min(360px, 82vw);
    margin: 0;
    padding: 28px 26px;
    background: linear-gradient(180deg, #ffffff 0%, #fbf9f4 100%);
    border: 1px solid rgba(163, 135, 83, 0.18);
    border-radius: 18px;
    box-shadow: var(--ts-shadow-soft);
    opacity: 0.75;
    transform: scale(0.92);
    transition:
        transform 0.65s var(--ts-ease),
        opacity 0.65s ease,
        box-shadow 0.65s ease,
        border-color 0.4s ease;
}

/* Center / active card: enlarged, crisp, fully opaque, on top */
.ts-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1.08);
    z-index: 5;
    box-shadow: var(--ts-shadow-crisp);
    border-color: rgba(163, 135, 83, 0.42);
}

/* ---------- Card: header row ---------- */
.ts-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.ts-card__avatar {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #efe9dd 0%, #e5dcc9 100%);
    border: 2px solid rgba(163, 135, 83, 0.35);
}
.ts-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ts-card__avatar.is-missing img {
    display: none;
}
.ts-mono {
    font-family: var(--font-family-heading, 'Jost', 'IRANSans', Tahoma, sans-serif);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.04em;
    color: var(--ts-gold-dark);
    user-select: none;
}

.ts-card__user {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ts-card__name {
    margin: 0;
    font-family: var(--font-family-heading, 'Jost', 'IRANSans', Tahoma, sans-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--ts-ink);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ts-card__city {
    font-size: 13px;
    color: #8a847a;
    line-height: 1.6;
}

/* ---------- Stars ---------- */
.ts-card__stars {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.ts-star {
    font-size: 13px;
    color: var(--ts-star);
    line-height: 1;
}
.ts-star.is-mute {
    color: rgba(240, 163, 42, 0.28);
}

/* ---------- Body ---------- */
.ts-card__text {
    margin: 0;
    font-size: 14.5px;
    color: var(--ts-ink-soft);
    line-height: 2;
    text-align: justify;
}
.ts-card__text p {
    margin: 0 0 10px;
}
.ts-card__text p:last-child {
    margin-bottom: 0;
}

/* ---------- Pagination (pill dots) ---------- */
.ts-pagination {
    position: static;
    bottom: auto;
    top: auto;
    left: auto;
    right: auto;
    margin: 34px auto 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}
.ts-pagination .swiper-pagination-bullet {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(29, 29, 29, 0.22);
    opacity: 1;
    transition: width 0.4s var(--ts-ease), background 0.4s ease;
}
.ts-pagination .swiper-pagination-bullet-active {
    width: 34px;
    background: var(--ts-gold);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .ts-section {
        padding: 64px 0 72px;
    }
    .ts-header {
        margin-bottom: 40px;
    }
    .ts-card {
        width: min(400px, 88vw);
    }
    .ts-swiper {
        overflow: hidden; /* single centered card — hide spillover */
    }
}

@media (max-width: 576px) {
    .ts-section {
        padding: 52px 0 58px;
    }
    .ts-watermark {
        font-size: clamp(56px, 20vw, 96px);
    }
    .ts-card {
        padding: 22px 18px;
    }
    .ts-card__head {
        flex-wrap: wrap;
    }
    .ts-card__stars {
        order: 3;
        width: 100%;
        flex-direction: row;
        align-items: center;
        margin-top: 2px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .ts-swiper .swiper-wrapper,
    .ts-card,
    .ts-pagination .swiper-pagination-bullet {
        transition: none !important;
    }
}
