/* ============================================
   INVLAB - Estilos para Páginas de Artigos
   Sistema padronizado para todos os artigos
   ============================================ */

/* Container do Artigo */
.article-wrapper {
    max-width: 1200px; /* PADRONIZADO: 800px → 1200px (consistente com todo o site) */
    margin: 0 auto;
    padding: 8px 20px 40px; /* ULTRA COMPACTO: 40px top → 8px (consistente com index) */
    border: none !important; /* FORÇADO: sem bordas */
    outline: none !important; /* FORÇADO: sem outline */
    box-shadow: none !important; /* FORÇADO: sem sombras */
}

/* Breadcrumb - STICKY (gruda no menu ao rolar) */
.breadcrumb {
    margin-bottom: 32px; /* AUMENTADO: 16px → 32px (respiro e destaque do breadcrumb) */
    padding: 12px 0 16px; /* AJUSTADO: 12px padding-top para folga interna entre texto e borda superior */
    background: #0D0D0D; /* OPACO: fundo preto para evitar texto aparecer ao rolar */
    border: none !important; /* FORÇADO: sem bordas */
    outline: none !important; /* FORÇADO: sem outline */
    box-shadow: none !important; /* FORÇADO: sem sombras */
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    
    /* STICKY - Cola no header ao rolar */
    position: sticky;
    top: 110px; /* Mantido: posição do container permanece perfeita */
    z-index: 999; /* Abaixo do header (1000) mas acima do conteúdo */
    
    /* Transição suave ao grudar */
    transition: all 0.3s ease;
}

/* Remove qualquer linha antes do breadcrumb */
.breadcrumb::before {
    content: none !important;
    display: none !important;
}

.breadcrumb .content-wrapper-wide {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7); /* MELHORADO: 0.6 → 0.7 (mais visível) */
    text-decoration: none;
    transition: all 0.2s;
}

.breadcrumb a:hover {
    color: #D4AF37;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.4); /* MELHORADO: 0.3 → 0.4 (mais legível) */
    user-select: none; /* ADICIONADO: não seleciona o separador */
}

.breadcrumb-current {
    color: #D4AF37;
    font-weight: 600;
    background: rgba(212, 175, 55, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    border-left: 3px solid #D4AF37;
}

/* Meta do Artigo - REMOVIDO (poluição visual desnecessária) */
/*
.article-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    max-width: 1200px;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: auto;
    margin-right: auto;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(42, 127, 255, 0.15);
    color: var(--blue-action);
}

.article-time {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}
*/ /* Espaço compensado em .article-title com margin-top: 41px */

/* Título Principal */
.article-title {
    font-size: 36px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    margin-top: 41px; /* COMPENSAÇÃO: espaço das caixas removidas (article-meta ~25px + margin 16px) */
    margin-bottom: 16px; /* REDUZIDO: 20px → 16px (compacto) */
    text-align: center; /* CENTRALIZADO: consistente com hero-title */
}

/* Lead (subtítulo) */
.article-lead {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px; /* REDUZIDO: 40px → 24px (compacto) */
    text-align: center; /* CENTRALIZADO: consistente com section-subtitle */
}

/* Hero Section */
.article-hero {
    text-align: center;
    padding: 32px 24px; /* REDUZIDO: 48px → 32px (compacto) */
    background: rgba(26, 26, 26, 0.6);
    border-radius: 16px;
    margin-bottom: 32px; /* REDUZIDO: 48px → 32px (compacto) */
}

.hero-emoji {
    font-size: 72px;
    margin-bottom: 16px;
}

.hero-caption {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

/* Seções do Artigo */
.article-section {
    margin-bottom: 48px;
}

.article-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 20px;
    text-align: center; /* CENTRALIZADO: consistência visual */
}

.article-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 12px;
    margin-top: 24px;
    text-align: center; /* CENTRALIZADO: consistência visual */
}

.article-section p {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
}

.article-section ul {
    margin: 20px 0;
    padding-left: 24px;
}

.article-section li {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
}

/* Tabelas */
.article-section table {
    width: 100%;
    margin-top: 12px;
    font-size: 14px;
    border-collapse: collapse;
}

