/* Módulo único de preguntas frecuentes (acordeón). Marcado generado por Support\FaqAccordion; los textos
   cambian por idioma/página, el estilo es este. Colores solo por variables: sirve igual en claro y oscuro. */

.faq { margin: 2rem 0; }

/* Encabezado: pliega/despliega todo el bloque. Conserva el estilo del h2 del sitio y añade un chevron. */
.faq-head,
.faq-q { list-style: none; cursor: pointer; position: relative; }
.faq-head::-webkit-details-marker,
.faq-q::-webkit-details-marker { display: none; }
/* Título del bloque: un peldaño por encima de las preguntas (1.1rem), no el h2 de página (1.8rem), para que emoji y texto no desborden la tarjeta. */
.faq-head > h2,
.story .body .faq .faq-head > h2 { margin: 0; padding-right: 3.2rem; font-size: 1.35rem; line-height: 1.25; }
.faq-head::after,
.faq-q::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.25s ease;
}
.faq-head::after { right: 1.4rem; color: var(--color-accent-warm); }
.faq-head:focus-visible,
.faq-q:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 14px; }
.faq:not([open]) > .faq-head::after,
.faq-item:not([open]) > .faq-q::after { transform: translateY(-70%) rotate(-45deg); }
.faq-item[open] > .faq-q::after { transform: translateY(-30%) rotate(225deg); }
.faq[open] > .faq-head::after { transform: translateY(-30%) rotate(225deg); }

/* Lista de preguntas: tarjetas redondeadas, cerradas por defecto. */
.faq-list { display: grid; gap: 0.7rem; margin-top: 1rem; }
.faq-list > p { margin: 0; }

.faq-item {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-item:hover { border-color: var(--color-accent-warm); }
.faq-item[open] { border-color: var(--color-accent-warm); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); }

.faq-q { padding: 0.9rem 3.2rem 0.9rem 1.2rem; }
.faq-q::after { right: 1.3rem; color: var(--color-accent-warm); }
.faq .faq-q > h3,
.story .body .faq .faq-q > h3 {
    margin: 0;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-accent-warm);
}

.faq-a { padding: 0 1.2rem 1.1rem; font-size: 0.92rem; animation: faq-open 0.25s ease; }
.faq-a > :first-child { margin-top: 0; }
.faq-a > :last-child { margin-bottom: 0; }
.faq-a img { max-width: 100%; height: auto; border-radius: 12px; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
    .faq-q { padding: 0.8rem 2.8rem 0.8rem 1rem; }
    .faq .faq-q > h3,
    .story .body .faq .faq-q > h3 { font-size: 0.98rem; }
    .faq-head > h2,
    .story .body .faq .faq-head > h2 { font-size: 1.2rem; }
    .faq-a { padding: 0 1rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .faq-a { animation: none; }
    .faq-head::after, .faq-q::after { transition: none; }
}

/* Dentro de un cuento (.story .body) las reglas de capítulo (article.story .body h2/h3: tamaño y color grandes)
   tienen más especificidad que las de arriba, de ahí los selectores .story .body .faq. La inicial agrandada de los encabezados del cuerpo (theme.css: h2/h3 ::first-letter, 1.3em) no aplica al
   FAQ: el emoji inicial del título y de cada pregunta se queda al tamaño del texto. */
.story .body .faq .faq-head > h2::first-letter,
.story .body .faq .faq-q > h3::first-letter {
    font-size: inherit;
    font-weight: inherit;
    text-shadow: none;
}
