/* ── FAQ: accordion + gerarchia (pagina con blocco Rank Math FAQ) ── */

/* Titoli dei gruppi (A, B, C...) — h3 del contenuto, resi distinti */
.single-post__content h3.wp-block-heading {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 500;
    color: var(--accent);
    margin: 2.8rem 0 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.single-post__content h3.wp-block-heading:first-of-type { margin-top: 1.5rem; }

/* Barra pulsanti Apri/Chiudi tutto */
.faq-controls {
    display: flex;
    gap: 0.6rem;
    margin: 1.5rem 0 0.5rem;
    flex-wrap: wrap;
}
.faq-controls__btn {
    background: var(--grad-gold);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.72rem; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.faq-controls__btn:hover { opacity: 0.88; }

/* Lista accordion */
.rank-math-list { display: flex; flex-direction: column; gap: 0.6rem; }

.rank-math-list-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}
.rank-math-list-item.is-open { border-color: var(--accent); }

/* Domanda = intestazione cliccabile (h4) */
.rank-math-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 1.1rem 1.4rem;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.rank-math-question:hover { color: var(--accent); }
.rank-math-question:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* Freccina */
.faq-arrow {
    flex: 0 0 auto;
    width: 9px; height: 9px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);           /* chiuso: punta a destra */
    transition: transform 0.25s ease;
    margin-right: 4px;
}
.rank-math-list-item.is-open .faq-arrow { transform: rotate(45deg); } /* aperto: punta giù */

/* Risposta = pannello collassabile */
.rank-math-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.rank-math-answer > * { margin: 0; }
.rank-math-answer p {
    padding: 0 1.4rem;
    margin-bottom: 1rem;                    /* spazio uniforme tra paragrafi */
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}
.rank-math-answer > *:first-child { margin-top: 0.4rem; }
.rank-math-answer > *:last-child  { margin-bottom: 1.2rem; }
.rank-math-answer a {
    color: var(--accent);
    text-decoration: none;                 /* niente doppia sottolineatura */
    border-bottom: 1px solid var(--accent);
    padding-bottom: 1px;                    /* stacca la linea dal testo */
}
.rank-math-answer a:hover { opacity: 0.75; }

/* Paragrafo finale dopo l'ultimo gruppo FAQ: staccalo dalla scheda sopra */
.single-post__content .rank-math-block + p { margin-top: 2.2rem; line-height: 1.8; }

/* Nascondi eventuale numerazione/immagine del blocco Rank Math non usata */
.rank-math-list-item .rank-math-question strong { font-weight: inherit; }
