/* ==========================================================================
   Blog SI Soluções Digitais - estilos específicos do blog
   Complementa assets/css/style.css (reutiliza as variáveis de marca).
   ========================================================================== */

/* Breadcrumbs ------------------------------------------------------------- */
.blog-breadcrumb {
  background: transparent;
  padding: 1.25rem 0 0;
  font-size: .85rem;
}
.blog-breadcrumb .breadcrumb {
  margin-bottom: 0;
}
.blog-breadcrumb a {
  color: var(--si-teal-deep);
  font-weight: 600;
}
.blog-breadcrumb a:hover { text-decoration: underline; }
.blog-breadcrumb .breadcrumb-item.active { color: var(--si-text-muted); }
.blog-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #b6c2cc; }

/* Hero do blog ------------------------------------------------------------ */
.blog-hero {
  background: linear-gradient(135deg, var(--si-navy-2) 0%, #2f6b8c 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.blog-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(111,177,207,.4) 0%, rgba(111,177,207,0) 70%);
  border-radius: 50%;
}
.blog-hero .lead { color: rgba(255,255,255,.9); }

/* Quadro mais compacto: menos espaço no topo */
.blog-hero .section { padding-top: 2rem; padding-bottom: 2.25rem; }
@media (max-width: 767.98px) {
  .blog-hero .section { padding-top: 1.25rem; padding-bottom: 1.5rem; }
}

/* Barra de ferramentas: busca + filtro ------------------------------------ */
.blog-toolbar {
  background: var(--si-white);
  border: 1px solid #dde4ea;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(15,30,43,.06);
  padding: 1rem 1.15rem;
}
.blog-search-input {
  border-radius: 999px;
}
.blog-search-input:focus {
  border-color: var(--si-teal);
  box-shadow: 0 0 0 .2rem rgba(63,139,176,.2);
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 2px solid #dde4ea;
  background: var(--si-white);
  color: var(--si-navy);
  font-weight: 600;
  font-size: .82rem;
  padding: .4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.category-chip:hover { border-color: var(--si-teal); color: var(--si-teal-deep); }
.category-chip.active {
  background: var(--si-navy);
  color: #fff;
  border-color: var(--si-navy);
}

/* Cartão de matéria ------------------------------------------------------- */
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--si-white);
  border: 1px solid #dde4ea;
  border-radius: 16px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(15,30,43,.12);
  border-color: transparent;
}
.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: var(--si-gray-bg);
}
.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.25rem 1.35rem 1.4rem;
  flex: 1 1 auto;
}
.post-card__cat {
  align-self: flex-start;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--si-teal-deep);
  background: rgba(63,139,176,.1);
  border-radius: 999px;
  padding: .25rem .7rem;
}
.post-card__title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--si-navy);
  line-height: 1.3;
  margin: 0;
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--si-teal-deep); }
.post-card__excerpt {
  color: var(--si-text-muted);
  font-size: .9rem;
  margin: 0;
  flex: 1 1 auto;
}
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  color: #7d8b96;
  font-size: .78rem;
  margin-top: .35rem;
}

/* Matéria em destaque ----------------------------------------------------- */
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--si-white);
  border: 1px solid rgba(212,175,55,.5);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(15,30,43,.08);
}
.featured-card__media {
  aspect-ratio: auto;
  min-height: 100%;
  background: var(--si-navy);
}
.featured-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.featured-card__body {
  padding: 2.25rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  justify-content: center;
}
.featured-card__title {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--si-navy);
  margin: 0;
}
.featured-card__title a { color: inherit; }
.featured-card__title a:hover { color: var(--si-teal-deep); }
@media (max-width: 767.98px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card__media { aspect-ratio: 16 / 9; }
  .featured-card__body { padding: 1.6rem 1.4rem; }
  .featured-card__title { font-size: 1.4rem; }
}

/* Lista lateral (populares / recentes) ------------------------------------ */
.mini-post {
  display: flex;
  gap: .85rem;
  padding: .75rem 0;
  border-bottom: 1px solid #eef2f5;
}
.mini-post:last-child { border-bottom: none; }
.mini-post__thumb {
  flex: 0 0 74px;
  width: 74px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--si-gray-bg);
}
.mini-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-post__title {
  font-size: .86rem;
  font-weight: 600;
  color: var(--si-navy);
  line-height: 1.3;
  margin: 0;
}
.mini-post__title a { color: inherit; }
.mini-post__title a:hover { color: var(--si-teal-deep); }
.mini-post__meta { font-size: .72rem; color: #7d8b96; margin-top: .2rem; }

.sidebar-card {
  border: 1px solid #dde4ea;
  border-radius: 14px;
  background: var(--si-white);
  padding: 1.3rem 1.4rem;
  box-shadow: 0 6px 24px rgba(15,30,43,.05);
}
.sidebar-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--si-navy);
  margin-bottom: .5rem;
}

