/* ==========================================================================
   Felikis — Blog (usa as variáveis e o padrão visual de theme.css)
   ========================================================================== */

/* ---------- Hero compacto (home) ---------- */
.hero.hero-compact { padding-top: 7.5rem; padding-bottom: 0; }
@media (max-width: 767.98px) {
  .hero.hero-compact { padding-top: 6.5rem; }
}

/* ---------- Faixa fina "novo no blog" (home) ---------- */
.latest-post-strip {
  background-color: var(--fx-bg-soft);
  border-top: 1px solid var(--fx-border);
  border-bottom: 1px solid var(--fx-border);
}
/* Tiras empilhadas: a borda inferior da primeira já separa as duas */
.latest-post-strip + .latest-post-strip { border-top: none; }
.latest-post-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 0;
  text-decoration: none;
  color: var(--fx-ink);
}
.latest-post-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--fx-amber);
  background-color: #fff;
  border: 1px solid var(--fx-border);
  border-radius: 50rem;
  padding: .32rem .8rem;
}
/* Variação da pílula para a tira da News */
.latest-post-badge.badge-news { color: var(--fx-teal); }

.latest-post-headline {
  flex-grow: 1;
  min-width: 0;
  font-weight: 600;
  font-size: .98rem;
  color: var(--fx-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.latest-post-link:hover .latest-post-headline { color: var(--fx-primary-dark); }
.latest-post-aside {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
}
.latest-post-aside .meta { color: var(--fx-muted); font-size: .85rem; white-space: nowrap; }
.latest-post-read {
  color: var(--fx-primary);
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
}
.latest-post-read svg { transition: transform .15s ease; }
.latest-post-link:hover .latest-post-read svg { transform: translateX(3px); }
@media (max-width: 767.98px) {
  .latest-post-link { flex-wrap: wrap; gap: .5rem .75rem; padding: .75rem 0; }
  .latest-post-headline { white-space: normal; flex-basis: 100%; order: 3; }
  .latest-post-aside .meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .latest-post-read svg { transition: none !important; }
}

/* ---------- Barra de progresso de leitura (páginas de matéria) ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--fx-primary), var(--fx-teal), var(--fx-amber));
  z-index: 1090;
  transition: width .1s linear;
}

/* ---------- Breadcrumbs ---------- */
.fx-breadcrumb {
  font-size: .85rem;
}
.fx-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  padding: 0;
  margin: 0;
}
.fx-breadcrumb li { display: inline-flex; align-items: center; gap: .4rem; color: var(--fx-muted); }
.fx-breadcrumb a { color: var(--fx-muted); text-decoration: none; }
.fx-breadcrumb a:hover { color: var(--fx-primary); text-decoration: underline; }
.fx-breadcrumb li[aria-current="page"] { color: var(--fx-ink); font-weight: 600; }
.fx-breadcrumb .sep { color: var(--fx-border); }

/* ---------- Chip de categoria ---------- */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 50rem;
  padding: .3rem .85rem;
  text-decoration: none;
  background-color: var(--fx-primary-light);
  color: var(--fx-primary-dark);
  border: 1px solid transparent;
  transition: filter .15s ease;
}
.cat-chip:hover { filter: brightness(.96); color: var(--fx-primary-dark); }
.cat-chip.cat-gis      { background-color: var(--fx-primary-light); color: var(--fx-primary-dark); }
.cat-chip.cat-operacional { background-color: var(--fx-teal-light); color: var(--fx-teal); }
.cat-chip.cat-dados    { background-color: var(--fx-purple-light); color: var(--fx-purple); }
.cat-chip.cat-setores  { background-color: var(--fx-amber-light); color: var(--fx-amber); }

/* ---------- Grid de cards de matéria ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fff;
  border: 1px solid var(--fx-border);
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: var(--fx-ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 40, 35, .08);
  border-color: var(--fx-primary);
  color: var(--fx-ink);
}
.post-card__media {
  aspect-ratio: 1200 / 630;
  width: 100%;
  background-color: var(--fx-bg-soft);
  border-bottom: 1px solid var(--fx-border);
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-card__title { font-size: 1.12rem; font-weight: 700; line-height: 1.3; margin: .7rem 0 .5rem; letter-spacing: -0.01em; }
.post-card:hover .post-card__title { color: var(--fx-primary-dark); }
.post-card__excerpt { color: var(--fx-muted); font-size: .93rem; margin-bottom: 1rem; }
.post-card__meta { margin-top: auto; font-size: .8rem; color: var(--fx-muted); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.post-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background-color: var(--fx-border); }

/* ---------- Card em destaque (matéria principal) ---------- */
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background-color: #fff;
  border: 1px solid var(--fx-border);
  border-radius: 1.25rem;
  overflow: hidden;
  text-decoration: none;
  color: var(--fx-ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: 0 20px 45px rgba(15, 40, 35, .10); border-color: var(--fx-primary); color: var(--fx-ink); }
