/* style.css */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f2f4f8;
  --text: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --brand: #0f172a;
  --brand-2: #2563eb;
  --success: #12b76a;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1240px;
  --sidebar: 270px;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #fbfcfe 0%, #f7f8fb 100%);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.container { width: min(calc(100% - 32px), var(--container)); margin: 0 auto; }

/* Navegação */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.05rem; color: var(--brand); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0f172a, #2563eb); box-shadow: var(--shadow); font-size: 0.95rem;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: flex-end; }
.top-search { width: min(100%, 480px); position: relative; }
.top-search input {
  width: 100%; height: 48px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  padding: 0 18px 0 48px; outline: none; transition: var(--transition);
}
.top-search input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.top-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; font-weight: 600; cursor: pointer; transition: var(--transition); border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: #1e293b; transform: translateY(-1px); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: var(--surface-soft); border-color: #d0d5dd; }

/* Secção Hero */
.hero { padding: 60px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; }
.hero-card, .hero-panel, .card, .article-card, .path-card, .faq-card, .cta-card, .stat-card {
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius-xl); padding: 32px;
}
.hero-card { background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 30%), #fff; position: relative; overflow: hidden; }
.hero-badge { display: inline-flex; padding: 8px 16px; background: #eff6ff; color: var(--brand-2); border-radius: 999px; font-weight: 600; font-size: 0.9rem; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 16px; color: var(--brand); }
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 30px; max-width: 55ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hero-metric { padding: 16px; background: var(--surface-soft); border-radius: var(--radius-lg); border: 1px solid #edf0f5; }
.hero-metric strong { display: block; font-size: 1.2rem; margin-bottom: 4px; color: var(--brand); }
.hero-metric span { font-size: 0.9rem; color: var(--muted); }

/* Painel Lateral Hero */
.hero-panel { display: flex; flex-direction: column; gap: 20px; }
.mini-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.hero-panel h2 { font-size: 1.5rem; line-height: 1.2; }
.quick-list { display: grid; gap: 12px; }
.quick-item { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: var(--transition); }
.quick-item:hover { transform: translateY(-2px); border-color: var(--brand-2); box-shadow: 0 4px 12px rgba(37,99,235,0.05); }
.quick-item strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.quick-item span { font-size: 0.9rem; color: var(--muted); }

/* Grelhas Comuns */
.section-head { margin: 60px 0 30px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -0.03em; margin-bottom: 8px; }
.section-head p { color: var(--muted); max-width: 60ch; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.articles-grid, .path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 60px; }

/* Cartões */
.card, .article-card, .path-card, .faq-card { transition: var(--transition); cursor: pointer; }
.card:hover, .article-card:hover, .path-card:hover { transform: translateY(-4px); border-color: #cbd5e1; box-shadow: 0 12px 24px rgba(0,0,0,0.04); }
.icon-box { width: 56px; height: 56px; background: #eff6ff; color: var(--brand-2); border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px; }
h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--brand); }
p { color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { display: inline-flex; align-items: center; padding: 4px 12px; background: var(--surface-soft); border-radius: 999px; font-size: 0.85rem; font-weight: 500; color: #475569; border: 1px solid var(--line); }
.eyebrow { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-2); font-weight: 700; margin-bottom: 12px; display: inline-block; }

/* Layout Artigo/Guia */
.knowledge-layout { display: grid; grid-template-columns: var(--sidebar) 1fr; gap: 30px; margin-bottom: 60px; }
.sidebar { position: sticky; top: 100px; display: grid; gap: 20px; align-self: start; }
.sidebar-nav { display: grid; gap: 6px; margin-top: 16px; }
.sidebar-nav a { padding: 10px 16px; border-radius: var(--radius-md); color: #475569; transition: var(--transition); font-weight: 500; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: #eff6ff; color: var(--brand-2); }

.article-shell { display: grid; gap: 24px; }
.article-header { background: #fff; padding: 40px; border-radius: var(--radius-xl); border: 1px solid var(--line); }
.article-header h2 { font-size: 2.5rem; line-height: 1.1; margin: 16px 0; }
.article-content { background: #fff; padding: 40px; border-radius: var(--radius-xl); border: 1px solid var(--line); font-size: 1.05rem; }
.article-content h3 { font-size: 1.5rem; margin: 32px 0 16px; }
.article-content p { margin-bottom: 16px; color: #334155; }
.article-content ul { padding-left: 24px; margin-bottom: 16px; color: #334155; }
.article-content li { margin-bottom: 8px; }
.info-box { padding: 20px; background: #f8fafc; border-left: 4px solid var(--brand-2); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 24px 0; font-weight: 500; color: #0f172a; }

/* CTA Bottom */
.bottom-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; margin-bottom: 60px; }
.cta-card { background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #fff; border: none; }
.cta-card h3 { color: #fff; font-size: 2rem; margin: 16px 0; line-height: 1.1; }
.cta-card p { color: #cbd5e1; }
.cta-card .tag { background: rgba(255,255,255,0.1); border-color: transparent; color: #fff; }
.subscribe-form { display: flex; gap: 12px; margin-top: 20px; }
.subscribe-form input { flex: 1; min-height: 48px; border-radius: var(--radius-md); border: 1px solid var(--line); padding: 0 16px; }

/* Footer & Políticas */
.footer { padding: 60px 0 40px; background: #fff; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { font-size: 1.05rem; margin-bottom: 20px; color: var(--brand); }
.footer ul { list-style: none; display: grid; gap: 12px; }
.footer a { color: var(--muted); transition: var(--transition); }
.footer a:hover { color: var(--brand-2); text-decoration: underline; }
.footer-brand p { max-width: 40ch; margin-top: 16px; color: var(--muted); }

.risk-disclaimer { margin-top: 30px; padding: 20px; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-md); color: #991b1b; font-size: 0.85rem; line-height: 1.5; }
.risk-disclaimer strong { color: #7f1d1d; }

.footnote { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; flex-wrap: wrap; gap: 16px; }

/* Banner de Cookies */
.cookie-banner { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 9999; display: none; }
.cookie-banner.show { display: block; animation: slideUp 0.4s ease forwards; }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cookie-banner__content { max-width: 1120px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: 0 20px 40px rgba(0,0,0,0.1); padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cookie-banner__text { flex: 1; min-width: 300px; }
.cookie-banner__text h3 { margin: 0 0 8px; font-size: 1.2rem; }
.cookie-banner__text p { margin: 0; font-size: 0.95rem; }
.cookie-banner__text a { color: var(--brand-2); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 12px; }

/* Responsivo */
.mobile-toggle { display: none; width: 48px; height: 48px; border-radius: var(--radius-md); border: 1px solid var(--line); background: #fff; cursor: pointer; }

@media (max-width: 1024px) {
  .hero-grid, .bottom-grid, .knowledge-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .topbar-actions .btn, .top-search { display: none; }
  .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .articles-grid, .path-grid, .faq-grid, .stats-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cookie-banner__content { flex-direction: column; align-items: stretch; }
  .cookie-banner__actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
}