/* ════════════════════════════════════════════════════════════
   blog.css — páginas públicas do blog (home, post, categoria, busca).
   Usa só os tokens de css/global.css. Estilo mínimo: o acabamento
   final entra na Fase 9.
════════════════════════════════════════════════════════════ */

/* Gradiente verde-água atrás da nav transparente (mesmo das páginas de serviço) */
body {
  background-image: linear-gradient(180deg,
      rgba(178, 232, 224, .42) 0%,
      rgba(178, 232, 224, .16) 20%,
      transparent 44%);
  background-repeat: no-repeat;
  background-size: 100% 100vh;
}

::selection { background: var(--green); color: #fff; }

.bl-wrap a:focus-visible,
.bl-wrap button:focus-visible,
.bl-wrap input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.bl-wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: calc(var(--nav) + 64px) var(--pad) 96px;
}

/* global.css posiciona todo <nav> como fixo: neutraliza no breadcrumb e na paginação */
.bl-crumb, .bl-pager, .bl-filter { position: static; inset: auto; z-index: auto; height: auto; }

/* breadcrumb */
.bl-crumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; margin-block: -10px; font-size: 13.5px; color: var(--text2); }
.bl-crumb li + li::before { content: "›"; margin-right: 10px; }
.bl-crumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text2); text-decoration: none; }
.bl-crumb a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.bl-crumb [aria-current] { color: var(--text); font-weight: 600; }

/* cabeçalho de listagem: o título é o design (mesma escala do /sobre) */
.bl-head { margin: 28px 0 44px; }
.bl-head h1 { overflow-wrap: break-word; font-size: clamp(40px, 10vw, 88px); font-weight: 800; letter-spacing: -.04em; line-height: .98; text-wrap: balance; }
.bl-head p { margin-top: 20px; max-width: 34em; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; color: var(--text2); }
.bl-empty { max-width: 34em; font-size: 19px; line-height: 1.6; color: var(--text2); }
.bl-empty a { color: var(--green); }

/* layout principal + barra lateral (categoria, busca e post) */
.bl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; margin-top: 24px; }
.bl-head + .bl-layout { margin-top: 0; }

