/* ============================================
   RB FINANCEIRA — DESIGN SYSTEM PREMIUM
   Arquivo compartilhado por todas as páginas
   ============================================ */

/* --- IMPORTAÇÃO DE FONTE PREMIUM --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- VARIÁVEIS GLOBAIS --- */
:root {
    --primary-blue: #00AEEF;
    --accent-glow: #38bdf8;
    --primary-dark: #0a0e1a;
    --bg-surface: #111827;
    --bg-glass: rgba(255,255,255,0.04);
    --border-subtle: rgba(255,255,255,0.08);
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --gold: #f59e0b;
    --pix-color: #32BCAD;
    --border-radius: 16px;

    /* Override das variáveis das páginas internas */
    --secondary-gray: #111827 !important;
    --secondary-bg: #111827 !important;
    --text-color: #e2e8f0 !important;
    --energy-yellow: #f59e0b;
    
    /* NUCLEAR: Redefine --white para dark quando usado como background */
    --white: rgba(255,255,255,0.04) !important;
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif !important;
    line-height: 1.7;
    color: var(--text-primary) !important;
    background-color: var(--primary-dark) !important;
}

/* Forçar fundos escuros em qualquer elemento com fundo branco/claro inline */
[style*="background-color: #fff"],
[style*="background-color: #FFF"],
[style*="background-color: white"],
[style*="background: #fff"],
[style*="background: #FFF"],
[style*="background: white"],
[style*="background: var(--white)"],
[style*="background-color: var(--white)"] {
    background-color: var(--bg-surface) !important;
    background: var(--bg-surface) !important;
}

h1, h2, h3, h4 {
    font-family: 'Inter', sans-serif;
    color: #ffffff !important;
    font-weight: 700;
}

/* NUCLEAR: Corrigir textos escuros legados em todas as páginas */
p, span, li, a:not(.btn):not(.btn-destaque):not(.btn-destaque-header), label, div {
    color: inherit; /* Permitir que o container pai controle se necessário */
}

/* Forçar cores claras em elementos que costumam ter cores escuras inline */
[style*="color: #333"],
[style*="color: #333333"],
[style*="color: #000"],
[style*="color: #000000"],
[style*="color: #334155"],
[style*="color: #475569"],
[style*="color: #64748b"],
[style*="color: #1e293b"],
[style*="color: #0f172a"],
[style*="color: #111827"] {
    color: var(--text-primary) !important;
}

[style*="color: #666"],
[style*="color: #999"],
[style*="color: #aaa"],
[style*="color: #777"] {
    color: var(--text-muted) !important;
}

a { text-decoration: none; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- BOTÕES PREMIUM --- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; border-radius: 12px; font-weight: 600;
    text-align: center; transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer; border: none; font-size: 0.9rem;
    letter-spacing: 0.02em; font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-glow));
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0,174,239,0.3);
}
.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(0,174,239,0.5);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(34,197,94,0.3);
}
.btn-whatsapp:hover {
    box-shadow: 0 8px 30px rgba(34,197,94,0.5);
    transform: translateY(-2px);
}

/* --- BOTÃO DESTAQUE (BLOG) UNIFICADO --- */
body .btn-destaque, 
body .btn-destaque-header,
#app-header .btn-destaque,
#app-header .btn-destaque-header,
#app-header .nav-links li a.btn-destaque,
#app-header .nav-links li a.btn-destaque-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-glow)) !important;
    color: #ffffff !important;
    padding: 12px 28px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 15px rgba(0,174,239,0.3) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    text-decoration: none !important;
}

.btn-destaque:hover,
.btn-destaque-header:hover {
    box-shadow: 0 8px 25px rgba(0,174,239,0.5) !important;
    transform: translateY(-2px) !important;
    filter: brightness(1.1) !important;
}

