/*
 * FAQ Styling
 * Estilos para la sección de preguntas frecuentes
 */

/* Contenedor principal de FAQs */
.faqs-container {
  margin-bottom: 60px;
}

.faqs-container .section-title {
  margin-bottom: 40px;
  text-align: center;
}

.faqs-container .section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.faqs-container .section-title h2:after {
  content: '';
  position: absolute;
  width: 70%;
  height: 2px;
  background: #001a57;
  left: 15%;
  bottom: 0;
}

.faqs-container .section-title p {
  max-width: 700px;
  margin: 15px auto 0;
  color: rgba(35, 35, 35, 0.85);
}

/* Barra de búsqueda */
.faqs-container .faq-search {
  margin-bottom: 30px;
  position: relative;
}

.faqs-container .faq-search input[type="search"] {
  width: 100%;
  padding: 12px 50px 12px 20px;
  border: 1px solid #e6e6e6;
  border-radius: 30px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.faqs-container .faq-search input[type="search"]:focus {
  border-color: #001a57;
  box-shadow: 0 0 0 3px rgba(0, 26, 87, 0.1);
  outline: none;
}

.faqs-container .faq-search button {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(35, 35, 35, 0.5);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.faqs-container .faq-search button:hover {
  color: #001a57;
}

/* Navegación por pestañas */
.faqs-container .faq-tabs {
  margin-bottom: 30px;
  border-bottom: 2px solid #e6e6e6;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.faqs-container .faq-tab {
  padding: 12px 20px;
  margin: 0 5px -2px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: #232323;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  outline: none;
}

.faqs-container .faq-tab:hover {
  color: #0056b3;
}

.faqs-container .faq-tab.active {
  border-bottom: 2px solid #001a57;
  color: #001a57;
}

.faqs-container .faq-tab .count {
  display: inline-block;
  background-color: rgba(0, 26, 87, 0.1);
  color: #001a57;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 6px;
  min-width: 25px;
  text-align: center;
}

@media (max-width: 767px) {
  .faqs-container .faq-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 5px;
  }

  .faqs-container .faq-tabs::-webkit-scrollbar {
    height: 3px;
  }

  .faqs-container .faq-tabs::-webkit-scrollbar-thumb {
    background-color: rgba(0, 26, 87, 0.3);
    border-radius: 3px;
  }

  .faqs-container .faq-tab {
    white-space: nowrap;
    flex: 0 0 auto;
  }
}

/* Paneles de contenido */
.faqs-container .faq-tab-content {
  display: none;
}

.faqs-container .faq-tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* Grupo de Acordeón */
.faqs-container .faq-accordion {
  border-top: 1px solid #e6e6e6;
}

/* Elemento individual */
.faqs-container details.faq-item {
  border-bottom: 1px solid #e6e6e6;
  margin-bottom: 0;
  transition: background-color 0.3s ease;
}

.faqs-container details.faq-item:hover {
  background-color: rgba(0, 26, 87, 0.02);
}

.faqs-container details.faq-item summary {
  padding: 20px 50px 20px 20px;
  font-weight: 600;
  color: #232323;
  position: relative;
  cursor: pointer;
  list-style: none;
  outline: none;
}

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

.faqs-container details.faq-item summary:after {
  content: "\f107";
  font-family: 'Font Awesome 5 Free', sans-serif;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #001a57;
  font-size: 18px;
  font-weight: 900;
  transition: transform 0.3s ease;
}

.faqs-container details.faq-item summary:hover {
  color: #001a57;
}

.faqs-container details.faq-item[open] {
  background-color: rgba(0, 26, 87, 0.05);
}

.faqs-container details.faq-item[open] summary:after {
  transform: translateY(-50%) rotate(180deg);
}

.faqs-container details.faq-item .details-wrapper {
  padding: 0 20px 20px;
}

.faqs-container details.faq-item .details-wrapper p {
  margin-top: 0;
  color: rgba(35, 35, 35, 0.85);
}

.faqs-container details.faq-item .details-wrapper ul,
.faqs-container details.faq-item .details-wrapper ol {
  padding-left: 20px;
}

.faqs-container details.faq-item .details-wrapper li {
  margin-bottom: 10px;
}

.faqs-container details.faq-item .details-wrapper li:last-child {
  margin-bottom: 0;
}

/* Estilos para resultados de búsqueda */
.faqs-container .faq-search-results {
  display: none;
  margin-top: 30px;
}

.faqs-container .faq-search-results.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.faqs-container .faq-search-results .search-status {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 500;
}

.faqs-container .faq-search-results .search-status .search-term {
  color: #001a57;
  font-weight: 600;
}

.faqs-container .faq-search-results .search-status .result-count {
  font-weight: 600;
}

.faqs-container .faq-search-results .no-results {
  text-align: center;
  padding: 30px;
  background-color: rgba(230, 230, 230, 0.2);
  border-radius: 5px;
}

.faqs-container .faq-search-results .no-results h3 {
  color: #232323;
  margin-bottom: 15px;
}

.faqs-container .faq-search-results .no-results p {
  max-width: 500px;
  margin: 0 auto;
  color: rgba(35, 35, 35, 0.7);
}

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