/**
 * ITSWEBER CMS – Testimonial Slider Plugin
 * Animated slider with star ratings, navigation and touch support.
 *
 * @author  Benny Weber (ITSWEBER)
 * @version 1.0.0
 */

/* ═══════════════════════════════════════════════════════════════════
   Section Base
   ═══════════════════════════════════════════════════════════════════ */
.testimonial-slider-section {
    padding: 5rem 0;
}

/* ── Header ────────────────────────────────────────────────────── */
.ts-header {
    text-align: center;
    margin-bottom: 3rem;
}
.ts-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary, #15779b);
    margin: 0 0 0.5rem;
}
.ts-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
    color: var(--color-text, #1a1a2e);
}

/* ═══════════════════════════════════════════════════════════════════
   Slider Container
   ═══════════════════════════════════════════════════════════════════ */
.ts-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 3rem;
}
.ts-slider-overflow {
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
   Track & Slides
   ═══════════════════════════════════════════════════════════════════ */
.ts-track {
    display: flex;
    width: 100%;
}

/* ── Slide transition ─────────────────────────────────────────── */
.ts--transition-slide .ts-track {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-slide {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 2rem 2.5rem;
    box-sizing: border-box;
    text-align: center;
}

/* ── Fade transition ──────────────────────────────────────────── */
.ts--transition-fade .ts-track {
    position: relative;
}
.ts--transition-fade .ts-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.ts--transition-fade .ts-slide.ts-slide--active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════════
   Quote Icon
   ═══════════════════════════════════════════════════════════════════ */
.ts-quote-icon {
    margin-bottom: 1rem;
    color: var(--color-primary, #15779b);
}

/* ═══════════════════════════════════════════════════════════════════
   Testimonial Text
   ═══════════════════════════════════════════════════════════════════ */
.ts-text {
    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--color-text, #1a1a2e);
    margin: 0 0 1.5rem;
    border: none;
    padding: 0;
    quotes: none;
}

/* ═══════════════════════════════════════════════════════════════════
   Star Rating
   ═══════════════════════════════════════════════════════════════════ */
.ts-stars {
    display: flex;
    justify-content: center;
    gap: 0.125rem;
    margin-bottom: 1.5rem;
}
.ts-star {
    display: inline-block;
}
.ts-star--filled {
    color: #f59e0b;
}
.ts-star--empty {
    color: var(--color-border, rgba(0, 0, 0, 0.2));
}

/* ═══════════════════════════════════════════════════════════════════
   Author Info
   ═══════════════════════════════════════════════════════════════════ */
.ts-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
}
.ts-author-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--color-border, rgba(0, 0, 0, 0.08));
}
.ts-author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ts-author-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.ts-author-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text, #1a1a2e);
    line-height: 1.3;
}
.ts-author-position {
    font-size: 0.8125rem;
    color: var(--color-text-light, #555);
    line-height: 1.3;
    margin-top: 0.125rem;
}

/* ═══════════════════════════════════════════════════════════════════
   Arrow Navigation
   ═══════════════════════════════════════════════════════════════════ */
.ts-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text, #1a1a2e);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 2;
    padding: 0;
    font-family: inherit;
}
.ts-arrow:hover {
    background: var(--color-bg-alt, #f5f5f5);
    border-color: var(--color-primary, #15779b);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ts-arrow:focus-visible {
    outline: 2px solid var(--color-primary, #15779b);
    outline-offset: 2px;
}
.ts-arrow--prev {
    left: 0;
}
.ts-arrow--next {
    right: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   Dot Navigation
   ═══════════════════════════════════════════════════════════════════ */
.ts-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.ts-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: var(--color-border, rgba(0, 0, 0, 0.15));
    transition: background 0.2s ease, transform 0.2s ease;
}
.ts-dot:hover {
    background: var(--color-primary, #15779b);
    opacity: 0.6;
}
.ts-dot--active {
    background: var(--color-primary, #15779b);
    transform: scale(1.2);
}
.ts-dot:focus-visible {
    outline: 2px solid var(--color-primary, #15779b);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   Color Scheme Overrides
   ═══════════════════════════════════════════════════════════════════ */
.dark-section .ts-title,
.dark-section .ts-text,
.dark-section .ts-author-name {
    color: #fff;
}
.dark-section .ts-author-position {
    color: rgba(255, 255, 255, 0.7);
}
.dark-section .ts-star--empty {
    color: rgba(255, 255, 255, 0.25);
}
.dark-section .ts-quote-icon {
    color: rgba(255, 255, 255, 0.3);
}
.dark-section .ts-arrow {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.dark-section .ts-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}
.dark-section .ts-dot {
    background: rgba(255, 255, 255, 0.25);
}
.dark-section .ts-dot--active,
.dark-section .ts-dot:hover {
    background: #fff;
}
.dark-section .ts-author-image {
    border-color: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════
   Accessibility: prefers-reduced-motion
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .ts--transition-slide .ts-track,
    .ts--transition-fade .ts-slide,
    .ts-arrow,
    .ts-dot {
        transition: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .testimonial-slider-section {
        padding: 3.5rem 0;
    }
    .ts-header {
        margin-bottom: 2rem;
    }
    .ts-slide {
        padding: 1.5rem 1rem;
    }
    .ts-text {
        font-size: 1rem;
    }
    .ts-arrow {
        width: 34px;
        height: 34px;
    }
    .ts-arrow--prev {
        left: 0;
    }
    .ts-arrow--next {
        right: 0;
    }
    .ts-author-image {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .ts-arrow {
        display: none;
    }
}
