/**
 * Block: Testimonials Slider
 */

.testimonial-block {
  margin: 40px 0;
  overflow: hidden;
}

.testimonial-block-wrapper {
  position: relative;
}
.testimonial-block:before,
.testimonial-block:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  height: 100%;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.testimonial-block:before {
  left: 50%;
  margin-left: calc(-50vw);
  width: calc(50vw - 50%);
  background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);
}
.testimonial-block:after {
  right: 50%;
  margin-right: calc(-50vw);
  width: calc(50vw - 50%);
  background: linear-gradient(to left, white 0%, rgba(255, 255, 255, 0) 100%);
}

.testimonials-slider-wrapper {
  border-radius: 20px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.testimonials-slider {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.testimonial-slide {
  flex: 0 0 100%;
  width: 100%;
}

.testimonial {
  background-color: white;
  padding: 60px 30px 30px 30px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-content {
  position: relative;
  border-radius: 20px;
  padding: 30px 20px;
  width: 100%;
}

.testimonial-image {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0;
}

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

.testimonial-name {
  font-weight: 700;
  text-align: center;
  margin-top: 60px;
  font-size: 1.2em;
}

.testimonial-title {
  text-align: center;
  color: #666;
  font-size: 0.9em;
  margin-top: 5px;
}

.testimonial-rating {
  text-align: center;
  margin-top: 8px;
  letter-spacing: 4px;
}

.testimonial-rating .star {
  font-size: 1.2em;
  color: #ddd;
  transition: color 0.2s;
}

.testimonial-rating .star.filled {
  color: #ffc107;
}

.testimonial-quote {
  text-align: center;
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 0;
  font-size: 0.95em;
  line-height: 1.6;
  color: #333;
}

.testimonial-logo {
  text-align: center;
  margin-top: 15px;
  margin-bottom: 0;
  max-height: 50px;
}

.testimonial-logo img {
  max-width: 120px;
  max-height: 50px;
  object-fit: contain;
}

/* Controls */
.testimonials-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding: 0 10px;
}

.control-prev,
.control-next {
  background: var(--wp--preset--color--dusty-pink, #f0f0f0);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s ease;
  border: none;
}

.control-prev:hover,
.control-next:hover {
  color: #fff;
}

.control-dots {
  display: flex;
  gap: 8px;
}

.control-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #e0e0e0;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.control-dot.active {
  background: #e0e0e0;
  width: 24px;
  border-radius: 5px;
}

.control-dot:hover {
  background: #999;
}

/* Responsive */
@media (max-width: 768px) {
  .testimonial {
    padding: 50px 20px 20px;
    min-height: auto;
  }

  .testimonial-content {
    padding: 20px 15px;
  }

  .testimonial-image {
    width: 80px;
    height: 80px;
  }

  .testimonial-name {
    margin-top: 45px;
    font-size: 1.1em;
  }

  .testimonial-quote {
    font-size: 0.9em;
  }

  .control-prev,
  .control-next {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .testimonial {
    padding: 40px 15px 15px;
  }

  .testimonial-content {
    padding: 15px 10px;
    border-radius: 16px;
  }

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

  .testimonial-name {
    margin-top: 40px;
    font-size: 1em;
  }

  .testimonial-title {
    font-size: 0.85em;
  }

  .testimonial-quote {
    font-size: 0.85em;
    margin-top: 10px;
  }

  .testimonials-controls {
    gap: 12px;
    margin-top: 15px;
  }

  .control-prev,
  .control-next {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .control-dot {
    width: 8px;
    height: 8px;
  }

  .control-dot.active {
    width: 20px;
  }
}
