/* Accordion FAQ, stile del vecchio blocco home Comp8. Colori sovrascrivibili dal pannello Elementor. */

.hfh-faq {
    --faq-bar: #E8B67A;
    --faq-title: #8F775E;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
}

.hfh-faq-title,
.hfh-faq-group {
    width: 100%;
    margin: 0;
    text-align: center;
    color: var(--faq-title);
    font-weight: 700;
}

.hfh-faq-title {
    padding-bottom: 15px;
    margin-bottom: 5px;
    font-size: 30px;
    border-bottom: 1px solid #C6CACC;
}

.hfh-faq-group {
    margin-top: 30px;
    font-size: 24px;
}

.hfh-faq-item {
    border-radius: 10px;
    overflow: hidden;
    background-color: #FFF6E9;
}

.hfh-faq .hfh-faq-head {
    width: 100%;
    min-height: 73px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 30px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background-color: var(--faq-bar);
    color: white;
    font: 700 20px/1.3 'Montserrat', sans-serif;
    text-align: left;
    text-transform: none;
    cursor: pointer;
}

.hfh-faq .hfh-faq-head:hover,
.hfh-faq .hfh-faq-head:focus {
    background-color: var(--faq-bar);
    color: white;
}

.hfh-faq .hfh-faq-head:focus-visible {
    outline: 2px solid var(--faq-title);
    outline-offset: -4px;
}

/* "+" disegnato con due barre: ruotato di 45° diventa la "×" di chiusura. */
.hfh-faq-icon {
    position: relative;
    flex: none;
    width: 18px;
    height: 18px;
    transition: transform .3s ease;
}

.hfh-faq-icon::before,
.hfh-faq-icon::after {
    content: '';
    position: absolute;
    inset: 50% 0 auto;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 2px;
    background: currentColor;
}

.hfh-faq-icon::after {
    transform: rotate(90deg);
}

/* 0fr → 1fr anima l'altezza senza conoscerla: il figlio deve avere overflow hidden. */
.hfh-faq-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s ease;
}

.hfh-faq-body > div {
    overflow: hidden;
}

.hfh-faq-answer {
    padding: 20px 30px;
    color: #212121;
    font-size: 17px;
    line-height: 1.6;
}

.hfh-faq-answer > :first-child { margin-top: 0; }
.hfh-faq-answer > :last-child { margin-bottom: 0; }

.hfh-faq-item.is-open .hfh-faq-body {
    grid-template-rows: 1fr;
}

.hfh-faq-item.is-open .hfh-faq-icon {
    transform: rotate(45deg);
}

@media (max-width: 760px) {
    .hfh-faq .hfh-faq-head {
        min-height: 60px;
        padding: 12px 20px;
        font-size: 17px;
    }
    .hfh-faq-answer {
        padding: 15px 20px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hfh-faq-body,
    .hfh-faq-icon {
        transition: none;
    }
}

/* Stesso stile dei bottoni CTA della home (.btn.big). */
.hfh-faq .hfh-faq-more {
    align-self: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 320px;
    max-width: 100%;
    height: 57px;
    margin-top: 20px;
    border-radius: 5px;
    background-color: #FFA502;
    color: black;
    font: 700 20px 'Montserrat', sans-serif;
    text-decoration: none;
}

.hfh-faq .hfh-faq-more:active {
    transform: translate(1px, 1px);
}
