/* ============================================================================
 * GERADO por scripts/sync-css.mjs — NÃO EDITAR À MÃO.
 * Origem: knxsite/src/components/blog/blog.css
 * Para alterar, edite a origem no knxsite (só leitura durante a migração) ou
 * ajuste a transformação em scripts/sync-css.mjs.
 * ============================================================================ */

/* Khoinix — página Conteúdo (listagem do blog).
   Construído sobre os tokens/classes globais de khoinix.css
   (.hero, .hero-grid, .hero-woven, .eyebrow, .container já existem lá). */

/* ---------- Toolbar: busca + filtros ---------- */
.blog-toolbar {
  position: sticky; top: 116px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 20px 0;
  margin: 40px 0 8px;
  background: rgba(254, 254, 254, 0.82);
  backdrop-filter: blur(24px) saturate(1.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Busca */
.blog-search {
  position: relative; flex: 1 1 320px; max-width: 420px; min-width: 240px;
}
.blog-search > svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--fg-subtle); pointer-events: none;
}
.blog-search input {
  width: 100%; height: 48px;
  padding: 0 44px 0 46px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface); color: var(--fg);
  font: 400 16px var(--font-sans);
  outline: none;
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.blog-search input::placeholder { color: var(--fg-subtle); }
.blog-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}
.blog-search .clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-gray-100); color: var(--fg-muted);
  transition: background var(--duration-fast) var(--ease-out);
}
.blog-search .clear:hover { background: var(--color-gray-200); color: var(--fg-strong); }

/* Filtros por categoria (chips) */
.blog-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.blog-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; cursor: pointer;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface); color: var(--fg-strong);
  font: 600 14px var(--font-sans); white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}
.blog-chip:hover { background: var(--color-gray-50); }
.blog-chip .count {
  font-size: 12px; font-weight: 600; color: var(--fg-subtle);
  font-feature-settings: "tnum";
}
.blog-chip.active {
  background: var(--color-navy-500); border-color: var(--color-navy-500);
  color: white;
}
.blog-chip.active .count { color: rgba(255,255,255,0.7); }
.blog-chip .dot { width: 9px; height: 9px; border-radius: var(--radius-pill); flex-shrink: 0; }

/* contagem de resultados */
.blog-results-count {
  font-size: 14px; color: var(--fg-muted);
  margin: 28px 0 24px;
}
.blog-results-count b { color: var(--fg-strong); font-weight: 600; }

/* ---------- Grid de artigos ---------- */
.posts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  padding-bottom: 8px;
}
.post {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-2xl); overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-spring),
              border-color var(--duration-normal) var(--ease-out);
}
.post:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
  border-color: var(--border-strong);
}
.post:hover .post-title { color: var(--color-orange-700); }

/* capa */
.post-cover {
  aspect-ratio: 16 / 9; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 16px;
}
.post-cover.cat-a { background: var(--gradient-navy); }
.post-cover.cat-b { background: var(--gradient-orange); }
.post-cover.cat-c { background: linear-gradient(135deg, #1B3148 0%, #238F84 100%); }
.post-cover.cat-d { background: linear-gradient(135deg, #2F3133 0%, #4A4E54 100%); }
.post-cover .watermark {
  position: absolute; right: -14px; bottom: -18px;
  width: 132px; height: 132px; opacity: 0.16;
  filter: brightness(0) invert(1);
  object-fit: contain;
}
.post-cover .cover-cat {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.92);
  font: 600 12px var(--font-sans); letter-spacing: 0.02em;
  color: var(--color-gray-900);
}
.post-cover .cover-cat .dot { width: 8px; height: 8px; border-radius: var(--radius-pill); }

/* corpo */
.post-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-title {
  font-family: var(--font-display);
  font-size: 21px; line-height: 1.28; letter-spacing: -0.01em;
  font-weight: 600; color: var(--fg-strong); margin: 0;
  text-wrap: balance;
  transition: color var(--duration-fast) var(--ease-out);
}
.post-excerpt {
  font-size: 14.5px; line-height: 1.55; color: var(--fg-muted); margin: 0;
}
.post-meta {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--fg-muted);
}
.post-meta .avatar {
  width: 30px; height: 30px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  background: var(--color-orange-50); color: var(--color-orange-700);
  font: 600 12px var(--font-sans); flex-shrink: 0;
  object-fit: cover;
}
.post-meta .author { font-weight: 600; color: var(--fg-strong); }
.post-meta .sep { color: var(--color-gray-300); }
.post-meta .read { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }

/* destaque (post com featured=true) — ocupa 2 colunas */
.post.featured { grid-column: span 2; flex-direction: row; }
.post.featured .post-cover { aspect-ratio: auto; flex: 1 1 50%; min-height: 320px; }
.post.featured .post-cover .watermark { width: 180px; height: 180px; }
.post.featured .post-body { flex: 1 1 50%; padding: 32px; gap: 14px; justify-content: center; }
.post.featured .post-title { font-size: 30px; line-height: 1.18; }
.post.featured .post-excerpt { font-size: 16px; }

/* estado vazio */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 64px 24px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-2xl);
  background: var(--bg-subtle);
}
.blog-empty .icon {
  width: 56px; height: 56px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-subtle); margin-bottom: 16px;
}
.blog-empty h3 { font-size: 20px; margin: 0 0 8px; }
.blog-empty p { font-size: 15px; color: var(--fg-muted); margin: 0 auto; max-width: 42ch; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .posts { grid-template-columns: 1fr 1fr; }
  .post.featured { grid-column: span 2; }
  .blog-toolbar { top: 88px; }
}
@media (max-width: 640px) {
  .blog-toolbar { flex-direction: column; align-items: stretch; }
  .blog-search { max-width: none; }
  .blog-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .posts { grid-template-columns: 1fr; }
  .post.featured { grid-column: span 1; flex-direction: column; }
  .post.featured .post-cover { min-height: 0; aspect-ratio: 16/9; }
  .post.featured .post-body { padding: 22px 24px 24px; }
  .post.featured .post-title { font-size: 24px; }
}
