/* ════════════════════════════════════════════════
   BLOG — estilos específicos do blog
   ════════════════════════════════════════════════ */

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: #64748b;
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: #2563eb; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #cbd5e1; }
.breadcrumb [aria-current="page"] { color: #0f172a; font-weight: 500; }

/* Blog list */
.blog-hero {
  padding: 6rem 0 3rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e5e7eb;
}
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
.blog-hero p {
  font-size: 1.125rem;
  color: #475569;
  max-width: 720px;
  margin: 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -10px rgba(37, 99, 235, 0.18);
  border-color: #c7d2fe;
}
.post-card-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.post-card-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18) 0, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.12) 0, transparent 40%);
}
.post-card-thumb svg { width: 64px; height: 64px; opacity: 0.95; position: relative; z-index: 1; }
.post-card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.post-card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: flex-start;
}
.post-card-tag.tag-mei { color: #047857; background: #ecfdf5; }
.post-card-tag.tag-contador { color: #b45309; background: #fef3c7; }
.post-card-tag.tag-tutorial { color: #6d28d9; background: #f5f3ff; }
.post-card-tag.tag-novidade { color: #be123c; background: #ffe4e6; }
.post-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
}
.post-card p {
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}
.post-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }

/* Article */
.article-hero {
  padding: 5rem 0 2rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.article-meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1rem;
}
.article-meta-top .post-card-tag { margin: 0; }
.article-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.875rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  line-height: 1.15;
}
.article-lead {
  font-size: 1.1875rem;
  color: #475569;
  line-height: 1.6;
  max-width: 760px;
  margin: 0 0 2rem;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: #475569;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}
.article-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}
.article-author strong { color: #0f172a; }

/* Article body */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #1e293b;
}
.article-body > p,
.article-body > ul,
.article-body > ol,
.article-body > .callout,
.article-body > .toc,
.article-body > table,
.article-body > .cta-inline,
.article-body > figure { margin: 0 0 1.5rem; }
.article-body h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
  scroll-margin-top: 90px;
}
.article-body h3 {
  font-size: 1.3125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 2rem 0 0.75rem;
  scroll-margin-top: 90px;
}
.article-body ul, .article-body ol { padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body a { color: #2563eb; font-weight: 500; }
.article-body a:hover { text-decoration: underline; }
.article-body strong { color: #0f172a; font-weight: 700; }
.article-body code {
  background: #f1f5f9;
  padding: 0.1rem 0.375rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: #be123c;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.article-body th, .article-body td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.article-body th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}
.article-body tr:last-child td { border-bottom: 0; }

/* TOC */
.toc {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.toc strong {
  display: block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.625rem;
}
.toc ol { padding-left: 1.25rem; margin: 0; }
.toc li { margin-bottom: 0.25rem; }
.toc a { color: #1e293b; text-decoration: none; }
.toc a:hover { color: #2563eb; }

/* Callouts */
.callout {
  display: flex;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  border-radius: 12px;
  border-left: 4px solid;
  background: #f8fafc;
  border-left-color: #2563eb;
}
.callout.callout-tip { background: #eff6ff; border-left-color: #2563eb; }
.callout.callout-warn { background: #fffbeb; border-left-color: #d97706; }
.callout.callout-danger { background: #fef2f2; border-left-color: #dc2626; }
.callout.callout-success { background: #ecfdf5; border-left-color: #059669; }
.callout svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 0.125rem; }
.callout.callout-tip svg { color: #2563eb; }
.callout.callout-warn svg { color: #d97706; }
.callout.callout-danger svg { color: #dc2626; }
.callout.callout-success svg { color: #059669; }
.callout > div { flex: 1; }
.callout strong { display: block; margin-bottom: 0.25rem; }
.callout p { margin: 0; font-size: 0.9875rem; line-height: 1.55; color: #334155; }

/* CTA inline */
.cta-inline {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}
.cta-inline h3 {
  color: #fff !important;
  margin: 0 0 0.5rem !important;
  font-size: 1.375rem !important;
}
.cta-inline p { margin: 0 0 1.25rem; color: #dbeafe; font-size: 0.9875rem; }
.cta-inline .btn-primary {
  background: #fff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.cta-inline .btn-primary:hover { transform: translateY(-2px); }

/* Related posts */
.related-posts {
  border-top: 1px solid #e5e7eb;
  padding: 2.5rem 0 4rem;
  background: #f8fafc;
}
.related-posts h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .article-hero { padding: 4rem 0 1.5rem; }
  .article-body { font-size: 1rem; }
  .article-body h2 { font-size: 1.5rem; margin-top: 2.5rem; }
  .article-body h3 { font-size: 1.1875rem; }
  .cta-inline { padding: 1.5rem; }
}