.article-section table th,
.article-section table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-section table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: #FFFFFF;
}

.article-section table td {
    color: rgba(255, 255, 255, 0.85);
}

/* Callout Boxes */
.callout {
    padding: 24px;
    border-radius: 12px;
    margin: 32px 0;
    display: flex;
    gap: 16px;
}

.callout-warning {
    background: rgba(249, 115, 22, 0.1);
    border-left: 4px solid #f97316;
}

.callout-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
}

.callout-info {
    background: rgba(42, 127, 255, 0.1);
    border-left: 4px solid #2A7FFF;
}

.callout-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.callout-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.callout-content p {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
}

.callout-content p:last-child {
    margin-bottom: 0;
}

/* Example Cards */
.example-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.example-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.1);
}

.example-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.example-card p {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
}

.example-card p:last-child {
    margin-bottom: 0;
}

.example-commission {
    color: #f97316 !important;
    font-weight: 600 !important;
}

/* Tips List */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0;
}

.tip-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(26, 26, 26, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.tip-item:hover {
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(26, 26, 26, 0.9);
    transform: translateX(4px);
}

.tip-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #D4AF37, #B8960C);
    color: #0D0D0D;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.tip-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.tip-content p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
}

.tip-content p:last-child {
    margin-bottom: 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .article-wrapper {
        padding: 24px 16px;
    }

    .breadcrumb {
        top: 90px; /* AJUSTADO: para colar na base do menu em tablet */
        padding: 10px 16px 12px; /* 10px padding-top para folga interna */
        font-size: 13px;
    }

    .article-title {
        font-size: 28px;
        margin-top: 41px; /* COMPENSAÇÃO: mantém espaço mesmo em tablet */
    }

    .article-lead {
        font-size: 16px;
    }

    .article-section h2 {
        font-size: 24px;
    }

    .hero-emoji {
        font-size: 56px;
    }

    .tip-item {
        flex-direction: column;
    }

    .callout {
        flex-direction: column;
        padding: 20px;
    }

    .callout-icon {
        font-size: 28px;
    }
}

/* Cards "Em breve" — desabilitados visualmente */
.inv-card-soon {
    position: relative;
    opacity: 0.6;
    cursor: default !important;
    pointer-events: none;
}

.inv-card-soon::after {
    content: 'Em breve';
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #D4AF37;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* Footer INVLAB — identidade dourada nas subpáginas */
.footer-invlab h4 {
    color: #D4AF37 !important;
}

.footer-invlab {
    background: rgba(13, 13, 13, 0.97) !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
}

.footer-invlab .footer-inner-border {
    border-top: 1px solid rgba(212, 175, 55, 0.1) !important;
}

@media (max-width: 480px) {
    .article-wrapper {
        padding: 20px 12px;
    }

    .breadcrumb {
        top: 96px; /* AJUSTADO: para colar na base do menu em mobile */
        padding: 8px 12px 10px; /* 8px padding-top para folga interna */
        font-size: 12px;
        gap: 6px;
    }

    .article-title {
        font-size: 24px;
        margin-top: 41px; /* COMPENSAÇÃO: mantém espaço mesmo em mobile */
    }

    .article-lead {
        font-size: 15px;
    }

    .article-section h2 {
        font-size: 22px;
    }

    .article-section h3 {
        font-size: 18px;
    }

    .article-section p,
    .article-section li {
        font-size: 15px;
    }

    .hero-emoji {
        font-size: 48px;
    }

    .callout-content h3 {
        font-size: 16px;
    }

    .callout-content p {
        font-size: 14px;
    }

    .example-card {
        padding: 16px;
    }

    .tip-item {
        padding: 16px;
    }
}

/* ================================================
   COMPONENTES EDITORIAIS INVLAB
   Padrão de contextualização e notas editoriais
   ================================================ */

.invlab-editorial {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 18px 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.55);
}

.invlab-editorial strong {
    font-weight: 700;
    margin-right: 4px;
}

