/* ==================== ESTILOS FAQ - PREGUNTAS FRECUENTES ==================== */
/* Diseño Premium con las mejores prácticas de UI/UX */

/* Hero Section - Impresionante */
.hero-faq {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-faq::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

.hero-faq::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, -30px) rotate(180deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-faq h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInDown 1s ease;
  letter-spacing: -0.02em;
}

.hero-faq p {
  font-size: 1.5rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  animation: fadeInUp 1s ease 0.2s both;
  font-weight: 300;
}

/* Content Section - Optimizado */
.seccion-contenido {
  padding: 4rem 0;
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.contenido-principal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.faq-container {
  background: white;
  padding: 3rem;
  border-radius: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* Búsqueda FAQ - Premium */
.busqueda-faq {
  margin-bottom: 3rem;
}

.busqueda-input {
  width: 100%;
  padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  border: 3px solid var(--gray-300);
  border-radius: 2rem;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
}

.busqueda-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1), 0 8px 25px rgba(46, 125, 50, 0.15);
  transform: translateY(-2px);
}

.busqueda-input::placeholder {
  color: var(--gray-500);
  font-weight: 500;
}

/* Categorías FAQ - Diseño Moderno */
.categorias-faq {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.categoria-btn {
  padding: 0.875rem 2rem;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.categoria-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.categoria-btn:hover::before {
  left: 100%;
}

.categoria-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.2);
}

.categoria-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-dark);
  color: white;
  box-shadow: 0 6px 25px rgba(46, 125, 50, 0.3);
  transform: translateY(-2px);
}

/* FAQ List - Accordion Premium */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.faq-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 8px 30px rgba(46, 125, 50, 0.15);
  transform: translateY(-2px);
}

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

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(46, 125, 50, 0.2);
}

.faq-item[open]::before {
  transform: scaleX(1);
}

.faq-item summary {
  padding: 1.75rem 2rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s ease;
  user-select: none;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.faq-item[open] summary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.faq-item summary .pregunta {
  flex: 1;
  line-height: 1.5;
}

.faq-item summary .icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 125, 50, 0.1);
  color: var(--primary);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 300;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.faq-item[open] summary .icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: rotate(45deg);
}

.faq-item .respuesta {
  padding: 0 2rem 2rem 2rem;
  font-size: 1.063rem;
  color: var(--gray-700);
  line-height: 1.9;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-item .respuesta p {
  margin-bottom: 1.25rem;
}

.faq-item .respuesta p:last-child {
  margin-bottom: 0;
}

.faq-item .respuesta ul,
.faq-item .respuesta ol {
  margin-left: 2rem;
  margin-bottom: 1.25rem;
  padding-left: 0.5rem;
}

.faq-item .respuesta li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

.faq-item .respuesta strong {
  color: var(--primary);
  font-weight: 700;
}

.faq-item .respuesta a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.faq-item .respuesta a:hover {
  border-bottom-color: var(--primary);
}

/* Contacto Adicional Section */
.contacto-adicional {
  margin-top: 5rem;
  padding: 3rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 2rem;
  color: white;
  box-shadow: 0 15px 50px rgba(46, 125, 50, 0.3);
}

.contacto-adicional h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  text-align: center;
}

.contacto-adicional > p {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2.5rem;
  text-align: center;
  color: white;
}

.contacto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.contacto-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 1.25rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.contacto-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.contacto-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contacto-item {
  font-size: 1.125rem;
  color: white;
  font-weight: 500;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .contacto-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-faq {
    padding: 4rem 0 3rem;
  }

  .hero-faq h1 {
    font-size: 2.5rem;
  }

  .hero-faq p {
    font-size: 1.25rem;
  }

  .seccion-contenido {
    padding: 3rem 0;
  }

  .contenido-principal {
    padding: 0 1rem;
  }

  .faq-container {
    padding: 2rem 1.5rem;
  }

  .categorias-faq {
    flex-direction: column;
    padding: 1.5rem;
  }

  .categoria-btn {
    width: 100%;
    text-align: center;
  }

  .faq-item summary {
    padding: 1.5rem 1.5rem;
    font-size: 1.125rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .faq-item summary .icon {
    align-self: flex-end;
  }

  .faq-item .respuesta {
    padding: 0 1.5rem 1.5rem 1.5rem;
  }

  .contacto-adicional {
    padding: 2.5rem 1.5rem;
  }

  .contacto-adicional h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-faq h1 {
    font-size: 2rem;
  }

  .faq-container {
    padding: 1.5rem 1rem;
  }

  .busqueda-input {
    padding: 1rem 1.25rem 1rem 3rem;
    font-size: 1rem;
  }

  .faq-item summary {
    padding: 1.25rem 1.25rem;
    font-size: 1rem;
  }

  .faq-item .respuesta {
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: 1rem;
  }

  .contacto-adicional {
    padding: 2rem 1rem;
  }

  .contacto-adicional h2 {
    font-size: 1.75rem;
  }
}

/* Optimización para pantallas grandes */
@media (min-width: 1600px) {
  .contenido-principal {
    max-width: 1400px;
  }

  .faq-item summary {
    padding: 2rem 2.5rem;
  }

  .faq-item .respuesta {
    padding: 0 2.5rem 2.5rem 2.5rem;
  }
}

/* Asegurar que el hero content tenga el container correcto */
.hero-faq .hero-content.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Efectos adicionales para mejor UX */
.faq-item summary:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.faq-item summary:focus:not(:focus-visible) {
  outline: none;
}

/* Estilo para el input de búsqueda con icono */
.busqueda-faq {
  position: relative;
}

.busqueda-faq::before {
  content: "🔍";
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  z-index: 1;
  pointer-events: none;
}

/* Mejora visual para categorías activas */
.categoria-btn.active::after {
  content: "✓";
  margin-left: 0.5rem;
  font-weight: 700;
}

/* Animación suave para cuando se abre un FAQ */
.faq-item[open] .respuesta {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
