/* ============== TESTIMONIALS — KARUZELA MARQUEE ============== */
.testimonials {
  background: #12335b;
  color: var(--c-white);
  padding: clamp(48px, 5.21vw, 100px) 0 clamp(56px, 6.25vw, 120px);
  position: relative;
}

.testimonials__heading {
  font-size: clamp(22px, 2.292vw, 44px);
  line-height: 1.07;
  font-weight: 400;
  text-align: center;
  margin: 0 auto clamp(32px, 3.75vw, 72px);
  max-width: 1100px;
  padding: 0 24px;
  white-space: pre-line;
}

.testimonials__carousel {
  position: relative;
  margin: 0 auto;
  max-width: 1920px;
  padding: 0 24px;
  outline: none;
}

.testimonials__viewport {
  overflow: hidden;
  position: relative;
  /* Fade-out na lewym i prawym brzegu — eleganckie zakończenie marquee */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}

@keyframes testimonials-marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.testimonials__track {
  display: flex;
  gap: clamp(16px, 1.5vw, 28px);
  align-items: stretch;
  width: max-content;
  will-change: transform;
}

/* Animacja startuje dopiero po doklonowaniu kart (JS dodaje is-running) */
.testimonials__track.is-running {
  animation: testimonials-marquee var(--mq-dur, 60s) linear infinite;
}

.testimonials__carousel:hover .testimonials__track,
.testimonials__carousel:focus-within .testimonials__track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .testimonials__track {
    animation: none;
  }
}

/* Strzałki ukryte (marquee = ciągły ruch, strzałki niepotrzebne) */
.testimonials__arrow {
  display: none !important;
}

/* ============== KARTA ============== */
.testimonial-card {
  flex: 0 0 auto;
  width: clamp(280px, 22vw, 360px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: clamp(14px, 1.5vw, 28px);
  padding: clamp(20px, 1.75vw, 34px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.25vw, 22px);
  box-sizing: border-box;
}

.testimonial-card__head {
  display: flex;
  align-items: center;
  gap: clamp(10px, 0.83vw, 16px);
}

.testimonial-card__avatar {
  width: clamp(56px, 4.17vw, 80px);
  height: clamp(56px, 4.17vw, 80px);
  border-radius: 50%;
  object-fit: cover;
  background: #2b4672;
  border: 2px solid rgba(167, 183, 202, 0.45);
  flex-shrink: 0;
  display: block;
}

.testimonial-card__avatar--brand {
  border-color: rgba(151, 182, 208, 0.5);
}

.testimonial-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.testimonial-card__name {
  font-size: clamp(15px, 1.04vw, 20px);
  font-weight: 400;
  color: var(--c-white);
  line-height: 1.2;
}

.testimonial-card__role {
  font-size: clamp(12px, 0.78vw, 15px);
  color: rgba(167, 183, 202, 0.85);
  line-height: 1.25;
}

.testimonial-card__text {
  font-size: clamp(13px, 0.83vw, 16px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 11;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.testimonial-card__stars {
  display: flex;
  gap: 4px;
  color: #ffb43d;
  margin-top: auto;
}

.testimonial-card__stars svg {
  width: clamp(14px, 1.04vw, 18px);
  height: clamp(14px, 1.04vw, 18px);
}

@media (max-width: 767px) {
  .testimonial-card {
    width: 86vw;
    max-width: 340px;
  }
  .testimonial-card__text {
    -webkit-line-clamp: 14;
  }
}
