/*
Theme Name: da Silva Costa — Blog
Theme URI: https://dasilvacosta.adv.br
Author: da Silva Costa Advocacia
Description: Tema custom do blog jurídico da Silva Costa. Integra com o site estático principal em / (mesmos CSS, fontes e identidade visual).
Version: 1.0.0
License: Proprietary
Text Domain: dasilvacosta-blog
*/

/* ============================================================
   BLOG WP — estende o sistema do site estático principal (em /)
   Importa CSS vars do site (--ink, --accent, --paper, fontes)
   e adiciona apenas o que é específico de blog (single post,
   comments, sidebar, archive, pagination).
   ============================================================ */

/* Body base — herda fontes e cores do styles.css principal */
body.blog-page {
  background: var(--paper, #fff);
  color: var(--ink, #0e0d0c);
  font-family: var(--font-sans, 'Roboto', sans-serif);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* Blog: nav SEMPRE com fundo sólido — não tem hero escuro como o site
   estático, então transparente ficaria ilegível sobre o conteúdo claro */
body.blog-page .nav.theme-light {
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line, rgba(33,33,39,0.12));
}

/* ---- Layout principal ---- */
.blog-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.blog-main {
  padding: 60px 0 100px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
}
.blog-content { min-width: 0; }
.blog-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

/* ---- Hero do blog (archive) ---- */
.blog-archive-hero {
  padding: 120px 0 40px;
  border-bottom: 1px solid #ece8df;
  background: linear-gradient(180deg, #f7f5f1 0%, #fff 100%);
}
.blog-archive-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin: 16px 0 12px;
}
.blog-archive-hero h1 .em { font-style: italic; color: var(--accent, #c9a96a); }
.blog-archive-hero p {
  font-size: 18px;
  color: #6b6760;
  font-weight: 300;
  max-width: 60ch;
  line-height: 1.6;
}

/* ---- Lista de posts (archive/home) ---- */
.blog-list { padding: 0 0 60px; }
.blog-post-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid #ece8df;
  align-items: start;
}
.blog-post-card:last-child { border-bottom: 0; }
.blog-post-card .thumb {
  aspect-ratio: 4 / 3;
  background: #f1ede2;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
}
.blog-post-card .meta {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6760;
  margin-bottom: 14px;
}
.blog-post-card .meta .cat {
  background: #1a1816;
  color: #fff;
  padding: 4px 10px;
  border-radius: 3px;
}
.blog-post-card h2 {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  line-height: 1.3;
}
.blog-post-card h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.blog-post-card h2 a:hover { color: var(--accent, #c9a96a); }
.blog-post-card .excerpt {
  font-size: 16px;
  line-height: 1.65;
  color: #2b2823;
  margin-bottom: 18px;
}
.blog-post-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--accent, #c9a96a);
  text-decoration: none;
  font-weight: 500;
}
.blog-post-card .read-more::after { content: '→'; transition: transform 0.2s; }
.blog-post-card .read-more:hover::after { transform: translateX(4px); }

/* ---- Single post ---- */
.single-post-hero {
  padding: 120px 0 40px;
  background: linear-gradient(180deg, #f7f5f1 0%, #fff 100%);
  border-bottom: 1px solid #ece8df;
}
.single-post-hero .meta {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6760;
  margin-bottom: 24px;
}
.single-post-hero .meta .accent { color: var(--accent, #c9a96a); font-weight: 500; }
.single-post-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 20px;
  max-width: 22ch;
}
.single-post-hero h1 .em {
  font-style: italic;
  color: var(--accent, #c9a96a);
}
.single-post-hero .lead {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.55;
  color: #2b2823;
  max-width: 60ch;
  margin: 0 0 30px;
}
.single-post-hero .author {
  display: flex; align-items: center; gap: 16px;
  font-size: 14px;
  color: #6b6760;
}
.single-post-hero .author strong { color: #1a1816; font-weight: 500; }

/* ---- Post body ---- */
.single-post-body {
  padding: 60px 0 80px;
}
.single-post-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
}
.single-toc {
  position: sticky;
  top: 120px;
  align-self: start;
  font-size: 13px;
}
.single-toc-title {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b6760;
  margin-bottom: 16px;
}
.single-toc ul { list-style: none; padding: 0; margin: 0; }
.single-toc li { padding: 6px 0; border-left: 1px solid #ece8df; padding-left: 14px; }
.single-toc a { color: #2b2823; text-decoration: none; transition: color 0.2s; }
.single-toc a:hover { color: var(--accent, #c9a96a); }
.single-toc a.active { color: var(--accent, #c9a96a); font-weight: 500; }

.single-content {
  font-size: 18px;
  line-height: 1.75;
  color: #1a1816;
  font-weight: 300;
}
.single-content p { margin: 0 0 24px; }
.single-content h2 {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 56px 0 20px;
}
.single-content h3 {
  font-size: 22px;
  font-weight: 500;
  margin: 40px 0 16px;
}
.single-content a { color: var(--accent, #c9a96a); text-decoration: underline; text-underline-offset: 3px; }
.single-content strong { font-weight: 500; color: #0e0d0c; }
.single-content ul, .single-content ol { padding-left: 24px; margin: 0 0 24px; }
.single-content li { margin-bottom: 10px; }
.single-content blockquote {
  margin: 32px 0;
  padding: 22px 28px;
  border-left: 3px solid var(--accent, #c9a96a);
  background: #faf8f4;
  font-style: italic;
  font-size: 17px;
  color: #2b2823;
}
.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 32px 0;
}
.single-content code {
  background: #f1ede2;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}
.single-content pre {
  background: #1a1816;
  color: #f1ede2;
  padding: 20px 24px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono, monospace);
  font-size: 14px;
}
.single-content pre code { background: transparent; padding: 0; color: inherit; }

/* ---- Tags / categorias ---- */
.post-tags { margin: 40px 0 20px; }
.post-tags a {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 6px 12px;
  border: 1px solid #ece8df;
  border-radius: 999px;
  font-size: 12px;
  color: #2b2823;
  text-decoration: none;
  transition: all 0.2s;
}
.post-tags a:hover { background: var(--accent, #c9a96a); color: #fff; border-color: var(--accent, #c9a96a); }

/* ---- Bio do autor ---- */
.author-box {
  margin: 64px 0 40px;
  padding: 40px;
  background: #f4f4f4;
  border-radius: 3px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 32px;
  align-items: center;
}
.author-box .avatar {
  width: 110px; height: 110px;
  border-radius: 999px;
  background-size: cover;
  background-position: 75% 30%;
  background-color: #ece8df;
}
.author-box-body { min-width: 0; }
.author-box-body { min-width: 0; }
.author-box h4 { font-size: 22px; font-weight: 500; margin: 0 0 8px; letter-spacing: -0.01em; }
.author-box .role {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b6760;
  margin-bottom: 18px;
}
.author-box p {
  font-size: 14px;
  line-height: 1.7;
  color: #2b2823;
  margin: 0 0 14px;
}
.author-box p:last-of-type { margin-bottom: 18px; }
.author-box strong { font-weight: 500; color: #1a1816; }
.author-links {
  display: flex;
  gap: 14px;
  align-items: center;
}
.author-links a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b6760;
  border: 1px solid #ece8df;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.author-links a:hover {
  color: #fff;
  background: var(--accent, #c9a96a);
  border-color: var(--accent, #c9a96a);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .author-box {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 24px;
  }
  .author-box .avatar {
    width: 80px; height: 80px;
  }
}

/* ---- Posts relacionados ---- */
.related-posts {
  border-top: 1px solid #ece8df;
  padding: 60px 0;
}
.related-posts-title {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b6760;
  margin-bottom: 32px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.related-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.related-card .thumb {
  aspect-ratio: 4 / 3;
  background: #f1ede2;
  border-radius: 6px;
  margin-bottom: 16px;
  background-size: cover;
  background-position: center;
}
.related-card h4 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 8px;
  transition: color 0.2s;
}
.related-card:hover h4 { color: var(--accent, #c9a96a); }
.related-card .meta {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #6b6760;
}

/* ---- Sidebar ---- */
.widget {
  margin-bottom: 40px;
  font-size: 14px;
}
.widget-title {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b6760;
  margin-bottom: 18px;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li {
  padding: 8px 0;
  border-bottom: 1px solid #ece8df;
}
.widget li:last-child { border-bottom: 0; }
.widget a { color: #2b2823; text-decoration: none; transition: color 0.2s; }
.widget a:hover { color: var(--accent, #c9a96a); }

/* CTA na sidebar */
.sidebar-cta {
  padding: 24px;
  background: #0e0d0c;
  color: #fff;
  border-radius: 8px;
}
.sidebar-cta h4 { font-size: 18px; font-weight: 400; margin: 0 0 10px; color: #fff; }
.sidebar-cta p { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.7); margin: 0 0 18px; }
.sidebar-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--accent, #c9a96a);
  color: #0e0d0c;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

/* ---- Paginação ---- */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}
.blog-pagination a, .blog-pagination span {
  padding: 10px 16px;
  border: 1px solid #ece8df;
  border-radius: 4px;
  text-decoration: none;
  color: #2b2823;
  font-size: 13px;
  transition: all 0.2s;
}
.blog-pagination a:hover { background: #1a1816; color: #fff; border-color: #1a1816; }
.blog-pagination .current { background: var(--accent, #c9a96a); color: #fff; border-color: var(--accent, #c9a96a); }

/* ---- Comments (oculto por padrão — blog jurídico não costuma ter) ---- */
.comments-area { display: none; }

/* ---- 404 ---- */
.error-404 {
  padding: 200px 0 120px;
  text-align: center;
}
.error-404 h1 {
  font-size: 120px;
  font-weight: 200;
  margin: 0;
  color: var(--accent, #c9a96a);
}
.error-404 h2 {
  font-size: 32px;
  font-weight: 300;
  margin: 16px 0 32px;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .blog-main { grid-template-columns: 1fr; gap: 40px; }
  .blog-sidebar { position: static; }
  .blog-post-card { grid-template-columns: 1fr; }
  .single-post-grid { grid-template-columns: 1fr; }
  .single-toc { position: static; display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .author-box { grid-template-columns: 1fr; }
  .author-box .avatar { width: 60px; height: 60px; }
}
