/* ==========================================================================
   VARIÁVEIS E RESET
   ========================================================================== */
:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --accent: #2563eb;
    --card-bg: #f8fafc;
    --border: #e2e8f0;
    --muted: #64748b;
    --code-bg: #1e293b;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --text: #f8fafc;
        --accent: #3b82f6;
        --card-bg: #1e293b;
        --border: #334155;
        --muted: #94a3b8;
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   COMPONENTES GERAIS (NAV & FOOTER)
   ========================================================================== */
.navbar {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -1px;
}

.brand span { color: var(--accent); }

.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a, .back-link { 
    text-decoration: none; 
    color: var(--muted); 
    font-size: 0.9rem; 
    font-weight: 500; 
}
.nav-links a:hover, .back-link:hover { color: var(--accent); }

.site-footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    margin-top: 5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   HOME PAGE
   ========================================================================== */
.hero { padding: 5rem 0 3rem; }
.hero h1 { font-size: 3.2rem; line-height: 1.1; margin-bottom: 1rem; letter-spacing: -2px; font-weight: 800; }
.hero p { font-size: 1.25rem; color: var(--muted); max-width: 650px; }

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 3rem; 
    margin-top: 4rem; 
}

.card { padding-bottom: 2rem; border-bottom: 1px solid var(--border); transition: 0.3s; }
.card:hover { border-color: var(--accent); }
.card time { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.card h2 { margin: 0.5rem 0; font-size: 1.6rem; line-height: 1.3; }
.card h2 a { text-decoration: none; color: inherit; }
.card p { color: var(--muted); font-size: 1rem; margin-bottom: 1.5rem; }

/* ==========================================================================
   POST PAGE (ESTRUTURA DE DUAS COLUNAS)
   ========================================================================== */
.main-wrapper.post-page {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    margin-top: 4rem;
}

.post-page .content { flex: 3; max-width: 720px; }
.post-header h1 { font-size: 3rem; line-height: 1.1; margin: 1rem 0; font-weight: 800; letter-spacing: -1.5px; }
.lead { font-size: 1.35rem; color: var(--muted); margin-bottom: 2.5rem; }

/* Estilos de Texto do Artigo */
.post-body { font-size: 1.15rem; }
.post-body p { margin-bottom: 1.5rem; }
.post-body h2 { margin: 2.5rem 0 1rem; font-size: 1.8rem; }

blockquote {
    border-left: 4px solid var(--accent);
    margin: 2.5rem 0;
    padding: 1rem 2rem;
    background: var(--card-bg);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

pre {
    background: var(--code-bg);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    margin: 2rem 0;
}

/* ==========================================================================
   SIDEBAR & ADS
   ========================================================================== */
.post-page .sidebar { flex: 1; min-width: 260px; }

.sticky-ad {
    position: sticky;
    top: 6rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.ad-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.btn-ad {
    display: block;
    text-align: center;
    background: var(--accent);
    color: white;
    padding: 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 900px) {
    .main-wrapper.post-page { flex-direction: column; }
    .post-page .content, .post-page .sidebar { width: 100%; }
    .sticky-ad { position: static; }
    .hero h1 { font-size: 2.5rem; }
}


.tags { display: flex; gap: 0.5rem; margin-top: auto; }
.tags span { 
    font-size: 0.7rem; 
    background: var(--card-bg); 
    padding: 0.2rem 0.6rem; 
    border-radius: 4px; 
    color: var(--muted); 
    font-weight: 600;
}
/* ==========================================================================
   DEFINITION BOX (SEO)
   ========================================================================== */
.definition-box {
    background: var(--card-bg);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
}

.definition-box strong {
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
