/* ================= FAQ BACKGROUND ================= */

main:has(.faq-bg) {
    position: relative;
    overflow: hidden;
}

.faq-bg {
    position: absolute;
    left: 0;
    width: 100%;
    height: 80vh;
    z-index: 0;

    background: url(/IMAGENS/faqbg.png);
    background-position: bottom center;
    background-size: cover;
    background-repeat: no-repeat;
}

.faq-bg--top {
    top: 0;

    background: url(/IMAGENS/faqbottom.png);
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to top, black 0%, transparent 70%);
    mask-image: linear-gradient(to top, black 0%, transparent 100%);
}

.faq-bg--bottom {
    bottom: 0;
    background: url(/IMAGENS/faqbg.png);
    background-position: left;
    background-size: cover;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to top, black 0%, transparent 70%);
    mask-image: linear-gradient(to top, black 0%, transparent 100%);
}

.faq-bg-overlay {
    position: absolute;
    inset: 0;
}

.faq-bg-overlay--top {
    background: linear-gradient(180deg,
            rgba(0, 28, 72, .35) 0%,
            rgba(0, 28, 72, .75) 55%,
            #001C48 100%);
}

.faq-bg-overlay--bottom {
    background: linear-gradient(180deg,
            #001C48 0%,
            rgba(0, 28, 72, .75) 45%,
            rgba(0, 28, 72, .35) 100%);
}

/* ================= FAQ VOLTAR ================= */

.faq-btn-voltar {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;
    padding: 12px 32px;

    border-radius: 14px;
    background-color: #CE9B02;
    border: none;

    color: #001C48;
    font-variant: small-caps;
    font-size: 1.2rem;
    font-weight: 700;

    text-decoration: none;
    cursor: pointer;

    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
    transition: .3s;
}

.faq-btn-voltar:hover {
    background: #7D3122;
    transform: translateY(-2px);
}

/* ================= FAQ CONTAINER / TÍTULO ================= */

.faqContainer {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
}

.faqContainer h1 {
    text-align: center;
    font-family: "Yantranamav", serif;
    font-weight: 200;
    opacity: 0.9;
    font-variant: small-caps;
}

/* ================= FAQ LISTA ================= */

.faq-lista {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    gap: 2.2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 8rem 1.5rem 10rem;
}

.faq-item {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(246, 218, 22, .12);
    transition: border-color .3s ease;
}

.faq-item:hover {
    border-color: rgba(246, 218, 22, .3);
}

.faq-item[open] {
    border-color: #F6DA16;
    border: 1px;
}

/* remove o marcador nativo do <summary> */
.faq-pergunta {
    list-style: none;
}

.faq-pergunta::-webkit-details-marker,
.faq-pergunta::marker {
    display: none;
    content: "";
}

.faq-pergunta {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    padding: 3rem 2rem;
    color: whitesmoke;
    font-family: inherit;
    user-select: none;

    background-color: rgba(255, 255, 255, .04);
    transition: background-color .3s ease;
}

.faq-pergunta:hover {
    background-color: rgba(255, 255, 255, .07);
}

.faq-item[open] .faq-pergunta {
    background-color: #0c3d86;
}

.faq-numero {
    flex-shrink: 0;
    font-family: "Bodoni Moda", serif;
    font-weight: 900;
    font-size: 1.4rem;
    color: #CE9B02;
    min-width: 40px;
    transition: color .3s ease;
}

.faq-item[open] .faq-numero {
    color: #F6DA16;
}

.faq-texto {
    flex: 1;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.5;
}

/* seta apontando para a resposta, gira ao abrir */
.faq-icone {
    flex-shrink: 0;
    position: relative;
    width: 28px;
    height: 28px;
}

.faq-icone::before {
    content: "";
    position: absolute;
    top: 45%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-right: 3px solid #F6DA16;
    border-bottom: 3px solid #F6DA16;
    transform: translate(-50%, -50%) rotate(45deg);
    transition: transform .35s ease;
}

.faq-item[open] .faq-icone::before {
    transform: translate(-50%, -35%) rotate(225deg);
}

/* corpo da resposta: fundo diferente da pergunta */
.faq-resposta {
    display: grid;
    grid-template-rows: 0fr;
    background-color: rgba(0, 0, 0, .18);
    transition: grid-template-rows .4s ease;
}

.faq-resposta>p {
    overflow: hidden;
    padding: 0 2rem;
    font-size: 1.6rem;
    line-height: 1.75;
    opacity: .9;
    transition: padding .4s ease;
    font-weight: 500;
}

.faq-item[open] .faq-resposta {
    grid-template-rows: 1fr;
}

.faq-item[open] .faq-resposta>p {
    padding: 1.6rem 2rem;
}

/* fallback para navegadores sem suporte a grid-template-rows animável */
@supports not (grid-template-rows: 0fr) {
    .faq-resposta {
        max-height: 0;
        overflow: hidden;
        transition: max-height .4s ease;
    }

    .faq-item[open] .faq-resposta {
        max-height: 600px;
    }

    .faq-resposta>p {
        padding: 1.6rem 2rem;
    }
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .faq-bg {
        height: 45vh;
        background-position: center;
    }

    .faqContainer {
        padding: 1.2rem;
    }

    .faqContainer h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .faq-lista {
        padding: 5rem 1rem 6rem;
        gap: 1.2rem;
    }

    .faq-item {
        border-radius: 16px;
    }

    .faq-pergunta {
        padding: 1.2rem;
        gap: .9rem;
        align-items: flex-start;
    }

    .faq-numero {
        min-width: 28px;
        font-size: 1rem;
    }

    .faq-texto {
        font-size: 1rem;
        line-height: 1.5;
    }

    .faq-icone {
        width: 22px;
        height: 22px;
    }

    .faq-icone::before {
        width: 9px;
        height: 9px;
    }

    .faq-resposta>p {
        font-size: .95rem;
        line-height: 1.8;
        padding: 0 1.2rem;
    }

    .faq-item[open] .faq-resposta>p {
        padding: 1.2rem;
    }

    .faq-btn-voltar {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        padding: 14px;
    }

}

@media (max-width: 480px) {

    .faq-bg {
        height: 35vh;
    }

    .faqContainer {
        padding: 1rem;
    }

    .faq-lista {
        padding: 4rem .8rem 5rem;
    }

    .faq-pergunta {
        padding: 1rem;
    }

    .faq-texto {
        font-size: .95rem;
    }

    .faq-resposta>p {
        font-size: .9rem;
    }

}