.featured-card__media { background-color: var(--fx-bg-soft); border-right: 1px solid var(--fx-border); }
.featured-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 260px; }
.featured-card__body { padding: 2rem 2.25rem; display: flex; flex-direction: column; justify-content: center; }
.featured-card__title { font-size: 1.7rem; font-weight: 800; line-height: 1.22; letter-spacing: -0.02em; margin: .85rem 0 .75rem; }
.featured-card__excerpt { color: var(--fx-muted); margin-bottom: 1.25rem; }
@media (max-width: 767.98px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card__media { border-right: none; border-bottom: 1px solid var(--fx-border); }
  .featured-card__media img { min-height: 200px; }
  .featured-card__body { padding: 1.5rem 1.5rem 1.75rem; }
  .featured-card__title { font-size: 1.35rem; }
}

/* ---------- Barra de busca e filtros ---------- */
.blog-toolbar {
  background-color: #fff;
  border: 1px solid var(--fx-border);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
}
.blog-search { position: relative; }
.blog-search svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--fx-muted); }
.blog-search input { padding-left: 2.5rem; }
.filter-pill {
  cursor: pointer;
  color: var(--fx-muted);
  font-weight: 600;
  font-size: .85rem;
  border-radius: 50rem;
  padding: .45rem 1rem;
  border: 1px solid var(--fx-border);
  background-color: #fff;
  transition: all .15s ease;
}
.filter-pill:hover { border-color: var(--fx-primary); color: var(--fx-primary); }
.filter-pill.active { background-color: var(--fx-primary); border-color: var(--fx-primary); color: #fff; }

/* ---------- Estado vazio ---------- */
.blog-empty { display: none; text-align: center; padding: 3rem 1rem; color: var(--fx-muted); }
.blog-empty.show { display: block; }

/* ---------- Sidebar do blog ---------- */
.blog-widget {
  background-color: #fff;
  border: 1px solid var(--fx-border);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.blog-widget h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.blog-widget .cat-list { list-style: none; padding: 0; margin: 0; }
.blog-widget .cat-list li { border-bottom: 1px solid var(--fx-border); }
.blog-widget .cat-list li:last-child { border-bottom: none; }
.blog-widget .cat-list a { display: flex; justify-content: space-between; align-items: center; padding: .65rem 0; color: var(--fx-ink); text-decoration: none; font-weight: 500; font-size: .92rem; }
.blog-widget .cat-list a:hover { color: var(--fx-primary); }
.blog-widget .cat-list .count { background-color: var(--fx-bg-soft); color: var(--fx-muted); font-size: .75rem; font-weight: 700; border-radius: 50rem; padding: .1rem .55rem; }
.popular-item { display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--fx-border); text-decoration: none; color: var(--fx-ink); }
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { color: var(--fx-primary); }
.popular-item img { width: 68px; height: 46px; object-fit: cover; border-radius: .5rem; flex-shrink: 0; border: 1px solid var(--fx-border); }
.popular-item .t { font-size: .86rem; font-weight: 600; line-height: 1.25; }

/* ---------- Artigo ---------- */
.article-header { border-bottom: 1px solid var(--fx-border); }
.article-title { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.article-lead { color: var(--fx-muted); font-size: 1.15rem; line-height: 1.6; }
.article-byline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; color: var(--fx-muted); font-size: .88rem; }
.article-byline .author { display: inline-flex; align-items: center; gap: .55rem; color: var(--fx-ink); font-weight: 600; }
.article-byline .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--fx-primary), var(--fx-teal));
  color: #fff; font-weight: 700; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.article-cover { border-radius: 1.25rem; overflow: hidden; border: 1px solid var(--fx-border); background-color: var(--fx-bg-soft); }
.article-cover img { width: 100%; height: auto; display: block; }

/* Tipografia do corpo */
.article-body { font-size: 1.05rem; line-height: 1.78; color: #2b3a3f; }
.article-body p { margin-bottom: 1.25rem; }
.article-body h2 {
  font-weight: 800; font-size: 1.6rem; letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem; scroll-margin-top: 6rem; color: var(--fx-ink);
}
.article-body h3 { font-weight: 700; font-size: 1.25rem; margin: 1.75rem 0 .75rem; scroll-margin-top: 6rem; color: var(--fx-ink); }
.article-body ul, .article-body ol { margin-bottom: 1.25rem; padding-left: 1.25rem; }
.article-body li { margin-bottom: .5rem; }
.article-body a { color: var(--fx-primary); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--fx-primary-dark); }
.article-body strong { color: var(--fx-ink); }
.article-body img { max-width: 100%; height: auto; border-radius: .75rem; border: 1px solid var(--fx-border); }
.article-body figure { margin: 1.75rem 0; }
.article-body figcaption { font-size: .85rem; color: var(--fx-muted); margin-top: .5rem; text-align: center; }

/* Destaque / callout dentro do artigo */
.article-callout {
  background-color: var(--fx-primary-light);
  border-left: 4px solid var(--fx-primary);
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  font-size: 1rem;
}
.article-callout.accent-teal { background-color: var(--fx-teal-light); border-left-color: var(--fx-teal); }
.article-callout.accent-amber { background-color: var(--fx-amber-light); border-left-color: var(--fx-amber); }
.article-callout.accent-purple { background-color: var(--fx-purple-light); border-left-color: var(--fx-purple); }
.article-callout .label { display: block; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fx-primary-dark); margin-bottom: .35rem; }

