/* ============================================
   POST HERO — dourado #C2A776 com overlay da
   imagem destacada (opacity 0.25)
   ============================================ */

.post-hero {
  position: relative;
  min-height: var(--altura-hero-min);
  background-color: var(--cor-dourado);
  color: #FFFFFF;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--espaco-xs);
  padding: 40px var(--padding-container);
  text-align: center;
}

.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

.post-hero__icone {
  position: relative;
  z-index: 1;
  width: 45px;
  height: 45px;
  fill: #FFFFFF;
  opacity: 0.85;
  margin-bottom: 8px;
}

.post-hero__categorias {
  position: relative;
  z-index: 1;
  max-width: var(--largura-hero-post);
  font-family: var(--fonte-display);
  font-size: var(--tamanho-hero-icon);
  font-weight: 400;
  color: #FFFFFF;
  line-height: 1.1;
}

.post-hero__categorias a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.post-hero__categorias a:hover {
  opacity: 0.82;
}

@media (max-width: 1024px) {
  .post-hero {
    padding: 40px 5%;
  }
}

@media (max-width: 767px) {
  .post-hero {
    padding: 30px var(--padding-container-mobile);
  }
  .post-hero__categorias {
    font-size: 28px;
  }
  .post-hero__icone {
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
  }
}

/* ============================================
   POST CONTAINER — 1200px, layout 65/35
   ============================================ */

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

.post__layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}

.post__content {
  flex: 0 0 var(--largura-conteudo-post);
  min-width: 0;
  padding-right: var(--espaco-md);
}

.post__sidebar {
  flex: 0 0 var(--largura-sidebar-post);
  min-width: 0;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.post__loading {
  padding: 40px 0;
  color: var(--cor-corpo);
  font-style: italic;
  text-align: center;
}

@media (max-width: 1024px) {
  .post__container {
    padding: var(--espaco-lg) 5% 0;
    margin-bottom: 60px;
  }
  .post__layout {
    flex-wrap: wrap;
  }
  .post__content,
  .post__sidebar {
    flex: 1 1 100%;
    padding-right: 0;
    position: static;
  }
}

@media (max-width: 767px) {
  .post__container {
    padding: var(--espaco-md) var(--padding-container-mobile) 0;
  }
}

/* ============================================
   POST TITLE (H1) — dourado, League Spartan 35px weight 300
   ============================================ */

.post__titulo {
  font-family: var(--fonte-display);
  font-size: var(--tamanho-h1-post);
  font-weight: 300;
  line-height: var(--lh-titulo-post);
  color: var(--cor-dourado);
  text-transform: capitalize;
  text-align: left;
  margin: 0 0 24px 0;
}

.post__titulo .split-word {
  display: inline-block;
}

@media (max-width: 1024px) {
  .post__titulo {
    font-size: var(--tamanho-h1-tablet);
  }
}

@media (max-width: 767px) {
  .post__titulo {
    font-size: var(--tamanho-h1-mobile);
  }
}

/* ============================================
   POST METADATA — data + autor + tempo de leitura
   ============================================ */

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 14px 0 24px 0;
  font-family: var(--fonte-display);
  font-size: 16px;
  font-weight: 300;
  color: #4a4a4a;
  text-transform: none;
}

.post-meta__item {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.post-meta__item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
}

.post-meta__item + .post-meta__item::before {
  content: "•";
  margin-right: 14px;
  color: #4a4a4a;
}

@media (max-width: 600px) {
  .post-meta {
    gap: 10px;
    font-size: 14px;
  }
  .post-meta__item + .post-meta__item::before {
    margin-right: 10px;
  }
}

/* ============================================
   POST EXCERPT — borda esquerda dourada 4px
   ============================================ */

.post-excerpt {
  font-family: var(--fonte-texto);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: #16163f;
  padding-left: 30px;
  border-left: 4px solid #d3b574;
  margin: 30px 0 40px 0;
}

.post-excerpt p {
  margin: 0;
}

@media (max-width: 600px) {
  .post-excerpt {
    font-size: 16px;
    padding-left: 20px;
  }
}

/* ============================================
   POST FEATURED IMAGE — 100% largura, margin-top 50px
   ============================================ */

.post__featured {
  display: block;
  width: 100%;
  margin: var(--espaco-md) 0 0 0;
  padding: 0;
  text-align: center;
}

.post__featured img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--raio-md);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ============================================
   TOC — bloco estático no fluxo do conteúdo
   ============================================ */

.post-toc {
  position: static;
  width: 100%;
  max-width: 100%;
  z-index: auto;
  background-color: #F7F5F0;
  border: none;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 30px 0 40px 0;
}

.post-toc__titulo {
  font-family: var(--fonte-display);
  font-size: 20px;
  font-weight: 500;
  color: #16163f;
  margin: 0 0 14px 0;
  text-transform: none;
  letter-spacing: 0;
}

.post-toc__lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-toc__lista li {
  margin-bottom: 8px;
  font-family: var(--fonte-texto);
  font-size: 15px;
  line-height: 1.5;
}

.post-toc__lista a {
  color: #4a4a4a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-toc__lista a:hover {
  color: var(--cor-dourado);
}

.post-toc__lista ul {
  list-style: none;
  padding-left: 20px;
  margin-top: 8px;
}

.post-toc__lista ul li {
  font-size: 14px;
  margin-bottom: 6px;
}

