/* =========================================================
   BLOG — design limpo inspirado no layout de referência
   Usa tokens de critical.css (carregado antes; rest.css é deferido)
   ========================================================= */

/* ── Página geral ── */
.blog-page { background: #fff; }

/* Header sempre solido em paginas do blog (body claro): o critical.css deixa
   .header transparente no topo, contando com hero escuro atras. No blog o body
   eh branco, entao logo+nav branco somem ate o usuario rolar 40px e ganhar
   .scrolled. Aqui forcamos o mesmo visual de .scrolled desde o load. */
body.blog-page .header {
  background: rgba(8, 39, 100, 0.92);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ── Hero topo ── */
.blog-top {
  background: var(--azul-profundo);
  padding: 72px 0 56px;
}
.blog-top .eyebrow { margin-bottom: 12px; }
.blog-top h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  color: var(--branco-puro);
  line-height: 1.15;
  margin-bottom: 12px;
}
.blog-top p { font-size: 15px; color: var(--cinza-suave); max-width: 520px; }

/* ── Post em destaque ── */
.blog-featured-wrap {
  background: var(--azul-profundo);
  padding: 148px 0 72px;
}
.blog-featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  background: var(--offwhite);
  border-radius: 20px;
  overflow: hidden;
}
.blog-featured-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--azul-profundo);
}
.blog-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.blog-featured-card:hover .blog-featured-img img { transform: scale(1.03); }

.blog-featured-content { padding: 40px 40px 40px 0; }
.blog-featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.blog-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--azul-medio);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 99px;
  text-transform: uppercase;
}
.blog-tag-outline {
  display: inline-block;
  padding: 4px 14px;
  background: transparent;
  color: var(--azul-medio);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--cinza-suave);
  border-radius: 99px;
}
.blog-featured-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--azul-profundo);
  line-height: 1.2;
  margin-bottom: 16px;
}
.blog-featured-excerpt {
  font-size: 15px;
  color: var(--texto-sec-escuro);
  line-height: 1.7;
  margin-bottom: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-featured-date {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--azul-medio);
  text-decoration: none;
  transition: gap .2s;
}
.blog-read-more:hover { gap: 10px; color: var(--coral-text); }
.blog-read-more svg { flex-shrink: 0; }

