/* Rubriq — blog. Estilos do índice (/blog) e das páginas de artigo
   (/blog/<slug>). Depende das variáveis e do header/footer de styles.css —
   este arquivo só adiciona o que é específico do blog. Tema claro, dourado. */

/* ---------- Índice: hero ---------- */
.blog-index-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 40px;
  text-align: center;
}
.blog-index-hero .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.blog-index-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.blog-index-hero h1 .grad { color: var(--brand-600); }
.blog-index-hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Índice: grid de posts ---------- */
.blog-grid {
  max-width: var(--max);
  margin: 24px auto 96px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.post-card .post-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 14px;
}
.post-card h2 {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.post-card p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 18px;
  flex: 1;
}
.post-card .post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.post-card .post-meta .dot { opacity: 0.5; }
.post-card .post-more {
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card:hover .post-more { gap: 10px; }
.post-card .post-more svg { width: 15px; height: 15px; transition: transform 0.2s; }

/* ---------- Artigo ---------- */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}
.article-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.article-breadcrumb a { color: var(--brand-700); font-weight: 500; }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 16px;
}
.article h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 18px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-dim);
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.article-meta .dot { opacity: 0.5; }
.article-lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 28px;
  font-weight: 500;
}

/* Corpo tipográfico */
.article-body { font-size: 1.06rem; line-height: 1.75; color: #1e293b; }
.article-body h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 48px 0 16px;
  color: var(--text);
}
.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text);
}
.article-body p { margin: 0 0 20px; }
.article-body a { color: var(--brand-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--brand-600); }
.article-body strong { font-weight: 700; color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 24px; }
.article-body li { margin-bottom: 10px; }
.article-body ul li::marker { color: var(--brand); }
.article-body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--brand);
  color: var(--text-dim);
  font-style: italic;
  font-size: 1.08rem;
}

/* Tabela dentro de artigo */
.article-body .table-wrap { overflow-x: auto; margin: 0 0 24px; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 460px;
}
.article-body th, .article-body td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.article-body th {
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
}
.article-body tr:last-child td { border-bottom: none; }

/* Código inline e blocos */
.article-body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  color: #b4531f;
  word-break: break-word;
}
.article-body pre {
  background: #1a1405;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 24px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}
.article-body pre code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: none;
  border: none;
  padding: 0;
  color: #f4ecd6;
  white-space: pre;
  word-break: normal;
}
.article-body pre .tok-c { color: #9a8a5c; }   /* comentário */
.article-body pre .tok-s { color: #d4af37; }   /* string / destaque */

/* Callout / destaque */
.callout {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 28px 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #4a3d12;
}
.callout strong { color: var(--brand-700); }

/* Caixa de CTA no meio/fim do artigo */
.cta-box {
  background: linear-gradient(135deg, #1a1405 0%, #2a2410 100%);
  border-radius: 16px;
  padding: 32px 28px;
  margin: 40px 0;
  text-align: center;
  box-shadow: var(--shadow-gold);
}
.cta-box h3 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.cta-box p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  margin: 0 auto 20px;
  max-width: 440px;
  line-height: 1.55;
}
.cta-box .btn-primary { padding: 13px 26px; font-size: 1rem; }
.cta-box .cta-sub {
  display: block;
  margin-top: 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Autor + compartilhar no rodapé do artigo */
.article-foot {
  max-width: 760px;
  margin: 8px auto 0;
  padding: 28px 24px 0;
  border-top: 1px solid var(--border);
}
.article-author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.article-author .avatar {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-300), var(--brand));
  display: flex; align-items: center; justify-content: center;
  color: #1a1405; font-weight: 800; font-size: 1.1rem;
  flex-shrink: 0;
}
.article-author .who strong { display: block; font-size: 0.95rem; color: var(--text); }
.article-author .who span { font-size: 0.85rem; color: var(--text-dim); }

/* Relacionados */
.related {
  max-width: var(--max);
  margin: 64px auto 96px;
  padding: 0 24px;
}
.related h2 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
