/* Jucoski Soluções em TI — tema do blog.
   Mesmo sistema visual do site (tokens.css + base.css); aqui só o que é do blog: cabeçalho sólido,
   listagem de artigos, leitura do post (coluna de texto + sumário), contato no fim e rodapé. */

/* ---------- Cabeçalho do blog ---------- */
.site-header { border-bottom-color: var(--border); }
.blog-mark {
  display: inline-flex; align-items: center; margin-left: 14px; padding-left: 14px;
  border-left: 1px solid var(--border-strong);
  font-size: .9375rem; font-weight: 700; color: var(--ink-2); text-decoration: none;
}
.blog-mark:hover { color: var(--action); }
.brand-wrap { display: flex; align-items: center; flex: none; }
.site-nav__list a[aria-current] { color: var(--ink); }
.site-nav__list a[aria-current]::after { transform: scaleX(1); }
.site-nav__ext::after { content: " ↗"; }
.site-nav__cta-item { display: flex; align-items: center; margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--border); }
/* menu sem outros links antes do botão (caso atual do blog): sem o filete separador solto */
.site-nav__cta-item:first-child { margin-left: 0; padding-left: 0; border-left: 0; }
.site-nav__list a.site-nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--action); color: #fff; font-weight: 700;
  box-shadow: 0 1px 2px rgba(13, 116, 180, .25), 0 6px 14px -6px rgba(13, 116, 180, .5);
}
.site-nav__list a.site-nav__cta::after { display: none; }
.site-nav__list a.site-nav__cta:hover { background: var(--action-hover); color: #fff; }
.site-nav__cta .icon { width: 16px; height: 16px; }
.mobile-menu__wa {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; margin-top: 16px; border-radius: 12px;
  background: var(--action); color: #fff; font-weight: 700; text-decoration: none;
}
/* o base.css (do site) pinta este ícone de verde #1EA952; no botão azul ele some (1,6:1): branco como o texto */
.mobile-menu__wa .icon { color: inherit; }
@media (max-width: 959px) {
  .site-header__inner { position: relative; }
  /* width: a marca mede o próprio conteúdo; presa a 50% da tela, o "Blog" passava por baixo do botão do menu (320–340 px) */
  .brand-wrap { position: absolute; left: 50%; transform: translateX(-50%); width: max-content; }
  /* base.css (copiado do site) centraliza a própria .brand no celular; aqui quem centraliza é o .brand-wrap,
     então a logo volta ao fluxo normal (senão ela fica espremida em cima do "Blog") */
  .site-header:not(.legal-header) .brand-wrap .brand { position: static; transform: none; }
}
@media (max-width: 479px) { .blog-mark { margin-left: 10px; padding-left: 10px; font-size: .875rem; } }
/* abaixo de 360 px a marca centralizada ainda encostava no botão do menu: um pouco menor e 6 px à esquerda */
@media (max-width: 359px) {
  .brand-wrap { left: calc(50% - 6px); }
  .brand__logo { height: 25px; }
  .blog-mark { margin-left: 8px; padding-left: 8px; }
}

/* barra de progresso de leitura (só no post; js/blog.js define --progress) */
.reading-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  pointer-events: none;
}

/* ---------- Página inicial do blog ---------- */
.blog-intro { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 40px); background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.blog-intro__title { max-width: 18ch; font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
.blog-intro__lead { max-width: 56ch; margin-top: 16px; font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg);
  font-size: .9375rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--action); color: var(--action-hover); }
.chip[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip__count { font-size: .8125rem; opacity: .7; }

.blog-list { padding-block: clamp(24px, 4vw, 48px) clamp(64px, 8vw, 104px); }
.blog-list__title { margin-bottom: 20px; font-size: 1.125rem; font-weight: 700; color: var(--ink-2); }

/* categoria do post (etiqueta pequena, sem virar "eyebrow" de seção) */
.post-cat {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--action-soft); color: var(--action-hover); font-size: .8125rem; font-weight: 700; text-decoration: none;
}
.post-cat:hover { background: var(--action); color: #fff; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .875rem; color: var(--ink-2); }
.meta > * + *::before { content: "·"; margin-right: 10px; color: var(--border-strong); }

/* cartão em destaque (post mais recente): capa vertical + texto */
.card-feature {
  position: relative; display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(24px, 4vw, 48px); align-items: center;
  padding: clamp(16px, 2vw, 20px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg);
  box-shadow: var(--shadow);
  transition: box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.card-feature:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.card-feature__cover { overflow: hidden; border-radius: 14px; background: var(--bg-ice); aspect-ratio: 4 / 5; }
.card-feature__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.card-feature:hover .card-feature__cover img { transform: scale(1.03); }
.card-feature__body { display: grid; gap: 14px; justify-items: start; padding-right: clamp(0px, 2vw, 24px); }
.card-feature__title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.card-feature__title a, .card__title a { color: var(--ink); text-decoration: none; }
/* o cartão inteiro leva ao post (link esticado no título) */
.card-feature__title a::after, .card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-feature .post-cat, .card .post-cat { position: relative; z-index: 1; }
.card-feature__excerpt { max-width: 60ch; font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); }
.read-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--action); }
.read-more .icon { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease); }
.card-feature:hover .read-more .icon, .card:hover .read-more .icon { transform: translateX(3px); }

