/**
 * Page Full - FAQ (Perguntas Frequentes) Front-end Styles
 * Design moderno em acordeão, responsivo, acessível e com estética premium.
 */

/* Reset e compatibilidade para página dedicada de FAQ */
body.sf-faq-page-active {
    overflow-x: hidden;
}

body.sf-faq-page-active .entry-content,
body.sf-faq-page-active .wp-block-post-content,
body.sf-faq-page-active main,
body.sf-faq-page-active .wp-site-blocks,
body.sf-faq-page-active article,
body.sf-faq-page-active .wp-block-group {
    max-width: 100% !important;
    width: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 0 !important;
}

body.sf-faq-page-active .sf-footer,
.sf-faq-section + .sf-footer,
.sf-faq-section ~ .sf-footer {
    margin-top: 0 !important;
}

body.sf-faq-page-active .wp-block-post-title,
body.sf-faq-page-active .entry-title,
body.sf-faq-page-active .page-title,
body.sf-faq-page-active header.entry-header,
body.sf-faq-page-active .entry-header,
body.sf-faq-page-active h1.single-title,
body.sf-faq-page-active .wp-block-query-title,
body.sf-faq-page-active footer.wp-block-template-part,
body.sf-faq-page-active .wp-block-template-part-footer,
body.sf-faq-page-active footer.site-footer,
body.sf-faq-page-active .site-footer,
body.sf-faq-page-active footer.wp-block-group {
    display: none !important;
}

/* ==========================================================================
   Estrutura da Seção FAQ
   ========================================================================== */
.sf-faq-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    position: relative;
    padding: 90px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.sf-faq-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.sf-faq-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   Header Centralizado com Badge, Título e Subtítulo
   ========================================================================== */
.sf-faq-header {
    text-align: center;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sf-faq-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 7px 22px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #f8fafc;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.sf-faq-badge:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.32);
    transform: translateY(-1px);
}

.sf-faq-title {
    font-size: 38px;
    line-height: 1.25;
    font-weight: 800;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.sf-faq-subtitle {
    font-size: 17px;
    line-height: 1.65;
    margin: 0 auto;
    max-width: 680px;
    opacity: 0.92;
}

/* ==========================================================================
   Acordeão (Accordion)
   ========================================================================== */
.sf-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 45px;
}

.sf-faq-item {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.sf-faq-item:hover {
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.sf-faq-item.sf-faq-item--active {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(56, 189, 248, 0.1);
}

/* Botão de Disparo / Pergunta */
.sf-faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: #ffffff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.2s ease;
    box-sizing: border-box;
}

.sf-faq-trigger:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: -2px;
}

.sf-faq-trigger__icon {
    font-size: 20px;
    color: #38bdf8;
    flex-shrink: 0;
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
}

.sf-faq-item--active .sf-faq-trigger__icon {
    color: #0ea5e9;
    transform: scale(1.1);
}

.sf-faq-trigger__question {
    flex-grow: 1;
}

.sf-faq-trigger__toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.sf-faq-chevron {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sf-faq-item--active .sf-faq-trigger__toggle {
    background: rgba(56, 189, 248, 0.2);
}

.sf-faq-item--active .sf-faq-chevron {
    transform: rotate(180deg);
    stroke: #38bdf8;
}

/* Painel de Resposta */
.sf-faq-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-faq-panel__content {
    padding: 20px 26px 26px 26px;
    font-size: 16px;
    line-height: 1.75;
    opacity: 0.95;
    box-sizing: border-box;
}

.sf-faq-panel__content p {
    margin: 0 0 14px 0;
}

.sf-faq-panel__content p:last-child {
    margin-bottom: 0;
}

.sf-faq-panel__content ul,
.sf-faq-panel__content ol {
    margin: 10px 0 14px 22px;
    padding: 0;
}

.sf-faq-panel__content li {
    margin-bottom: 6px;
}

/* ==========================================================================
   Bloco de Suporte / CTA no Rodapé da FAQ
   ========================================================================== */
.sf-faq-cta-wrapper {
    margin-top: 20px;
}

.sf-faq-cta-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 30px 34px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.sf-faq-cta-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(56, 189, 248, 0) 70%);
    pointer-events: none;
}

.sf-faq-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.sf-faq-cta-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sf-faq-cta-icon {
    font-size: 26px;
    color: #38bdf8;
}

.sf-faq-cta-content {
    flex-grow: 1;
    min-width: 260px;
}

.sf-faq-cta-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.sf-faq-cta-desc {
    font-size: 15px;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.5;
}

.sf-faq-cta-action {
    flex-shrink: 0;
}

.sf-faq-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #e00000;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border: 2px solid transparent;
}

.sf-faq-cta-btn:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

.sf-faq-cta-btn i {
    transition: transform 0.25s ease;
}

.sf-faq-cta-btn:hover i {
    transform: translateX(4px);
}

.sf-faq-empty {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #94a3b8;
    font-size: 16px;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */
@media (max-width: 768px) {
    .sf-faq-section {
        padding: 60px 16px;
    }

    .sf-faq-title {
        font-size: 30px;
    }

    .sf-faq-subtitle {
        font-size: 15px;
    }

    .sf-faq-trigger {
        padding: 18px 20px;
        font-size: 16px;
    }

    .sf-faq-panel__content {
        padding: 16px 20px 20px 20px;
        font-size: 15px;
    }

    .sf-faq-cta-card {
        padding: 24px 20px;
    }

    .sf-faq-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .sf-faq-cta-action {
        width: 100%;
    }

    .sf-faq-cta-btn {
        width: 100%;
        box-sizing: border-box;
    }
}
