/* ============================================================
   BLOG — TecnoFink
   Carrega DEPOIS de institucional.css (usa as mesmas variáveis,
   o hero navy, os botões e o cartão de CTA).
   ============================================================ */

/* ---------- LISTA (/blog/) ---------- */
/* Topo com foto (embarcação industrial no mar, céu claro). A foto é clara, então
   o degradê navy à esquerda é forte para garantir a leitura do texto; à direita
   a embarcação aparece mais. */
.inst-hero.blog-hero {
  background:
    linear-gradient(90deg, rgba(8,0,62,0.96) 0%, rgba(12,0,89,0.88) 40%, rgba(12,0,89,0.45) 72%, rgba(12,0,89,0.25) 100%),
    linear-gradient(0deg, rgba(8,0,62,0.55) 0%, transparent 45%),
    url('/images/blog/blog-hero-embarcacao-industrial.webp') 70% 60% / cover no-repeat,
    var(--bg-navy);
}
/* Telas largas: foto ampliada e encostada à direita, para a embarcação
   ficar ao lado do texto e não por baixo dele. */
@media (min-width: 1100px) {
  .inst-hero.blog-hero { background-size: auto, auto, 128% auto, auto; background-position: 0 0, 0 0, right 62%, 0 0; }
}
.inst-hero.blog-hero::after { opacity: .5; }
@media (max-width: 760px) {
  .inst-hero.blog-hero {
    background:
      linear-gradient(180deg, rgba(8,0,62,0.84) 0%, rgba(12,0,89,0.90) 100%),
      url('/images/blog/blog-hero-embarcacao-industrial.webp') 58% center / cover no-repeat,
      var(--bg-navy);
  }
}

.blog-filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 36px; }
.blog-filtro {
  font: 600 0.9rem 'Manrope', sans-serif; cursor: pointer;
  padding: 9px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.22);
  transition: background .2s, border-color .2s, color .2s;
}
.blog-filtro:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.blog-filtro[aria-pressed="true"] { background: var(--accent-bright); border-color: var(--accent-bright); color: #08003E; }
.blog-filtro small { opacity: .7; font-weight: 500; margin-left: 4px; }

.blog-lista { padding: 72px 0 24px; background: var(--bg); }
.blog-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 24px 48px -28px rgba(12,0,89,0.35); }
.post-card-img { aspect-ratio: 16 / 9; background: var(--bg-2); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.post-card:hover .post-card-img img { transform: scale(1.03); }
.post-card-corpo { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.post-cat { color: var(--blue); font-weight: 500; }
.post-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.post-card h2, .post-card h3 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.18rem; line-height: 1.3; letter-spacing: -0.012em; }
.post-card p { color: var(--ink-2); font-size: 0.95rem; line-height: 1.6; }
.post-card-mais { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 0.92rem; color: var(--accent); display: inline-flex; gap: 8px; align-items: center; }

/* Destaque: o artigo mais recente ocupa a linha inteira */
.post-card.destaque { grid-column: 1 / -1; flex-direction: row; }
.post-card.destaque .post-card-img { flex: 0 0 56%; aspect-ratio: auto; min-height: 340px; }
.post-card.destaque .post-card-corpo { padding: 44px 48px; justify-content: center; gap: 16px; }
.post-card.destaque h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; }
.post-card.destaque p { font-size: 1.02rem; }
.post-card[hidden] { display: none; }

/* ---------- ARTIGO (/blog/slug) ---------- */
.post-hero { padding-bottom: 170px; }
.post-hero h1 { font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.12; max-width: 980px; }
.post-hero .post-meta { color: var(--ink-on-navy-3); margin-top: 26px; }
.post-hero .post-meta .post-cat { color: var(--accent-bright); }
.post-hero .post-meta .sep { background: rgba(255,255,255,0.3); }

.post-capa-secao { background: var(--bg); }
.post-capa {
  position: relative; z-index: 2; margin: -130px auto 0; max-width: 1040px;
  border-radius: 20px; overflow: hidden; background: var(--bg-2);
  box-shadow: 0 40px 80px -44px rgba(12,0,89,0.55);
}
.post-capa img { display: block; width: 100%; height: auto; }

.post-corpo { background: var(--bg); padding: 64px 0 40px; }
.post-texto { max-width: 760px; margin: 0 auto; font-size: 1.08rem; line-height: 1.78; color: var(--ink); }
.post-texto > * + * { margin-top: 1.15em; }
.post-texto h2 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.6rem; line-height: 1.25; letter-spacing: -0.015em; margin-top: 2em; }
.post-texto h3 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.01em; margin-top: 1.8em; }
.post-texto h3 + h3 { margin-top: 1em; }
.post-texto .post-linha-fina { font-family: 'Manrope', sans-serif; font-weight: 500; font-size: 1.22rem; line-height: 1.55; color: var(--ink-2); margin-top: 0; padding-left: 20px; border-left: 3px solid var(--blue); }
.post-texto a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; overflow-wrap: anywhere; }
.post-texto a:hover { color: var(--blue); }
.post-texto ul, .post-texto ol { padding-left: 1.4em; }
.post-texto li + li { margin-top: 0.5em; }
.post-texto ul li::marker { color: var(--blue); }
.post-texto blockquote {
  margin: 1.8em 0; padding: 26px 30px; background: var(--bg-wash); border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.12rem; font-style: italic; color: var(--ink);
}
.post-texto hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.post-texto figure { margin: 2em 0; }
.post-texto figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.post-texto figcaption { margin-top: 10px; text-align: center; font-size: 0.88rem; line-height: 1.5; color: var(--ink-3); }

/* Rodapé do artigo: origem + produtos citados */
.post-rodape { max-width: 760px; margin: 56px auto 0; display: grid; gap: 20px; }
.post-produtos { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; background: var(--bg-2); }
.post-produtos h2 { font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.post-produtos ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.post-produtos a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); font-weight: 600; font-size: 0.92rem; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.post-produtos a:hover { border-color: var(--accent); color: var(--accent); }
.post-origem { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.93rem; color: var(--ink-2); }
.post-origem a { font-weight: 700; color: var(--accent); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.post-origem a:hover { color: var(--blue); }
.post-voltar { font-weight: 700; color: var(--accent); text-decoration: none; }

.post-relacionados { background: var(--bg); padding: 56px 0 8px; }
.post-relacionados-titulo { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.6rem; letter-spacing: -0.015em; margin-bottom: 28px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.post-relacionados-titulo a { font-family: 'Manrope', sans-serif; font-size: 0.95rem; font-weight: 700; color: var(--accent); text-decoration: none; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 1080px) {
  .blog-grade { grid-template-columns: repeat(2, 1fr); }
  .post-card.destaque .post-card-corpo { padding: 32px 34px; }
}
@media (max-width: 760px) {
  .blog-grade { grid-template-columns: 1fr; gap: 20px; }
  .post-card.destaque { flex-direction: column; }
  .post-card.destaque .post-card-img { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
  .post-card.destaque .post-card-corpo { padding: 24px 26px 28px; }
  .blog-lista { padding-top: 48px; }
  .post-hero { padding-bottom: 110px; }
  .post-capa { margin-top: -80px; border-radius: 14px; }
  .post-corpo { padding-top: 40px; }
  .post-texto { font-size: 1.02rem; }
  .post-texto h2 { font-size: 1.35rem; }
  .post-texto h3 { font-size: 1.15rem; }
  .post-texto blockquote { padding: 20px 22px; }
}
