/**
 * Homepage testimonials section.
 */

.testimonials-section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.testimonials-section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto 60px;
  text-align: center;
}

.testimonials-section__subtitle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border: 1px solid rgba(25, 168, 207, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.testimonials-section__heading {
  margin: 0;
  color: var(--color-primary-darker);
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.testimonials-section__summary {
  margin: 0;
  max-width: 680px;
  color: rgba(17, 61, 72, 0.72);
  font-size: 1rem;
  line-height: 1.75;
}

.testimonials-slider-wrapper {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 60px 0 80px;
  position: relative;
  overflow: visible;
}

.testimonials-slider {
  width: 100%;
  padding: 0;
  overflow: visible;
}

.testimonials-slider .swiper-wrapper {
  padding: 40px 0;
  align-items: center;
}

.testimonials-slider .swiper-slide {
  height: auto;
  transition: all 0.5s ease;
}

.testimonial-card {
  background: #fff;
  border-radius: 20px;
  padding: 30px 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  position: relative;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  height: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.swiper-slide-active .testimonial-card {
  transform: translateY(-25px) scale(1.08);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.testimonial-quote-icon,
.testimonial-quote-icon-bottom {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1ca8cb, #0891b2);
}

.testimonial-quote-icon {
  top: 15px;
  left: 20px;
}

.testimonial-quote-icon-bottom {
  bottom: 15px;
  right: 20px;
  background: linear-gradient(135deg, #0891b2, #1ca8cb);
}

.testimonial-quote-icon i,
.testimonial-quote-icon-bottom i {
  font-size: 1rem;
  color: #fff;
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #1ca8cb;
  margin: 0 auto 15px;
  box-shadow: 0 5px 20px rgba(28, 168, 203, 0.3);
  transition: all 0.5s ease;
  flex-shrink: 0;
}

.swiper-slide-active .testimonial-avatar {
  width: 100px;
  height: 100px;
  border-width: 5px;
  box-shadow: 0 8px 30px rgba(28, 168, 203, 0.5);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-info {
  margin-bottom: 15px;
  flex-shrink: 0;
}

.testimonial-name {
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgb(17, 61, 72);
  margin: 0 0 5px;
}

.testimonial-job,
.testimonial-location {
  font-family: "Manrope", sans-serif;
  font-size: 0.85rem;
  color: #1ca8cb;
  margin: 0;
  font-weight: 500;
}

.testimonial-location {
  color: rgba(17, 61, 72, 0.6);
  margin-top: 3px;
}

.testimonial-rating {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 15px;
  flex-shrink: 0;
}

.testimonial-rating i {
  font-size: 0.95rem;
  color: #ddd;
  transition: color 0.3s ease;
}

.testimonial-rating i.active {
  color: #ffc107;
}

.testimonial-content {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  overflow: hidden;
  max-height: 150px;
}

.testimonial-content p {
  font-family: "Manrope", sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #666;
  margin: 0;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.testimonials-button-prev,
.testimonials-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  min-height: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #1ca8cb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.testimonials-button-prev {
  left: 20px;
}

.testimonials-button-next {
  right: 20px;
}

.testimonials-button-prev:hover,
.testimonials-button-next:hover {
  background: #1ca8cb;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 15px rgba(28, 168, 203, 0.3);
}

.testimonials-button-prev i,
.testimonials-button-next i {
  font-size: 1rem;
  color: #1ca8cb;
  transition: color 0.3s ease;
}

.testimonials-button-prev:hover i,
.testimonials-button-next:hover i {
  color: #fff;
}

.testimonials-button-prev.swiper-button-disabled,
.testimonials-button-next.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: #ddd;
}

.testimonials-button-prev.swiper-button-disabled i,
.testimonials-button-next.swiper-button-disabled i {
  color: #ddd;
}

.testimonials-pagination {
  display: none !important;
}

@media (max-width: 768px) {
  .testimonials-slider-wrapper {
    display: none !important;
  }

  .testimonials-section .testimonials-mobile-cards {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .testimonials-mobile-cards {
    display: none !important;
  }
}

.testimonials-mobile-cards {
  display: none;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 20px 0;
}

.testimonials-mobile-cards::-webkit-scrollbar {
  height: 6px;
}

.testimonials-mobile-cards::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.testimonials-mobile-cards::-webkit-scrollbar-thumb {
  background: #1ca8cb;
  border-radius: 3px;
}

.testimonials-mobile-wrapper {
  display: flex;
  gap: 15px;
  padding: 0 20px;
}

.testimonial-mobile-card {
  flex: 0 0 280px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  scroll-snap-align: start;
}

.testimonial-mobile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.testimonial-mobile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #1ca8cb;
}

.testimonial-mobile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-mobile-info h4 {
  font-size: 0.95rem;
  color: #1a1a1a;
  margin: 0 0 3px;
  font-weight: 600;
}

.testimonial-mobile-info p {
  font-size: 0.75rem;
  color: #666;
  margin: 0;
}

.testimonial-mobile-rating {
  color: #ffc107;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.testimonial-mobile-content {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  font-style: italic;
}

@media (max-width: 1200px) {
  .testimonials-slider .swiper-slide {
    width: 400px;
  }

  .testimonial-card {
    padding: 35px 30px;
    height: 480px;
  }

  .testimonials-button-prev {
    left: 10px;
  }

  .testimonials-button-next {
    right: 10px;
  }
}

@media (max-width: 992px) {
  .testimonials-section {
    padding: 60px 0;
  }

  .testimonials-section__header {
    margin-bottom: 44px;
  }

  .testimonials-section__heading {
    font-size: clamp(1.8rem, 4vw, 2.25rem);
  }

  .testimonials-section__summary {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .testimonials-slider .swiper-slide {
    width: 380px;
  }

  .testimonial-card {
    padding: 30px 25px;
    height: 460px;
  }

  .swiper-slide-active .testimonial-card {
    transform: translateY(-20px) scale(1.06);
  }
}

@media (max-width: 768px) {
  .testimonials-section {
    padding: 40px 0;
  }

  .testimonials-section__header {
    gap: 10px;
    margin-bottom: 36px;
  }

  .testimonials-section__heading {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .testimonials-section__summary {
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .testimonials-slider-wrapper {
    padding: 40px 0 60px;
  }

  .testimonials-slider {
    overflow: visible;
  }

  .testimonials-slider .swiper-wrapper {
    align-items: center;
  }

  .testimonials-slider .swiper-slide {
    width: 85%;
    max-width: 280px;
    opacity: 0.5;
    transform: scale(0.9);
    filter: blur(1px);
  }

  .testimonials-slider .swiper-slide-active {
    opacity: 1 !important;
    transform: scale(1) !important;
    filter: blur(0) !important;
  }

  .testimonial-card {
    padding: 25px 20px;
    height: 400px;
  }

  .swiper-slide-active .testimonial-card {
    transform: translateY(-10px);
  }

  .testimonial-avatar {
    width: 70px;
    height: 70px;
  }

  .swiper-slide-active .testimonial-avatar {
    width: 90px;
    height: 90px;
  }

  .testimonial-name {
    font-size: 1.2rem;
  }

  .testimonial-content p {
    font-size: 0.95rem;
  }

  .testimonials-button-prev,
  .testimonials-button-next {
    width: 40px;
    height: 40px;
  }

  .testimonials-button-prev {
    left: 5px;
  }

  .testimonials-button-next {
    right: 5px;
  }
}

@media (max-width: 576px) {
  .testimonials-section__subtitle {
    padding: 6px 16px;
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .testimonials-section__heading {
    font-size: 1.7rem;
  }

  .testimonials-section__summary {
    font-size: 0.9rem;
  }

  .testimonial-card {
    padding: 25px 20px;
    height: 420px;
  }

  .testimonial-quote-icon,
  .testimonial-quote-icon-bottom {
    width: 40px;
    height: 40px;
  }

  .testimonial-avatar {
    width: 70px;
    height: 70px;
    border-width: 4px;
  }

  .swiper-slide-active .testimonial-avatar {
    width: 80px;
    height: 80px;
  }

  .testimonial-name {
    font-size: 1.1rem;
  }

  .testimonial-job {
    font-size: 0.9rem;
  }

  .testimonial-content p {
    font-size: 0.9rem;
  }

  .testimonial-rating i {
    font-size: 1rem;
  }

  .testimonial-mobile-card {
    flex: 0 0 260px;
    padding: 18px;
  }

  .testimonial-mobile-content {
    font-size: 0.8rem;
  }
}

@media (max-width: 375px) {
  .testimonials-section {
    padding: 40px 0;
  }

  .testimonial-card {
    padding: 22px 18px;
    height: 400px;
  }

  .testimonial-avatar {
    width: 65px;
    height: 65px;
  }

  .swiper-slide-active .testimonial-avatar {
    width: 75px;
    height: 75px;
  }
}