/* --- HEADER TRANSLÚCIDO PREMIUM --- */
#app-header {
    position: fixed !important; width: 100%; top: 0; z-index: 1000;
    background: rgba(10,14,26,0.85) !important;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: none !important;
    height: 80px; display: flex; align-items: center;
}

.nav-container {
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center; height: 100%;
}

.logo img { height: 65px; width: auto; object-fit: contain; display: block; transition: 0.3s; }
.logo img:hover { transform: scale(1.05); }

.nav-links {
    display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center;
}
.nav-links li { position: relative; }
.nav-links li a {
    text-decoration: none; color: var(--text-muted) !important; font-weight: 500;
    font-size: 0.95rem; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    letter-spacing: 0.02em; padding: 10px 0;
    display: block;
}
.nav-links li a:hover { color: #ffffff !important; }

/* Indicador de Hover Premium */
.nav-links li a::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    width: 0; height: 2px; background: var(--primary-blue);
    box-shadow: 0 0 10px var(--primary-blue);
    transition: all 0.3s ease; transform: translateX(-50%);
}
.nav-links li a:hover::after { width: 100%; }

.dropdown > a::after {
    content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    margin-left: 6px; font-size: 0.8rem; opacity: 0.7;
}

.btn-destaque {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-glow)) !important;
    color: white !important; padding: 10px 24px; border-radius: 10px;
    font-weight: 600; box-shadow: 0 4px 15px rgba(0,174,239,0.3); transition: 0.3s;
}
.btn-destaque:hover { box-shadow: 0 6px 20px rgba(0,174,239,0.5); transform: translateY(-1px); }

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted) !important; padding: 10px; }

/* --- DROPDOWN PREMIUM --- */
.dropdown { position: relative; padding-bottom: 30px; margin-bottom: -30px; } /* Ponte invisível ampliada */
.dropdown-content {
    display: block; position: absolute;
    background: rgba(10, 14, 26, 0.99) !important; backdrop-filter: blur(25px);
    min-width: 300px; box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    z-index: 1001; border-radius: 16px; top: calc(100% - 15px); left: -20px;
    padding: 15px 0; border: 1px solid rgba(255,255,255,0.12) !important;
    opacity: 0; visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    transition-delay: 0.15s; /* Delay para evitar fechamento acidental */
}
/* Ponte invisível para evitar perda de hover (Bridge) */
.dropdown-content::before {
    content: ''; position: absolute; top: -40px; left: 0; width: 100%; height: 40px;
}
.dropdown:hover .dropdown-content { 
    opacity: 1; visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}
.dropdown-content a {
    display: flex; align-items: center; justify-content: flex-start; gap: 15px;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.03) !important;
    color: var(--text-muted) !important; font-size: 0.95rem; transition: 0.3s;
    font-weight: 500;
}
.dropdown-content a i { 
    width: 24px; text-align: center; color: var(--primary-blue); font-size: 1rem; 
    transition: 0.3s; opacity: 0.8;
}
.dropdown-content a:last-child { border-bottom: none !important; }
.dropdown-content a:hover { 
    background: linear-gradient(90deg, rgba(0,174,239,0.1), transparent) !important; 
    color: #ffffff !important;
    padding-left: 30px;
}
.dropdown-content a:hover i { color: #ffffff; transform: scale(1.2); opacity: 1; }

/* --- RODAPÉ PREMIUM --- */
footer, #app-footer footer {
    background: #060a14 !important; color: #ffffff;
    padding: 60px 0 30px; font-family: 'Inter', sans-serif;
    border-top: 1px solid var(--border-subtle);
}
.footer-content, footer .footer-content {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px; margin-bottom: 40px;
}
.footer-col h3, .footer-col h4 {
    color: #ffffff !important; margin-bottom: 20px; font-size: 1.1rem;
    border-left: 3px solid var(--primary-blue) !important; padding-left: 12px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a, .footer-col li a {
    color: var(--text-muted) !important; text-decoration: none; transition: 0.3s; font-size: 0.88rem;
}
.footer-col a:hover, .footer-col li a:hover { color: var(--primary-blue) !important; }

.social-icons { display: flex; gap: 12px; margin-top: 20px; }
.social-btn {
    color: white; background: rgba(255,255,255,0.06) !important;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; text-decoration: none; transition: 0.3s;
    border: 1px solid var(--border-subtle);
}
.social-btn:hover { background: var(--primary-blue) !important; border-color: var(--primary-blue); }

/* --- WHATSAPP FLUTUANTE PREMIUM --- */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white; width: 60px; height: 60px; border-radius: 16px;
    display: flex; justify-content: center; align-items: center;
    font-size: 28px; box-shadow: 0 8px 24px rgba(34,197,94,0.4);
    z-index: 1000; transition: 0.3s; text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.08) translateY(-2px); }

