/* Centraliza o header no topo */
.blog-post-header {
  width: 100%;
  text-align: center;
  margin: 0px 0 40px 0;
}

.blog-post-header h3 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.blog-post-header a {
  color: #FFFFFF;
  text-decoration: none;
}

.blog-post-header a:hover {
  color: #5bc0be;
}

.blog-post-header div {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 1rem;
  opacity: 0.85;
}

/* Layout principal: textos à esquerda, sumário/imagens à direita */
.main-content {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  padding: 0 20px;
}

.main-content h1 {
  color: #5bc0be;
  line-height: 2.5;
}

.main-content h2 {
  color: #5bc0be;
  line-height: 2.5;
}

.main-content p {
  line-height: 2.5;
  font-size: 18px;
}

.main-content li {
  line-height: 2.5;
  font-size: 18px;
}

.main-content a {
  color: #FFFFFF;
  text-decoration: none;
}

.main-content a:hover {
  color: #5bc0be;
}

/* Área de textos (section) */
.main-content section {
  flex: 1.1;
  /* diminua esse valor para deixar a área de texto mais estreita */
  max-width: 900px;
  /* limite a largura máxima do texto */
  min-width: 0;
  text-align: left;
  order: 2;
}

/* Área lateral (sumário e imagens) */
/* No seu CSS, adicione ou altere o estilo do aside */
.main-content aside {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  border-radius: 12px;
  padding: 24px 16px;
  margin-top: 0;
  position: sticky;
  top: 32px;
  /* Distância do topo ao rolar */
  align-self: flex-start;
  /* Garante o sticky */
  height: fit-content;
  /* Altura só do conteúdo */
  z-index: 10;
  order: 1;
}

.section-escritor {
  display: flex;
  align-items: center;
  margin: 50px 200px 50px 100px;
}

.section-escritor a {
  text-decoration: none;
  color: #FFFFFF;
}

.section-escritor a:hover {
  color: #5bc0be;
}

.escritor-img {
  width: 100px;
  height: 100px;
  border-radius: 5px;
  margin-right: 32px;
  /* Espaço entre imagem e texto */
  margin-left: 60px;
  /* Anula margem à esquerda */
  display: block;
}

.director-text {
  text-align: left;
  font-size: 18px;
  /* Se quiser limitar a largura do texto ou controlar o espaço, ajuste aqui */
}

.toc {
  background: #181818;
  padding: 12px 18px;
  border-radius: 8px;
  color: #FFFFFF;
  max-height: 500px;
  /* Defina a altura máxima que deseja! */
  overflow-y: auto;
  /* Oculta a scrollbar no Chrome, Edge, Safari */
  scrollbar-width: none;
  /* Para Firefox */
  -ms-overflow-style: none;
  /* Para IE e Edge antigos */
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin-bottom: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.toc a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s;
}

.toc a:hover {
  color: #5bc0be;
}

/* Destaque o link ativo do sumário */
.toc a.toc-ativo {
  color: #5bc0be !important;
  font-weight: bold;
}

.toc::-webkit-scrollbar {
  width: 6px;
  display: none;
}

.toc::-webkit-scrollbar-thumb {
  background: #222e41;
  border-radius: 3px;
}

.toc::-webkit-scrollbar-track {
  background: transparent;
}

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: #5bc0be;
  z-index: 9999;
  transition: width 0.2s;
}

/* CSS Mobile para Página de Post de Blog - Adaptado para telas até 768px */

@media (max-width: 768px) {
  .blog-post-header {
    width: 100%;
    text-align: center;
    margin: 0 0 20px 0;
  }

  .blog-post-header h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .blog-post-header a {
    color: #FFFFFF;
    text-decoration: none;
  }

  .blog-post-header a:hover {
    color: #5bc0be;
  }

  .blog-post-header div {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    opacity: 0.85;
  }

  .main-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    gap: 20px;
    padding: 0 10px;
  }

  .main-content h1 {
    color: #5bc0be;
    line-height: 1.8;
  }

  .main-content h2 {
    color: #5bc0be;
    line-height: 1.8;
  }

  .main-content p {
    line-height: 1.8;
    font-size: 16px;
  }

  .main-content li {
    line-height: 1.8;
    font-size: 16px;
  }

  .main-content a {
    color: #FFFFFF;
    text-decoration: none;
  }

  .main-content a:hover {
    color: #5bc0be;
  }

  .main-content section {
    flex: none;
    max-width: 100%;
    min-width: 0;
    text-align: left;
    order: 2;
  }

  .main-content aside {
    flex: none;
    min-width: 100%;
    max-width: 100%;
    border-radius: 12px;
    padding: 16px 12px;
    margin-top: 0;
    position: relative;
    top: 0;
    align-self: center;
    height: fit-content;
    z-index: 10;
    order: 1;
  }

  .section-escritor {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 10px;
  }

  .section-escritor a {
    text-decoration: none;
    color: #FFFFFF;
  }

  .section-escritor a:hover {
    color: #5bc0be;
  }

  .escritor-img {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 16px;
    display: block;
  }

  .director-text {
    text-align: center;
    font-size: 16px;
  }

  .toc {
    background: #181818;
    padding: 10px 14px;
    border-radius: 8px;
    color: #FFFFFF;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .toc li {
    margin-bottom: 4px;
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .toc a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.2s;
  }

  .toc a:hover {
    color: #5bc0be;
  }

  .toc a.toc-ativo {
    color: #5bc0be !important;
    font-weight: bold;
  }

  .toc::-webkit-scrollbar {
    width: 6px;
    display: none;
  }

  .toc::-webkit-scrollbar-thumb {
    background: #222e41;
    border-radius: 3px;
  }

  .toc::-webkit-scrollbar-track {
    background: transparent;
  }

  #progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: #5bc0be;
    z-index: 9999;
    transition: width 0.2s;
  }

  #sumario-blog {
    display: none !important;
  }
}