/* ============================================
   POST BODY — conteúdo do post (HTML da API)
   Lato 16px weight 400 cor #4a4a4a
   ============================================ */

.post__body {
  margin-top: var(--espaco-md);
  font-family: var(--fonte-texto);
  font-size: var(--tamanho-corpo);
  font-weight: 400;
  color: var(--cor-corpo);
  line-height: 1.75;
  text-align: left;
}

.post__body > *:first-child {
  margin-top: 0;
}

.post__body h2 {
  font-family: var(--fonte-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--cor-dourado);
  line-height: 1.25;
  margin: 48px 0 20px;
}

.post__body h3 {
  font-family: var(--fonte-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--cor-titulo);
  line-height: 1.3;
  margin: 36px 0 14px;
}

.post__body h4,
.post__body h5,
.post__body h6 {
  font-family: var(--fonte-display);
  color: var(--cor-titulo);
  font-weight: 500;
  margin: 28px 0 12px;
}

.post__body p {
  margin: 0 0 20px;
}

.post__body a {
  color: var(--cor-dourado);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.post__body a:hover {
  color: var(--cor-dourado-alt);
}

.post__body strong,
.post__body b {
  font-weight: 700;
  color: var(--cor-titulo);
}

.post__body ul,
.post__body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.post__body li {
  margin-bottom: 8px;
}

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

.post__body blockquote {
  border-left: 4px solid var(--cor-dourado-alt);
  padding: 10px 24px;
  margin: 28px 0;
  font-style: italic;
  color: var(--cor-titulo);
  background: #F9F8F5;
  border-radius: 4px;
}

.post__body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 28px auto;
  border-radius: var(--raio-md);
}

.post__body figure {
  margin: 28px 0;
}

.post__body figure figcaption {
  font-size: 14px;
  color: var(--cor-corpo);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

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

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

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

.post__body code {
  background: #F5F3EE;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  font-family: Menlo, Monaco, Consolas, monospace;
  color: var(--cor-titulo);
}

.post__body pre {
  background: var(--cor-preto);
  color: var(--cor-off-white);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 28px 0;
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}

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

/* ============================================
   AFFILIATE NOTICE — aviso de links de afiliados
   ============================================ */

.affiliate-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background-color: #FAF8F5;
  border-left: 4px solid var(--cor-dourado);
  padding: 18px 24px;
  border-radius: 8px;
  font-family: var(--fonte-texto);
  font-size: 14px;
  line-height: 1.5;
  color: #4a4a4a;
}

.affiliate-notice--top {
  margin: 0 0 32px 0;
}

.affiliate-notice--bottom {
  margin: 40px 0 24px 0;
}

.affiliate-notice__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--cor-dourado);
  margin-top: 2px;
}

.affiliate-notice__content {
  flex: 1;
  min-width: 0;
}

.affiliate-notice__link {
  color: var(--cor-dourado);
  text-decoration: underline;
  font-weight: 500;
  margin-left: 4px;
}

.affiliate-notice__link:hover {
  color: var(--cor-dourado-alt);
}

.affiliate-notice--bottom p {
  margin: 0;
}

.affiliate-notice--bottom a {
  color: var(--cor-dourado);
  text-decoration: underline;
}

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

.post-nav {
  max-width: var(--largura-max);
  margin: 0 auto var(--espaco-2xl);
  padding: 0 var(--padding-container);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-nav__grid {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 40px;
  border-top: 1px solid var(--cor-divider);
  padding-top: 40px;
}

.post-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.post-nav__item:hover {
  background: #F9F8F5;
}

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

.post-nav__separator {
  width: 1px;
  background: var(--cor-divider);
  align-self: stretch;
}

.post-nav__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fonte-cards);
  font-size: 16px;
  font-weight: 400;
  color: var(--cor-corpo);
  text-transform: capitalize;
}

.post-nav__label svg {
  width: 21px;
  height: 21px;
  color: var(--cor-titulo);
  fill: currentColor;
}

.post-nav__titulo {
  font-family: var(--fonte-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--cor-titulo);
  text-transform: capitalize;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.post-nav__item:hover .post-nav__titulo {
  color: var(--cor-dourado);
}

@media (max-width: 767px) {
  .post-nav {
    padding: 0 var(--padding-container-mobile);
    margin-bottom: var(--espaco-lg);
  }
  .post-nav__grid {
    flex-direction: column;
    gap: 20px;
  }
  .post-nav__separator {
    display: none;
  }
  .post-nav__item--next {
    text-align: left;
    align-items: flex-start;
  }
  .post-nav__titulo {
    font-size: 18px;
  }
}

/* ============================================
   BACK TO TOP — aparece após 400px
   ============================================ */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 96px; /* empilhado acima do WhatsApp float (60px + 16px gap) */
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cor-dourado);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease, background 200ms ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  z-index: 80;
}

@media (max-width: 768px) {
  .back-to-top {
    right: 20px;
    bottom: 84px; /* acima do WhatsApp float mobile (54px + 14px gap) */
    width: 42px;
    height: 42px;
  }
}

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

.back-to-top[hidden] {
  display: none;
}

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

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

/* ============================================
   POST NOT FOUND
   ============================================ */

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

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

.post-404 p {
  font-size: 16px;
  color: var(--cor-corpo);
  margin-bottom: 28px;
}

.post-404 a {
  display: inline-block;
  background: var(--cor-dourado);
  color: #FFFFFF;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.post-404 a:hover {
  background: var(--cor-dourado-alt);
}
