/*
 * blog.css — Estilos compartilhados do blog do Norma.
 * Importado por blog/index.html e por cada post individual.
 * Depende das fontes carregadas via Google Fonts (herdado do site).
 * Usa as mesmas variáveis CSS de privacidade.html / termos.html.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #F6F3EC;
  --surface:    #FBFAF7;
  --surface-2:  #F1EEE7;
  --text:       #1F2430;
  --muted:      #5C6470;
  --muted-2:    #7A8088;
  --primary:    #2F4F6B;
  --primary-h:  #254260;
  --primary-dim:rgba(47,79,107,0.08);
  --border:     #D9D2C7;
  --border-2:   #CFC6B8;
  --r-sm:       8px;
  --r-md:       12px;
  --serif:      'Source Serif 4', Georgia, serif;
  --sans:       'Source Sans 3', system-ui, sans-serif;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); }
a:hover { color: var(--primary-h); }

/* ── Navegação ──────────────────────────────────────────── */
nav.top-nav {
  display: flex;
  align-items: center;
  padding: 0 40px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-shrink: 0;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.nav-blog {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.nav-blog:hover { color: var(--primary); }

.nav-sep {
  font-size: 13px;
  color: var(--border-2);
}

.nav-cta {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--r-sm);
  transition: background .15s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--primary-h); color: #fff; }

/* ── Main ───────────────────────────────────────────────── */
main { flex: 1; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
}
footer a { color: var(--muted-2); text-decoration: none; margin: 0 10px; }
footer a:hover { color: var(--primary); }

/* ════════════════════════════════════════════════════════
   INDEX DO BLOG
   ════════════════════════════════════════════════════════ */

.blog-index-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 56px 40px 48px;
  text-align: center;
}

.blog-index-hero h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.blog-index-hero p {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 40px 64px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.post-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(47,79,107,.10);
  color: var(--text);
}

.post-card-illo {
  background: var(--primary-dim);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--primary);
}

.post-card-body h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.post-card-body p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.post-card-meta {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 4px;
}

/* ════════════════════════════════════════════════════════
   POST INDIVIDUAL
   ════════════════════════════════════════════════════════ */

.post-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 52px 40px 44px;
}

.post-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.post-hero-text { flex: 1; }

.post-hero-text .post-tag { display: block; margin-bottom: 14px; }

.post-hero-text h1 {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
  margin-bottom: 16px;
}

.post-hero-text .post-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.post-hero-text .post-meta {
  font-size: 12.5px;
  color: var(--muted-2);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.post-illo { flex-shrink: 0; opacity: .85; }

/* ── Coluna de leitura ──────────────────────────────────── */
.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 40px 72px;
}

.post-content h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2.2em 0 .7em;
  line-height: 1.3;
}

.post-content h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.6em 0 .5em;
}

.post-content p {
  font-family: var(--serif);
  font-size: 1.035rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.1em;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.1em 1.5em;
}

.post-content li {
  font-family: var(--serif);
  font-size: 1.035rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: .35em;
}

.post-content strong { font-weight: 700; }

/* Bloco de exemplo ABNT */
.abnt-exemplo {
  background: var(--surface-2);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 14px 18px;
  margin: 1.2em 0 1.4em;
  font-family: var(--sans);
  font-size: .92rem;
  line-height: 1.65;
  color: var(--text);
}

.abnt-exemplo .exemplo-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 6px;
}

/* Tabela de normas */
.norma-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0 1.6em;
  font-size: .92rem;
}

.norma-table th {
  background: var(--primary);
  color: #fff;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  text-align: left;
  padding: 8px 14px;
  letter-spacing: .04em;
}

.norma-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  color: var(--text);
  vertical-align: top;
}

.norma-table tr:last-child td { border-bottom: none; }
.norma-table tr:nth-child(even) td { background: var(--surface); }

/* CTA box */
.cta-box {
  background: var(--primary-dim);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px 32px;
  margin: 2.5em 0 0;
  text-align: center;
}

.cta-box h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 8px;
}

.cta-box p {
  font-size: .92rem;
  color: var(--muted);
  margin: 0 0 18px;
  font-family: var(--sans);
}

.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 700;
  padding: 11px 28px;
  border-radius: var(--r-sm);
  transition: background .15s;
}
.cta-btn:hover { background: var(--primary-h); color: #fff; }

/* Posts relacionados */
.related {
  border-top: 1px solid var(--border);
  padding: 36px 40px 56px;
}

.related-inner { max-width: 720px; margin: 0 auto; }

.related h2 {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.4;
  transition: border-color .15s;
}
.related-card:hover { border-color: var(--primary); color: var(--primary); }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); padding: 36px 24px 48px; }
}

@media (max-width: 600px) {
  nav.top-nav { padding: 0 20px; height: 52px; }
  .blog-index-hero { padding: 40px 20px 36px; }
  .blog-index-hero h1 { font-size: 1.5rem; }
  .posts-grid { grid-template-columns: 1fr; padding: 28px 20px 48px; gap: 16px; }
  .post-hero { padding: 36px 20px 32px; }
  .post-hero-inner { flex-direction: column; gap: 24px; }
  .post-illo { display: none; }
  .post-hero-text h1 { font-size: 1.45rem; }
  .post-content { padding: 32px 20px 56px; }
  .related { padding: 28px 20px 44px; }
  .related-grid { grid-template-columns: 1fr; }
  footer { padding: 20px 20px; }
  .cta-box { padding: 22px 20px; }
}

/* ── Impressão ──────────────────────────────────────────── */
@media print {
  nav.top-nav, .cta-box, .related, footer { display: none; }
  .post-content { padding: 0; }
  .abnt-exemplo { border: 1px solid #999; }
}
