/* =========================================================================
   BLOG — design system minimalista (Apollo / Notion / Stripe inspired)
   Reusa os tokens das LPs: --paper, --ink, --ink-600, --ink-400, --neon, --border
   Criado para /blog/ e /blog/{slug}/.
   ========================================================================= */

/* ============= CONTAINER ============= */
.blog-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) { .blog-wrap { padding: 0 3rem; } }

/* ============= MAIN (nav clearance) =============
   O <main> da listagem e do artigo recebe a classe .blog-main com
   padding-top fixo para compensar o #aww-nav fixed (72-80px altura).
   Abordagem semântica e imune a cascata — o elemento que "recebe"
   o conteúdo simplesmente nunca começa no y=0. */
main.blog-main {
  padding-top: 96px;
}
@media (min-width: 1024px) {
  main.blog-main { padding-top: 104px; }
}

/* ============= HERO ============= */
.blog-hero {
  padding: 2.5rem 0 3rem;
  background: var(--paper, #fafafa);
}
@media (max-width: 767px) {
  .blog-hero { padding-top: 1.75rem; padding-bottom: 2.5rem; }
}
.blog-hero-inner { max-width: 720px; }
.blog-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-600, #475569);
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 1.25rem;
}
.blog-hero-eyebrow::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--neon, #10b981);
}
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink, #0f172a);
  margin: 0 0 1rem;
}
.blog-hero p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-600, #475569);
  margin: 0;
}

/* ============= FEATURE POST CARD ============= */
.blog-feature {
  padding: 2rem 0 4rem;
  background: var(--paper, #fafafa);
}
.blog-feature-card {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.blog-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
  border-color: #d1d5db;
}
.blog-feature-body {
  padding: 2.25rem 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 768px) {
  .blog-feature-body { padding: 2.75rem 3rem 2.5rem; }
}
.blog-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-600, #475569);
  background: var(--paper, #fafafa);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 1rem;
  align-self: flex-start;
}
.blog-feature-body h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink, #0f172a);
  margin: 0 0 0.875rem;
}
.blog-feature-body h2 a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(transparent calc(100% - 2px), var(--neon, #10b981) 0);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.25s ease;
}
.blog-feature-body h2 a:hover { background-size: 100% 100%; }
.blog-feature-excerpt {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-600, #475569);
  margin: 0 0 1.25rem;
}
.blog-feature-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--ink-400, #94a3b8);
}
.blog-feature-meta-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-400, #94a3b8);
}

/* ============= CATEGORIES PILLS ============= */
.blog-categories {
  padding: 0.5rem 0 2rem;
  border-top: 1px solid var(--border, #e5e7eb);
  position: sticky;
  /* fica logo abaixo do #aww-nav fixo (~70px), não encostado no topo */
  top: 70px;
  z-index: 10;
  background: rgba(250,250,250,.92);
  backdrop-filter: blur(8px);
}
.blog-categories-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1rem 0;
  scrollbar-width: none;
}
.blog-categories-inner::-webkit-scrollbar { display: none; }
.blog-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-600, #475569);
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}
.blog-pill:hover {
  border-color: var(--ink-400, #94a3b8);
  color: var(--ink, #0f172a);
}
.blog-pill.is-active {
  background: var(--ink, #0f172a);
  color: #fff;
  border-color: var(--ink, #0f172a);
}

/* ============= GRID DE POSTS ============= */
.blog-grid-section {
  padding: 1.5rem 0 4rem;
  background: var(--paper, #fafafa);
}
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px)  { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: 1fr 1fr 1fr; } }

.blog-card {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
  border-color: #d1d5db;
}
.blog-card-body {
  padding: 1.75rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-600, #475569);
  background: var(--paper, #fafafa);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 5px;
  padding: 3px 8px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}
.blog-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink, #0f172a);
  margin: 0 0 0.625rem;
}
.blog-card h3 a {
  color: inherit;
  text-decoration: none;
}
.blog-card h3 a:hover { color: var(--neon, #059669); }
.blog-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-600, #475569);
  margin: 0 0 1rem;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--ink-400, #94a3b8);
}

/* ============= BANNER DE CONVERSÃO ============= */
.blog-cta-banner {
  margin: 1rem 0 3.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.blog-cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.blog-cta-banner-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .blog-cta-banner { padding: 3rem 3rem; }
  .blog-cta-banner-inner { grid-template-columns: 1.6fr 1fr; gap: 2rem; }
}
.blog-cta-banner h2 {
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 0.625rem;
}
.blog-cta-banner h2 .hl {
  color: var(--neon, #10b981);
  background: linear-gradient(transparent calc(100% - 4px), rgba(16,185,129,.4) 0);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.blog-cta-banner p {
  font-size: 0.9375rem;
  color: rgba(255,255,255,.65);
  margin: 0;
  line-height: 1.5;
}
.blog-cta-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  align-items: flex-start;
}
@media (min-width: 768px) {
  .blog-cta-banner-actions { align-items: flex-end; }
}
.blog-cta-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--neon, #10b981);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid var(--neon, #10b981);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(16,185,129,.3);
}
.blog-cta-banner-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16,185,129,.4);
}
.blog-cta-banner-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,.4);
}

/* ============= ARTIGO INDIVIDUAL ============= */
.article-shell {
  background: var(--paper, #fafafa);
  /* O respiro do nav fixo agora vem do .blog-nav-clearance no topo
     do <main>. Padding aqui é só folga editorial. */
  padding: 2.5rem 0 5rem;
}
@media (max-width: 767px) {
  .article-shell { padding-top: 1.75rem; padding-bottom: 3rem; }
}
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 4rem;
    padding: 0 3rem;
  }
}
.article-main { max-width: 800px; width: 100%; margin: 0 auto; }

