/**
 * FAQ Modern Styles - Animaciones Ultra Atractivas
 * Diseño profesional y visualmente impactante
 */

/* Contenedor principal del FAQ */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Item individual del FAQ */
.faq-item {
  background: white;
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 2px solid transparent;
}

.faq-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #f5a425 0%, #f57f20 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.faq-item:hover::before {
  transform: scaleY(1);
}

.faq-item:hover {
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  transform: translateY(-5px);
}

.faq-item.active {
  background: linear-gradient(135deg, rgba(245,164,37,0.08) 0%, rgba(245,127,32,0.05) 100%);
  box-shadow: 0 15px 50px rgba(245,164,37,0.15), inset 0 0 0 2px #f5a425;
  border-color: #f5a425;
}

.faq-item.active::before {
  transform: scaleY(1);
}

/* Pregunta / Header */
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 30px;
  cursor: pointer;
  user-select: none;
  position: relative;
  background: transparent;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: rgba(245,164,37,0.03);
}

.faq-question h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #2c3e50;
  flex: 1;
  padding-right: 20px;
  transition: color 0.3s ease;
  line-height: 1.5;
}

.faq-item.active .faq-question h4 {
  color: #f5a425;
}

/* Ícono de expansión */
.faq-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, #f5a425 0%, #f57f20 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(245,164,37,0.3);
  position: relative;
  overflow: hidden;
}

.faq-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.faq-question:hover .faq-icon::before {
  width: 100%;
  height: 100%;
}

.faq-item.active .faq-icon {
  background: linear-gradient(135deg, #a4c639 0%, #8ab329 100%);
  box-shadow: 0 6px 20px rgba(164,198,57,0.4);
  transform: rotate(180deg);
}

/* Respuesta / Content */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.4s ease,
              padding 0.4s ease;
  opacity: 0;
  padding: 0 30px;
}

.faq-item.active .faq-answer {
  padding: 10px 30px 30px 30px;
  opacity: 1;
}

.faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  position: relative;
  padding-left: 25px;
}

.faq-answer p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #f5a425 0%, #f57f20 100%);
  border-radius: 50%;
  opacity: 0.7;
}

/* Efectos adicionales para las respuestas */
.faq-answer ul,
.faq-answer ol {
  margin: 15px 0;
  padding-left: 25px;
}

.faq-answer li {
  margin-bottom: 10px;
  color: #555;
  line-height: 1.7;
  position: relative;
  padding-left: 20px;
}

.faq-answer li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #a4c639;
  font-weight: bold;
  font-size: 16px;
}

/* Badge decorativo opcional */
.faq-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f5a425 0%, #f57f20 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(245,164,37,0.3);
}

/* Animación de entrada del badge */
@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 10px rgba(245,164,37,0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(245,164,37,0.5);
  }
}

.faq-badge {
  animation: badge-pulse 2s ease-in-out infinite;
}

/* Divisor decorativo entre pregunta y respuesta */
.faq-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #f5a425 50%, transparent 100%);
  margin: 0 30px;
  opacity: 0;
  transform: scaleX(0);
  transition: all 0.4s ease;
}

.faq-item.active .faq-divider {
  opacity: 1;
  transform: scaleX(1);
}

/* Responsive */
@media (max-width: 768px) {
  .faq-question {
    padding: 20px 18px;
  }

  .faq-question h4 {
    font-size: 16px;
  }

  .faq-answer {
    padding: 0 18px;
  }

  .faq-item.active .faq-answer {
    padding: 10px 18px 20px 18px;
  }

  .faq-icon {
    width: 35px;
    height: 35px;
    min-width: 35px;
    font-size: 16px;
  }

  .faq-answer p {
    font-size: 15px;
  }
}

/* Efecto de shimmer en hover */
.faq-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transition: left 0.5s;
  pointer-events: none;
}

.faq-item:hover::after {
  left: 100%;
}

/* Estado de carga / skeleton */
.faq-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 16px;
  height: 80px;
  margin-bottom: 20px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Icono de pregunta frecuente popular */
.faq-popular {
  position: relative;
}

.faq-popular::after {
  content: '🔥';
  position: absolute;
  top: 15px;
  right: 70px;
  font-size: 20px;
  animation: flame-flicker 1.5s ease-in-out infinite;
}

@keyframes flame-flicker {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-5px) scale(1.1);
    opacity: 0.8;
  }
}

/* Efecto de brillo en el borde del item activo */
.faq-item.active {
  position: relative;
  animation: glow-border 2s ease-in-out infinite;
}

@keyframes glow-border {
  0%, 100% {
    box-shadow: 0 15px 50px rgba(245,164,37,0.15), inset 0 0 0 2px #f5a425;
  }
  50% {
    box-shadow: 0 15px 50px rgba(245,164,37,0.25), inset 0 0 0 2px #f5a425, 0 0 20px rgba(245,164,37,0.3);
  }
}
