/* =============================================================================
   Testimonials — Rotating
   ============================================================================= */

.cb-tr {
  box-sizing: border-box;
  background: var(--tr-bg, #0d0d0d);
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem);
  overflow: hidden;
}

.cb-tr *,
.cb-tr *::before,
.cb-tr *::after {
  box-sizing: inherit;
}

.cb-tr__inner {
  max-width: var(--tr-max-width, 820px);
  margin: 0 auto;
}

/* =============================================================================
   Alignment variants
   ============================================================================= */

.cb-tr--align-left   { text-align: left; }
.cb-tr--align-center { text-align: center; }
.cb-tr--align-right  { text-align: right; }

.cb-tr--align-center .cb-tr__cite { justify-content: center; }
.cb-tr--align-right  .cb-tr__cite { justify-content: flex-end; }
.cb-tr--align-center .cb-tr__dots { justify-content: center; }
.cb-tr--align-right  .cb-tr__dots { justify-content: flex-end; }

/* =============================================================================
   Header
   ============================================================================= */

.cb-tr__headline {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 4vw, var(--tr-headline-size, 42px));
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--tr-headline);
}

.cb-tr__subheadline {
  margin: 0 0 clamp(2rem, 4vw, 3.5rem);
  font-size: clamp(0.875rem, 1.5vw, var(--tr-subheadline-size, 16px));
  color: var(--tr-subheadline);
  line-height: 1.6;
}

/* =============================================================================
   Slide stage
   ============================================================================= */

.cb-tr__stage {
  position: relative;
  min-height: clamp(180px, 24vh, 300px);
  margin-bottom: 2rem;
}

.cb-tr__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.cb-tr__slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

/* =============================================================================
   Quote
   ============================================================================= */

.cb-tr__quote {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(1rem, 2.4vw, var(--tr-quote-size, 24px));
  font-weight: 400;
  line-height: 1.55;
  color: var(--tr-quote);
  font-style: italic;
  letter-spacing: -0.01em;
}

.cb-tr__quote-mark {
  color: var(--tr-quote-mark, var(--tr-accent));
  font-size: 2.2em;
  line-height: 0;
  vertical-align: -0.22em;
  font-style: normal;
  font-weight: 400;
}

.cb-tr__quote-mark--open {
  margin-right: 0.05em;
}

.cb-tr__quote-mark--close {
  margin-left: 0.05em;
}

/* =============================================================================
   Citation
   ============================================================================= */

.cb-tr__cite {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cb-tr__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tr-accent), #ff6666);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.cb-tr__cite-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tr-name);
  line-height: 1.3;
}

.cb-tr__cite-company {
  font-size: 0.75rem;
  color: var(--tr-company);
  line-height: 1.4;
}

/* =============================================================================
   Dot navigation
   ============================================================================= */

.cb-tr__dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.cb-tr__dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tr-dot-inactive, rgba(255, 255, 255, 0.2));
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.cb-tr__dot.is-active {
  background: var(--tr-accent);
  transform: scale(1.35);
}

.cb-tr__dot:hover:not(.is-active) {
  background: var(--tr-accent);
  opacity: 0.55;
  transform: scale(1.15);
}

/* =============================================================================
   Entrance animation — JS sets inline opacity via GSAP; no CSS hidden state
   needed. The .cb-tr--visible class is added after the entrance animation
   completes (used only as a hook for downstream logic if needed).
   ============================================================================= */

/* =============================================================================
   Reduced motion
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  .cb-tr__slide,
  .cb-tr__dot {
    transition: none !important;
  }
}

/* =============================================================================
   Mobile
   ============================================================================= */

@media (max-width: 40rem) {
  .cb-tr {
    padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 3vw, 1.5rem);
  }

  .cb-tr__stage {
    min-height: clamp(200px, 40vh, 320px);
  }

  .cb-tr__cite {
    flex-wrap: wrap;
  }
}
