/* =========================
   DS Testimonials
   ========================= */

.ds-testimonials {
  --ds-link-color: #0F77AE;
  overflow: hidden;
}

.ds-testimonials__header {
  margin-bottom: 32px;
}

.ds-testimonials__header .module-title {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.ds-testimonials__header .module-title__pretitle,
.ds-testimonials__header .module-title__title {
  margin: 0;
}

.ds-testimonials__header .module-title__pretitle {
  margin-bottom: 8px;
}

.ds-testimonials__header .module-title__post-title {
  max-width: 640px;
  margin: 16px auto 0;
}

.ds-testimonials__content {
  margin-top: 0;
}

.ds-testimonials__grid {
  display: grid;
  gap: 24px;
  width: 100%;
}

.ds-testimonials__grid--1 { grid-template-columns: 1fr; }
.ds-testimonials__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-testimonials__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-testimonials__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ds-testimonials__grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.ds-testimonials__item {
  min-width: 0;
}

/* Card */
.card-quote {
  min-height: 260px;
  padding: 24px;
  background: #fff;
}

.card-quote--weak { background: #f5f5f5; }
.card-quote--white { background: #fff; }

.card-quote__header,
.card-quote__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.card-quote__header {
  margin-bottom: 20px;
}

.card-quote__footer {
  align-items: center;
  gap: 16px;
}

.card-quote__stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.card-quote__google-logo img {
  display: block;
  max-width: 112px;
  height: auto;
}

.card-quote__title h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.card-quote__description {
  margin-bottom: 12px;
}

.card-quote__description .body-m-regular {
  font-size: 14px;
  line-height: 1.45;
}

.card-quote__description--clamped .body-m-regular {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-quote__description--clamped p {
  margin: 0;
}

.card-quote__read-more {
  display: inline-block;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: var(--ds-link-color);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.card-quote__read-more:hover,
.card-quote__read-more:focus {
  color: var(--ds-link-color);
  text-decoration: underline;
}

.card-quote__label {
  margin-bottom: 14px;
}

.card-quote__location {
  margin-left: auto;
  font-size: 13px;
  text-align: right;
}

.card-quote a,
.card-quote a:hover,
.card-quote a:focus,
.testimonials__see-more a,
.testimonials__see-more a:hover,
.testimonials__see-more a:focus,
.testimonials__see-more .text-link,
.testimonials__see-more .btn {
  color: var(--ds-link-color);
}

.testimonials__see-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* Modal */
.testimonials-modal {
  --ds-link-color: #0F77AE;
  display: none;
}

.testimonials-modal.is-open {
  display: block;
}

.testimonials-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.38);
}

.testimonials-modal__dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  width: min(860px, calc(100% - 32px));
  min-height: 600px;
  max-height: calc(100vh - 64px);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
}

.testimonials-modal__close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.testimonials-modal__content {
  flex: 1;
  overflow: auto;
  padding: 40px 48px 32px;
}

.testimonials-modal__pretitle {
  margin-bottom: 8px;
  color: #333;
  font-size: 13px;
  line-height: 1.3;
}

.testimonials-modal__title {
  margin: 0 0 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid #d8d8d8;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.testimonials-modal__slide {
  display: none;
}

.testimonials-modal__slide.is-active {
  display: block;
}

.testimonials-modal__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 14px;
}

.testimonials-modal__name {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.testimonials-modal__location {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.3;
}

.testimonials-modal__top img {
  display: block;
  max-width: 116px;
  height: auto;
  margin-top: 4px;
}

.testimonials-modal__stars {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.testimonials-modal__stars .badge,
.testimonials-modal__stars .label-special-style {
  margin-left: 8px;
}

.testimonials-modal__description {
  max-width: 620px;
  color: #333;
  font-size: 14px;
  line-height: 1.45;
}

.testimonials-modal__description p {
  margin: 0 0 24px;
}

.testimonials-modal__description p:last-child {
  margin-bottom: 0;
}

.testimonials-modal__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px 48px;
  border-top: 1px solid #d8d8d8;
}

.testimonials-modal__nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: var(--ds-link-color);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.testimonials-modal__nav:hover,
.testimonials-modal__nav:focus,
.testimonials-modal__description a,
.testimonials-modal__description a:hover,
.testimonials-modal__description a:focus,
.testimonials-modal__footer a,
.testimonials-modal__footer a:hover,
.testimonials-modal__footer a:focus,
.testimonials-modal__footer .text-link,
.testimonials-modal__footer .btn {
  color: var(--ds-link-color);
}

.testimonials-modal__nav:hover,
.testimonials-modal__nav:focus,
.testimonials-modal__description a:hover,
.testimonials-modal__description a:focus,
.testimonials-modal__footer a:hover,
.testimonials-modal__footer a:focus {
  text-decoration: underline;
}

.testimonials-modal__nav svg {
  width: 12px;
  height: 12px;
}

.testimonials-modal__nav--prev { justify-self: start; }
.testimonials-modal__nav--next { justify-self: end; }
.testimonials-modal__nav--prev svg { order: -1; }
.testimonials-modal__nav--next svg { order: 1; }

.testimonials-modal__footer .btn {
  min-width: 220px;
  justify-content: center;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 991px) {
  .ds-testimonials__grid--4,
  .ds-testimonials__grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ds-testimonials__grid,
  .ds-testimonials__grid--1,
  .ds-testimonials__grid--2,
  .ds-testimonials__grid--3,
  .ds-testimonials__grid--4,
  .ds-testimonials__grid--5 {
    grid-template-columns: 1fr;
  }

  .testimonials-modal__dialog {
    width: calc(100% - 24px);
    min-height: auto;
  }

  .testimonials-modal__content {
    padding: 32px 24px 24px;
  }

  .testimonials-modal__title {
    font-size: 24px;
  }

  .testimonials-modal__top {
    flex-direction: column;
    gap: 12px;
  }

  .testimonials-modal__footer {
    grid-template-columns: 1fr;
    padding: 20px 24px;
  }

  .testimonials-modal__nav--prev,
  .testimonials-modal__nav--next {
    justify-self: center;
  }
}
