/* Testimonials Carousel Styles for Sparky4u Electric */
/* Auto-scrolling marquee effect with pause on hover */

.testimonials-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 60px 0;
  overflow: hidden;
  position: relative;
}

.testimonials-section::before,
.testimonials-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 10;
  pointer-events: none;
}

.testimonials-section::before {
  left: 0;
  background: linear-gradient(to right, #f8f9fa, transparent);
}

.testimonials-section::after {
  right: 0;
  background: linear-gradient(to left, #f8f9fa, transparent);
}

.testimonials-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.testimonials-header h2 {
  font-family: 'Poppins', 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 10px;
  line-height: 1.3;
}

.testimonials-header .subtitle {
  font-size: 16px;
  color: #6c757d;
  font-family: 'Source Sans Pro', sans-serif;
}

.testimonials-track {
  display: flex;
  animation: scroll 40s linear infinite;
  width: max-content;
}

.testimonials-section:hover .testimonials-track {
  animation-play-state: paused;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.testimonial-card {
  flex: 0 0 auto;
  width: 350px;
  margin: 0 15px;
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.testimonial-card .stars {
  color: #ffc107;
  font-size: 18px;
  margin-bottom: 15px;
  letter-spacing: 2px;
}

.testimonial-card .review-text {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 15px;
  font-style: italic;
  position: relative;
  padding-left: 20px;
}

.testimonial-card .review-text::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -5px;
  font-size: 40px;
  color: #007bff;
  opacity: 0.3;
  font-family: Georgia, serif;
}

.testimonial-card .reviewer {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #6c757d;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.testimonial-card .reviewer::before {
  content: '—';
  color: #007bff;
}

/* Google Maps link */
.testimonials-cta {
  text-align: center;
  margin-top: 40px;
  padding: 0 20px;
}

.testimonials-cta a {
  display: inline-block;
  background: #007bff;
  color: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.testimonials-cta a:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.testimonials-cta a svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  width: 18px;
  height: 18px;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .testimonials-section {
    padding: 40px 0;
  }
  
  .testimonials-section::before,
  .testimonials-section::after {
    width: 40px;
  }
  
  .testimonials-header h2 {
    font-size: 22px;
  }
  
  .testimonial-card {
    width: 300px;
    padding: 20px;
    margin: 0 10px;
  }
  
  .testimonial-card .review-text {
    font-size: 15px;
  }
  
  .testimonials-track {
    animation-duration: 35s;
  }
}

@media screen and (max-width: 480px) {
  .testimonials-section::before,
  .testimonials-section::after {
    display: none;
  }
  
  .testimonials-header h2 {
    font-size: 20px;
  }
  
  .testimonial-card {
    width: 280px;
    padding: 18px;
  }
  
  .testimonials-track {
    animation-duration: 30s;
  }
  
  .testimonials-cta a {
    padding: 10px 24px;
    font-size: 14px;
  }
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .testimonials-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .testimonial-card {
    margin: 10px;
  }
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}