/* ============================================
   SINGLE POST
   ============================================ */

/* ============================================
   HERO DO POST — dark, com badge de categoria
   ============================================ */

.post-hero {
  background: linear-gradient(180deg, #111827 0%, #1F2937 100%);
  padding: 60px var(--padding-container) 60px;
  color: var(--cor-texto-claro);
  text-align: center;
  position: relative;
}

.post-hero__container {
  max-width: 820px;
  margin: 0 auto;
}

.post-hero__category-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--fonte-texto);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  margin-bottom: 24px;
  border-radius: var(--raio-pill);
  background: var(--cat-cor);
  color: #fff;
  transition: filter var(--transicao);
}

.post-hero__category-badge:hover { filter: brightness(1.1); }

.post-hero__titulo {
  font-family: var(--fonte-display);
  font-size: var(--tamanho-h1-post);
  font-weight: 400;
  line-height: 1.15;
  color: var(--cor-texto-claro);
  margin: 0;
  letter-spacing: -0.01em;
}

.post-hero__excerpt {
  font-family: var(--fonte-texto);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--cor-texto-claro-fraco);
  margin: 20px auto 0;
  max-width: 640px;
}

.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  font-family: var(--fonte-texto);
  font-size: 13px;
  color: #9CA3AF;
}

.post-hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-hero__meta-item svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .post-hero { padding: 40px var(--padding-container-mobile); }
  .post-hero__titulo { font-size: var(--tamanho-h1-post-mobile); }
  .post-hero__excerpt { font-size: 16px; }
}

/* ============================================
   CONTAINER PRINCIPAL DO POST
   ============================================ */

.post__container {
  max-width: var(--largura-max);
  margin: 0 auto;
  padding: 60px var(--padding-container) var(--espaco-lg);
}

.post__layout {
  display: grid;
  grid-template-columns: var(--largura-conteudo-post) 1fr;
  gap: 48px;
  align-items: start;
}

.post__main {
  min-width: 0;
}

.post__aside {
  min-width: 0;
}

/* Featured image — sobreposta sobre o hero */
.post__featured {
  margin: 0 auto 32px;
  max-width: 760px;
  position: relative;
  z-index: 1;
  border-radius: var(--raio-md);
  overflow: hidden;
  box-shadow: var(--sombra-card);
  background: var(--cor-fundo-alt);
}

.post__featured img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  max-height: 420px;
}

/* Byline E-E-A-T — autor, datas e links de transparência */
.post-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin: 0 0 28px;
  background: var(--cor-fundo-alt);
  border-radius: var(--raio-md);
  border-left: 3px solid var(--cor-acento);
}

.post-byline__avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cor-fundo);
  padding: 4px;
}

.post-byline__text { flex: 1; min-width: 0; }

.post-byline__author {
  font-family: var(--fonte-texto);
  font-size: 14px;
  font-weight: 600;
  color: var(--cor-titulo);
  margin: 0 0 2px;
}

.post-byline__author a {
  color: var(--cor-acento);
  text-decoration: none;
}

.post-byline__author a:hover {
  text-decoration: underline;
}

.post-byline__meta {
  font-family: var(--fonte-texto);
  font-size: 12px;
  color: var(--cor-meta);
  margin: 0 0 4px;
}

.post-byline__editorial {
  font-family: var(--fonte-texto);
  font-size: 12px;
  margin: 0;
}

.post-byline__editorial a {
  color: var(--cor-meta);
  text-decoration: underline;
  text-decoration-color: var(--cor-borda);
  text-underline-offset: 2px;
}

.post-byline__editorial a:hover {
  color: var(--cor-acento);
  text-decoration-color: var(--cor-acento);
}

@media (max-width: 600px) {
  .post-byline { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Excerpt destacado abaixo da imagem */
.post__excerpt-destaque {
  background: var(--cor-acento-suave);
  border-left: 4px solid var(--cor-acento);
  border-radius: 0 var(--raio-sm) var(--raio-sm) 0;
  padding: 18px 22px;
  margin: 0 0 32px;
  font-family: var(--fonte-texto);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--cor-titulo);
}

/* ============================================
   CORPO DO POST (HTML do WP)
   ============================================ */

.post__body {
  font-family: var(--fonte-texto);
  font-size: var(--tamanho-corpo);
  line-height: var(--lh-corpo);
  color: var(--cor-corpo);
}

.post__body > * + * { margin-top: 1.4em; }

.post__body p { line-height: 1.75; }

.post__body h2 {
  font-family: var(--fonte-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--cor-titulo);
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}

.post__body h3 {
  font-family: var(--fonte-texto);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cor-titulo);
  margin: 32px 0 12px;
  scroll-margin-top: 90px;
}

.post__body h4 {
  font-family: var(--fonte-texto);
  font-size: 17px;
  font-weight: 600;
  color: var(--cor-titulo);
  margin: 24px 0 8px;
}

