/**
 * FAQ Module Styles
 * Estilos modernos para el módulo de Preguntas Frecuentes
 */

/* Contenedor principal */
#faq {
  margin: 40px 0;
  padding: 30px 0;
}

#faq .docs-heading {
  margin-bottom: 30px;
  color: #2d3748;
  font-size: 32px;
  font-weight: 600;
  border-bottom: 3px solid #de007e;
  padding-bottom: 15px;
}

/* Herramientas de búsqueda y filtro */
#faqTools {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

#faqSearch {
  flex: 1;
  min-width: 250px;
  padding: 12px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
}

#faqSearch:focus {
  outline: none;
  border-color: #de007e;
  box-shadow: 0 0 0 3px rgba(222, 0, 126, 0.1);
}

#faqFilterCategoria {
  padding: 12px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

#faqFilterCategoria:focus {
  outline: none;
  border-color: #de007e;
  box-shadow: 0 0 0 3px rgba(222, 0, 126, 0.1);
}

/* Contenedor de FAQs */
#faqContainer {
  margin-bottom: 30px;
}

/* Sección de categoría */
.faq-category-section {
  margin-bottom: 40px;
}

.faq-category-title {
  font-size: 24px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

/* Tarjeta de FAQ */
.faq-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.25s ease;
  border: 1px solid #e2e8f0;
}

.faq-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Header de la tarjeta */
.faq-card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  cursor: pointer;
  user-select: none;
  background: #f8f9fa;
  transition: background 0.2s ease;
}

.faq-card-header:hover {
  background: #f1f3f5;
}

.faq-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.faq-card-title {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  line-height: 1.4;
}

.faq-toggle {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.faq-toggle:hover {
  background: rgba(222, 0, 126, 0.1);
  color: #de007e;
}

.faq-toggle i {
  transition: transform 0.3s ease;
}

/* Descripción */
.faq-description {
  padding: 0 20px 15px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

/* Contenido del accordion */
.faq-card-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 0 20px;
}

.faq-card-content.active {
  max-height: 5000px;
  opacity: 1;
  padding: 0 20px 20px;
}

.faq-explanation {
  margin: 15px 0;
  padding: 15px;
  background: #f8f9fa;
  border-left: 4px solid #de007e;
  border-radius: 4px;
  color: #2d3748;
  font-size: 14px;
  line-height: 1.6;
}

/* Toggle JSON/XML */
.faq-code-toggle {
  display: flex;
  gap: 10px;
  margin: 20px 0 15px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
}

.faq-code-btn {
  padding: 8px 20px;
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s ease;
}

.faq-code-btn:hover {
  border-color: #de007e;
  color: #de007e;
}

.faq-code-btn.active {
  background: #de007e;
  border-color: #de007e;
  color: #fff;
}

/* Contenedor de código */
.faq-code-container {
  position: relative;
  margin-top: 10px;
}

.faq-code-block {
  display: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.faq-code-block.active {
  display: block;
}

.faq-code-block code {
  display: block;
  padding: 15px;
  background: #1e293b;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Paginación */
#faqPagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 40px;
  padding: 20px 0;
}

.faq-pagination-btn {
  padding: 10px 20px;
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
  transition: all 0.2s ease;
}

.faq-pagination-btn:hover:not(:disabled) {
  border-color: #de007e;
  background: #de007e;
  color: #fff;
}

.faq-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.faq-pagination-info {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}


/* Responsive */
@media (max-width: 768px) {
  #faqTools {
    flex-direction: column;
  }

  #faqSearch,
  #faqFilterCategoria {
    width: 100%;
    min-width: auto;
  }

  .faq-card-header {
    flex-wrap: wrap;
  }

  .faq-card-title {
    font-size: 16px;
  }

  .faq-code-toggle {
    flex-direction: column;
  }

  .faq-code-btn {
    width: 100%;
  }
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-card {
  animation: fadeInUp 0.3s ease forwards;
}

/* Mejoras de accesibilidad */
.faq-card-header:focus {
  outline: 2px solid #de007e;
  outline-offset: 2px;
}

.faq-toggle:focus {
  outline: 2px solid #de007e;
  outline-offset: 2px;
}

/* Scroll suave para categorías */
html {
  scroll-behavior: smooth;
}

/* Sin resultados */
.faq-no-results {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.faq-no-results p {
  font-size: 16px;
  margin: 0;
}

