.testimonial-slider-block {
  --ts-bg: #f6f8f7;
  --ts-card: #ffffff;
  --ts-ink: #101820;
  --ts-muted: #647074;
  --ts-line: rgba(16, 24, 32, 0.1);
  --ts-green: var(--wp--preset--color--green, #4dac99);
  --ts-blue: var(--wp--preset--color--blue, #1d3561);
  --ts-blue-light: var(--wp--preset--color--blue-lighter, #3586f1);
  position: relative;
  overflow: hidden;
  margin-block-start: 0 !important;
  padding: clamp(56px, 7vw, 104px) 24px;
  background:
    linear-gradient(135deg, rgba(77, 172, 153, 0.14), rgba(77, 172, 153, 0) 36%),
    linear-gradient(180deg, #ffffff 0%, var(--ts-bg) 100%);
  color: var(--ts-ink);
}

.testimonial-slider-block::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--ts-green), var(--ts-blue-light), var(--ts-blue));
}

.testimonial-slider-shell {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.testimonial-slider-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.testimonial-slider-heading {
  display: grid;
  gap: 12px;
}

.testimonial-slider-kicker {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(77, 172, 153, 0.32);
  border-radius: 6px;
  color: var(--ts-green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  background: rgba(77, 172, 153, 0.08);
}

.testimonial-slider-block h2 {
  max-width: 760px;
  margin: 0;
  color: var(--ts-ink);
}

.testimonial-slider-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.testimonial-slider-counter {
  color: var(--ts-muted);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.testimonial-slider-nav {
  display: flex;
  gap: 8px;
}

.testimonial-slider-nav__button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--ts-line);
  border-radius: 8px;
  background: var(--ts-card);
  box-shadow: 0 12px 30px rgba(16, 24, 32, 0.08);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.testimonial-slider-nav__button:hover,
.testimonial-slider-nav__button:focus-visible {
  border-color: rgba(77, 172, 153, 0.55);
  background: var(--ts-green);
  box-shadow: 0 16px 34px rgba(77, 172, 153, 0.28);
  transform: translateY(-1px);
}

.testimonial-slider-nav__button:focus-visible {
  outline: 2px solid var(--ts-blue);
  outline-offset: 3px;
}

.testimonial-slider-nav__button img {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 0;
  opacity: 1;
  transition: filter 160ms ease;
}

.testimonial-slider-nav__button:hover img,
.testimonial-slider-nav__button:focus-visible img {
  filter: brightness(0) invert(1);
}

.testimonial-slider-block .splide__track {
  overflow: visible;
}

.testimonial-slider-block .splide__list {
  margin: 0;
  padding: 0;
}

.testimonial-slider-block .splide__slide {
  border-radius: 0;
}

.testimonial-slider-block .splide__slide:not(.is-active) {
  height: 0 !important;
  overflow: hidden;
}

.testimonial-card {
  position: relative;
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  min-height: clamp(390px, 38vw, 500px);
  padding: clamp(32px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid rgba(16, 24, 32, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(29, 53, 97, 0.055), rgba(255, 255, 255, 0) 45%),
    var(--ts-card);
  box-shadow: 0 30px 90px rgba(16, 24, 32, 0.12);
}

.testimonial-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(180deg, var(--ts-green), var(--ts-blue-light));
}

.testimonial-card .quote-icon {
  position: absolute;
  top: -34px;
  right: clamp(20px, 6vw, 72px);
  color: rgba(53, 134, 241, 0.1);
  font-family: Georgia, serif;
  font-size: clamp(9rem, 18vw, 17rem);
  line-height: 1;
  pointer-events: none;
}

.testimonial-text {
  position: relative;
  z-index: 1;
  max-width: 900px;
  align-self: end;
  margin: 0;
  color: var(--ts-ink);
  font-family: var(--wp--preset--font-family--metropolis, inherit);
  font-size: clamp(1.2rem, 1.02rem + 0.78vw, 1.75rem);
  font-weight: 500;
  line-height: 1.44;
}

.testimonial-text > * {
  margin-block-start: 0;
  margin-block-end: 0;
}

.testimonial-text > * + * {
  margin-block-start: 0.8em;
}

.testimonial-footer {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--ts-line);
}

.testimonial-author-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.testimonial-author-mark {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ts-blue);
  font-family: var(--wp--preset--font-family--metropolis, inherit);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.testimonial-author {
  display: grid;
  min-width: 0;
  gap: 5px;
  line-height: 1.25;
}

.testimonial-author strong {
  color: var(--ts-ink);
  font-family: var(--wp--preset--font-family--metropolis, inherit);
  font-size: 1rem;
  font-weight: 700;
}

.testimonial-position {
  color: var(--ts-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.testimonial-logo {
  flex: 0 0 auto;
}

.testimonial-logo img {
  display: block;
  width: auto;
  max-width: min(170px, 28vw);
  max-height: 60px;
  object-fit: contain;
  border-radius: 0;
}

@media (max-width: 780px) {
  .testimonial-slider-block {
    padding: 48px 16px;
  }

  .testimonial-slider-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .testimonial-slider-controls {
    justify-content: space-between;
  }

  .testimonial-card {
    min-height: 440px;
    padding: 32px 24px;
  }

  .testimonial-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .testimonial-logo img {
    max-width: 160px;
  }
}

@media (max-width: 480px) {
  .testimonial-text {
    font-size: 1.125rem;
  }

  .testimonial-slider-controls {
    align-items: flex-end;
  }

  .testimonial-slider-nav__button {
    width: 42px;
    height: 42px;
  }

  .testimonial-author-mark {
    width: 46px;
    height: 46px;
  }
}
