.testimonials {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 112px;
  width: 100%;
  padding: 140px 56px;
  overflow: hidden;
  background: #000;
}

.testimonials__backgrounds {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.testimonials__backgrounds::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  content: "";
}

.testimonials__background-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
}

.testimonials__background-image.is-active,
.testimonials__background-image.is-previous {
  opacity: 1;
  visibility: visible;
}

.testimonials__background-image.is-active {
  z-index: 1;
}

.testimonials__background-image.is-previous {
  z-index: 0;
  clip-path: none;
}

.testimonials__header,
.testimonials__carousel {
  position: relative;
  z-index: 1;
}

.testimonials__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(228, 230, 243, 0.8);
}

.testimonials__heading,
.testimonials__summary {
  margin: 0;
  color: #e4e6f3;
  font-family: "Satoshi", sans-serif;
  font-size: var(--font-size-large);
  font-weight: 500;
  line-height: 1.3;
}

.testimonials__heading {
  color: #d3d8ed;
}

.testimonials__carousel {
  display: grid;
  grid-template-columns: repeat(12, minmax(50px, 1fr));
  gap: 24px;
  width: 100%;
}

.testimonials__slides {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  min-height: 457px;
}

.testimonial-card {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 600ms cubic-bezier(0.44, 0, 0.56, 1),
    visibility 0s linear 600ms;
}

.testimonial-card.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 600ms cubic-bezier(0.44, 0, 0.56, 1),
    visibility 0s linear 0s;
}

.testimonial-card__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(50px, 1fr));
  grid-template-rows: auto auto;
  align-content: start;
  gap: 24px;
  width: 100%;
  min-height: 456px;
  height: auto;
}

.testimonial-card__author {
  grid-column: 3 / span 7;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  height: auto;
  margin-top: 24px;
}

.testimonial-card__name,
.testimonial-card__role,
.testimonial-card__quote,
.testimonial-card__quote p {
  margin: 0;
}

.testimonial-card__name {
  color: #e4e6f3;
  font-family: "Satoshi", sans-serif;
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.2;
}

.testimonial-card__role {
  color: #9da2b4;
  font-family: "Satoshi", sans-serif;
  font-size: var(--font-size-body);
  font-weight: 500;
  line-height: 1.34;
}

.testimonial-card__quote {
  grid-column: 3 / span 7;
  grid-row: 1;
  width: 100%;
  color: #d3d8ed;
  font-family: "Satoshi", sans-serif;
  font-size: 2.5rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.3;
}

.testimonials__controls {
  display: contents;
}

.testimonials__pagination {
  grid-column: 1 / span 2;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  margin: 0;
  color: #9da2b4;
  font-family: "Satoshi", sans-serif;
  font-size: 4rem;
  font-weight: 500;
  line-height: 1.1;
}

.testimonials__navigation {
  grid-column: 11 / -1;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  display: flex;
  gap: 32px;
}

.testimonials__button {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 1px solid rgba(110, 137, 167, 0.4);
  border-radius: 4px;
  background: #101215;
  color: #9da2b4;
  cursor: pointer;
  transition:
    border-color 300ms ease,
    color 300ms ease;
}

.testimonials__button:hover,
.testimonials__button:focus-visible {
  border-color: #1e83f4;
  color: #e4e6f3;
}

.testimonials__button:focus-visible {
  outline: 2px solid #1e83f4;
  outline-offset: 3px;
}

.testimonials__button-icon {
  width: 34px;
  height: 34px;
  --1335ju: 1.5;
  --18mrqx2: currentColor;
}

@media (max-width: 1439.98px) {
  .testimonials {
    gap: 80px;
    padding: 78px 56px;
  }

  .testimonials__heading,
  .testimonials__summary {
    font-size: var(--font-size-medium);
  }

  .testimonials__slides {
    grid-column: 1;
    grid-row: 2;
    min-height: 325px;
  }

  .testimonials__carousel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    row-gap: 40px;
  }

  .testimonial-card__grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    min-height: 325px;
    height: auto;
  }

  .testimonial-card__author {
    order: 1;
    flex: none;
    gap: 4px;
    width: 100%;
    height: auto;
    margin-top: 0;
  }

  .testimonial-card__name {
    font-size: var(--font-size-large);
    line-height: 1.2;
  }

  .testimonial-card__role {
    font-size: var(--font-size-small);
    line-height: 1.05;
  }

  .testimonial-card__quote {
    order: 0;
    width: 100%;
    font-size: var(--font-size-large);
  }

  .testimonials__pagination {
    grid-column: 1;
    grid-row: 1;
    font-size: 3rem;
  }

  .testimonials__navigation {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }
}

@media (max-width: 767.98px) {
  .testimonials {
    gap: 48px;
    padding: 70px 24px;
  }

  .testimonials__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .testimonials__summary {
    display: none;
  }

  .testimonials__carousel {
    row-gap: 32px;
  }

  .testimonials__slides {
    min-height: 0;
  }

  .testimonial-card__grid {
    gap: 32px;
    min-height: 0;
  }

  .testimonial-card__quote {
    order: 0;
  }

  .testimonial-card__author {
    order: 1;
    flex: none;
    width: 223px;
    height: min-content;
  }

  .testimonial-card__role {
    line-height: 1.34;
  }

  .testimonials__pagination {
    font-size: 2.2rem;
  }

  .testimonials__button {
    width: 58px;
    height: 58px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .testimonials__background-image.is-active {
    clip-path: none;
  }

  .testimonial-card,
  .testimonial-card.is-active {
    transition: none;
  }
}
