:root {
  --azul: #2563EB;
  --azul-escuro: #1D4ED8;
  --marinho: #0F2447;
  --sky: #E8F0FE;
  --azul-aco: #5B8DEF;
  --nevoa: #F4F6FA;
  --corpo: #334155;
  --secundario: #475569;
  --muted: #64748B;
  --linha: #E5E9F0;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;
  --sh-md: 0 6px 18px rgba(15,36,71,.08);
  --sh-lg: 0 18px 40px rgba(15,36,71,.10);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Geist', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--corpo); background: #fff; line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--azul); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--marinho); line-height: 1.2; margin: 0 0 .5em; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* Header */
.blog-header { border-bottom: 1px solid var(--linha); padding: 18px 0; }
.blog-header .container { display: flex; align-items: center; justify-content: space-between; }
.blog-header .brand-logo { height: 30px; width: auto; }
.blog-header nav { display: flex; gap: 24px; font-size: 14px; font-weight: 500; }
.blog-header nav a { color: var(--secundario); text-decoration: none; }
.blog-header nav a:hover, .blog-header nav a.active { color: var(--azul); }

/* Footer */
.blog-footer { background: var(--marinho); color: #9fb0c9; padding: 40px 0; margin-top: 80px; font-size: 14px; }
.blog-footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.blog-footer a { color: #cfe0ff; }

/* Listing */
.blog-hero { background: var(--nevoa); padding: 56px 0; text-align: center; }
.blog-hero h1 { font-size: 36px; }
.blog-hero p { color: var(--secundario); max-width: 620px; margin: 0 auto; }

.cat-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; justify-content: center; }
.cat-filters a { background: var(--sky); color: var(--secundario); padding: 8px 16px; border-radius: var(--r-full); font-size: 13px; font-weight: 600; text-decoration: none; }
.cat-filters a.active, .cat-filters a:hover { background: var(--azul); color: #fff; }

.post-grid { list-style: none; margin: 0 0 48px; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post-card { border: 1px solid var(--linha); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow .18s, transform .18s; display: flex; flex-direction: column; }
.post-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.post-card img { width: 100%; height: 180px; object-fit: cover; background: var(--sky); }
.post-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-cat { font-size: 12px; font-weight: 700; color: var(--azul); text-transform: uppercase; letter-spacing: .05em; }
.post-card h2 { font-size: 19px; margin: 0; }
.post-card h2 a { color: var(--marinho); text-decoration: none; }
.post-card p { color: var(--secundario); font-size: 14px; margin: 0; flex: 1; }
.post-card-meta { font-size: 12px; color: var(--muted); }

.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--linha); font-size: 14px; text-decoration: none; color: var(--secundario); }
.pagination a:hover { background: var(--sky); }
.pagination .current { background: var(--azul); color: #fff; border-color: var(--azul); }

/* Single post */
.post-header { padding: 48px 0 24px; }
.post-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.post-breadcrumb a { color: var(--muted); text-decoration: none; }
.post-header h1 { font-size: 38px; }
.post-byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.post-byline-author { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--marinho); font-weight: 600; font-size: 14px; }
.post-byline-author:hover { color: var(--azul); }
.post-byline-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; }
.post-byline-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: var(--sky); color: var(--azul); font-weight: 700; text-transform: uppercase; }
.post-meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.post-featured-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r-lg); margin: 24px 0; }

.post-excerpt { background: var(--sky); border-left: 4px solid var(--azul); padding: 16px 20px; border-radius: var(--r-sm); font-size: 16px; color: var(--marinho); margin-bottom: 32px; }

/* Principais pontos (GEO/AIO) */
.post-takeaways { background: var(--nevoa); border: 1px solid var(--linha); border-radius: var(--r-lg); padding: 24px 28px; margin-bottom: 32px; }
.post-takeaways h2 { font-size: 17px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .7em; }
.post-takeaways ul { margin: 0; padding-left: 1.2em; }
.post-takeaways li { margin-bottom: .5em; color: var(--corpo); }
.post-takeaways li:last-child { margin-bottom: 0; }

