/* ============================================================
   FURUSHIMA: Blog premium (listagem + arquivos de categoria/tag/autor/busca)
   Reaproveita .furu-post-card e .furu-hero--page do furu-site.css.
   Carregado por furu-blog.php SO nas telas do blog (dep: furu-site).
   Isolado de proposito: nao depende de edicoes no furu-site.php.
   ============================================================ */

/* area geral do blog: fundo branco (casa com a curva do hero) + respiro */
.furu-blog { background: #fff; padding: 3.4rem 0 5rem; }
.furu-blog__wrap {
  max-width: 1180px; margin: 0 auto; padding: 0 1.25rem;
  display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 2.6rem; align-items: start;
}
.furu-blog__main { min-width: 0; }

/* ---------- barra de filtros por categoria ---------- */
.furu-blog__toolbar {
  display: flex; align-items: center; gap: .9rem;
  margin-bottom: 1.7rem;
}
/* rail rolavel: os temas correm numa linha so, nunca amontoam em 2 linhas */
.furu-chiprail { position: relative; flex: 1 1 auto; min-width: 0; }
.furu-chiprail::before,
.furu-chiprail::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 46px; z-index: 3;
  pointer-events: none; opacity: 0; transition: opacity .3s ease;
}
.furu-chiprail::before { left: -1px;  background: linear-gradient(90deg,  #fff 32%, rgba(255, 255, 255, 0)); }
.furu-chiprail::after  { right: -1px; background: linear-gradient(270deg, #fff 32%, rgba(255, 255, 255, 0)); }
.furu-chiprail.can-left::before { opacity: 1; }
.furu-chiprail.can-right::after { opacity: 1; }
.furu-chips {
  display: flex; flex-wrap: nowrap; gap: .55rem;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-behavior: smooth;
  padding: .5rem .2rem;
  scrollbar-width: none; -ms-overflow-style: none;
}
.furu-chips::-webkit-scrollbar { display: none; }
.furu-blog__count {
  flex: none; color: var(--gray-500); font-size: .82rem; font-weight: 700;
  white-space: nowrap; letter-spacing: .02em;
}
.furu-chip {
  --c: var(--furushima-green); flex: none;
  display: inline-flex; align-items: center; gap: .45rem; text-decoration: none;
  font: 700 .82rem/1 'Inter', sans-serif; color: var(--gray-700);
  background: #fff; border: 1px solid var(--gray-200); border-radius: 999px;
  padding: .5rem .95rem; transition: color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease, background .25s ease;
  white-space: nowrap;
}
.furu-chip:focus-visible { outline: 2px solid var(--furushima-green); outline-offset: 2px; }
.furu-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.furu-chip:hover {
  border-color: color-mix(in srgb, var(--c) 55%, var(--gray-200)); color: var(--navy);
  transform: translateY(-1px); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--c) 70%, transparent);
}
.furu-chip.is-active {
  background: var(--gradient-primary); color: #fff; border-color: transparent;
  box-shadow: 0 10px 22px -10px rgba(70, 193, 170, .65);
}
.furu-chip.is-active .furu-chip__dot { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .28); }

/* ---------- grid da listagem (reaproveita .furu-post-card) ---------- */
.furu-bloglist { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 1.5rem; }

/* excerto: os cards da HOME nao tem, os do blog tem */
.furu-post-card__excerpt {
  color: var(--gray-600); font-size: .875rem; line-height: 1.62; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* CTA em texto (so no card destaque; os normais tem so a seta) */
.furu-post-card__more--text {
  width: auto; height: auto; border-radius: 999px; padding: .5rem .95rem; gap: .4rem;
  font: 800 .84rem/1 'Inter', sans-serif; letter-spacing: .01em;
}

/* ---------- card em destaque: post mais recente, linha inteira ---------- */
.furu-post-card--feature { grid-column: 1 / -1; }
.furu-post-card__flag {
  position: absolute; top: .8rem; left: .8rem; z-index: 6;
  font: 800 .6rem/1 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #fff;
  background: var(--navy); padding: .46em .8em; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(12, 45, 66, .35);
}
@media (min-width: 720px) {
  .furu-post-card--feature { flex-direction: row; align-items: stretch; }
  .furu-post-card--feature .furu-post-card__thumb { aspect-ratio: auto; width: 54%; min-height: 310px; flex: none; }
  .furu-post-card--feature .furu-post-card__body { padding: 2.1rem 2.2rem; justify-content: center; gap: .7rem; }
  .furu-post-card--feature h3 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.22; }
  .furu-post-card--feature .furu-post-card__excerpt { -webkit-line-clamp: 4; font-size: .98rem; line-height: 1.68; }
}

/* ---------- coluna lateral (sidebar) ---------- */
.furu-blog__side {
  display: flex; flex-direction: column; gap: 1.3rem;
  position: sticky; top: calc(var(--nav-h) + 18px);
}
.furu-side__card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 18px;
  padding: 1.4rem 1.45rem; box-shadow: 0 1px 2px rgba(16, 32, 45, .05);
}
.furu-side__title {
  display: flex; align-items: center; gap: .6rem; margin: 0 0 1.05rem;
  font: 800 .76rem/1 'Inter', sans-serif; letter-spacing: .13em; text-transform: uppercase; color: var(--navy);
}
.furu-side__title::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--gradient-primary); flex: none; }