/* ── Seção de artigos recentes ── */
.blog-articles {
  background: #fff;
  padding: 72px 0 80px;
  border-top: 1px solid #e8edf3;
}
.blog-articles-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
}
.blog-articles-header h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--azul-profundo);
  margin-bottom: 4px;
}
.blog-articles-header p { font-size: 14px; color: #94a3b8; }

.blog-page-arrows {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.blog-page-arrows button {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--cinza-suave);
  border-radius: 50%;
  background: #fff;
  color: var(--azul-profundo);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, color .2s;
}
.blog-page-arrows button:hover:not(:disabled) {
  background: var(--azul-profundo);
  border-color: var(--azul-profundo);
  color: #fff;
}
.blog-page-arrows button:disabled { opacity: .35; cursor: not-allowed; }

/* ── Toolbar: busca + filtro por editoria ── */
.blog-toolbar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  margin: 0 0 24px;
  align-items: stretch;
}
.blog-search {
  position: relative;
  display: flex;
  align-items: center;
}
.blog-search-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  pointer-events: none;
}
.blog-search input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 12px 44px 12px 46px;
  font: 500 14px/1.4 var(--font-body);
  color: var(--azul-profundo);
  transition: border-color .2s, box-shadow .2s;
}
.blog-search input::placeholder { color: #94a3b8; font-weight: 400; }
.blog-search input:focus {
  outline: none;
  border-color: var(--azul-medio);
  box-shadow: 0 0 0 4px rgba(8, 86, 177, .12);
}
.blog-search-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  color: #475569;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.blog-search-clear:hover { background: #cbd5e1; color: #0f172a; }

.blog-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px 14px 4px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.blog-filter:focus-within {
  border-color: var(--azul-medio);
  box-shadow: 0 0 0 4px rgba(8, 86, 177, .12);
}
.blog-filter-label {
  font: 700 11px/1 var(--font-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}
.blog-filter select {
  flex: 1;
  border: none;
  background: transparent;
  font: 500 14px/1.4 var(--font-body);
  color: var(--azul-profundo);
  padding: 10px 4px 10px 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 22px;
}
.blog-filter select:focus { outline: none; }

.blog-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1.5px solid var(--azul-medio);
  background: rgba(8, 86, 177, .08);
  color: var(--azul-profundo);
  font: 600 12px/1 var(--font-body);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.blog-chip:hover { background: var(--azul-medio); color: #fff; }
.blog-chip span { font-size: 16px; line-height: 1; }
.blog-chip-reset {
  border-color: #e2e8f0;
  background: #fff;
  color: #64748b;
}
.blog-chip-reset:hover { background: #f1f5f9; color: var(--azul-profundo); }

/* Autor no card */
.blog-card-author {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}
.blog-card-date { font-size: 12px; color: #94a3b8; }

/* ── Grid de cards ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card {
  border: 1px solid #e8edf3;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  box-shadow: 0 12px 32px rgba(8,39,100,.1);
  transform: translateY(-3px);
}
.blog-card-img {
  aspect-ratio: 16/9;
  background: var(--azul-profundo);
  overflow: hidden;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-img .no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .25;
}

.blog-card-body { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }

.blog-card-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 12px;
  color: #94a3b8;
}
.blog-card-byline .blog-tag { font-size: 11px; padding: 3px 10px; }
.blog-card-byline .blog-card-date { margin-left: auto; }

.blog-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--azul-profundo);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.blog-card-excerpt {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  padding: 0 24px 20px;
}
.blog-card-read {
  font-size: 13px;
  font-weight: 700;
  color: var(--azul-medio);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: gap .2s, color .2s;
}
.blog-card-read:hover { gap: 8px; color: var(--coral-text); }

/* ── Estados ── */
.blog-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 0;
  color: #94a3b8;
  font-size: 15px;
}
.blog-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 15px;
  padding: 64px 0;
}
.blog-loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* featured-slot: aguarda o JS injetar o card */
#featured-slot { min-height: 0; }

/* ── Página do artigo ── */
.article-page {
  background: #f8fafc;
  min-height: 60vh;
}

/* ── Cabeçalho azul ── */
.article-header {
  background: var(--azul-profundo);
  padding: 112px 0 56px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.article-breadcrumb a { color: var(--texto-sec-claro); text-decoration: none; }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-breadcrumb span { opacity: .4; }

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.article-title {
  font-family: var(--font-display);
  font-size: var(--fs-article-title);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 880px;
}

.article-byline {
  margin-top: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,.78);
  letter-spacing: .01em;
}
.article-byline-author strong {
  color: #fff;
  font-weight: 700;
}
.article-byline-sep {
  color: rgba(255,255,255,.35);
  font-size: 12px;
}
.article-byline-date {
  color: rgba(255,255,255,.65);
  font-weight: 500;
}

/* ── Imagem de capa com margens ── */
.article-hero-img {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 0;
}
.article-hero-img img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(8,39,100,.14);
  display: block;
}

/* Layout 2 colunas: conteúdo + sidebar */
.article-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: flex-start;
}

/* Corpo do artigo */
.article-body {
  background: #fff;
  border-radius: 16px;
  padding: 48px 52px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  font-size: 16px;
  line-height: 1.85;
  color: #334155;
  min-width: 0;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--azul-profundo);
  margin: 36px 0 14px;
  line-height: 1.3;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--azul-profundo);
  margin: 28px 0 10px;
}
.article-body p { margin-bottom: 22px; }
.article-body ul, .article-body ol { margin: 0 0 22px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--azul-medio); text-decoration: underline; }
.article-body a:hover { color: var(--coral-text); }
.article-body img { border-radius: 10px; margin: 28px 0; width: 100%; }
.article-body blockquote {
  border-left: 4px solid var(--coral);
  padding: 18px 22px;
  background: #f0f7ff;
  border-radius: 0 10px 10px 0;
  margin: 28px 0;
  font-style: italic;
  color: #475569;
  font-size: 15px;
}
.article-body strong { color: var(--azul-profundo); }
.article-body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: #0f172a;
}

