/* ─── Testimonials — Themeable via CSS variables ──────────────────────────────
   Variables are set by JS on the root container element.
   ─────────────────────────────────────────────────────────────────────────── */

/* ─── Container ──────────────────────────────────────────────────────────── */

[data-testimonials] {
  font-family: var(--ts-font, system-ui, -apple-system, 'Segoe UI', sans-serif);
  color: var(--ts-text, #1a1a1a);
}

.ts-wrap {
  max-width: 680px;
  margin: 0 auto;
}

/* ─── Track — CSS grid stack: all slides occupy the same cell ────────────── */

.ts-track {
  display: grid;
  position: relative;
}

.ts-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}

.ts-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */

.ts-card {
  background: rgba(255, 255, 255, 0.38);
  border-radius: var(--ts-radius, 14px);
  padding: 40px 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.ts-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ─── Stars ──────────────────────────────────────────────────────────────── */

.ts-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 18px;
}

.ts-star {
  font-size: 20px;
  color: var(--ts-border, #e0e0e0);
  line-height: 1;
}

.ts-star.is-filled {
  color: var(--ts-star, #f59e0b);
}

/* ─── Quote ──────────────────────────────────────────────────────────────── */

.ts-quote {
  margin: 0 0 28px;
  padding: 0;
  border: none;
}

.ts-quote p {
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  margin: 0;
}

.ts-quote p::before {
  content: '\201C';
  font-size: 2em;
  line-height: 0;
  vertical-align: -0.15em;
  margin-right: 2px;
  color: rgba(240, 165, 0, 0.7);
}

.ts-quote p::after {
  content: '\201D';
  font-size: 2em;
  line-height: 0;
  vertical-align: -0.15em;
  margin-left: 2px;
  color: rgba(240, 165, 0, 0.7);
}

/* ─── Author ─────────────────────────────────────────────────────────────── */

.ts-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ts-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ts-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ts-primary, #1a1a1a);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}

.ts-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ts-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.ts-role {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ─── Controls ───────────────────────────────────────────────────────────── */

.ts-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

/* ─── Arrows ─────────────────────────────────────────────────────────────── */

.ts-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}

.ts-arrow svg {
  width: 16px;
  height: 16px;
  display: block;
}

.ts-arrow:hover {
  border-color: var(--color-accent, #F0A500);
  color: var(--color-accent, #F0A500);
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.08);
}

/* ─── Dots ───────────────────────────────────────────────────────────────── */

.ts-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ts-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.ts-dot.is-active {
  background: var(--color-accent, #F0A500);
  transform: scale(1.3);
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .ts-card {
    padding: 24px 22px;
  }

  .ts-quote p {
    font-size: 15px;
  }

  .ts-arrow {
    width: 34px;
    height: 34px;
  }
}