/* =====================================================
   blog.css — Calctto Blog (dark theme, SEO-first)
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0A0C10;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --text: #CBD5E1;
  --text-muted: #94A3B8;
  --heading: #F8FAFC;
  --accent: #10B981;
  --accent-light: #34D399;
  --accent-dim: rgba(16,185,129,0.12);
  --purple: #8B5CF6;
  --purple-dim: rgba(139,92,246,0.1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --max-w: 1200px;
  --article-w: 740px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-light); }
img { max-width: 100%; height: auto; display: block; }

/* ─── NAVIGATION (igual à landing page) ──────────── */
.blog-nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(6,10,18,0.88);
}
.blog-nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.blog-nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.blog-logo-img {
  height: 64px; width: auto; max-width: 220px; object-fit: contain; display: block;
  filter: drop-shadow(0 0 14px rgba(46,125,255,0.25));
}
.blog-nav-logo:has(.blog-logo-img) .blog-logo-text { display: none; }
.blog-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #2E7DFF, #06b6d4);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px; color: white;
  box-shadow: 0 0 20px rgba(46,125,255,0.4); flex-shrink: 0;
}
.blog-logo-text { font-weight: 900; font-size: 20px; color: white; letter-spacing: -0.03em; }
.blog-nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.blog-nav-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 600; transition: color .2s; }
.blog-nav-links a:hover, .blog-nav-links a.active { color: #fff; }
.blog-nav-cta-wrap { display: flex; align-items: center; gap: 10px; }
.blog-btn-ghost {
  padding: 9px 18px; background: transparent; border: 1px solid var(--border);
  border-radius: 12px; color: var(--text-muted); font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .2s; white-space: nowrap;
}
.blog-btn-ghost:hover { border-color: rgba(255,255,255,0.22); color: #fff; }
.blog-btn-primary {
  padding: 9px 20px;
  background: linear-gradient(135deg, #2E7DFF 0%, #1d4ed8 100%);
  border-radius: 12px; color: #fff; font-size: 14px; font-weight: 700;
  text-decoration: none; transition: all .2s; white-space: nowrap;
  box-shadow: 0 8px 24px -6px rgba(46,125,255,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative; overflow: hidden;
}
.blog-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -6px rgba(46,125,255,0.7); color: #fff; }

/* ─── HERO (index) ─────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, rgba(16,185,129,0.07) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 56px;
  text-align: center;
}
.blog-hero h1 { font-size: clamp(28px,5vw,52px); font-weight: 800; color: var(--heading); margin-bottom: 14px; line-height: 1.15; }
.blog-hero p { color: var(--text-muted); font-size: clamp(15px,2vw,19px); max-width: 560px; margin: 0 auto; }
.blog-badge {
  display: inline-block; background: var(--accent-dim); color: var(--accent);
  font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 20px;
  margin-bottom: 18px; border: 1px solid rgba(16,185,129,0.2); letter-spacing: .5px;
  text-transform: uppercase;
}

/* ─── BLOG GRID ─────────────────────────────────── */
.blog-section { max-width: var(--max-w); margin: 0 auto; padding: 56px 24px; }
.blog-section-title { font-size: 22px; font-weight: 700; color: var(--heading); margin-bottom: 32px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 24px; }
.blog-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: transform .2s, border-color .2s, background .2s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--bg-card-hover); }
.blog-card-cover {
  width: 100%; height: 200px; object-fit: cover;
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(139,92,246,0.1));
}
.blog-card-cover-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, rgba(16,185,129,0.12) 0%, rgba(139,92,246,0.08) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.blog-tag { background: var(--accent-dim); color: var(--accent); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .3px; }
.blog-tag-purple { background: var(--purple-dim); color: var(--purple); }
.blog-card-date, .blog-read-time { color: var(--text-muted); font-size: 12px; }
.blog-card h2 { color: var(--heading); font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.blog-card p { color: var(--text-muted); font-size: 14px; line-height: 1.65; flex: 1; margin-bottom: 20px; }
.blog-card-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 14px; font-weight: 600; }
.blog-card-link::after { content: '→'; transition: transform .2s; }
.blog-card:hover .blog-card-link::after { transform: translateX(4px); }

/* ─── ARTICLE LAYOUT ────────────────────────────── */
.article-wrapper { max-width: var(--article-w); margin: 0 auto; padding: 48px 24px 80px; }

.article-breadcrumb {
  display: flex; align-items: center; gap: 8px; margin-bottom: 36px;
  font-size: 13px; color: var(--text-muted); flex-wrap: wrap;
}
.article-breadcrumb a { color: var(--text-muted); }
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb-sep { color: var(--border-strong); }

.article-header { margin-bottom: 40px; }
.article-header .blog-tag { margin-bottom: 16px; }
.article-header h1 {
  font-size: clamp(26px,4vw,42px); font-weight: 800; color: var(--heading);
  line-height: 1.2; margin-bottom: 16px;
}
.article-header .article-lead { font-size: 18px; color: var(--text); line-height: 1.7; margin-bottom: 20px; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
  color: var(--text-muted); font-size: 13px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 14px 0; margin-top: 8px;
}
.article-meta-item { display: flex; align-items: center; gap: 6px; }

/* Article cover image */
.article-cover { width: 100%; border-radius: 16px; margin: 32px 0; overflow: hidden; border: 1px solid var(--border); }
.article-cover img { width: 100%; object-fit: cover; }

/* Article body typography */
.article-body { font-size: 16px; }
.article-body h2 {
  font-size: clamp(20px,3vw,28px); font-weight: 700; color: var(--heading);
  margin: 52px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.article-body h3 {
  font-size: clamp(17px,2vw,21px); font-weight: 600; color: var(--heading);
  margin: 36px 0 12px;
}
.article-body h4 { font-size: 17px; font-weight: 600; color: #E2E8F0; margin: 24px 0 10px; }
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 10px; line-height: 1.65; }
.article-body strong { color: var(--heading); font-weight: 600; }
.article-body em { color: var(--accent-light); font-style: normal; font-weight: 500; }
.article-body a { color: var(--accent); border-bottom: 1px solid rgba(16,185,129,0.25); }
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

/* Callout boxes */
.callout { border-radius: 12px; padding: 20px 24px; margin: 32px 0; }
.callout-tip { background: rgba(16,185,129,0.07); border: 1px solid rgba(16,185,129,0.2); }
.callout-warn { background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2); }
.callout-info { background: rgba(99,102,241,0.07); border: 1px solid rgba(99,102,241,0.2); }
.callout-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.callout-tip .callout-title { color: var(--accent); }
.callout-warn .callout-title { color: #F59E0B; }
.callout-info .callout-title { color: #818CF8; }
.callout p { margin: 0; font-size: 15px; }

/* Formula box */
.formula-box {
  background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.25);
  border-radius: 14px; padding: 28px 24px; margin: 36px 0; text-align: center;
}
.formula-box .formula-text {
  font-size: clamp(15px,2.5vw,20px); font-weight: 700; color: #E9D5FF;
  font-family: 'Courier New', monospace; line-height: 1.6;
}
.formula-box .formula-label { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* Comparison table */
.article-body table { width: 100%; border-collapse: collapse; margin: 32px 0; border-radius: 12px; overflow: hidden; font-size: 14px; }
.article-body thead tr { background: rgba(16,185,129,0.1); }
.article-body th { color: var(--heading); font-size: 13px; font-weight: 700; padding: 14px 16px; text-align: left; }
.article-body td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: top; }
.article-body tr:hover td { background: rgba(255,255,255,0.02); }
.td-check { color: var(--accent); font-weight: 700; }
.td-cross { color: #F87171; font-weight: 700; }
.td-partial { color: #FBBF24; }

/* Number highlight */
.stat-block { display: flex; gap: 20px; flex-wrap: wrap; margin: 32px 0; }
.stat-item { flex: 1; min-width: 140px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.stat-number { font-size: 36px; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

/* Example box */
.example-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin: 32px 0; }
.example-box-title { font-weight: 700; color: var(--heading); font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.example-box table { margin: 0; }

/* Checklist */
.checklist { list-style: none; margin-left: 0 !important; }
.checklist li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ─── INLINE CTA ─────────────────────────────────── */
.article-cta {
  background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(139,92,246,0.07) 100%);
  border: 1px solid rgba(16,185,129,0.25); border-radius: 18px;
  padding: 36px; margin: 56px 0; text-align: center;
}
.article-cta h3 { color: var(--heading); font-size: clamp(20px,3vw,26px); font-weight: 800; margin-bottom: 10px; }
.article-cta p { color: var(--text-muted); margin-bottom: 28px; font-size: 15px; max-width: 480px; margin-left: auto; margin-right: auto; }
.btn-cta {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 15px; padding: 14px 36px; border-radius: 10px;
  transition: background .2s, transform .15s;
}
.btn-cta:hover { background: #059669; transform: translateY(-1px); color: #fff; }
.article-cta .cta-note { display: block; color: var(--text-muted); font-size: 12px; margin-top: 14px; }

/* ─── RELATED ARTICLES ──────────────────────────── */
.related-section { border-top: 1px solid var(--border); padding-top: 48px; margin-top: 48px; }
.related-section h2 { font-size: 20px; font-weight: 700; color: var(--heading); margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
.related-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  transition: border-color .2s, background .2s;
}
.related-card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
.related-card .blog-tag { margin-bottom: 10px; }
.related-card h3 { color: var(--heading); font-size: 14px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }
.related-card p { color: var(--text-muted); font-size: 12px; margin: 0; }

/* ─── FOOTER ──────────────────────────────────── */
.blog-footer { border-top: 1px solid var(--border); padding: 36px 24px; }
.blog-footer-inner { max-width: var(--max-w); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.blog-footer p { color: var(--text-muted); font-size: 13px; }
.blog-footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.blog-footer-links a { color: var(--text-muted); font-size: 13px; }
.blog-footer-links a:hover { color: var(--accent); }

/* ─── WHATSAPP FLOAT ────────────────────────────── */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: #25D366; color: #fff;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.1); color: #fff; }
.wa-float svg { width: 26px; height: 26px; fill: #fff; }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
  .blog-nav-links { display: none; }
  .blog-btn-ghost { display: none; }
  .blog-btn-primary { padding: 8px 14px; font-size: 12px; }
  .blog-hero { padding: 48px 16px 36px; }
  .blog-section { padding: 36px 16px; }
  .blog-grid { grid-template-columns: 1fr; }
  .article-wrapper { padding: 32px 16px 60px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .stat-block { gap: 12px; }
  .stat-item { min-width: 120px; }
  .article-cta { padding: 28px 20px; }
  .formula-box { padding: 20px 16px; }
}
@media (max-width: 480px) {
  .related-grid { grid-template-columns: 1fr; }
  .btn-cta { width: 100%; text-align: center; padding: 14px 20px; }
  .stat-number { font-size: 28px; }
  .blog-footer-inner { flex-direction: column; text-align: center; }
}
