/* Estilo automático para a página: faq */

/* Perguntas frequentes: accordions em 2 colunas */
#faq {
    padding: 60px 0 80px;

    h3 {
        margin: 0 0 12px;
    }

    h2 {
        margin-bottom: 48px;
        text-align: center;
    }

    /* Card em pílula azul claro com a curva azul no canto inferior direito */
    .item-faq {
        position: relative;
        border-radius: 40px;
        overflow: hidden;
        isolation: isolate;
        background: #F1F5FE;
        box-shadow: 0 4px 12px rgba(53, 28, 119, 0.08);

        &::after {
            content: "";
            position: absolute;
            z-index: -1;
            right: -30px;
            bottom: -40px;
            width: 90px;
            height: 70px;
            border-radius: 50%;
            background: #D6E4FF;
            transition: opacity 0.4s ease;
        }

        /* Aberto: a curva some para não ficar atrás do texto da resposta */
        &.aberto::after {
            opacity: 0;
        }
    }

    .pergunta-faq {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
        min-height: 80px;
        padding: 20px 40px 20px 72px;
        color: var(--Primrias-Azul);
        font-family: "Fredoka", sans-serif;
        font-size: 20px;
        font-weight: 600;
        line-height: 1.3;
        text-align: left;

        span {
            font-family: inherit;
        }

        &:hover {
            color: var(--Primrias-Vermelho);
        }

        &:focus-visible {
            outline: 2px solid var(--Primrias-Vermelho);
            outline-offset: -4px;
            border-radius: 40px;
        }
    }

    /* Seta gira ao abrir */
    .seta-faq {
        flex-shrink: 0;
        width: 22px;
        height: 22px;
        transition: transform 0.4s ease;
    }

    .item-faq.aberto .seta-faq {
        transform: rotate(180deg);
    }

    /* Resposta: altura animada de 0 até o tamanho do conteúdo */
    .resposta-faq {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.4s ease;
    }

    .item-faq.aberto .resposta-faq {
        grid-template-rows: 1fr;
    }

    .resposta-faq__conteudo {
        overflow: hidden;

        p {
            padding: 0 40px 24px 72px;
            color: var(--Neutros-Cinza);
            font-size: 16px;
            line-height: 1.7;
            opacity: 0;
            transition: opacity 0.3s ease;
            font-family: "Fredoka", sans-serif;

        }
    }

    .item-faq.aberto .resposta-faq__conteudo p {
        opacity: 1;
        transition-delay: 0.1s;
    }

    @media (prefers-reduced-motion: reduce) {
        .resposta-faq,
        .seta-faq,
        .resposta-faq__conteudo p {
            transition: none;
        }
    }

    @media (max-width: 768px) {
        padding: 40px 0 60px;

        h3 {
            font-size: 18px;
        }

        h2 {
            font-size: 24px;
            margin-bottom: 32px;
        }

        .item-faq {
            border-radius: 28px;
        }

        .pergunta-faq {
            min-height: 68px;
            padding: 16px 24px 16px 28px;
            font-size: 16px;
        }

        .resposta-faq__conteudo p {
            padding: 0 24px 20px 28px;
        }
    }
}

/* Mensagem quando nenhuma pergunta foi cadastrada no ACF */
#faq .sem-perguntas {
    color: var(--Neutros-Cinza);
    font-family: "Fredoka", sans-serif;
    text-align: center;
}