/* barra de filtro: categorias à esquerda, busca à direita */
.bl-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 48px; }
.bl-filter ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.bl-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 100px; background: #F1F1EC; color: var(--text2); font-size: 14.5px; font-weight: 600; text-decoration: none; transition: background .2s, color .2s; }
.bl-chip:hover { background: #E7E7E0; color: var(--text); }
.bl-chip[aria-current] { background: var(--text); color: #fff; }
.bl-chip-n { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bl-chip[aria-current] .bl-chip-n { color: #D1D5DB; }

/* destaque: post mais recente, imagem grande ao lado do texto */
.bl-featured { margin-bottom: 72px; }
.bl-card--feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.bl-card--feature .bl-card-media { order: 0; }
.bl-card--feature .bl-card-media img { aspect-ratio: 16 / 10; }
.bl-card--feature .bl-card-title { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.bl-card--feature .bl-card-excerpt { font-size: 18px; line-height: 1.6; -webkit-line-clamp: 4; }
.bl-card--feature .bl-card-body { gap: 16px; }
.bl-card--feature .bl-card-meta { margin-top: 4px; }

/* grade de posts: imagem em cima, texto direto no fundo, sem caixa */
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }
.bl-card { position: relative; display: flex; flex-direction: column; gap: 20px; }
.bl-card-media { overflow: hidden; border-radius: 14px; background: #ECECE6; }
.bl-card-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.bl-card:hover .bl-card-media img { transform: scale(1.03); }
.bl-card-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bl-card-cat { font-size: 13px; font-weight: 700; color: var(--grn-h); }
.bl-card-cat a { position: relative; z-index: 2; display: inline-block; padding: 6px 0; margin: -6px 0; color: inherit; text-decoration: none; }
.bl-card-cat a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bl-card-title { overflow-wrap: break-word; font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.bl-card-title a { color: var(--text); text-decoration: none; }
.bl-card:hover .bl-card-title a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.bl-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 14px; }
.bl-card-title a:focus-visible { outline: none; }
.bl-card-title a:focus-visible::after { outline: 2px solid var(--green); outline-offset: 6px; }
.bl-card-excerpt { font-size: 16px; line-height: 1.55; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bl-card-meta { font-size: 13.5px; color: var(--muted); }

/* paginação */
.bl-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 15px; }
.bl-pager a { color: var(--text); font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.bl-pager a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.bl-pager-info { color: var(--muted); }

/* barra lateral */
.bl-side { display: flex; flex-direction: column; gap: 40px; position: sticky; top: calc(var(--nav) + 24px); }
/* busca: pílula com botão verde (toolbar das listagens e sidebar do post) */
.bl-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bl-search-row { display: flex; gap: 8px; }
.bl-search input { flex: 1; min-width: 0; width: 260px; min-height: 44px; padding: 0 18px; border: 1px solid #848A94; border-radius: 100px; font: inherit; font-size: 16px; background: #fff; transition: border-color .2s; }
.bl-search input::placeholder { color: var(--muted); }
.bl-search input:hover { border-color: var(--text2); }
.bl-search button { min-height: 44px; padding: 0 22px; border: 0; border-radius: 100px; background: var(--green); color: #fff; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background .15s; }
.bl-search button:hover { background: var(--grn-h); }
.bl-side .bl-search input { width: auto; }
.bl-widget h2 { margin-bottom: 14px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bl-widget--cat { padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.bl-widget-name { font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.bl-widget-name a { color: var(--text); text-decoration: none; }
.bl-widget-name a:hover { color: var(--green); }
.bl-widget-desc { margin-top: 10px; font-size: 15.5px; line-height: 1.55; color: var(--text2); }
.bl-widget-link { display: inline-block; margin-top: 16px; font-size: 14.5px; font-weight: 600; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.bl-widget-link:hover { color: var(--grn-h); text-decoration-thickness: 2px; }
.bl-widget ul { list-style: none; border-top: 1px solid var(--border); }
.bl-widget li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 16px; font-weight: 600; text-decoration: none; transition: color .15s; }
.bl-widget li a:hover { color: var(--green); }
.bl-count { color: var(--muted); font-weight: 500; font-size: 14px; }

/* post: coluna de leitura de ~70 caracteres ao lado da barra lateral */
.bl-layout--post { grid-template-columns: minmax(0, 740px) 300px; justify-content: center; gap: 80px; margin-top: 0; }
.bl-post { min-width: 0; }
.bl-post-head { margin-top: 28px; }
.bl-post-head .bl-card-cat { font-size: 14.5px; }
.bl-post-head h1 { overflow-wrap: break-word; margin-top: 14px; font-size: clamp(34px, 6.2vw, 64px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
.bl-post-meta { margin-top: 22px; font-size: 14.5px; color: var(--text2); }
.bl-post-hero { margin: 44px 0 56px; }
.bl-post-hero img { display: block; width: 100%; height: auto; border-radius: 18px; }

.bl-content { font-size: 19px; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.bl-content > * + * { margin-top: 1.15em; }
.bl-content h2 { margin-top: 2.3em; font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
.bl-content h3 { margin-top: 1.9em; font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.bl-content h4 { margin-top: 1.6em; font-size: 18px; font-weight: 700; }
.bl-content h2 + *, .bl-content h3 + *, .bl-content h4 + * { margin-top: .7em; }
.bl-content a { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bl-content a:hover { color: var(--grn-h); text-decoration-thickness: 2px; }
.bl-content ul, .bl-content ol { padding-left: 1.4em; }
.bl-content li + li { margin-top: .45em; }
.bl-content li::marker { color: var(--green); font-weight: 700; }
.bl-content blockquote { position: relative; padding: 44px 0 0; color: var(--text); font-size: 1.32em; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; text-wrap: balance; }
.bl-content blockquote::before { content: "\201C"; position: absolute; left: -2px; top: -6px; font-size: 3.6em; line-height: 1; font-weight: 800; color: var(--green); }
.bl-content blockquote cite { display: block; margin-top: 12px; font-size: .62em; font-weight: 500; font-style: normal; color: var(--muted); letter-spacing: 0; }
.bl-content hr { border: 0; border-top: 1px solid var(--border); margin: 2.6em 0; }
.bl-content mark { background: #FFF3B0; padding: 0 2px; }
.bl-content code { padding: 2px 6px; border-radius: 5px; background: #EEF0EE; font-size: .88em; }
.blog-post-figure { margin: 2.2em 0; }
.blog-post-figure img { display: block; width: 100%; height: auto; border-radius: 14px; }
.blog-post-figure figcaption, .blog-embed-caption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.blog-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.blog-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bl-tags { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }

/* card de CTA do post: fino e arredondado, o botão é a única cor */
.bl-postcta { margin-top: 56px; padding: 36px; background: #fff; border: 1px solid var(--border); border-radius: 20px; }
.bl-postcta-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.bl-postcta-sub { margin-top: 8px; font-size: 16.5px; color: var(--text2); }
.bl-postcta-btn { display: inline-flex; align-items: center; min-height: 48px; margin-top: 24px; padding: 0 28px; border-radius: 999px; background: var(--green); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s; }
.bl-postcta-btn:hover { background: var(--grn-h); }

/* leia também */
.bl-related { margin-top: 112px; padding-top: 56px; border-top: 1px solid var(--border); }
.bl-related h2 { margin-bottom: 40px; font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }

/* post removido */
.bl-gone { max-width: 760px; }
.bl-gone h1 { font-size: clamp(40px, 8vw, 72px); font-weight: 800; letter-spacing: -.04em; line-height: 1; text-wrap: balance; }
.bl-gone p { margin-top: 20px; font-size: 19px; line-height: 1.6; color: var(--text2); }
.bl-gone-btn { display: inline-flex; align-items: center; min-height: 48px; margin-top: 32px; padding: 0 28px; border-radius: 999px; background: var(--green); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s; }
.bl-gone-btn:hover { background: var(--grn-h); }

@media (max-width: 1100px) {
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .bl-card--feature { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .bl-featured { margin-bottom: 56px; }
  .bl-toolbar { margin-bottom: 36px; }
}

@media (max-width: 640px) {
  .bl-wrap { padding-top: calc(var(--nav) + 40px); padding-bottom: 72px; }
  .bl-head { margin-bottom: 32px; }
  .bl-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .bl-search, .bl-search-row { width: 100%; }
  .bl-search input { width: auto; }
  .bl-pager { margin-top: 56px; }
}

@media (max-width: 1100px) {
  .bl-layout--post { grid-template-columns: minmax(0, 700px) 260px; gap: 48px; }
}

@media (max-width: 900px) {
  .bl-layout, .bl-layout--post { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .bl-side { position: static; }
  .bl-content { font-size: 17.5px; line-height: 1.7; }
  .bl-post-hero { margin: 32px 0 40px; }
  .bl-postcta { padding: 26px; }
  .bl-related { margin-top: 80px; padding-top: 40px; }
}

/* barra de pré-visualização (só admin) */
.bl-preview-bar { position: fixed; inset: auto 0 0 0; z-index: 300; padding: 10px var(--pad); background: #1A1A1A; color: #fff; font-size: 14px; text-align: center; }