/* grade dos demais artigos */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.card {
  position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg);
  transition: box-shadow 220ms var(--ease), border-color 220ms var(--ease), transform 220ms var(--ease);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card__cover { aspect-ratio: 4 / 5; background: var(--bg-ice); }
.card__cover img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: grid; gap: 10px; align-content: start; justify-items: start; padding: 18px 20px 22px; }
.card__title { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--border); color: var(--ink); font-weight: 700; text-decoration: none;
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty-state { max-width: 52ch; padding: 40px 0; color: var(--ink-2); }

@media (max-width: 959px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) {
  .card-feature { grid-template-columns: 1fr; }
  .card-feature__cover { max-width: 420px; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------- Post ---------- */
.post-hero { padding-block: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 40px); background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.post-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: clamp(28px, 5vw, 72px); align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .875rem; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--action); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .icon { width: 14px; height: 14px; }
.post-hero__title {
  margin-top: 18px; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; overflow-wrap: break-word;
}
.post-hero__lead { max-width: 60ch; margin-top: 18px; font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.byline__avatar {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
}
.byline__avatar img { width: 30px; height: auto; }
.byline__name { font-weight: 700; color: var(--ink); }
.post-cover { overflow: hidden; border-radius: var(--radius-lg); background: var(--bg-ice); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(32px, 6vw, 80px); align-items: start; padding-block: clamp(32px, 5vw, 56px) clamp(56px, 7vw, 96px); }
.post-main { min-width: 0; max-width: 720px; }

/* texto do post (conteúdo vindo do editor) */
.prose { font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); line-height: 1.78; color: #2D3F4B; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.5rem, 1.25rem + .9vw, 1.875rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; font-weight: 700; line-height: 1.35; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose strong { color: var(--ink); }
.prose a { color: var(--action); font-weight: 600; text-underline-offset: 3px; }
.prose a:hover { color: var(--action-hover); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; left: -1.05em; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose ol { list-style: none; counter-reset: passo; }
.prose ol > li { position: relative; counter-increment: passo; padding-left: .4em; }
.prose ol > li::before {
  content: counter(passo); position: absolute; left: -1.4em; top: .22em;
  display: grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%;
  background: var(--action-soft); color: var(--action-hover); font-size: .8em; font-weight: 700; line-height: 1;
}
.prose li + li { margin-top: .45em; }
.prose code {
  padding: .12em .42em; border-radius: 6px; background: #FFF4E5; border: 1px solid #F6D9AE;
  color: #8A4B08; font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .86em;
  overflow-wrap: anywhere;
}
.prose blockquote { padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--ink); font-size: 1.08em; }
.prose img, .prose figure { max-width: 100%; height: auto; border-radius: 14px; }
.prose figcaption { margin-top: 8px; font-size: .875rem; color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95em; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
/* primeiro parágrafo em destaque */
.prose > p:first-child { font-size: 1.12em; color: var(--ink); }

/* sumário fixo na lateral */
.toc { position: sticky; top: calc(var(--header-h) + 28px); }
.toc__title { font-size: .875rem; font-weight: 700; color: var(--ink); }
.toc__list { display: grid; margin-top: 12px; border-left: 2px solid var(--border); }
.toc__list a {
  display: block; margin-left: -2px; padding: 7px 0 7px 14px; border-left: 2px solid transparent;
  font-size: .875rem; line-height: 1.4; color: var(--ink-2); text-decoration: none;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.toc__list a:hover { color: var(--ink); }
.toc__list a[aria-current] { border-left-color: var(--action); color: var(--action-hover); font-weight: 700; }
.toc-mobile { display: none; margin-bottom: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt); }
.toc-mobile summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; font-weight: 700; cursor: pointer; list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary .icon { transition: transform var(--t-fast) var(--ease); }
.toc-mobile[open] summary .icon { transform: rotate(180deg); }
.toc-mobile .toc__list { margin: 0 16px 16px; }

/* contato no fim do post */
.post-cta {
  display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center;
  margin-top: 56px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg);
  background: var(--dark); color: #C9D8E2;
}
.post-cta__title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; color: #fff; }
.post-cta__text { margin-top: 8px; line-height: 1.6; }
/* verde com contraste AA para o texto branco: #1EA952 dava 3,1:1 (hover #178A42, 4,4:1); #16873F dá 4,6:1 e #157A3B, 5,4:1 */
.btn--wa { background: #16873F; color: #fff; box-shadow: 0 6px 16px -6px rgba(22, 135, 63, .6); }
.btn--wa:hover { background: #157A3B; }

/* "Compartilhar" numa linha e os três botões na linha de baixo, com a mesma largura (não sobra um sozinho) */
.share { display: grid; grid-template-columns: repeat(3, max-content); align-items: center; gap: 10px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.share__label { grid-column: 1 / -1; font-weight: 700; color: var(--ink); }
.share a, .share button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); font: inherit; font-size: .9375rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.share a:hover, .share button:hover { border-color: var(--action); color: var(--action-hover); }
.share .icon { width: 18px; height: 18px; flex: none; }
.share a, .share button { justify-content: center; white-space: nowrap; }
/* sem a API de área de transferência o blog.js põe hidden no "Copiar link"; o display acima o mantinha na tela */
.share [hidden] { display: none; }
@media (max-width: 599px) {
  .share { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .share a, .share button { gap: 6px; padding: 0 8px; font-size: .875rem; }
  /* "Link copiado" e "Não foi possível copiar" não cabem no terço da linha: o texto quebra dentro do botão
     em vez de passar da borda. O conteúdo é centralizado, então o respiro lateral menor não muda nada na tela */
  .share button { padding: 0 2px; }
  .share button span { white-space: normal; line-height: 1.25; }
}
/* abaixo de 360 px ícone + texto não cabem (vazavam pelas bordas dos botões): só o texto, o ícone é decorativo */
@media (max-width: 359px) {
  .share .icon { display: none; }
  .share a { padding: 0 5px; }
}

.related { padding-block: clamp(48px, 6vw, 80px); background: var(--bg-alt); border-top: 1px solid var(--border); }
.related__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.875rem); font-weight: 700; letter-spacing: -0.02em; }

@media (max-width: 1023px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-main { max-width: 720px; margin-inline: auto; }
  .toc { display: none; }
  .toc-mobile { display: block; }
}
@media (max-width: 719px) {
  .post-hero__grid { grid-template-columns: 1fr; }
  .post-cover { max-width: 420px; }
  .post-cta { grid-template-columns: 1fr; }
  .post-cta .btn { width: 100%; }
}

/* ---------- Faixa de contato (fim da página inicial) ---------- */
.blog-cta { padding-block: clamp(56px, 7vw, 88px); background: var(--dark); color: #C9D8E2; }
.blog-cta__inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center; }
.blog-cta__title { max-width: 24ch; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: #fff; }
.blog-cta__text { max-width: 56ch; margin-top: 12px; line-height: 1.6; }
.blog-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--ghost-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn--ghost-dark:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .06); }
/* até 1099 px os botões ao lado espremiam o texto (177 px de coluna em 768 px): botões embaixo */
@media (max-width: 1099px) { .blog-cta__inner { grid-template-columns: 1fr; } }
@media (max-width: 719px) { .blog-cta__actions .btn { width: 100%; } }

/* ---------- Rodapé ---------- */
.site-footer { padding-block: 56px 28px; background: #0B1B25; color: #B7C8D3; font-size: .9375rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.site-footer__logo { height: 31px; width: auto; }
.site-footer__brand p { margin-top: 16px; max-width: 36ch; line-height: 1.6; }
.site-footer__title { margin-bottom: 10px; font-size: 1rem; font-weight: 700; color: #fff; }
.site-footer__title--sub { margin-top: 18px; }
.site-footer ul { display: grid; }
.site-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #C9D8E2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-footer .icon { width: 16px; height: 16px; color: #6CC0F2; }
.site-footer :focus-visible { outline-color: #7CC6F4; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8125rem; color: #9FB3C1; }
.site-footer__bottom a { min-height: 0; font-size: .8125rem; }
@media (max-width: 767px) { .site-footer__grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 404 / busca ---------- */
.notfound { padding-block: clamp(64px, 10vw, 128px); }
.notfound__code { font-size: clamp(4rem, 3rem + 5vw, 7rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--action); }
.notfound h1 { margin-top: 12px; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 700; }
.notfound p { max-width: 52ch; margin-top: 12px; color: var(--ink-2); }
.notfound .btn { margin-top: 24px; }
/* o "Buscar" da busca também é .btn: herdava o margin-top acima e descia 24 px, esticando o campo ao lado */
.notfound .search-form .btn { margin-top: 0; }

/* seleção de texto no tom da marca */
::selection { background: rgba(26, 159, 235, .22); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .card-feature__cover img, .card, .read-more .icon { transition: none; }
  .card-feature:hover .card-feature__cover img, .card:hover { transform: none; }
}

/* ---------- Busca, comentários e página comum ---------- */
.search-form { display: flex; gap: 8px; max-width: 480px; margin-top: 20px; }
.search-form input[type="search"] {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg); font: inherit; color: var(--ink);
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 4px rgba(13, 116, 180, .16); }
.post-layout--page { grid-template-columns: minmax(0, 1fr); }
.comments { margin-top: 48px; }
.comment-list { display: grid; gap: 20px; margin-top: 16px; }
.comment-list .comment-body { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.comment-form { display: grid; gap: 12px; margin-top: 16px; }
.comment-form label { font-weight: 700; font-size: .9375rem; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; font: inherit;
}