/* 📋 Nota INVLAB — dourado (dado de mercado, taxa, limite regulatório) */
.invlab-nota {
    background: rgba(212, 175, 55, 0.06);
    border-left: 3px solid rgba(212, 175, 55, 0.45);
}
.invlab-nota strong { color: #D4AF37; }

/* 📊 Simulação ilustrativa — azul (cálculos, tabelas numéricas) */
.invlab-simulacao {
    background: rgba(42, 127, 255, 0.06);
    border-left: 3px solid rgba(42, 127, 255, 0.40);
}
.invlab-simulacao strong { color: #60A5FA; }

/* 📈 Histórico — âmbar (contextualização de dado passado) */
.invlab-historico {
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid rgba(245, 158, 11, 0.40);
}
.invlab-historico strong { color: #F59E0B; }

/* ⚖️ Regulamentação — índigo (leis, normas, limites legais) */
.invlab-regulamentacao {
    background: rgba(129, 140, 248, 0.06);
    border-left: 3px solid rgba(129, 140, 248, 0.40);
}
.invlab-regulamentacao strong { color: #818CF8; }

/* 💡 Dica do Tutor — verde (orientação prática) */
.invlab-dica {
    background: rgba(16, 185, 129, 0.06);
    border-left: 3px solid rgba(16, 185, 129, 0.40);
}
.invlab-dica strong { color: #10B981; }

/* 🔍 Vale comparar — ciano (introdução de quadros comparativos) */
.invlab-comparar {
    background: rgba(6, 182, 212, 0.06);
    border-left: 3px solid rgba(6, 182, 212, 0.40);
}
.invlab-comparar strong { color: #22D3EE; }

/* ================================================
   BACK TO TOP — padrão global INVLAB
   ================================================ */
#backToTop {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
    color: #0D0D0D;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    line-height: 52px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease-in-out;
    opacity: 0;
}
#backToTop:hover {
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.6);
    border-color: rgba(16, 185, 129, 0.6);
}
@media (max-width: 768px) {
    #backToTop {
        width: 48px;
        height: 48px;
        font-size: 24px;
        line-height: 44px;
        bottom: 24px;
        right: 24px;
    }
}

/* ── Gap fix: main margin-top reduzido no mobile (body 55px + 55px = 110px = fundo do header) ── */
@media (max-width: 768px) {
    main { margin-top: 55px !important; }
}
@media (max-width: 480px) {
    main { margin-top: 20px !important; } /* body 100px + 20px = 120px, ~4px após o header */
}

/* ── LOTE 3 — Responsivo: seções de artigo e títulos de categoria ── */
@media (max-width: 900px) {
    .article-content h2 {
        font-size: var(--inv-rfs-900-heading) !important; /* 1.5rem */
        line-height: var(--inv-lh-title);
        margin-top: 36px !important;
        margin-bottom: 16px !important;
    }
    .inv-category-title {
        font-size: var(--inv-rfs-900-heading); /* 1.5rem */
        line-height: var(--inv-lh-title);
        margin-top: 28px;
        margin-bottom: 12px;
    }
}
@media (max-width: 600px) {
    .article-content h2 {
        font-size: var(--inv-rfs-600-article-h2) !important; /* clamp(1.15rem,5vw,1.4rem) */
        line-height: var(--inv-lh-title);
        margin-top: 28px !important;
        margin-bottom: 12px !important;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    .inv-category-title {
        font-size: var(--inv-rfs-600-category); /* clamp(1.15rem,5vw,1.3rem) */
        line-height: 1.22;                       /* C — ajuste fino, sem token */
        margin-top: 22px;
        margin-bottom: 10px;
    }
}

/* ── LOTE 4 — Responsivo: hero h2 de páginas auxiliares (clamp inline) ── */
@media (max-width: 900px) {
    .invlab-lab-container h2[style*="clamp(1.8rem"] {
        font-size: var(--inv-rfs-900-hero-h2) !important; /* 1.8rem */
        line-height: var(--inv-lh-title);
        margin-top: 20px;
        margin-bottom: 14px;
    }
}
@media (max-width: 600px) {
    .invlab-lab-container h2[style*="clamp(1.8rem"] {
        font-size: var(--inv-rfs-600-section) !important; /* clamp(1.5rem,6vw,1.7rem) — iguala Primeiros Passos */
        line-height: var(--inv-lh-title-sm);
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

