.testimonial-carousel-container {
  position: relative;
  overflow: hidden;
  padding: 30px 15px;
  margin: 0 auto;
  max-width: 1000px;
  width: 100%;
  box-sizing: border-box;
}

.testimonial-track {
  display: flex;
  transition: transform 0.4s ease-out;
  gap: 20px;
  padding: 20px 10px;
  will-change: transform;
  width: max-content;
  min-width: 100%;
}

.testimonial-card {
  background: var(--card-light, #ffffff);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(61, 99, 221, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 250px;
  flex-shrink: 0;
  box-sizing: border-box;
  min-width: 250px;
  transform-origin: center center;
  z-index: 1;
  opacity: 0.5;
  transform: scale(0.9);
}

.testimonial-card.active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 20px rgba(61, 99, 221, 0.15);
  z-index: 3;
}

.testimonial-card.prev,
.testimonial-card.next {
  opacity: 0.7;
  transform: scale(0.95);
  z-index: 2;
}

body.dark-theme .testimonial-card {
  background: var(--card-dark, #1e1e1e);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .testimonial-card.active {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(61, 99, 221, 0.25);
}

.testimonial-content {
  margin-bottom: 15px;
  position: relative;
  flex-grow: 1;
}

.testimonial-quote-icon {
  position: absolute;
  top: -8px;
  left: -5px;
  font-size: 40px;
  color: var(--primary-light, #8a9bff);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
  z-index: 0;
}

.testimonial-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--dark-text, #333);
  position: relative;
  z-index: 1;
  margin-top: 10px;
}

body.dark-theme .testimonial-text {
  color: var(--light-text, #f0f0f0);
}

/* Rating */
.testimonial-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
}

.rating-star {
  color: #ffd700;
  font-size: 14px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.testimonial-avatar-container {
  position: relative;
  width: 45px;
  height: 45px;
  flex-shrink: 0;
}

.testimonial-avatar-bg {
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  background: linear-gradient(
    135deg,
    var(--primary-color, #3d63dd),
    var(--primary-light, #8a9bff)
  );
  border-radius: 50%;
  opacity: 0.15;
}

.testimonial-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-light, #8a9bff);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.testimonial-card.active .testimonial-avatar {
  border-color: var(--primary-color, #3d63dd);
  transform: scale(1.05);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--dark-text, #333);
}

body.dark-theme .author-info h4 {
  color: var(--light-text, #f0f0f0);
}

.author-info p {
  font-size: 12px;
  color: var(--primary-color, #3d63dd);
  font-weight: 500;
}

/* Controls */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-light, #ffffff);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: var(--primary-color, #3d63dd);
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.carousel-btn:hover {
  background: var(--primary-color, #3d63dd);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61, 99, 221, 0.2);
}

body.dark-theme .carousel-btn {
  background: var(--card-dark, #1e1e1e);
  color: var(--primary-light, #8a9bff);
}

body.dark-theme .carousel-btn:hover {
  background: var(--primary-color, #3d63dd);
  color: white;
}

.carousel-indicators {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-light, #8a9bff);
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.5;
  border: none;
  padding: 0;
}

.indicator:hover {
  opacity: 0.8;
  transform: scale(1.2);
}

.indicator.active {
  opacity: 1;
  background: var(--primary-color, #3d63dd);
  transform: scale(1.2);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 0.5;
    transform: translateY(0);
  }
}

.testimonial-card {
  animation: fadeIn 0.3s ease forwards;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.15;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.2;
  }
}

@media (min-width: 769px) {
  .testimonial-carousel-container {
    padding: 40px 20px;
  }

  .testimonial-track {
    gap: 25px;
    padding: 25px 0;
  }

  .testimonial-card {
    min-height: 270px;
    padding: 25px;
  }

  .testimonial-text {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .testimonial-carousel-container {
    padding: 25px 10px;
  }

  .testimonial-track {
    gap: 15px;
    padding: 20px 10px;
  }

  .testimonial-card {
    min-height: 230px;
    padding: 18px;
    width: 85vw !important;
    max-width: 350px;
    margin: 0 auto;
  }

  .testimonial-text {
    font-size: 13px;
    line-height: 1.5;
  }

  .testimonial-author {
    gap: 10px;
  }

  .testimonial-avatar-container {
    width: 40px;
    height: 40px;
  }

  .testimonial-avatar {
    width: 40px;
    height: 40px;
  }

  .author-info h4 {
    font-size: 13px;
  }

  .carousel-controls {
    margin-top: 20px;
    gap: 12px;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .indicator {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 480px) {
  .testimonial-carousel-container {
    padding: 20px 8px;
  }

  .testimonial-track {
    gap: 12px;
    padding: 15px 8px;
  }

  .testimonial-card {
    min-height: 200px;
    padding: 16px;
    width: 90vw !important;
  }

  .testimonial-quote-icon {
    font-size: 32px;
    top: -6px;
  }

  .testimonial-text {
    font-size: 12px;
  }

  .testimonial-author {
    gap: 8px;
  }

  .testimonial-avatar-container {
    width: 35px;
    height: 35px;
  }

  .testimonial-avatar {
    width: 35px;
    height: 35px;
  }

  .carousel-btn {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
}

.carousel-btn:focus,
.indicator:focus {
  outline: 2px solid var(--primary-color, #3d63dd);
  outline-offset: 2px;
}
