/* Testimonials */
#testimonials {
  background-color: transparent;
  padding: 88px 0 78px;
  overflow: hidden;
}

/* Title */
.testimonials-wrap {
  width: min(1320px, calc(100% - 96px));
  margin: 0 auto;
  text-align: center;
}

.testimonials-title {
  font-family: var(--font-mono);
  max-width: 24ch;
  margin: 0 auto 54px;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.1;
  font-weight: 700;
  color: var(--color-accent);
  padding: 0 20px;
}

/* Stage */
.testimonials-stage {
  position: relative;
  width: 100%;
}

.testimonials-track-outer {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.testimonials-track-outer::before,
.testimonials-track-outer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(48px, 9vw, 120px);
  z-index: 2;
  pointer-events: none;
}

.testimonials-track-outer::before {
  left: 0;
  background: linear-gradient(to right, #1c1c1c 0%, transparent 100%);
}

.testimonials-track-outer::after {
  right: 0;
  background: linear-gradient(to left, #1c1c1c 0%, transparent 100%);
}

/* Track */
.testimonials-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  padding: 30px 0 20px;
}

.testimonials-track.is-resetting {
  transition: none !important;
}

/* Cards */
.testimonial-card {
  flex: 0 0 min(640px, calc(100vw - 400px));
  display: flex;
  flex-direction: column;
  min-height: 300px;
  overflow: visible;
  background:
    linear-gradient(102deg, rgba(34, 42, 42, 0.96) 0%, rgba(29, 38, 37, 0.96) 66%, rgba(26, 26, 26, 0.98) 100%);
  border: 1px solid rgba(var(--color-accent-rgb), 0.62);
  border-radius: 28px;
  box-shadow: inset 0 0 0 1px rgba(var(--color-accent-rgb), 0.02);
  padding: 58px 40px 34px;
  margin: 0 24px;
  text-align: left;
  position: relative;
  opacity: 0.36;
  transform: scale(0.9);
  cursor: pointer;
  transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.45s ease, background 0.45s ease;
}

.testimonials-track.is-resetting .testimonial-card {
  transition: none !important;
}

/* Card content */
.testimonial-card.is-active {
  background: linear-gradient(180deg, rgba(47, 108, 98, 0.98) 0%, rgba(41, 95, 87, 0.98) 100%);
  opacity: 1;
  transform: scale(1);
  border-color: rgba(var(--color-accent-rgb), 0.82);
  cursor: default;
}

.testimonial-quote {
  position: absolute;
  top: -14px;
  left: -10px;
  display: block;
  font-family: var(--font-sans);
  font-size: 104px;
  font-weight: 700;
  line-height: 0.72;
  color: var(--color-white);
  margin: 0;
  opacity: 0.92;
  user-select: none;
  pointer-events: none;
}

.testimonial-text {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 30px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}

.testimonial-line {
  flex: 0 0 80px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.78);
  display: block;
}

.testimonial-name {
  font-family: var(--font-sans);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

/* Controls */
.testimonials-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.testimonials-arrow {
  position: relative;
  width: 28px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 1;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.testimonials-arrow-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.testimonials-arrow-icon-hover {
  opacity: 0;
}

.testimonials-arrow:hover {
  transform: translateY(-1px);
}

.testimonials-arrow:focus-visible {
  outline: 1px solid rgba(var(--color-accent-rgb), 0.8);
  outline-offset: 6px;
}

.testimonials-arrow:hover .testimonials-arrow-icon-default,
.testimonials-arrow:focus-visible .testimonials-arrow-icon-default {
  opacity: 0;
}

.testimonials-arrow:hover .testimonials-arrow-icon-hover,
.testimonials-arrow:focus-visible .testimonials-arrow-icon-hover {
  opacity: 1;
}

.testimonials-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.dot:hover,
.dot:focus-visible {
  background-color: rgba(var(--color-accent-rgb), 0.85);
  box-shadow: 0 0 0 4px rgba(var(--color-accent-rgb), 0.12),
    0 0 12px rgba(var(--color-accent-rgb), 0.45);
  transform: scale(1.18);
}

.dot.is-active {
  background-color: var(--color-accent);
  box-shadow: 0 0 8px rgba(var(--color-accent-rgb), 0.3);
  transform: scale(1.25);
}
