/**
 * Testimonials Slider — Frontend Stylesheet v1.3.0
 * Scoped under .ts-slider to avoid theme conflicts.
 *
 * Bug fixes:
 *  – overflow-x: hidden only (was overflow: hidden) → cards no longer
 *    clipped at the bottom on tall content
 *  – padding: 2px on track-wrapper so 1px card borders are never
 *    clipped by the parent container (fixes left/right cut-off
 *    on last slide at various viewport widths)
 */

/* ── Google Fonts: Montserrat ────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* ── Wrapper ─────────────────────────────────────────────────── */
.ts-slider {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    /* Small horizontal padding so the last card's right border
       is never swallowed by the page container */
    padding: 8px 2px;
    font-family: 'Montserrat', sans-serif;
}

/* ── Track wrapper (the clipping viewport) ───────────────────── */
.ts-track-wrapper {
    flex: 1;
    /* ONLY clip horizontally — vertical overflow: visible so tall
       cards are never chopped at the bottom */
    overflow-x: hidden;
    overflow-y: visible;
    min-width: 0;
    /* 2px vertical breathing room so card borders paint fully */
    padding: 2px 0;
}

/* ── Track (moving rail) ─────────────────────────────────────── */
.ts-track {
    display: flex;
    gap: 16px;
    transition: transform 0.35s ease;
    will-change: transform;
    /* Match the wrapper padding so borders on first/last card show */
    padding: 1px;
    box-sizing: border-box;
}

/* ── Individual card ─────────────────────────────────────────── */
.ts-card {
    background: #eef0f5;
    border-radius: 0;
    border: 1px solid #1e4fa0;
    padding: 22px;
    box-sizing: border-box;
    flex-shrink: 0;
    /* Desktop: 3 cards — (100% − 2 gaps of 16px − 2px track padding) ÷ 3 */
    width: calc((100% - 34px) / 3);
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
}

/* ── Large decorative quote mark ─────────────────────────────── */
.ts-quote-mark {
    color: #1e4fa0;
    font-size: 60px;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 0.6;
    margin-bottom: 10px;
    user-select: none;
    display: block;
}

/* ── Quote body text ─────────────────────────────────────────── */
.ts-quote-text {
    color: #2c2c2c;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 16px;
}

.ts-quote-text p:first-child { margin-top: 0; }
.ts-quote-text p:last-child  { margin-bottom: 0; }

/* ── Divider ─────────────────────────────────────────────────── */
.ts-divider {
    border-top: 1px solid #d0d4dd;
    margin-bottom: 14px;
}

/* ── Author row ──────────────────────────────────────────────── */
.ts-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
}

/* ── Avatar ──────────────────────────────────────────────────── */
.ts-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.ts-avatar img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.ts-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e4fa0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
    user-select: none;
}

/* ── Author info ─────────────────────────────────────────────── */
.ts-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ts-author-name {
    font-weight: 700;
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-author-job {
    font-size: 11px;
    font-family: 'Montserrat', sans-serif;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Stars ───────────────────────────────────────────────────── */
.ts-stars {
    margin-left: auto;
    display: flex;
    gap: 1px;
    flex-shrink: 0;
}

.ts-star         { font-size: 13px; line-height: 1; }
.ts-star--filled { color: #f5a623; }
.ts-star--empty  { color: #d1d5db; }

/* ── Navigation arrows ───────────────────────────────────────── */
.ts-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #1e4fa0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.ts-arrow:hover:not(:disabled) {
    background: #163a80;
}

.ts-arrow:focus {
    outline: none;
}

.ts-arrow:focus-visible {
    outline: 2px solid #163a80;
    outline-offset: 2px;
}

.ts-arrow:active {
    background: #163a80;
}

.ts-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Tablet (≤900px): 2 cards ────────────────────────────────── */
@media (max-width: 900px) {
    .ts-card {
        /* 2 cards: (100% − 1 gap of 16px − 2px padding) ÷ 2 */
        width: calc((100% - 18px) / 2);
        padding: 18px;
    }

    .ts-quote-mark  { font-size: 48px; }
    .ts-quote-text  { font-size: 13px; }
    .ts-author-name { font-size: 12px; }
    .ts-author-job  { font-size: 11px; }
    .ts-star        { font-size: 12px; }

    .ts-avatar,
    .ts-avatar img,
    .ts-initials    { width: 34px; height: 34px; }
    .ts-initials    { font-size: 11px; }

    .ts-arrow { width: 26px; height: 26px; font-size: 14px; }
}



/* ── Utility ─────────────────────────────────────────────────── */
.ts-no-testimonials {
    color: #6b7280;
    font-style: italic;
    font-family: 'Montserrat', sans-serif;
}

/* ── Mobile (≤520px): 1 card only ───────────────────────────── */
@media (max-width: 520px) {
    .ts-slider { gap: 6px; padding: 8px 2px; }
    .ts-track  { gap: 16px; }

    .ts-card {
        /* 1 card: full width minus track padding */
        width: calc(100% - 2px);
        padding: 20px;
    }

    .ts-quote-mark  { font-size: 52px; }
    .ts-quote-text  { font-size: 14px; line-height: 1.65; margin-bottom: 16px; }
    .ts-divider     { margin-bottom: 14px; }
    .ts-author-row  { gap: 10px; }

    .ts-avatar,
    .ts-avatar img,
    .ts-initials    { width: 40px; height: 40px; }
    .ts-initials    { font-size: 13px; }

    .ts-author-name { font-size: 13px; }
    .ts-author-job  { font-size: 11px; }
    .ts-star        { font-size: 13px; }
    .ts-stars       { gap: 1px; }

    .ts-arrow { width: 28px; height: 28px; font-size: 15px; }
}
