/* ============ BLOG ============ */
.blog-page {
  --h-bg: #061320;
  --h-bg2: #0A1B2B;
  --h-panel: #0E2133;
  --h-line: rgba(120, 175, 215, .15);
  --h-text: rgba(235, 244, 250, .92);
  --h-soft: rgba(185, 208, 226, .62);
  background: var(--h-bg);
  color: var(--h-text);
  padding-top: 84px;
}

/* Hero do índice / tag */
.bhero { padding: 60px 0 20px; }
.bhero h1 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 900px; }
.bhero p { color: rgba(185,208,226,.72); max-width: 640px; margin-top: 12px; }

/* Grade de cards */
.bgrid__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.bcard { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: linear-gradient(165deg, #0E2133, #0A1826); border: 1px solid rgba(120,175,215,.15);
  text-decoration: none; transition: transform .3s ease, border-color .3s ease; }
.bcard:hover { transform: translateY(-6px); border-color: rgba(154,195,28,.5); }
.bcard__media { position: relative; aspect-ratio: 16/9; background: #0A1826; }
.bcard__media img { width: 100%; height: 100%; object-fit: cover; }
.bcard__tag { position: absolute; left: 12px; top: 12px; font-size: .72rem; font-weight: 600;
  color: #06121F; background: var(--verde); padding: 4px 10px; border-radius: 999px; }
.bcard__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.bcard__body h3 { color: #fff; font-size: 1.12rem; line-height: 1.3; }
.bcard__body p { color: rgba(185,208,226,.72); font-size: .92rem; }
.bcard__meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: rgba(185,208,226,.62); font-size: .8rem; }
.bcard__meta img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.bcard__meta time { margin-left: auto; }

.bpager { display: flex; justify-content: space-between; margin-top: 40px; }
.bpager a { color: var(--verde-claro); text-decoration: none; font-weight: 600; }

/* Artigo — coluna de leitura (opcionalmente + sidebar) */
.bpost__shell { max-width: 760px; margin-inline: auto; padding-top: 40px; }
.bpost__shell--aside { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.bpost__col { min-width: 0; }

.bpost__head { margin-bottom: 22px; }
.bpost__back { color: rgba(185,208,226,.7); text-decoration: none; font-size: .9rem; }
.bpost__cat { display: inline-block; margin: 14px 0 6px; color: var(--verde-claro); font-weight: 600; font-size: .85rem; text-decoration: none; }
.bpost__cat:hover { text-decoration: underline; }
.bpost__head h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.12; }
.bpost__lead { color: rgba(185,208,226,.8); font-size: 1.15rem; margin-top: 14px; }
.bpost__byline { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.bpost__byline img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bpost__byline-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bpost__byline-info strong { color: #fff; font-size: .95rem; }
.bpost__byline-meta { color: rgba(185,208,226,.6); font-size: .85rem; }
.bpost__cover { margin: 22px 0 0; border-radius: 20px; overflow: hidden; border: 1px solid rgba(120,175,215,.15); }
.bpost__cover img { width: 100%; display: block; }

.bpost__body { color: rgba(235,244,250,.9); font-size: 1.08rem; line-height: 1.8; margin-top: 26px; }
.bpost__body h2 { color: #fff; font-family: var(--font-head); margin: 36px 0 12px; font-size: 1.6rem; }
.bpost__body h3 { color: #fff; font-family: var(--font-head); margin: 28px 0 10px; font-size: 1.25rem; }
.bpost__body p { margin: 16px 0; }
.bpost__body a { color: var(--verde-claro); }
.bpost__body ul, .bpost__body ol { margin: 16px 0 16px 22px; }
.bpost__body li { margin: 8px 0; }
.bpost__body blockquote { border-left: 3px solid var(--verde); padding-left: 18px; margin: 22px 0; color: rgba(185,208,226,.85); font-style: italic; }
.bpost__body img { max-width: 100%; border-radius: 14px; margin: 22px 0; }
.bpost__body code { background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.bpost__body pre { background: #0A1826; border: 1px solid rgba(120,175,215,.15); border-radius: 12px; padding: 16px; overflow-x: auto; }
.bpost__body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .95rem; }
.bpost__body th, .bpost__body td { border: 1px solid rgba(120,175,215,.15); padding: 11px 14px; text-align: left; vertical-align: top; }
.bpost__body thead th { background: rgba(154,195,28,.12); color: #fff; font-family: var(--font-head); font-weight: 700; }
.bpost__body tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
.bpost__body tbody td:first-child { color: #fff; font-weight: 600; }
@media (max-width: 600px) {
  .bpost__body table { display: block; overflow-x: auto; white-space: nowrap; }
}

.bpost__tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0; }
.btag { font-size: .82rem; color: var(--verde-claro); background: rgba(154,195,28,.1); border: 1px solid rgba(154,195,28,.4); padding: 6px 14px; border-radius: 999px; text-decoration: none; }

.bauthor { display: flex; gap: 18px; margin: 30px 0; padding: 24px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(120,175,215,.15); border-radius: 18px; }
.bauthor img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bauthor strong { color: #fff; } .bauthor small { color: var(--verde-claro); display: block; margin-bottom: 8px; }
.bauthor p { color: rgba(185,208,226,.75); font-size: .95rem; }
.bauthor a { color: var(--verde-claro); text-decoration: none; font-weight: 600; font-size: .9rem; }

.bpost__cta { text-align: center; margin: 40px 0 20px; padding: 32px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(55,124,190,.16), rgba(149,202,88,.10)); border: 1px solid rgba(149,202,88,.4); }
.bpost__cta p { color: #fff; font-family: var(--font-head); font-size: 1.3rem; margin-bottom: 18px; }

/* Autor */
.bauthor-hero { padding: 60px 0 10px; }
.bauthor-hero .container { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.bauthor-hero img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.bauthor-hero h1 { color: #fff; }
.bauthor-hero__role { color: var(--verde-claro); font-weight: 600; margin: 4px 0 10px; }
.bauthor-hero p { color: rgba(185,208,226,.78); max-width: 640px; }
.bauthor-hero__social { display: flex; gap: 14px; margin-top: 12px; }
.bauthor-hero__social a { color: var(--verde-claro); text-decoration: none; text-transform: capitalize; }

@media (max-width: 900px) { .bgrid__cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .bgrid__cards { grid-template-columns: 1fr; } }

/* ============ NAV sólida no blog (legível em claro e escuro) ============ */
.nav--solid {
  background: rgba(0, 21, 38, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

/* ============ Alternador de tema (topo do blog) ============ */
.blog-utility { padding: 14px 0 0; }
.blog-utility .container { display: flex; justify-content: flex-end; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: .85rem; font-weight: 600;
  font-family: var(--font-body); cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.theme-toggle:hover { border-color: var(--verde); color: var(--verde-claro); }
.theme-toggle__icon { font-size: 1rem; line-height: 1; }

/* ============ MODO CLARO (apenas no blog) ============ */
html.blog-theme-light .blog-page {
  --h-bg: #F4F7FB;
  --h-bg2: #FFFFFF;
  --h-panel: #FFFFFF;
  --h-line: rgba(0, 54, 95, .12);
  --h-text: #1B2A38;
  --h-soft: #566575;
  background: var(--h-bg);
  color: var(--h-text);
}
html.blog-theme-light .theme-toggle {
  background: rgba(0, 54, 95, .06);
  border-color: rgba(0, 54, 95, .18);
  color: var(--navy);
}
html.blog-theme-light .theme-toggle:hover { border-color: var(--verde); color: #5a7d12; }

/* textos suaves */
html.blog-theme-light .bhero p,
html.blog-theme-light .bcard__body p,
html.blog-theme-light .bcard__meta,
html.blog-theme-light .bpost__lead,
html.blog-theme-light .bpost__back,
html.blog-theme-light .bpost__byline small,
html.blog-theme-light .bpost__byline time,
html.blog-theme-light .bpost__rt,
html.blog-theme-light .bauthor p,
html.blog-theme-light .bauthor-hero p { color: var(--h-soft); }

/* títulos e texto forte */
html.blog-theme-light .bcard__body h3,
html.blog-theme-light .bpost__head h1,
html.blog-theme-light .bpost__body,
html.blog-theme-light .bpost__body h2,
html.blog-theme-light .bpost__body h3,
html.blog-theme-light .bpost__byline strong,
html.blog-theme-light .bauthor strong,
html.blog-theme-light .bauthor-hero h1,
html.blog-theme-light .bpost__cta p,
html.blog-theme-light .bpost__body thead th,
html.blog-theme-light .bpost__body tbody td:first-child { color: #12202e; }

/* superfícies */
html.blog-theme-light .bcard { background: #fff; border-color: rgba(0, 54, 95, .10); box-shadow: 0 10px 30px rgba(0, 30, 53, .06); }
html.blog-theme-light .bcard:hover { border-color: rgba(154, 195, 28, .6); }
html.blog-theme-light .bcard__media { background: #E9EEF4; }
html.blog-theme-light .bauthor { background: #fff; border-color: rgba(0, 54, 95, .10); }
html.blog-theme-light .bpost__cover { border-color: rgba(0, 54, 95, .12); }
html.blog-theme-light .bpost__body code { background: rgba(0, 54, 95, .06); }
html.blog-theme-light .bpost__body pre { background: #0E2133; }
html.blog-theme-light .bpost__body pre code { background: transparent; }
html.blog-theme-light .bpost__body th,
html.blog-theme-light .bpost__body td { border-color: rgba(0, 54, 95, .14); }
html.blog-theme-light .bpost__body thead th { background: rgba(154, 195, 28, .18); }
html.blog-theme-light .bpost__body tbody tr:nth-child(even) { background: rgba(0, 54, 95, .03); }
html.blog-theme-light .bpost__cta { background: linear-gradient(160deg, rgba(55, 124, 190, .10), rgba(149, 202, 88, .12)); border-color: rgba(149, 202, 88, .5); }

/* ============ Sidebar "Leia também" ============ */
.bpost__side-inner { position: sticky; top: 100px; }
.bpost__side h4 { color: #fff; font-family: var(--font-head); font-size: 1rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(120,175,215,.15); }
.brel { display: flex; gap: 12px; margin-bottom: 16px; text-decoration: none; align-items: flex-start; }
.brel__media { flex-shrink: 0; width: 78px; height: 58px; border-radius: 10px; overflow: hidden; background: #0A1826; }
.brel__media img { width: 100%; height: 100%; object-fit: cover; }
.brel__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brel__cat { color: var(--verde-claro); font-size: .72rem; font-weight: 600; }
.brel__t { color: rgba(235,244,250,.9); font-size: .9rem; line-height: 1.3; }
.brel:hover .brel__t { color: #fff; }

@media (max-width: 980px) {
  .bpost__shell--aside { grid-template-columns: 1fr; gap: 8px; max-width: 760px; }
  .bpost__side { border-top: 1px solid rgba(120,175,215,.15); padding-top: 20px; margin-top: 10px; }
  .bpost__side-inner { position: static; }
}

/* ============ Filtro de categorias ============ */
.bfilter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.bfilter__item { font-size: .88rem; font-weight: 600; color: rgba(235,244,250,.8); background: rgba(255,255,255,.04); border: 1px solid rgba(120,175,215,.18); border-radius: 999px; padding: 8px 18px; text-decoration: none; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.bfilter__item:hover { border-color: rgba(154,195,28,.5); color: #fff; }
.bfilter__item.is-active { background: var(--verde); border-color: var(--verde); color: #06121F; }

/* ============ Modo claro: ajustes de verde e novos elementos ============ */
html.blog-theme-light .bpost__byline-meta { color: #566575; }
html.blog-theme-light .bpost__cat,
html.blog-theme-light .btag,
html.blog-theme-light .bpost__body a,
html.blog-theme-light .bauthor small,
html.blog-theme-light .bauthor a,
html.blog-theme-light .bauthor-hero__role,
html.blog-theme-light .bpager a,
html.blog-theme-light .brel__cat { color: #4a7a0c; }
html.blog-theme-light .everde,
html.blog-theme-light .eyebrow { color: #4a7a0c; }
html.blog-theme-light .btag { background: rgba(154,195,28,.12); border-color: rgba(120,160,30,.45); }
html.blog-theme-light .bfilter__item { color: #35424f; background: rgba(0,54,95,.04); border-color: rgba(0,54,95,.14); }
html.blog-theme-light .bfilter__item:hover { border-color: rgba(120,160,30,.55); color: #12202e; }
html.blog-theme-light .bfilter__item.is-active { background: var(--verde); border-color: var(--verde); color: #06121F; }
html.blog-theme-light .bpost__side h4 { color: #12202e; border-bottom-color: rgba(0,54,95,.12); }
html.blog-theme-light .brel__t { color: #35424f; }
html.blog-theme-light .brel:hover .brel__t { color: #12202e; }
html.blog-theme-light .bpost__back { color: #566575; }
