/* File: /public/assets/css/pages/footer-preguntas-frecuentes.css */

html,
body {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.footer-preguntas-frecuentes-main {
  flex: 1 0 auto;
  min-height: calc(100vh - 220px);
}

.site-footer {
  margin-top: auto;
}

/* ===== SECCIÓN ===== */

.footer-preguntas-frecuentes-section {
  padding: 4rem 0 6rem;
}

.footer-preguntas-frecuentes-card {
  padding: 2.6rem;
  background-color: var(--color-tarjeta);
  border: 1px solid var(--color-borde-1);
  border-radius: var(--border-radius-12);
  box-shadow: var(--sombra-base);
}

/* ===== AVISO ===== */

.footer-preguntas-frecuentes-priority {
  margin: 0 0 2.2rem 0;
  padding: 1rem 1.3rem;
  background-color: #fffbeb;
  border: 1px solid #f4e7b5;
  border-left: 4px solid var(--color-advertencia);
  border-radius: var(--border-radius-10);
  font-size: var(--texto-12);
  font-weight: 800;
  color: #7c5a03;
  text-transform: uppercase;
}

/* ===== HEADER ===== */

.footer-preguntas-frecuentes-header {
  padding-bottom: 2.4rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid var(--color-borde-1);
}

.footer-preguntas-frecuentes-title {
  margin: 0;
  font-size: var(--texto-32);
  font-weight: 700;
  color: var(--color-texto-principal);
}

/* ===== LISTADO FAQ ===== */

.footer-preguntas-frecuentes-list {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.footer-preguntas-frecuentes-item {
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--color-borde-1);
}

.footer-preguntas-frecuentes-item:last-child {
  border-bottom: none;
}

/* Pregunta */
.footer-preguntas-frecuentes-item h2 {
  margin: 0 0 0.6rem 0;
  font-size: var(--texto-18);
  font-weight: 700;
  color: var(--color-acento);
  line-height: 1.4;
}

/* Respuesta */
.footer-preguntas-frecuentes-item p {
  margin: 0;
  font-size: var(--texto-15);
  line-height: 1.7;
  color: var(--color-texto-secundario);
}

/* ===== BLOQUE FINAL CONTACTO ===== */

.footer-preguntas-frecuentes-closing {
  margin-top: 2.4rem;
  padding: 1.6rem 1.8rem;
  background-color: #f4f7f6;
  border-left: 4px solid var(--color-acento);
  border-radius: var(--border-radius-10);
}

.footer-preguntas-frecuentes-closing p {
  margin: 0 0 1rem 0;
  font-weight: 600;
  color: var(--color-texto-principal);
}

.footer-preguntas-frecuentes-contact {
  display: grid;
  gap: 1.4rem;
}

.footer-preguntas-frecuentes-contact a {
  color: var(--color-acento);
  text-decoration: none;
}

.footer-preguntas-frecuentes-contact a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .footer-preguntas-frecuentes-section {
    padding: 3rem 0 4rem;
  }

  .footer-preguntas-frecuentes-card {
    padding: 1.6rem;
  }

  .footer-preguntas-frecuentes-title {
    font-size: var(--texto-24);
  }

  .footer-preguntas-frecuentes-item h2 {
    font-size: var(--texto-16);
  }

  .footer-preguntas-frecuentes-item p {
    font-size: var(--texto-14);
  }
}

@media (max-width: 480px) {
  .footer-preguntas-frecuentes-card {
    padding: 1.3rem;
  }

  .footer-preguntas-frecuentes-item {
    padding-bottom: 1.4rem;
  }

  .footer-preguntas-frecuentes-closing {
    padding: 1.3rem;
  }
}

/* ===== FAQ ACCORDION ===== */

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;

  font-size: var(--texto-18);
  font-weight: 700;
  color: var(--color-acento);

  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Flecha */
.faq-question::after {
  content: "+";
  font-size: 20px;
  transition: transform 0.2s ease;
}

/* Activo */
.faq-item-open .faq-question::after {
  content: "−";
}

/* Respuesta oculta */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

/* Texto respuesta */
.faq-answer p {
  margin-top: 0.6rem;
  font-size: var(--texto-15);
  line-height: 1.7;
  color: var(--color-texto-secundario);
}

/* Abierto */
.faq-item-open .faq-answer {
  max-height: 300px;
}

/* ===== TÍTULOS DE BLOQUE FAQ ===== */

.faq-section-title {
  margin: 2.4rem 0 0.4rem;
  padding: 1rem 1.2rem;
  background-color: #f4f7f6;
  border-left: 4px solid var(--color-acento);
  border-radius: var(--border-radius-10);
  font-size: var(--texto-20);
  font-weight: 800;
  color: var(--color-texto-principal);
}

.footer-preguntas-frecuentes-list .faq-section-title:first-child {
  margin-top: 0;
}

/* ===== LISTAS DENTRO DE RESPUESTAS ===== */

.faq-answer ul {
  margin: 0.8rem 0 0;
  padding-left: 1.8rem;
}

.faq-answer li {
  margin-bottom: 0.45rem;
  font-size: var(--texto-15);
  line-height: 1.65;
  color: var(--color-texto-secundario);
}

.faq-answer li:last-child {
  margin-bottom: 0;
}

.faq-answer li::marker {
  color: var(--color-acento);
}

/* ===== TABLA FAQ ===== */

.faq-table {
  width: 100%;
  margin: 1rem 0 1.2rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--color-borde-1);
  border-radius: var(--border-radius-10);
  font-size: var(--texto-14);
}

.faq-table th,
.faq-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--color-borde-1);
  line-height: 1.5;
  text-align: left;
}

.faq-table th {
  background-color: var(--color-acento);
  color: #fff;
  font-weight: 800;
}

.faq-table td {
  color: var(--color-texto-secundario);
}

.faq-table tr:last-child td {
  border-bottom: none;
}

/* ===== ACORDEÓN AJUSTADO PARA RESPUESTAS LARGAS ===== */

.faq-item-open .faq-answer {
  max-height: 1600px;
}

@media (max-width: 768px) {
  .faq-section-title {
    font-size: var(--texto-17);
  }

  .faq-answer li {
    font-size: var(--texto-14);
  }

  .faq-table,
  .faq-table thead,
  .faq-table tbody,
  .faq-table tr,
  .faq-table th,
  .faq-table td {
    display: block;
    width: 100%;
  }

  .faq-table thead {
    display: none;
  }

  .faq-table tr {
    border-bottom: 1px solid var(--color-borde-1);
  }

  .faq-table tr:last-child {
    border-bottom: none;
  }

  .faq-table td {
    border-bottom: none;
  }
}
