/* ==========================================================================
   Blog — Envio Ecom · estilos próprios (complementa tailwind.css + styles.css)
   ========================================================================== */

/* Barra de progresso de leitura (T2) */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #ff6600, #ff8533);
  z-index: 40;
  transition: width 0.1s linear;
}

/* Badge de categoria */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  color: #fff;
  line-height: 1;
}

/* Card de post */
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(23, 96, 176, 0.12);
  border-color: #d7e3f1;
}
.post-card__media {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: #eef3f9;
}
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
}
.post-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #11243b;
}
.post-card:hover .post-card__title {
  color: #1760b0;
}
.post-card__excerpt {
  font-size: 0.9rem;
  color: #5b6b77;
  line-height: 1.55;
  flex: 1;
}
.post-card__meta {
  font-size: 0.78rem;
  color: #8a98a8;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Corpo do artigo (T2) */
.article-body {
  font-size: 1.075rem;
  line-height: 1.8;
  color: #2b3a4a;
}
.article-body > * + * { margin-top: 1.2rem; }
.article-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  color: #11243b;
  margin-top: 2.4rem;
  scroll-margin-top: 90px;
}
.article-body h3 {
  font-size: 1.28rem;
  font-weight: 700;
  color: #11243b;
  margin-top: 1.8rem;
  scroll-margin-top: 90px;
}
.article-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2c3e;
  margin-top: 1.4rem;
}
.article-body p { margin-top: 1.1rem; }
.article-body a {
  color: #1760b0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover { color: #11498f; }
.article-body ul,
.article-body ol { padding-left: 1.4rem; margin-top: 1.1rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-top: 0.4rem; }
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.6rem 0;
}
.article-body figure { margin: 1.6rem 0; }
.article-body figcaption {
  font-size: 0.85rem;
  color: #8a98a8;
  text-align: center;
  margin-top: 0.5rem;
}
.article-body blockquote {
  border-left: 4px solid #ff6600;
  background: #fff7f0;
  padding: 0.9rem 1.2rem;
  border-radius: 0 10px 10px 0;
  color: #4a5666;
  font-style: italic;
}
.article-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.9rem;
}
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: #eef3f9;
  color: #11498f;
  padding: 0.12em 0.4em;
  border-radius: 6px;
}
.article-body pre code { background: transparent; color: inherit; padding: 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.5rem 0;
}
.article-body th,
.article-body td {
  border: 1px solid #e2e8f0;
  padding: 0.65rem 0.85rem;
  text-align: left;
}
.article-body thead th {
  background: #f5f8fc;
  font-weight: 700;
  color: #11243b;
}

/* Sumário / índice */
.toc {
  border: 1px solid #e8eef5;
  background: #f9fbfe;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}
.toc__title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a98a8;
  margin-bottom: 0.7rem;
}
.toc a {
  display: block;
  font-size: 0.9rem;
  color: #4a5666;
  padding: 0.28rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.7rem;
  margin-left: -0.7rem;
  transition: color 0.15s, border-color 0.15s;
}
.toc a:hover { color: #1760b0; }
.toc a.toc--h3 { padding-left: 1.5rem; font-size: 0.85rem; }
.toc a.is-active { color: #1760b0; border-left-color: #1760b0; font-weight: 600; }

/* CTA inline e final */
.cta-box {
  background: linear-gradient(135deg, #1760b0, #11498f);
  color: #fff;
  border-radius: 18px;
  padding: 2rem 1.6rem;
  text-align: center;
}
.cta-box--inline { margin: 2.2rem 0; padding: 1.6rem; }
.cta-box h3 { font-size: 1.4rem; font-weight: 800; }
.cta-box p { color: rgba(255, 255, 255, 0.85); margin-top: 0.4rem; }

/* Bloco do autor */
.author-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #f9fbfe;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 1.3rem;
}
.author-box img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef3f9;
  flex-shrink: 0;
}

/* Hero do blog */
.blog-hero {
  background: linear-gradient(135deg, #11498f 0%, #1760b0 100%);
  color: #fff;
}

/* Abas de filtro por categoria (T1) */
.cat-tab {
  cursor: pointer;
  color: #4a5666;
  transition: all 0.15s ease;
}
.cat-tab:hover { border-color: #1760b0; color: #1760b0; }
.cat-tab.is-active {
  background: #1760b0 !important;
  border-color: #1760b0 !important;
  color: #fff;
}
