/* ================================================================
   Qartt FAQ Injector — faq.css
   Paleta: dourado (#C9A96E / #8B7355), navy (#1a2744)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&display=swap');

.qfi-faq-block {
    margin: 48px 0;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ── Heading ── */
.qfi-faq-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 600;
    color: #1a2744;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #C9A96E;
    position: relative;
}

.qfi-faq-heading::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 48px;
    height: 2px;
    background: #1a2744;
}

/* ── Lista ── */
.qfi-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

/* ── Item ── */
.qfi-faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.qfi-faq-item:last-child {
    border-bottom: none;
}

/* ── Botão / Pergunta ── */
.qfi-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: #ffffff;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.18s;
    color: #1a2744;
}

.qfi-faq-question:hover {
    background: #f8faff;
}

.qfi-faq-question[aria-expanded="true"] {
    background: #1a2744;
    color: #ffffff;
}

.qfi-faq-q-text {
    font-size: 0.975rem;
    font-weight: 600;
    line-height: 1.45;
    flex: 1;
}

/* ── Ícone +/× ── */
.qfi-faq-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B7355;
    transition: background 0.18s, transform 0.3s, color 0.18s;
}

.qfi-faq-question[aria-expanded="true"] .qfi-faq-icon {
    background: rgba(201, 169, 110, 0.25);
    color: #C9A96E;
    transform: rotate(45deg);
}

.qfi-faq-icon svg {
    display: block;
}

/* Esconde o traço vertical quando aberto (fica só o horizontal = ×) */
.qfi-faq-question[aria-expanded="false"] .qfi-icon-h {
    display: none;
}

.qfi-faq-question[aria-expanded="true"] .qfi-icon-v {
    /* já está rotacionado 45° pelo pai */
}

/* ── Resposta ── */
.qfi-faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.qfi-faq-answer:not([hidden]) {
    max-height: 600px;
}

/* Remove [hidden] mas mantém a animação via max-height */
.qfi-faq-answer[hidden] {
    display: block !important;
    max-height: 0;
    visibility: hidden;
}

.qfi-faq-answer:not([hidden]) {
    visibility: visible;
}

.qfi-faq-answer-inner {
    padding: 6px 22px 20px 22px;
    color: #374151;
    font-size: 0.93rem;
    line-height: 1.72;
    border-left: 3px solid #C9A96E;
    margin: 0 22px 0 22px;
    padding-left: 16px;
}

.qfi-faq-answer-inner p {
    margin: 0 0 10px;
}

.qfi-faq-answer-inner p:last-child {
    margin-bottom: 0;
}

/* ── Responsivo ── */
@media (max-width: 600px) {
    .qfi-faq-question {
        padding: 14px 16px;
    }

    .qfi-faq-answer-inner {
        margin: 0 16px;
        padding: 4px 14px 16px;
    }

    .qfi-faq-q-text {
        font-size: 0.9rem;
    }
}

/* ── Respeita preferência de movimento reduzido ── */
@media (prefers-reduced-motion: reduce) {
    .qfi-faq-answer,
    .qfi-faq-icon {
        transition: none;
    }
}