/* --- MOBILE PREMIUM --- */
@media (max-width: 992px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: none; position: absolute; top: 80px; left: 0; width: 100%;
        background: rgba(10,14,26,0.98) !important; backdrop-filter: blur(20px);
        flex-direction: column; align-items: flex-start; padding: 0;
        box-shadow: 0 20px 40px rgba(0,0,0,0.4);
        border-top: 1px solid var(--border-subtle);
        max-height: 80vh; overflow-y: auto;
    }
    .nav-links.active { display: flex !important; }
    .nav-links li {
        width: 100%; margin: 0; text-align: left;
        border-bottom: 1px solid var(--border-subtle) !important;
    }
    .nav-links li a { display: block; font-size: 1rem; padding: 16px 20px; color: var(--text-muted) !important; transition: none; }
    .nav-links li a::after { display: none !important; }
    
    .btn-destaque {
        margin: 16px 20px; width: calc(100% - 40px);
        text-align: center; display: block !important;
    }

    .dropdown { padding-bottom: 0; margin-bottom: 0; }
    .dropdown:hover .dropdown-content { display: none; }
    .dropdown-content {
        display: none; position: relative; width: 100%; left: 0; top: 0;
        opacity: 1; visibility: visible; transform: none; box-shadow: none;
        background: rgba(0,174,239,0.05) !important; border: none !important;
        border-left: 3px solid var(--primary-blue) !important;
        border-radius: 0; padding: 0; margin: 0;
        transition: none;
    }
    .dropdown-content::before { display: none !important; }
    .dropdown.active .dropdown-content { display: block; }
    
    .dropdown-content a {
        padding: 12px 25px !important; font-size: 0.95rem;
    }
}

/* =================================================
   OVERRIDES GLOBAIS DE CONTEÚDO (DARK THEME)
   Converte seções internas das páginas para dark
   ================================================= */

/* --- TODAS AS SEÇÕES → DARK (universo completo de IDs) --- */
section, section[id] {
    color: var(--text-primary) !important;
}

/* Seções com fundo claro forçadas para dark */
#vantagens-luz, #requisitos, #faq-section, #convenios,
#beneficios, #como-funciona-clt, #parametros, #comparativo,
#info-section, #faq, #cta-final, #elegibilidade,
#diferenciais, #simulacao, #como-funciona-fgts, #jornada,
#vantagens, #vantagens-fgts, #vantagens-refin, #modalidades,
#margem-info, #tabela-entes, #faq-gov, #info-gov,
#limpa-hero, #como-funciona-limpa, #vantagens-limpa, #faq-limpa,
#pix-info, #como-funciona-pix, #faq-pix,
#sobre-hero, #valores, #historia,
#contato-hero, #form-section, #contact-main,
#news-section, #novidade-seo-inss, #novas-regras,
#simulador, #simulador-organico, #produtos, #produtos-gov, #produtos-inss,
#parceiros-secao, #info-inss, #passos, #passo-a-passo, #passos-siape,
#stats, #transparencia, #destaques-regionais,
#product-rules, #operational-guidelines,
#cta-fgts, #alert-aumento, #blog-hero, #lista-de-posts {
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-subtle) !important;
}