.post__body a {
  color: var(--cor-acento);
  text-decoration: underline;
  text-decoration-color: rgba(26, 107, 255, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transicao), color var(--transicao);
}

.post__body a:hover {
  color: var(--cor-acento-hover);
  text-decoration-color: var(--cor-acento);
}

.post__body strong { color: var(--cor-titulo); font-weight: 600; }
.post__body em { font-style: italic; }

.post__body ul,
.post__body ol {
  padding-left: 1.5em;
  margin-top: 1em;
  margin-bottom: 1em;
}

.post__body ul { list-style: disc; }
.post__body ol { list-style: decimal; }

.post__body li { margin-bottom: 0.5em; line-height: 1.65; }
.post__body li::marker { color: var(--cor-acento); }

.post__body blockquote {
  border-left: 4px solid var(--cor-acento);
  background: var(--cor-fundo-alt);
  padding: 18px 22px;
  margin: 24px 0;
  border-radius: 0 var(--raio-sm) var(--raio-sm) 0;
  font-family: var(--fonte-texto);
  font-style: italic;
  color: var(--cor-corpo);
}

.post__body blockquote p:first-child { margin-top: 0; }
.post__body blockquote p:last-child { margin-bottom: 0; }

.post__body img,
.post__body figure {
  margin: 32px 0;
  border-radius: var(--raio-md);
  overflow: hidden;
}

.post__body figcaption {
  font-size: 13px;
  color: var(--cor-meta);
  text-align: center;
  margin-top: 8px;
}

.post__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.post__body th,
.post__body td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--cor-borda);
}

.post__body th {
  background: var(--cor-fundo-alt);
  font-weight: 600;
  color: var(--cor-titulo);
}

.post__body code {
  background: var(--cor-fundo-alt);
  border: 1px solid var(--cor-borda);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--fonte-mono);
  font-size: 0.92em;
  color: var(--cor-titulo);
}

.post__body pre {
  background: var(--cor-dark);
  color: var(--cor-texto-claro);
  padding: 20px;
  border-radius: var(--raio-md);
  overflow-x: auto;
  margin: 24px 0;
}

.post__body pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

.post__body hr {
  border: 0;
  border-top: 1px solid var(--cor-borda);
  margin: 40px 0;
}

/* ============================================
   POST NAV — anterior/próximo
   ============================================ */

.post-nav {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--cor-borda);
}

.post-nav__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--cor-fundo-card);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio-md);
  transition: border-color var(--transicao), transform var(--transicao);
}

.post-nav__item:hover {
  border-color: var(--cor-acento);
  transform: translateY(-2px);
}

.post-nav__item--empty {
  background: transparent;
  border: 0;
}

.post-nav__item--next { text-align: right; }

.post-nav__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fonte-texto);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cor-meta);
}

.post-nav__item--next .post-nav__label { justify-content: flex-end; }

.post-nav__label svg { width: 14px; height: 14px; }

.post-nav__titulo {
  font-family: var(--fonte-display);
  font-size: 17px;
  font-weight: 400;
  color: var(--cor-titulo);
  line-height: 1.3;
}

@media (max-width: 768px) {
  .post-nav__grid { grid-template-columns: 1fr; gap: 12px; }
  .post-nav__item--next { text-align: left; }
  .post-nav__item--next .post-nav__label { justify-content: flex-start; }
}

/* ============================================
   LAYOUT RESPONSIVO
   ============================================ */

@media (max-width: 1024px) {
  .post__container { padding: 48px var(--padding-container-mobile); }
  .post__layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .post__featured { margin-top: 0; max-width: 100%; }
}

@media (max-width: 768px) {
  .post__excerpt-destaque { font-size: 16px; padding: 16px 18px; }
  .post__body h2 { font-size: 24px; }
  .post__body h3 { font-size: 18px; }
}

/* ============================================
   404 STATE
   ============================================ */

.post-404 {
  text-align: center;
  padding: 80px var(--padding-container);
  max-width: 600px;
  margin: 0 auto;
}

.post-404 h1 {
  font-family: var(--fonte-display);
  font-size: 32px;
  color: var(--cor-titulo);
  margin-bottom: 16px;
}

.post-404 p {
  color: var(--cor-meta);
  margin-bottom: 24px;
  line-height: 1.6;
}

.post-404__btn {
  display: inline-block;
  background: var(--cor-acento);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--raio-pill);
  font-weight: 600;
  transition: background var(--transicao);
}

.post-404__btn:hover { background: var(--cor-acento-hover); }

/* ============================================
   BACK TO TOP
   ============================================ */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--cor-acento);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(26, 107, 255, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transicao), transform var(--transicao), background var(--transicao);
  z-index: 90;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--cor-acento-hover); }

.back-to-top svg { width: 20px; height: 20px; }
