.testimonial-slider-widget {
  padding: 60px 0;
  overflow: hidden;
  width: 100%;
  position: relative;
}

.testimonial-container {
  width: 100%;
  position: relative;
}

/* Header Styles */
.testimonial-header {
  text-align: center;
  margin-bottom: 60px;
  padding: 0 20px;
}

.trustpilot-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.excellent-badge {
  background-color: #10b981;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 16px;
  color: #6b7280;
}

.star.filled {
  color: #10b981;
}

.rating-number {
  font-weight: 600;
  color: white;
}

.trustpilot-text {
  color: white;
  font-size: 14px;
}

.main-heading {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.2;
}

.sub-text {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Desktop - Infinite Scroll Rows */
.testimonial-rows-desktop {
  display: block;
}

.testimonial-row {
  margin-bottom: 30px;
  overflow: hidden;
  width: 100%;
  position: relative;
}

.testimonial-track {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
}

.first-row .testimonial-track {
  animation: scroll-left var(--animation-speed, 30s) linear infinite;
}

.second-row .testimonial-track {
  animation: scroll-right var(--animation-speed, 30s) linear infinite;
}

/* Mobile - Single Slider */
.testimonial-slider-mobile {
  display: none;
  position: relative;
  width: 100%;
  padding: 0 20px;
}

.mobile-slider-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.mobile-slider-track {
  display: flex;
  transition: transform 0.3s ease-in-out;
  width: 100%;
}

.mobile-slide {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

/* Pagination Dots */
.slider-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-dot.active {
  background-color: #10b981;
  transform: scale(1.2);
}

/* Testimonial Cards */
.testimonial-card {
  width: clamp(280px, 25vw, 350px);
  min-width: 280px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid #374151;
  box-sizing: border-box;
}

.card-content {
  padding: 24px;
}

.rating {
  margin-bottom: 16px;
}

.testimonial-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
}

.testimonial-content {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0.9;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-weight: 500;
  font-size: 14px;
  margin: 0 0 4px 0;
}

.author-date {
  font-size: 12px;
  margin: 0;
  opacity: 0.7;
}

/* Animations for Desktop */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% / 3));
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(calc(-100% / 3));
  }
  100% {
    transform: translateX(0);
  }
}

/* Pause on hover */
.testimonial-slider-widget[data-pause-hover="yes"] .testimonial-track:hover {
  animation-play-state: paused;
}

/* Full-width container support */
.elementor-section-full_width .testimonial-slider-widget,
.elementor-section-boxed .testimonial-slider-widget {
  width: 100%;
}

.elementor-container .testimonial-slider-widget {
  width: 100%;
}

.elementor-widget-testimonial_slider {
  width: 100%;
}

.elementor-widget-testimonial_slider .elementor-widget-container {
  width: 100%;
  overflow: hidden;
}

/* Mobile Responsive - Switch to Single Slider */
@media (max-width: 768px) {
  .testimonial-slider-widget {
    padding: 40px 0;
  }

  .testimonial-header {
    padding: 0 15px;
    margin-bottom: 40px;
  }

  /* Hide desktop infinite scroll */
  .testimonial-rows-desktop {
    display: none;
  }

  /* Show mobile slider */
  .testimonial-slider-mobile {
    display: block;
  }

  .testimonial-card {
    width: 100%;
    max-width: 400px;
    min-width: unset;
  }

  .trustpilot-rating {
    gap: 8px;
  }
}

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

  .card-content {
    padding: 20px;
  }
}

/* Smooth performance */
.testimonial-track,
.mobile-slider-track {
  backface-visibility: hidden;
  perspective: 1000px;
  transform: translateZ(0);
}

/* Touch support for mobile slider */
.mobile-slider-container {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