.article-breadcrumb {
  font-size: 0.8125rem;
  color: var(--ink-400, #94a3b8);
  margin-bottom: 1.25rem;
}
.article-breadcrumb a {
  color: var(--ink-600, #475569);
  text-decoration: none;
}
.article-breadcrumb a:hover { color: var(--ink, #0f172a); }
.article-breadcrumb-sep { margin: 0 6px; color: var(--ink-400, #94a3b8); }

.article-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neon, #059669);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 1.25rem;
}

.article-title {
  font-size: clamp(1.875rem, 4.5vw, 2.875rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink, #0f172a);
  margin: 0 0 1.25rem;
}
.article-deck {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-600, #475569);
  margin: 0 0 2rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8125rem;
  color: var(--ink-400, #94a3b8);
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  margin-bottom: 2.5rem;
}
.article-meta-author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-600, #475569);
  font-weight: 500;
}
.article-meta-author-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8125rem;
}
.article-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-400, #94a3b8); }

/* ============= PROSE (markdown rendering) ============= */
.article-prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-800, #1e293b);
}
.article-prose p { margin: 0 0 1.5rem; }
.article-prose strong { color: var(--ink, #0f172a); font-weight: 700; }
.article-prose a {
  color: var(--neon, #059669);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-prose a:hover { color: #047857; }

.article-prose h2 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink, #0f172a);
  margin: 3rem 0 1.25rem;
  scroll-margin-top: 80px;
}
.article-prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink, #0f172a);
  margin: 2.25rem 0 1rem;
  scroll-margin-top: 80px;
}

.article-prose ul,
.article-prose ol { margin: 0 0 1.75rem; padding-left: 0; list-style: none; }
.article-prose ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 0.625rem;
}
.article-prose ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 16px; height: 16px;
  background: #ecfdf5;
  border: 1.5px solid var(--neon, #10b981);
  border-radius: 50%;
  display: block;
}
.article-prose ul li::after {
  content: '';
  position: absolute;
  left: 4px; top: 0.85em;
  width: 8px; height: 4px;
  border-left: 2px solid var(--neon, #059669);
  border-bottom: 2px solid var(--neon, #059669);
  transform: rotate(-45deg);
}
.article-prose ol { counter-reset: art; }
.article-prose ol li {
  counter-increment: art;
  position: relative;
  padding-left: 36px;
  margin-bottom: 0.625rem;
}
.article-prose ol li::before {
  content: counter(art);
  position: absolute;
  left: 0; top: 0.1em;
  width: 24px; height: 24px;
  background: var(--ink, #0f172a);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.article-prose blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem 1.25rem 1.75rem;
  background: #ecfdf5;
  border-left: 4px solid var(--neon, #10b981);
  border-radius: 0 12px 12px 0;
  font-style: normal;
  color: var(--ink-800, #1e293b);
  font-size: 1.0625rem;
  line-height: 1.6;
}
.article-prose blockquote p:last-child { margin-bottom: 0; }
.article-prose blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-600, #475569);
  font-style: normal;
}

.article-prose code {
  background: #f1f5f9;
  border: 1px solid var(--border, #e5e7eb);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #0f172a;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.article-prose pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.article-prose pre code { background: none; border: none; padding: 0; color: inherit; }

.article-prose-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
}
.article-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: #fff;
}
.article-prose table th {
  background: var(--paper, #fafafa);
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-600, #475569);
  font-weight: 600;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.article-prose table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  color: var(--ink-800, #1e293b);
}
.article-prose table tr:last-child td { border-bottom: none; }

.article-prose hr {
  border: none;
  border-top: 1px solid var(--border, #e5e7eb);
  margin: 3rem 0;
}

/* Lead callout — usado em destaques no meio do texto */
.article-callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.article-callout-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #ecfdf5;
  color: var(--neon, #059669);
  display: flex; align-items: center; justify-content: center;
}
.article-callout-icon svg, .article-callout-icon i { width: 18px; height: 18px; }
.article-callout-body {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-800, #1e293b);
}
.article-callout-body strong { color: var(--ink, #0f172a); }

/* ============= SIDEBAR (TOC + CTA) ============= */
.article-sidebar {
  display: none;
}
@media (min-width: 1024px) {
  .article-sidebar {
    display: block;
    position: sticky;
    top: 100px;
    height: fit-content;
    align-self: flex-start;
  }
}
.toc-card {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.25rem;
}
.toc-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400, #94a3b8);
  margin: 0 0 0.875rem;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin: 0; }
.toc-list li a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-600, #475569);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -12px;
  transition: all 0.15s ease;
}
.toc-list li a:hover { color: var(--ink, #0f172a); }
.toc-list li a.is-active {
  color: var(--ink, #0f172a);
  font-weight: 600;
  border-left-color: var(--neon, #10b981);
}

.sidebar-cta {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 14px;
  padding: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.sidebar-cta::before {
  content: '';
  position: absolute;
  top: -30%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(16,185,129,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.sidebar-cta-inner { position: relative; z-index: 1; }
.sidebar-cta-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neon, #10b981);
  margin: 0 0 0.625rem;
}
.sidebar-cta h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.625rem;
  color: #fff;
}
.sidebar-cta p {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255,255,255,.65);
  margin: 0 0 1rem;
}
.sidebar-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--neon, #10b981);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(16,185,129,.3);
}
.sidebar-cta-btn:hover { transform: translateY(-1px); }

/* ============= POSTS RELACIONADOS ============= */
.related-section {
  background: var(--paper, #fafafa);
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--border, #e5e7eb);
}
.related-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink, #0f172a);
  margin: 0 0 1.5rem;
}