/* Estados: carregando / vazio --------------------------------------------- */
.blog-empty, .blog-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--si-text-muted);
}
.blog-spinner {
  width: 34px; height: 34px;
  border: 3px solid #dde4ea;
  border-top-color: var(--si-teal);
  border-radius: 50%;
  animation: blogspin .8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes blogspin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Página individual da matéria
   ========================================================================== */
.article-header { padding-top: 1.5rem; }
.article-title {
  font-size: 2.3rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--si-navy);
}
@media (max-width: 767.98px) { .article-title { font-size: 1.7rem; } }
.article-lead {
  font-size: 1.15rem;
  color: var(--si-text-muted);
  line-height: 1.55;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  align-items: center;
  color: #7d8b96;
  font-size: .85rem;
  padding: 1rem 0;
  border-top: 1px solid #eef2f5;
  border-bottom: 1px solid #eef2f5;
}
.article-meta .author { color: var(--si-navy); font-weight: 600; }
.article-cover {
  border-radius: 16px;
  overflow: hidden;
  margin: 1.75rem 0;
  border: 1px solid #dde4ea;
}
.article-cover img { width: 100%; height: auto; display: block; }

/* Corpo do texto ---------------------------------------------------------- */
.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2a3742;
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--si-navy);
  margin: 2.4rem 0 .9rem;
  scroll-margin-top: 90px;
}
.article-body h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--si-navy);
  margin: 1.8rem 0 .7rem;
  scroll-margin-top: 90px;
}
.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; padding-left: 1.3rem; }
.article-body li { margin-bottom: .5rem; }
.article-body a {
  color: var(--si-teal-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover { color: var(--si-teal); }
.article-body strong { color: var(--si-navy); }

.article-body figure { margin: 1.6rem 0; }
.article-body figure img { width: 100%; border-radius: 12px; border: 1px solid #dde4ea; }
.article-body figcaption { font-size: .82rem; color: #7d8b96; text-align: center; margin-top: .5rem; }

/* Destaque / callout ------------------------------------------------------ */
.callout {
  border-left: 4px solid var(--si-teal);
  background: var(--si-gray-bg);
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.35rem;
  margin: 1.6rem 0;
  color: #2a3742;
}
.callout--gold { border-left-color: var(--si-gold); }
.callout__label {
  display: block;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--si-teal-deep);
  margin-bottom: .35rem;
}
.callout--gold .callout__label { color: var(--si-gold-deep); }

/* Tabela ------------------------------------------------------------------ */
.article-body .table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.article-body th, .article-body td {
  border: 1px solid #dde4ea;
  padding: .65rem .8rem;
  text-align: left;
  vertical-align: top;
}
.article-body thead th {
  background: var(--si-navy);
  color: #fff;
  font-weight: 700;
}
.article-body tbody tr:nth-child(even) { background: var(--si-gray-bg); }

/* Sumário (TOC) ----------------------------------------------------------- */
.toc {
  border: 1px solid #dde4ea;
  background: var(--si-white);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 6px 24px rgba(15,30,43,.05);
}
.toc h2 {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--si-teal-deep);
  font-weight: 700;
  margin: 0 0 .75rem;
}
.toc nav ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc nav li { margin-bottom: .4rem; }
.toc nav a {
  color: var(--si-text-muted);
  font-size: .88rem;
  text-decoration: none;
  display: block;
  padding-left: .2rem;
  border-left: 2px solid transparent;
}
.toc nav a:hover { color: var(--si-teal-deep); }
.toc nav a.active {
  color: var(--si-navy);
  font-weight: 700;
  border-left-color: var(--si-teal);
  padding-left: .5rem;
}
@media (min-width: 992px) {
  .toc-sticky { position: sticky; top: 90px; }
}

/* Barra de progresso de leitura ------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--si-gold);
  z-index: 1080;
  transition: width .1s linear;
}

/* Compartilhamento -------------------------------------------------------- */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 1.75rem 0;
  padding: 1rem 0;
  border-top: 1px solid #eef2f5;
  border-bottom: 1px solid #eef2f5;
}
.share-bar .share-label { font-weight: 700; color: var(--si-navy); font-size: .85rem; margin-right: .25rem; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #dde4ea;
  background: var(--si-white);
  color: var(--si-navy);
  font-size: 1.05rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.share-btn:hover { background: var(--si-navy); color: #fff; border-color: var(--si-navy); transform: translateY(-2px); }
.copy-feedback { font-size: .8rem; color: var(--si-teal-deep); font-weight: 600; }

/* Fontes e referências ---------------------------------------------------- */
.sources-block {
  background: var(--si-gray-bg);
  border: 1px solid #dde4ea;
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin: 2rem 0;
}
.sources-block h2 { font-size: 1.2rem; margin-top: 0; }
.sources-block ol { padding-left: 1.2rem; margin-bottom: 0; }
.sources-block li { margin-bottom: .75rem; font-size: .9rem; color: var(--si-text-muted); }
.sources-block a { word-break: break-word; }

/* Notas / avisos editoriais ----------------------------------------------- */
.editorial-note {
  font-size: .85rem;
  color: #7d8b96;
  background: #fbfcfd;
  border: 1px dashed #d7dfe6;
  border-radius: 10px;
  padding: .85rem 1.1rem;
  margin: 1.5rem 0;
}

/* FAQ --------------------------------------------------------------------- */
.faq .accordion-button { font-size: 1rem; }

/* Navegação anterior / próxima ------------------------------------------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.post-nav a {
  border: 1px solid #dde4ea;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  color: var(--si-navy);
  transition: border-color .2s ease, box-shadow .2s ease;
  background: var(--si-white);
}
.post-nav a:hover { border-color: var(--si-teal); box-shadow: 0 8px 20px rgba(15,30,43,.06); }
.post-nav small { color: #7d8b96; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; font-weight: 700; }
.post-nav .pn-title { display: block; font-weight: 700; font-size: .95rem; margin-top: .25rem; }
.post-nav .pn-next { text-align: right; }
@media (max-width: 575.98px) { .post-nav { grid-template-columns: 1fr; } }

/* Autor ------------------------------------------------------------------- */
.author-box {
  display: flex;
  gap: 1rem;
  align-items: center;
  border: 1px solid #dde4ea;
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  background: var(--si-white);
  margin: 2rem 0;
}
.author-box .avatar {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--si-navy-3), var(--si-teal));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.author-box .name { font-weight: 700; color: var(--si-navy); margin: 0; }
.author-box .role { font-size: .82rem; color: var(--si-text-muted); margin: 0; }

/* CTA interno ------------------------------------------------------------- */
.inline-cta {
  background: var(--si-navy);
  color: #fff;
  border-radius: 16px;
  padding: 1.75rem 1.9rem;
  margin: 2rem 0;
}
.inline-cta h2 { color: #fff; font-size: 1.3rem; margin-top: 0; }
.inline-cta p { color: rgba(255,255,255,.85); margin-bottom: 1rem; }
/* Botão sobre fundo navy: teal claro com texto escuro, para ter contraste real */
.inline-cta .btn-teal {
  background-color: var(--si-teal-light);
  border-color: var(--si-teal-light);
  color: var(--si-navy);
  font-weight: 700;
}
.inline-cta .btn-teal:hover,
.inline-cta .btn-teal:focus {
  background-color: #fff;
  border-color: #fff;
  color: var(--si-navy);
}
.inline-cta .btn-teal:focus-visible {
  outline: 3px solid var(--si-gold);
  outline-offset: 2px;
}

/* Faixa de novidade na home ----------------------------------------------- */
.latest-strip {
  background: linear-gradient(90deg, rgba(212,175,55,.14), rgba(212,175,55,.05));
  border-top: 1px solid rgba(212,175,55,.35);
  border-bottom: 1px solid rgba(212,175,55,.35);
}
.latest-strip__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 0;
  flex-wrap: wrap;
}
.latest-strip__tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--si-gold-deep);
  background: rgba(212,175,55,.18);
  border: 1px solid rgba(212,175,55,.5);
  border-radius: 999px;
  padding: .32rem .8rem;
  white-space: nowrap;
}
.latest-strip__link {
  font-weight: 700;
  color: var(--si-navy);
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 220px;
}
.latest-strip__link:hover { color: var(--si-teal-deep); }
.latest-strip__meta { color: var(--si-text-muted); font-size: .82rem; white-space: nowrap; }
.latest-strip .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  .latest-strip__meta { display: none; }
  .latest-strip__link { min-width: 0; }
}

/* Reduz movimento --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .post-card:hover, .share-btn:hover { transform: none; }
}
