/* ================================================================
   TESTIMONIALS SECTION — Animated Carousel
   ================================================================ */

.testimonials-section {
  position: relative;
  overflow: hidden;
  padding: 4rem 1rem;
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .testimonials-section {
    padding: 8rem 1.5rem;
  }
}

.testimonials-container {
  width: 100%;
  max-width: 1200px;
}

/* Header Section */
.testimonials-header {
  text-align: center;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.testimonials-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .testimonials-header h2 {
    font-size: 2.25rem;
  }
}

@media (min-width: 768px) {
  .testimonials-header h2 {
    font-size: 3rem;
  }
}

.testimonials-header p {
  color: var(--text-muted, #666);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Main Grid */
.testimonials-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr auto;
    gap: 3.5rem;
  }
}

/* Testimonial Cards Container */
.testimonials-cards {
  position: relative;
  height: 320px;
}

@media (min-width: 768px) {
  .testimonials-cards {
    height: 280px;
  }
}

/* Quote icon */
.quote-icon {
  position: absolute;
  top: -24px;
  left: -24px;
  z-index: 10;
  opacity: 0.2;
  width: 48px;
  height: 48px;
  color: var(--primary, #6096ba);
}

/* Individual Testimonial Card */
.testimonial-card {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  border-radius: 0.5rem;
  background: var(--card-bg, #e7ecef);
  padding: 1.5rem;
  transition: all 0.5s ease-in-out;
  opacity: 0;
  transform: translateX(100px);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .testimonial-card {
    padding: 2rem;
  }
}

.testimonial-card.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.testimonial-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0;
}

.testimonial-avatar {
  display: none;
}

.testimonial-info {
  text-align: left;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--text-muted, #666);
}

/* Rating Stars */
.testimonial-rating {
  display: flex;
  gap: 0.25rem;
}

.star {
  width: 16px;
  height: 16px;
  fill: #fbbf24;
  color: #fbbf24;
  flex-shrink: 0;
}

/* Separator */
.testimonial-separator {
  height: 1px;
  background: var(--border, rgba(0, 0, 0, 0.1));
  margin: 1rem 0;
}

/* Testimonial Content */
.testimonial-content {
  flex: 1;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary, #333);
  margin-bottom: 1rem;
}

/* Verified Badge */
.testimonial-badge {
  font-size: 0.75rem;
  color: var(--text-muted, #666);
  text-align: right;
}

/* Navigation Controls */
.testimonials-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

@media (min-width: 768px) {
  .testimonials-nav {
    flex-direction: column;
    gap: 1rem;
    margin-top: 0;
  }
}

/* Nav Buttons */
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  background: var(--button-bg, #e7ecef);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary, #333);
  flex-shrink: 0;
}

.nav-button:hover {
  background: var(--primary, #6096ba);
  color: #ffffff;
  border-color: var(--primary, #6096ba);
  transform: translateY(-2px);
}

.nav-button svg {
  width: 16px;
  height: 16px;
}

/* Dots Indicator */
.testimonials-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .testimonials-dots {
    flex-direction: column;
  }
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active {
  background: var(--primary, #6096ba);
}

.dot:hover {
  background: var(--primary-hover, #2563eb);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .testimonial-card {
    background: var(--card-bg-dark, #1a1a1a);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .testimonial-name,
  .testimonial-content {
    color: var(--text-primary-dark, #ffffff);
  }

  .testimonial-role,
  .testimonial-badge,
  .testimonials-header p {
    color: var(--text-muted-dark, #999);
  }

  .nav-button {
    background: var(--button-bg-dark, #2a2a2a);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary-dark, #ffffff);
  }

  .nav-button:hover {
    background: var(--primary, #6096ba);
    color: #ffffff;
  }

  .dot {
    background: rgba(255, 255, 255, 0.2);
  }
}