/* busca */
.furu-side__search { display: flex; gap: .5rem; }
.furu-side__search input {
  flex: 1; min-width: 0; border: 1px solid var(--gray-200); border-radius: 11px;
  padding: .62rem .85rem; font: 500 .92rem 'Inter', sans-serif; color: var(--gray-900); background: var(--gray-50);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.furu-side__search input::placeholder { color: var(--gray-400); }
.furu-side__search input:focus { outline: none; border-color: var(--furushima-green); box-shadow: 0 0 0 3px rgba(70, 193, 170, .18); background: #fff; }
.furu-side__search button {
  flex: none; width: 44px; border: 0; border-radius: 11px; cursor: pointer;
  background: var(--gradient-primary); color: #fff; display: grid; place-items: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.furu-side__search button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgba(70, 193, 170, .7); }
.furu-side__search button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* lista de categorias */
.furu-catlist { list-style: none; margin: 0; padding: 0; }
.furu-catlist a {
  display: flex; align-items: center; gap: .65rem; text-decoration: none;
  color: var(--gray-700); font-weight: 600; font-size: .92rem;
  padding: .6rem .15rem; border-bottom: 1px solid var(--gray-100);
  transition: color .2s ease, padding-left .2s ease;
}
.furu-catlist li:last-child a { border-bottom: 0; padding-bottom: .1rem; }
.furu-catlist a:hover { color: var(--navy); padding-left: .4rem; }
.furu-catlist a.is-active { color: var(--furushima-dark); font-weight: 800; }
.furu-cat__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.furu-cat__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.furu-cat__count {
  flex: none; font: 800 .72rem/1 'Inter', sans-serif; color: var(--gray-500);
  background: var(--gray-100); border-radius: 999px; padding: .28rem .55rem; transition: color .2s ease, background .2s ease;
}
.furu-catlist a:hover .furu-cat__count, .furu-catlist a.is-active .furu-cat__count {
  background: color-mix(in srgb, var(--furushima-green) 20%, var(--gray-100)); color: var(--furushima-dark);
}

/* posts recentes */
.furu-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.furu-recent a { display: flex; gap: .8rem; text-decoration: none; align-items: center; }
.furu-recent__thumb { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; flex: none; background: var(--gray-100); }
.furu-recent__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.furu-recent a:hover .furu-recent__thumb img { transform: scale(1.08); }
.furu-recent__thumb--code {
  display: grid; place-items: center; color: color-mix(in srgb, var(--furushima-green) 72%, #fff);
  background: linear-gradient(150deg, #0a2030, #0c2d42); font: 900 1rem/1 ui-monospace, monospace; letter-spacing: -.03em;
}
.furu-recent__meta { min-width: 0; }
.furu-recent__meta b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .87rem; font-weight: 700; color: var(--gray-900); line-height: 1.34; transition: color .2s ease;
}
.furu-recent a:hover b { color: var(--furushima-dark); }
.furu-recent__meta time { display: block; margin-top: .28rem; font: 800 .7rem/1 'Inter', sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--gray-400); }

/* tags */
.furu-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.furu-tags a {
  text-decoration: none; font: 600 .78rem/1 'Inter', sans-serif; color: var(--gray-600);
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 9px; padding: .42rem .62rem;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.furu-tags a:hover { color: #fff; background: var(--furushima-green); border-color: transparent; transform: translateY(-1px); }

/* caixa CTA (versao Furushima do "análise gratuita") */
.furu-side__cta { background: var(--gradient-hero); border: 0; position: relative; overflow: hidden; }
.furu-side__cta::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); pointer-events: none;
}
.furu-side__cta .furu-side__title { color: #fff; }
.furu-side__cta .furu-side__title::before { background: #fff; }
.furu-side__cta p { position: relative; color: rgba(255, 255, 255, .92); font-size: .9rem; line-height: 1.62; margin: 0 0 1.15rem; }
.furu-side__cta .furu-wabtn {
  position: relative; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  background: #fff; color: var(--furushima-dark); font: 800 .9rem/1 'Inter', sans-serif;
  border-radius: 11px; padding: .72rem 1.15rem; transition: transform .2s ease, box-shadow .2s ease;
}
.furu-side__cta .furu-wabtn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 40, 55, .28); }
.furu-side__cta .furu-wabtn svg { fill: #25D366; }

/* paginacao */
.furu-pag { display: flex; justify-content: center; flex-wrap: wrap; gap: .45rem; margin-top: 2.8rem; }
.furu-pag a, .furu-pag span {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .55rem; border-radius: 12px;
  text-decoration: none; font: 700 .92rem/1 'Inter', sans-serif; color: var(--gray-700);
  background: #fff; border: 1px solid var(--gray-200); transition: color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.furu-pag a:hover { color: var(--furushima-dark); border-color: color-mix(in srgb, var(--furushima-green) 55%, var(--gray-200)); transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(70, 193, 170, .6); }
.furu-pag .current { background: var(--gradient-primary); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px rgba(70, 193, 170, .7); }
.furu-pag .dots { border-color: transparent; background: transparent; }
.furu-pag svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }

/* estado vazio */
.furu-blog__empty {
  background: var(--gray-50); border: 1px dashed var(--gray-200); border-radius: 18px;
  padding: 3.2rem 2rem; text-align: center; color: var(--gray-500);
}
.furu-blog__empty p { margin: 0 0 .5rem; }
.furu-blog__empty strong { color: var(--gray-900); font-size: 1.05rem; }
.furu-blog__empty a { color: var(--furushima-dark); font-weight: 700; }

/* ---------- responsivo ---------- */
@media (max-width: 980px) {
  .furu-blog__wrap { grid-template-columns: 1fr; gap: 2.4rem; }
  .furu-blog__side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; align-items: start; }
  .furu-side__cta { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .furu-blog__side { grid-template-columns: 1fr; }
  .furu-post-card--feature .furu-post-card__body { padding: 1.2rem 1.25rem 1.35rem; }
}

@media (prefers-reduced-motion: reduce) and (max-width: 0px) {
  .furu-chip, .furu-pag a, .furu-side__search button, .furu-tags a, .furu-recent__thumb img { transition: none; }
}

/* mobile: contagem acima, rail de temas rolando embaixo */
@media (max-width: 480px) {
  .furu-blog__toolbar { flex-direction: column; align-items: stretch; gap: .35rem; }
  .furu-blog__count { order: -1; align-self: flex-start; }
}
