/* ============ REVIEWS SECTION - CSS MODERNO ============ */
#reviews {
  padding: 80px 20px;
  background: linear-gradient(135deg, #0a1a2f 0%, #102542 100%);
  position: relative;
  overflow: hidden;
}

/* Efecto de partículas sutiles */
#reviews::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(77, 168, 218, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

#reviews h2 {
  text-align: center;
  font-size: 2.8rem;
  color: white;
  margin-bottom: 60px;
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 20px;
}

#reviews h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #4da8da, #2a7bb6);
  border-radius: 2px;
}

/* Contenedor del carousel */
.carousel {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  padding: 0 60px;
  overflow: hidden;
}

/* Track del carousel */
.track {
  display: flex;
  gap: 30px;
  animation: scrollReviews 40s linear infinite;
  padding: 10px 0;
  will-change: transform;
}

/* Pausar animación en hover */
.track:hover {
  animation-play-state: paused;
}

/* Estilos de cada review */
.review {
  flex: 0 0 380px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 35px;
  text-decoration: none;
  color: white;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

/* Efecto de brillo al hover */
.review::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.7s ease;
}

.review:hover::before {
  left: 100%;
}

.review:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(77, 168, 218, 0.3);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(77, 168, 218, 0.1);
}

/* Avatar */
.avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid rgba(77, 168, 218, 0.3);
  transition: all 0.3s ease;
}

.review:hover .avatar {
  border-color: #4da8da;
  transform: scale(1.1);
}

/* Estrellas */
.stars {
  color: #FFD700;
  font-size: 1.4rem;
  letter-spacing: 2px;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

/* Texto de la reseña */
.review p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 25px;
  flex-grow: 1;
  font-weight: 300;
}

/* Nombre del autor */
.review strong {
  font-size: 1.1rem;
  color: white;
  position: relative;
  padding-left: 25px;
  display: block;
}

.review strong::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #4da8da;
  font-weight: bold;
}

/* Animación del scroll */
@keyframes scrollReviews {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-380px * 5 - 30px * 5));
  }
}

/* Botones de navegación (opcional) */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: all;
  backdrop-filter: blur(5px);
}

.carousel-btn:hover {
  background: rgba(77, 168, 218, 0.3);
  border-color: #4da8da;
  transform: scale(1.1);
}

.carousel-btn:active {
  transform: scale(0.95);
}

/* Indicadores de progreso */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: #4da8da;
  transform: scale(1.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .carousel {
    padding: 0 40px;
  }
  
  .review {
    flex: 0 0 350px;
  }
  
  @keyframes scrollReviews {
    100% {
      transform: translateX(calc(-350px * 5 - 30px * 5));
    }
  }
}

@media (max-width: 768px) {
  #reviews {
    padding: 60px 15px;
  }
  
  #reviews h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
  }
  
  .carousel {
    padding: 0 20px;
  }
  
  .review {
    flex: 0 0 300px;
    padding: 25px;
    min-height: 280px;
  }
  
  .avatar {
    width: 60px;
    height: 60px;
  }
  
  .stars {
    font-size: 1.2rem;
  }
  
  .review p {
    font-size: 1rem;
  }
  
  @keyframes scrollReviews {
    100% {
      transform: translateX(calc(-300px * 5 - 30px * 5));
    }
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  #reviews h2 {
    font-size: 1.8rem;
  }
  
  .review {
    flex: 0 0 280px;
    padding: 20px;
  }
  
  @keyframes scrollReviews {
    100% {
      transform: translateX(calc(-280px * 5 - 30px * 5));
    }
  }
}

/* Efecto de gradiente en los bordes del carousel */
.carousel::before,
.carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.carousel::before {
  left: 0;
  background: linear-gradient(90deg, #0a1a2f 0%, transparent 100%);
}

.carousel::after {
  right: 0;
  background: linear-gradient(270deg, #0a1a2f 0%, transparent 100%);
}

/* Versión con controles interactivos (opcional) */
.review-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.control-btn {
  padding: 12px 30px;
  background: rgba(77, 168, 218, 0.2);
  border: 2px solid #4da8da;
  color: white;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.control-btn:hover {
  background: #4da8da;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(77, 168, 218, 0.3);
}

/* Animación para nuevas reseñas */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.review {
  animation: fadeInUp 0.6s ease-out backwards;
}

/* Retraso escalonado para las animaciones */
.review:nth-child(1) { animation-delay: 0.1s; }
.review:nth-child(2) { animation-delay: 0.2s; }
.review:nth-child(3) { animation-delay: 0.3s; }
.review:nth-child(4) { animation-delay: 0.4s; }
.review:nth-child(5) { animation-delay: 0.5s; }
.review:nth-child(6) { animation-delay: 0.6s; }
.review:nth-child(7) { animation-delay: 0.7s; }
.review:nth-child(8) { animation-delay: 0.8s; }
.review:nth-child(9) { animation-delay: 0.9s; }
.review:nth-child(10) { animation-delay: 1s; }

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  #reviews {
    background: linear-gradient(135deg, #0c0f1a 0%, #1a1a2e 100%);
  }
  
  .carousel::before,
  .carousel::after {
    background: linear-gradient(90deg, #0c0f1a 0%, transparent 100%);
  }
  
  .carousel::after {
    background: linear-gradient(270deg, #0c0f1a 0%, transparent 100%);
  }
}

/* Efecto de pulso sutil en las reseñas */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 0 15px 40px rgba(77, 168, 218, 0.15); }
}

.review {
  animation: 
    fadeInUp 0.6s ease-out backwards,
    pulseGlow 3s ease-in-out infinite;
}

/* Ajuste para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .review:hover {
    transform: none;
  }
  
  .track:hover {
    animation-play-state: running;
  }
  
  .carousel-btn {
    width: 60px;
    height: 60px;
    background: rgba(77, 168, 218, 0.3);
  }
}