/*
 * Preguntas frecuentes (pages/ayuda/preguntas-frecuentes.php). Se carga además de common.css ($pageCss = 'preguntas-frecuentes')
 * y usa sus variables (variables.css). CSS propio de esta página: los
 * bloques que comparte con las demás páginas informativas (cabecera,
 * tarjetas, formulario...) están copiados en cada una a propósito.
 */

/* ---------- Cabecera de página ---------- */

.info-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(46, 156, 99, .18), transparent 60%),
        radial-gradient(800px 300px at -10% 110%, rgba(242, 160, 61, .14), transparent 60%),
        var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.info-hero .breadcrumb {
    font-size: 13px;
    margin-bottom: 18px;
}

.info-hero .breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.info-hero .breadcrumb a:hover {
    color: var(--color-primary-dark);
}

.info-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: clamp(28px, 4.2vw, 44px);
    line-height: 1.1;
    margin: 10px 0 14px;
}

.info-hero__lead {
    font-size: clamp(15px, 1.6vw, 18px);
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0;
}

.info-hero__aside {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-hero__icon {
    width: 140px;
    height: 140px;
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 54px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    box-shadow: var(--shadow-float);
    transform: rotate(-6deg);
}

.info-hero__acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

/* ---------- Secciones y tarjetas ---------- */

.info-section {
    padding: 56px 0;
}

.info-section--alt {
    background: var(--color-surface-2);
}

@media (min-width: 992px) {
    .info-section {
        padding: 80px 0;
    }
}

.info-card {
    height: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-xs);
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.info-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
    margin-bottom: 16px;
}

.info-card__icon--accent {
    color: #9a5a10;
    background: var(--color-accent-soft);
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
}

.info-card p,
.info-card li {
    color: var(--color-text-muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.info-card p:last-child,
.info-card ul:last-child {
    margin-bottom: 0;
}

.info-card ul {
    padding-left: 18px;
}

/* ---------- Preguntas frecuentes ---------- */

.faq-buscador {
    position: relative;
    max-width: 560px;
}

.faq-buscador i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-soft);
}

.faq-buscador input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px 0 44px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 15px;
    box-shadow: var(--shadow-xs);
}

.faq-buscador input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}

/* Botones de temas = filtros. En el móvil, una fila que se desliza de lado;
   en pantallas grandes, varias líneas si hace falta. */
.faq-temas {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.faq-temas .btn-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.faq-temas__n {
    opacity: .75;
    font-weight: 500;
}

/* Buscando: los temas sin coincidencias se ven apagados. */
.faq-temas .btn-chip.is-vacio:not(.active) {
    opacity: .5;
}

@media (min-width: 992px) {
    .faq-temas {
        flex-wrap: wrap;
        justify-content: center;
        overflow: visible;
    }
}

.faq-temas::-webkit-scrollbar {
    display: none;
}

.faq-grupo {
    scroll-margin-top: 140px;
}

/* Espacio entre temas visibles (los ocultos por el filtro no cuentan). */
.faq-grupo:not([hidden]) ~ .faq-grupo:not([hidden]) {
    margin-top: 40px;
}

.faq-grupo__titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 14px;
}

.faq-grupo__titulo i {
    color: var(--color-primary);
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 15.5px;
}

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

.faq-item summary::after {
    content: "\f067";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 13px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
    transition: transform var(--dur) var(--ease-out);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    color: var(--color-primary-dark);
}

.faq-item__respuesta {
    padding: 0 20px 18px;
    color: var(--color-text-muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.faq-item__respuesta p:last-child,
.faq-item__respuesta ul:last-child {
    margin-bottom: 0;
}

.faq-sin-resultados {
    text-align: center;
    padding: 40px 16px;
    color: var(--color-text-muted);
}

/* ---------- Llamada a la acción ---------- */

.info-cta {
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: var(--shadow-float);
}

.info-cta h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(22px, 3vw, 30px);
    margin: 0 0 8px;
}

.info-cta p {
    margin: 0;
    opacity: .9;
}