/* Seções alternadas mais escuras */
#como-funciona, #cta-section, #depoimentos,
#parametros-inss, #margem, #cta-bottom-section,
#funciona-section {
    background: var(--primary-dark) !important;
}

/* --- CARDS E BLOCOS DE CONTEÚDO → GLASS (COMPLETO) --- */
.vantagem-card, .info-card, .faq-item,
.benefit-card, .step-card, .param-card,
.feature-card, .modalidade-card,
.servico-card, .valor-card,
.timeline-item, .highlight-box,
.b-card, .product-card, .product-card-base,
.contact-form-card, .info-box,
.guideline-card, .simulator-card,
.mvv-card, .news-card, .regras-box,
.result-box, .resultado-box, .warning-box,
.step-box, .stat-item, .t-item,
.vantagem-item, .passo-item, .feature-item,
.comp-card, .calculator-wrapper,
.card-destaque-novidade, .elegibilidade-wrapper,
.info-item, .resultado-item, .info-topic,
.card-limoeiro-regional, .card-sp-regional,
.disclaimer-box {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 14px;
    color: var(--text-primary) !important;
}
.vantagem-card:hover, .info-card:hover, .faq-item:hover,
.benefit-card:hover, .step-card:hover, .param-card:hover,
.feature-card:hover, .modalidade-card:hover,
.b-card:hover, .product-card:hover,
.guideline-card:hover, .mvv-card:hover,
.news-card:hover, .info-box:hover,
.comp-card:hover, .info-item:hover {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(0,174,239,0.2) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
}

/* --- TEXTOS HARDCODED → CORES CLARAS --- */
.vantagem-card h3, .info-card h4, .faq-item h4,
.benefit-card h3, .step-card h3, .param-card h3,
.feature-card h3, .req-text h2, .section-title h2,
.b-card h3, .product-card h3, .guideline-card h4,
.mvv-card h3, .info-box h3, .info-box h4,
.regras-box h3, .contact-form-card h3,
.simulator-card h3, .news-card h3,
.comp-card h3, .info-item h3, .info-topic h3 {
    color: #ffffff !important;
}

.vantagem-card p, .info-card p, .faq-item p,
.benefit-card p, .step-card p, .param-card p,
.feature-card p, .req-text p,
.section-title p, p.intro,
.b-card p, .product-card p, .guideline-card p,
.mvv-card p, .info-box p, .regras-box p,
.contact-form-card p, .simulator-card p,
.news-card p, .comp-card p, .info-item p,
.info-topic p, .disclaimer-box p {
    color: var(--text-muted) !important;
}

/* Textos de parágrafo genéricos em seções escuras */
section p {
    color: var(--text-muted);
}

/* Headings dentro de seções */
section h2, section h3 {
    color: #ffffff;
}

/* --- TABELAS → DARK --- */
table, .table-container table {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
    border-collapse: collapse;
}
table th {
    background: rgba(0,174,239,0.1) !important;
    color: #ffffff !important;
    border-bottom: 2px solid var(--primary-blue) !important;
}
table td {
    border-bottom: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}
table tr:hover td {
    background: rgba(255,255,255,0.03) !important;
}

/* --- LISTAS COM ÍCONES --- */
.info-card-list .info-card {
    border-left: 3px solid var(--primary-blue) !important;
    background: var(--bg-glass) !important;
}

/* --- ALERTAS / BOXES ESPECIAIS --- */
.alert-box, .aviso-box, .disclaimer-box,
[style*="background: #fffbeb"], [style*="background: #fef3c7"] {
    background: rgba(245,158,11,0.08) !important;
    border-color: rgba(245,158,11,0.3) !important;
    color: var(--text-primary) !important;
}

/* --- INPUTS/FORMULÁRIOS INTERNOS --- */
input, textarea, select {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif;
}
input::placeholder, textarea::placeholder {
    color: var(--text-muted) !important;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary-blue) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,174,239,0.15) !important;
}
label, .form-group label {
    color: var(--text-primary) !important;
}
.contact-form, .contact-form-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-subtle) !important;
}