/* Nota editorial */
.editorial-note {
  border: 1px dashed var(--fx-border);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  font-size: .9rem;
  color: var(--fx-muted);
  background-color: var(--fx-bg-soft);
  margin: 1.75rem 0;
}

/* Tabela dentro do artigo */
.article-body .table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--fx-border); border-radius: .85rem; }
.article-body table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0; }
.article-body thead th { background-color: var(--fx-bg-soft); text-align: left; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--fx-muted); padding: .85rem 1rem; }
.article-body td, .article-body th { padding: .8rem 1rem; border-top: 1px solid var(--fx-border); vertical-align: top; }

/* Sumário (TOC) */
.toc-box { background-color: var(--fx-bg-soft); border: 1px solid var(--fx-border); border-radius: .85rem; padding: 1.25rem 1.4rem; }
.toc-box h2 { font-size: .82rem !important; text-transform: uppercase; letter-spacing: .05em; color: var(--fx-muted); margin: 0 0 .75rem !important; font-weight: 700; }
.toc-box ol { list-style: none; counter-reset: toc; padding: 0; margin: 0; }
.toc-box li { counter-increment: toc; margin-bottom: .45rem; }
.toc-box a { color: var(--fx-ink); text-decoration: none; font-size: .92rem; display: flex; gap: .55rem; }
.toc-box a::before { content: counter(toc, decimal-leading-zero); color: var(--fx-primary); font-weight: 700; font-size: .8rem; }
.toc-box a:hover { color: var(--fx-primary); }
.toc-box a.active { color: var(--fx-primary); font-weight: 600; }

/* TOC fixo lateral (desktop) */
.toc-sticky { position: sticky; top: 6rem; }

/* Compartilhamento */
.share-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.share-btn {
  width: 40px; height: 40px; border-radius: .6rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--fx-border); background-color: #fff; color: var(--fx-muted);
  cursor: pointer; text-decoration: none; transition: all .15s ease;
}
.share-btn:hover { border-color: var(--fx-primary); color: var(--fx-primary); background-color: var(--fx-primary-light); }
.copy-feedback { font-size: .82rem; color: var(--fx-teal); font-weight: 600; opacity: 0; transition: opacity .2s ease; }
.copy-feedback.show { opacity: 1; }

/* Fontes e referências */
.sources-box { background-color: var(--fx-bg-soft); border: 1px solid var(--fx-border); border-radius: 1rem; padding: 1.75rem; }
.sources-box ol { padding-left: 1.15rem; margin: 0; }
.sources-box li { margin-bottom: .9rem; font-size: .92rem; line-height: 1.55; }
.sources-box li:last-child { margin-bottom: 0; }
.sources-box .src-meta { color: var(--fx-muted); display: block; font-size: .85rem; }

/* FAQ */
.faq-item { border: 1px solid var(--fx-border); border-radius: .75rem; margin-bottom: .75rem; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background-color: #fff; border: none; padding: 1.1rem 1.25rem; font-weight: 600; color: var(--fx-ink); display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; }
.faq-q:hover { background-color: var(--fx-bg-soft); }
.faq-q .chev { transition: transform .2s ease; flex-shrink: 0; color: var(--fx-primary); }
.faq-q[aria-expanded="true"] .chev { transform: rotate(180deg); }
.faq-a { padding: 0 1.25rem; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; color: var(--fx-muted); }
.faq-a.open { padding: 0 1.25rem 1.25rem; max-height: 600px; }

/* Navegação anterior/próxima */
.post-nav-card { display: flex; flex-direction: column; gap: .3rem; border: 1px solid var(--fx-border); border-radius: .85rem; padding: 1.1rem 1.35rem; text-decoration: none; color: var(--fx-ink); transition: border-color .2s ease, transform .2s ease; height: 100%; }
.post-nav-card:hover { border-color: var(--fx-primary); transform: translateY(-2px); color: var(--fx-ink); }
.post-nav-card .dir { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fx-muted); font-weight: 700; }
.post-nav-card .t { font-weight: 600; line-height: 1.3; }
.post-nav-card.next { text-align: right; }

/* Autor / caixa editorial */
.author-box { display: flex; gap: 1.1rem; align-items: flex-start; background-color: #fff; border: 1px solid var(--fx-border); border-radius: 1rem; padding: 1.5rem; }
.author-box .avatar-lg { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--fx-primary), var(--fx-teal)); color: #fff; font-weight: 800; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; }

/* CTA final integrado */
.blog-cta { background: linear-gradient(120deg, var(--fx-primary) 0%, var(--fx-primary-dark) 100%); color: #fff; border-radius: 1.25rem; }
.blog-cta .btn-light { font-weight: 600; }

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {
  .reading-progress, .post-card, .featured-card, .post-nav-card, .faq-a, .faq-q .chev, .share-btn { transition: none !important; }
  .hero-live-dot::after, .hero-pulse-ring, .hero-radar-ring { animation: none !important; }
}
