/* =========================
   Testimonial Section
   ========================= */

.home-3_testimonial {
  background: #f9f9f9;
  padding: 90px 0;
  overflow: hidden;
}

.home-3_testimonial > .container {
  max-width: 1740px;
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading__title {
  font-size: clamp(2.1rem, 3vw, 3.2rem);
  line-height: 1.15;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.section-heading--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading__button {
  display: flex;
  justify-content: flex-end;
}

.testimonial-slider {
  position: relative;
  left: 50%;
  display: grid;
  gap: 18px;
  width: 100vw;
  transform: translateX(-50%);
}

.testimonial-slider__row {
  overflow: hidden;
}

.testimonial-slider__track,
.testimonial-slider__group {
  display: flex;
  width: max-content;
}

.testimonial-slider__track {
  will-change: transform;
}

.testimonial-slider__group {
  align-items: stretch;
  gap: 18px;
  padding-right: 18px;
}

.testimonial-slider__row--right .testimonial-slider__track {
  animation: testimonial-move-right 48s linear infinite;
}

.testimonial-slider__row--left .testimonial-slider__track {
  animation: testimonial-move-left 48s linear infinite;
}

.testimonial-slider__row:hover .testimonial-slider__track {
  animation-play-state: paused;
}

.testimonial-card {
  display: flex;
  flex: 0 0 clamp(280px, 30vw, 350px);
  flex-direction: column;
  min-height: 164px;
  padding: 20px;
  background: #fff;
  border: 1px solid rgba(18, 20, 30, 0.08);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.testimonial-card__title {
  margin: 0 0 10px;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.testimonial-card p {
  margin: 0 0 14px;
  color: #28334d;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.55;
  text-align: center;
}

.testimonial-card__footer,
.testimonial-card__author {
  display: flex;
  align-items: center;
}

.testimonial-card__footer {
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.testimonial-card__author {
  min-width: 0;
  gap: 9px;
}

.testimonial-card__author-image {
  width: 32px;
  height: 32px;
  overflow: hidden;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #f3f4f6;
}

.testimonial-card__author-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-card__author-info h4 {
  margin: 0;
  color: #333;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
}

.testimonial-card__rating {
  flex: 0 0 auto;
  color: #f5a400;
  font-size: 0.8rem;
  letter-spacing: 1px;
  white-space: nowrap;
}

.btn-masco {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  background: #19423C;
  box-shadow: 0 10px 24px rgba(25, 66, 60, 0.24);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-masco:hover,
.btn-masco:focus-visible {
  transform: translateY(-2px);
  background: #19423C;
  box-shadow: 0 12px 26px rgba(25, 66, 60, 0.34);
  color: #fff;
}

.testimonial-btn__label {
  display: block;
  height: 1.2em;
  overflow: hidden;
}

.testimonial-btn__label-track {
  display: flex;
  flex-direction: column;
  transition: transform 350ms ease-in-out;
}

.testimonial-btn__label-track > span {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
  white-space: nowrap;
}

.btn-masco:hover .testimonial-btn__label-track,
.btn-masco:focus-visible .testimonial-btn__label-track {
  transform: translateY(-50%);
}

.testimonial-btn-mobile {
  display: none;
}

@keyframes testimonial-move-right {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes testimonial-move-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 991px) {
  .section-heading--row {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .section-heading__button {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .home-3_testimonial {
    padding: 64px 0;
  }

  .testimonial-slider {
    gap: 14px;
  }

  .testimonial-slider__group {
    gap: 14px;
    padding-right: 14px;
  }

  .testimonial-card {
    flex-basis: 82vw;
    min-height: 172px;
    padding: 18px;
  }

  .testimonial-btn {
    display: none;
  }

  .testimonial-btn-mobile {
    display: flex;
    justify-content: center;
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-slider__row {
    overflow-x: auto;
  }

  .testimonial-slider__track {
    animation: none !important;
  }

  .testimonial-slider__group[aria-hidden="true"] {
    display: none;
  }

  .btn-masco,
  .testimonial-btn__label-track {
    transition: none;
  }
}