/* Sumário (TOC) retrátil */
.post-toc { border: 1px solid var(--linha); border-radius: var(--r-lg); margin-bottom: 32px; overflow: hidden; }
.post-toc-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--marinho); color: #fff; border: none; padding: 16px 20px; font-family: var(--font-display); font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.post-toc-chevron { width: 20px; height: 20px; flex-shrink: 0; transition: transform .2s ease; }
.post-toc-toggle[aria-expanded="false"] .post-toc-chevron { transform: rotate(-90deg); }
.post-toc-body { padding: 20px 24px; }
.post-toc-list { counter-reset: toc; list-style: none; margin: 0; padding: 0; }
.post-toc-list > li { counter-increment: toc; position: relative; padding-left: 1.8em; margin-bottom: 10px; font-weight: 600; }
.post-toc-list > li::before { content: counter(toc) "."; position: absolute; left: 0; color: var(--azul); }
.post-toc-list a { color: var(--marinho); text-decoration: none; }
.post-toc-list a:hover { color: var(--azul); text-decoration: underline; }
.post-toc-sublist { counter-reset: subtoc; list-style: none; margin: 8px 0 0; padding: 0; }
.post-toc-sublist > li { counter-increment: subtoc; position: relative; padding-left: 3.4em; margin-bottom: 6px; font-weight: 400; font-size: 15px; }
.post-toc-sublist > li::before { content: counter(toc) "." counter(subtoc); position: absolute; left: 1.8em; width: 2.8em; color: var(--muted); font-weight: 600; }
.post-toc-sublist a { color: var(--secundario); }

.post-content { font-size: 17px; color: var(--corpo); scroll-behavior: smooth; }
.post-content h2 { font-size: 26px; margin-top: 1.6em; scroll-margin-top: 16px; }
.post-content h3 { font-size: 20px; margin-top: 1.4em; scroll-margin-top: 16px; }
.post-content p { margin: 0 0 1.2em; }
.post-content ul, .post-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.post-content li { margin-bottom: .4em; }
.post-content a { color: var(--azul); }
.post-content blockquote { border-left: 4px solid var(--azul); margin: 1.5em 0; padding: 4px 20px; color: var(--secundario); font-style: italic; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.post-content th, .post-content td { border: 1px solid var(--linha); padding: 8px 12px; text-align: left; }

.post-faq { margin: 48px 0; }
.faq-item-public { border: 1px solid var(--linha); border-radius: var(--r-md); margin-bottom: 12px; overflow: hidden; }
.faq-item-public summary { padding: 16px 20px; font-weight: 600; color: var(--marinho); cursor: pointer; list-style: none; }
.faq-item-public summary::-webkit-details-marker { display: none; }
.faq-item-public summary::after { content: '+'; float: right; color: var(--azul); font-weight: 700; }
.faq-item-public[open] summary::after { content: '−'; }
.faq-item-public p { padding: 0 20px 16px; margin: 0; color: var(--secundario); }

.post-sources { margin: 40px 0; padding: 20px; background: var(--nevoa); border-radius: var(--r-md); font-size: 13px; color: var(--muted); }
.post-sources h3 { font-size: 15px; }
.post-sources ul { padding-left: 1.2em; margin: 0; }

.related-posts { margin: 56px 0; }
.related-posts h2 { font-size: 22px; }

.post-cta { background: var(--marinho); color: #fff; border-radius: var(--r-lg); padding: 40px; text-align: center; margin: 56px 0; }
.post-cta h2 { color: #fff; }
.post-cta p { color: rgba(255,255,255,.8); }
.post-cta .btn { display: inline-block; margin-top: 16px; background: var(--azul); color: #fff; padding: 14px 28px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; }

@media (max-width: 680px) {
  .post-header h1 { font-size: 28px; }
  .blog-hero h1 { font-size: 26px; }
}

/* Página do autor */
.author-header { text-align: center; padding: 56px 0 40px; }
.author-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px; }
.author-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: var(--sky); color: var(--azul); font-weight: 700; font-size: 36px; text-transform: uppercase; }
.author-bio { color: var(--secundario); font-size: 17px; max-width: 60ch; margin: 0 auto 20px; }
.author-credentials { list-style: none; margin: 0 auto 20px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 620px; }
.author-credentials li { background: var(--sky); color: var(--azul-escuro); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: var(--r-full); }
.author-links { display: flex; justify-content: center; gap: 20px; font-size: 14px; }
.author-posts-title { font-size: 22px; margin-bottom: 20px; }