/* ── Compartilhar artigo (bloco base) ─────────────────── */
.article-share {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

/* Wrap do share que vem logo abaixo do título/capa ─────── */
.article-share-wrap {
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 0 32px;
}
.article-share-inner {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
/* Variante "topo": botões menores e sem borda superior */
.article-share.article-share--top {
  margin: 0;
  padding: 0;
  border: 0;
  gap: 16px;
  width: 100%;
}
.article-share.article-share--top .article-share-label {
  font-size: 12px;
  letter-spacing: .1em;
}
.article-share.article-share--top .article-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.article-share.article-share--top .article-share-buttons { gap: 10px; }

.article-share-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--azul-profundo);
}
.article-share-buttons {
  display: flex;
  gap: 14px;
}
.article-share-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--azul-profundo);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(8, 39, 100, .12);
}
.article-share-btn svg { color: #fff !important; }
.article-share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(8, 39, 100, .22);
}
.article-share-btn[data-platform="linkedin"]:hover { background: #0A66C2; }
.article-share-btn[data-platform="whatsapp"]:hover { background: #25D366; }
.article-share-btn[data-platform="twitter"]:hover  { background: #000; }
.article-share-btn[data-platform="facebook"]:hover { background: #1877F2; }
.article-share-copy:hover { background: var(--coral); color: #fff; }
.article-share-icon-check { display: none; }
.article-share-copy.copied { background: var(--coral); }
.article-share-copy.copied .article-share-icon-link  { display: none; }
.article-share-copy.copied .article-share-icon-check { display: block; }

@media (max-width: 640px) {
  .article-share { flex-direction: column; align-items: flex-start; gap: 16px; }
  .article-share-buttons { gap: 12px; }
}

/* Sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 96px;
}
.article-sidebar-card {
  background: var(--azul-profundo);
  border-radius: 16px;
  padding: 28px;
  color: #fff;
}
.article-sidebar-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-sec-claro);
  margin-bottom: 10px;
}
.article-sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}
.article-sidebar-card p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 20px;
}
.article-sidebar-btn {
  display: block;
  text-align: center;
  padding: 11px 20px;
  background: var(--coral);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
}
.article-sidebar-btn:hover { opacity: .88; }

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--azul-medio);
  text-decoration: none;
  padding: 10px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  transition: border-color .2s, color .2s;
}
.article-back:hover { border-color: var(--azul-medio); }

/* ── Posts relacionados ── */
.article-related {
  background: #f8fafc;
  padding: 64px 0 80px;
  border-top: 1px solid #e8edf3;
}
.article-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}
.article-related-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--azul-profundo);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-sidebar { position: static; }
}
@media (max-width: 720px) {
  .blog-toolbar { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .blog-featured-card { grid-template-columns: 1fr; }
  .blog-featured-img { aspect-ratio: 16/9; }
  .blog-featured-content { padding: 24px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-articles-header { flex-direction: column; align-items: flex-start; }
  .article-layout { padding: 32px 20px 60px; }
  .article-body { padding: 28px 24px; font-size: 15px; }
  .article-title { font-size: clamp(28px, 8vw, 40px); }
  .article-related { padding: 40px 0 60px; }
  .article-related-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .article-share-wrap { padding: 0 20px; }
  .article-share-inner { padding: 16px 18px; gap: 14px; flex-direction: column; align-items: flex-start; }
  .article-share.article-share--top { width: 100%; }
}