/* --- BADGES DE CONFIANÇA --- */
.trust-badge-hero {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-subtle) !important;
}

/* --- IMAGENS COM MOLDURA --- */
.req-img img, .about-img img {
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4) !important;
}

/* --- SEÇÃO DE FAQ REFINADA --- */
.faq-item {
    border-left: 3px solid transparent !important;
    transition: all 0.3s;
}
.faq-item:hover {
    border-left-color: var(--primary-blue) !important;
}

/* --- CTA BOTTOM SECTIONS --- */
.cta-bottom, .cta-section {
    background: transparent !important;
}

/* --- OVERRIDE UNIVERSAL: Pega qualquer div/section com fundo claro residual --- */
.about-section, .mvv-section,
.contact-info, .hero-content,
.info-content, .about-container,
.check-list, .prazos-grid,
.features-grid, .jornada-grid,
.elegibilidade-grid, .products-grid,
.products-base-grid, .destaques-grid,
.guidelines-grid, .rules-grid,
.authority-footer, .authority-footer-text {
    color: var(--text-primary) !important;
}
.authority-footer, .authority-footer-text {
    background: transparent !important;
    color: var(--text-muted) !important;
}

/* ==========================================================
   OVERRIDES NUCLEARES — ÚLTIMO RECURSO (Alta Especificidade)
   Captura qualquer elemento com fundo branco/claro inline
   ========================================================== */

/* Override universal: qualquer div/section dentro de main com var(--white) */
body div[style*="background-color: #ffffff"],
body div[style*="background: var(--white)"],
body section[style*="background-color: #ffffff"],
body section[style*="background: var(--white)"],
body div[style*="background-color: #fff"],
body div[style*="background: #fff"],
body section[style*="background-color: #fff"],
body section[style*="background: #fff"],
body div[style*="background-color: #f"],
body div[style*="background: #f"],
body section[style*="background-color: #f"],
body section[style*="background: #f"],
body div[style*="background: white"],
body section[style*="background: white"] {
    background: var(--bg-surface) !important;
    background-color: var(--bg-surface) !important;
}

/* Qualquer div com fundo inline eef/f0f/f1f/f8f */
body div[style*="background: linear-gradient"] {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--primary-dark) 100%) !important;
}

/* Forçar todos os cards e info-items a serem glass */
body .vantagem-card,
body .info-card,
body .b-card,
body .product-card,
body .product-card-base,
body .contact-form-card,
body .info-box,
body .guideline-card,
body .simulator-card,
body .mvv-card,
body .news-card,
body .regras-box,
body .result-box,
body .resultado-box,
body .warning-box,
body .step-box,
body .stat-item,
body .t-item,
body .vantagem-item,
body .passo-item,
body .feature-item,
body .comp-card,
body .calculator-wrapper,
body .card-destaque-novidade,
body .elegibilidade-wrapper,
body .info-item,
body .resultado-item,
body .info-topic,
body .disclaimer-box,
body .highlight-box,
body .step-card,
body .param-card,
body .faq-item,
body .benefit-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

/* Override para spans e parágrafos com cor escura inline */
body span[style*="color: #1"],
body span[style*="color: #2"],
body span[style*="color: #3"],
body span[style*="color: #4"],
body p[style*="color: #1"],
body p[style*="color: #2"],
body p[style*="color: #3"],
body p[style*="color: #4"],
body h1[style*="color: #1"],
body h2[style*="color: #1"],
body h3[style*="color: #1"],
body h4[style*="color: #1"],
body h1[style*="color: #2"],
body h2[style*="color: #2"],
body h3[style*="color: #2"],
body h4[style*="color: #2"],
body li[style*="color: #3"],
body li[style*="color: #4"] {
    color: var(--text-primary) !important;
}
