/* ================================
   VARIÁVEIS E RESET
================================ */
:root {
  --cor-primaria:   #32757a;
  --cor-secundaria: #222b78;
  --cor-destaque:   #eb5e28;
  --cor-texto:      #2d2d2d;
  --max-conteudo:   830px;
  --nav-altura:     64px;
  --raio:           8px;
  --sombra:         0 4px 20px rgba(0, 0, 0, 0.14);
  --transicao:      0.22s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: "Mulish", sans-serif;
  color: var(--cor-texto);
  overflow-x: hidden;
}

p {
  line-height: 1.8em;
}

/* ================================
   BARRA DE PROGRESSO DE LEITURA
================================ */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--cor-destaque);
  width: 0%;
  z-index: 1100;
  transition: width 0.12s linear;
  pointer-events: none;
}

/* ================================
   NAVEGAÇÃO FIXA
================================ */
#navbar {
  position: sticky;
  top: 0;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  height: var(--nav-altura);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.9rem;
  color: var(--cor-texto);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 4px;
  transition: background var(--transicao), color var(--transicao);
}

.nav-links a:hover,
.nav-links a.ativo {
  background: var(--cor-primaria);
  color: #fff;
}

/* Hambúrguer (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cor-texto);
  border-radius: 2px;
  transition: var(--transicao);
}

/* ================================
   SEÇÕES: offset para navbar sticky
================================ */
section[id],
main[id] {
  scroll-margin-top: var(--nav-altura);
}

/* ================================
   HEADER / CAPA DO MÓDULO
================================ */
header {
  background: url(img/id-bg.jpg) no-repeat center center;
  background-size: cover;
  height: 100vh;
  position: relative;
}

header .logo {
  max-width: 250px;
  position: absolute;
  top: 40px;
  right: 50px;
}

header .titulo-header {
  position: absolute;
  top: 35%;
  left: 18%;
}

header h1 {
  color: var(--cor-primaria);
  font-size: 50px;
  font-weight: bold;
  font-style: italic;
}

header h2 {
  font-weight: bold;
}

header ul li {
  font-size: 20px;
  padding-top: 10px;
}

.autor-header {
  position: absolute;
  bottom: 8%;
  right: 65px;
  font-weight: bold;
  margin: 0;
}

/* ================================
   APRESENTAÇÃO / SUMÁRIO
================================ */
.sumario .container-conteudo {
  padding-bottom: 10px;
}

/* Índice do módulo */
.indice-modulo {
  background: #f4f8f9;
  border-left: 4px solid var(--cor-primaria);
  border-radius: 0 var(--raio) var(--raio) 0;
  padding: 1.5rem 2rem;
  margin-top: 2rem;
}

.indice-modulo h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cor-primaria);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0;
  border-bottom: none;
}

.indice-modulo ol {
  margin: 0;
  padding-left: 1.4rem;
}

.indice-modulo li {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.indice-modulo a {
  color: var(--cor-texto);
  text-decoration: none;
  transition: color var(--transicao);
}

.indice-modulo a:hover {
  color: var(--cor-primaria);
  text-decoration: underline;
}

/* ================================
   TÍTULOS DE CAPA DE SEÇÃO
================================ */
.titulo-capa {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 92vh;
  display: flex;
  align-items: center;
}

.titulo-capa h2 {
  color: #fff;
  font-size: 52px;
  font-weight: bold;
  max-width: 800px;
  font-style: italic;
  margin-left: 11%;
}

.titulo-capa h2::after {
  content: "";
  display: block;
  width: 180px;
  height: 10px;
  background: #fff;
  margin: 30px 0;
}

/* ================================
   CONTAINER DE CONTEÚDO
================================ */
.container-conteudo {
  max-width: var(--max-conteudo);
  margin: 55px auto;
  padding: 0 1.5rem;
}

.container-conteudo p {
  font-size: 20px;
}

.container-conteudo img {
  max-width: 100%;
  margin-bottom: 10px;
}

/* ================================
   TIPOGRAFIA GERAL
================================ */
.jus {
  text-align: justify;
}

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

h3 {
  font-weight: 700;
  margin-top: 48px;
  font-size: 26px;
}

h3::after {
  content: "";
  display: block;
  width: 60px;
  height: 5px;
  background: var(--cor-destaque);
  margin: 8px 0 15px 0;
}

/* Subtítulos dentro do conteúdo (ex: 1.1, 2.1) */
.container-conteudo h4 {
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cor-primaria);
  margin: 2.5rem 0 0.6rem 0;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(50, 117, 122, 0.2);
}

blockquote p {
  font-style: italic;
  padding-left: 70px;
  text-align: right;
  color: #757671;
  font-size: 18px !important;
}

.text-bg {
  background-color: #f7f7f7;
  padding: 25px 15px;
  text-align: center;
}

.borda {
  border: 4px dashed #3c7481;
  padding: 30px;
  margin-top: 30px;
  text-align: justify;
}

.legendafoto {
  text-align: left;
  margin-top: 1px;
  font-size: 12px;
}

/* ================================
   LISTAS DE CONTEÚDO
================================ */
.lista-conteudo {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.75rem 0;
}

.lista-conteudo li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.9rem;
  font-size: 20px;
  line-height: 1.8;
  text-align: justify;
}

.lista-conteudo li::before {
  content: "•";
  color: var(--cor-destaque);
  font-size: 1.35rem;
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.04em;
}

/* ================================
   BLOCOS DE MÍDIA (VÍDEO)
================================ */
.bloco-midia {
  margin: 2.5rem 0 2rem 0;
}

.bloco-midia-titulo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bloco-midia-titulo img {
  width: 46px;
  height: auto;
  flex-shrink: 0;
  margin: 0;
}

.bloco-midia-titulo h5,
.bloco-midia-titulo h4 {
  font-weight: 700;
  font-size: 1.65rem;
  margin: 0;
}

.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--raio);
  overflow: hidden;
  box-shadow: var(--sombra);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================
   PODCAST
================================ */
.podcast {
  background-color: #edecec;
  padding: 2.5rem 5%;
  margin-top: 4rem;
}

.podcast .bloco-midia-titulo {
  padding-left: 0;
  margin-bottom: 1.25rem;
}

.podcast-player iframe {
  width: 100%;
  height: 166px;
  border: none;
  display: block;
  border-radius: var(--raio);
}

/* ================================
   BOTÃO VOLTAR AO TOPO (na navbar)
================================ */
#btn-topo {
  background: var(--cor-primaria);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}

#btn-topo:hover {
  background: var(--cor-destaque);
}

#btn-topo.visivel {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ================================
   BACKGROUNDS DAS CAPAS DE TÓPICO
================================ */
.primeiro-topico .titulo-1 {
  background-image: linear-gradient(180deg, rgba(60, 116, 129, 0.93), rgba(34, 43, 120, 0.93)), url(img/bg-1.jpg);
}

.segundo-topico .titulo-2 {
  background-image: linear-gradient(180deg, rgba(60, 116, 129, 0.93), rgba(34, 43, 120, 0.93)), url(img/bg-2.jpg);
}

.terceiro-topico .titulo-3 {
  background-image: linear-gradient(180deg, rgba(60, 116, 129, 0.93), rgba(34, 43, 120, 0.93)), url(img/bg-3.jpg);
}

.quarto-topico .titulo-4 {
  background-image: linear-gradient(180deg, rgba(60, 116, 129, 0.93), rgba(34, 43, 120, 0.93)), url(img/bg-4.jpg);
}

.quinto-topico .titulo-5 {
  background-image: linear-gradient(180deg, rgba(60, 116, 129, 0.93), rgba(34, 43, 120, 0.93)), url(img/bg-5.jpg);
}

.sexto-topico .titulo-6 {
  background-image: linear-gradient(180deg, rgba(60, 116, 129, 0.93), rgba(34, 43, 120, 0.93)), url(img/bg-6.jpg);
}

.setimo-topico .titulo-7 {
  background-image: linear-gradient(180deg, rgba(60, 116, 129, 0.93), rgba(34, 43, 120, 0.93)), url(img/bg-7.jpg);
}

.oitavo-topico .titulo-8 {
  background-image: linear-gradient(180deg, rgba(60, 116, 129, 0.93), rgba(34, 43, 120, 0.93)), url(img/bg-8.jpg);
}

/* ================================
   QUOTE LATERAL (tópicos 2 e 4)
================================ */
.segundo-topico .quote,
.quarto-topico .quote {
  float: left;
  font-weight: 700;
  font-style: italic;
  font-size: 20px;
  margin-right: 30px;
}

.segundo-topico .quote { width: 180px; }
.quarto-topico .quote  { width: 220px; margin-right: 20px; margin-top: 10px; }

.segundo-topico hr,
.quarto-topico hr {
  float: left;
  height: 162px;
  width: 5px;
  background-color: var(--cor-destaque);
  margin-right: 30px;
  border: none;
}

.segundo-topico hr { margin-top: 6px; }
.quarto-topico hr  { margin-top: 10px; }

/* ================================
   CLASSES DE IMAGEM (legado)
================================ */
.imagem-1 { float: none; border: 10px solid #c2ccca; margin: 12px auto; width: 480px; height: 350px; }
.imagem-2 { float: left; margin: 12px 28px 0 0; width: 270px; }
.imagem-3 { float: none; margin: 12px auto; width: auto; height: 480px; }
.imagem-4 { float: left; border: 10px solid #c2ccca; margin: 12px 130px 0 0; width: 500px; }
.imagem-5 { float: right; margin: 8px 0 0 30px; width: 270px; }

/* Classes de dados — usadas em módulos com gráficos */
.dados-1  { float: none; margin: 8px 0 20px 90px;  width: 650px;  height: 200px; }
.dados-2  { float: none; margin: 12px 0 0 15px;    width: 800px;  height: 400px; }
.dados-3  { float: none; margin: 12px 0 0 70px;    width: 700px;  height: 170px; }
.dados-4  { float: none; margin: 12px 0 0 20px;    width: 800px;  height: 200px; }
.dados-5  { float: none; margin: 12px 0 0 200px;   width: 400px;  height: 400px; }
.dados-6  { float: none; margin: 12px 0 0 0;       width: 850px;  height: 400px; }
.dados-7  { float: none; margin: 12px 0 0 0;       width: 900px;  height: 420px; }
.dados-8  { float: none; margin: 12px 0 0 0;       width: 900px;  height: 420px; }
.dados-9  { float: none; margin: 12px 0 0 120px;   width: 600px;  height: 500px; }
.dados-10 { float: none; margin: 12px 0 0 0;       width: 1000px; height: 400px; }
.dados-11 { float: none; margin: 12px 0 0 150px;   width: 500px;  height: 500px; }
.dados-12 { float: none; margin: 12px 0 0 150px;   width: 500px;  height: 700px; }
.dados-13 { float: none; margin: 12px 0 0 30px;    width: 750px;  height: 600px; }
.dados-14 { float: none; margin: 12px 0 0 150px;   width: 500px;  height: 400px; }
.dados-15 { float: none; margin: 12px 0 0 150px;   width: 500px;  height: 400px; }

/* ================================
   RESPONSIVIDADE
================================ */
@media (max-width: 900px) {
  header .titulo-header { left: 10%; }
  header h1 { font-size: 40px; }
}

@media (max-width: 739px) {
  /* Nav mobile */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-altura);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 0.5rem 1.5rem 1.25rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    gap: 0;
  }

  .nav-links.aberto {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 0.25rem;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
  }

  /* Header */
  header,
  .titulo-capa {
    height: 80vh;
  }

  header .logo {
    max-width: 160px;
    top: 20px;
    right: 20px;
  }

  header .titulo-header {
    left: 6%;
    top: 30%;
  }

  header h1 {
    font-size: 28px;
    max-width: 85vw;
  }

  header h2 {
    font-size: 16px;
  }

  .autor-header {
    bottom: 5%;
    right: 20px;
  }

  /* Capas de tópico */
  .titulo-capa h2 {
    font-size: 26px;
    max-width: 88%;
    margin-left: 6%;
  }

  /* Conteúdo */
  .container-conteudo {
    max-width: 100%;
    margin: 36px auto;
    padding: 0 1.1rem;
  }

  .container-conteudo p,
  .lista-conteudo li {
    font-size: 17px;
    text-align: left;
  }

  .lista-conteudo li::before {
    font-size: 1.2rem;
  }

  .container-conteudo img {
    width: 100% !important;
    height: auto !important;
    margin: 0 0 16px 0;
    float: none !important;
  }

  /* Podcast */
  .podcast {
    padding: 2rem 1.1rem;
    margin-top: 2.5rem;
  }

  /* Botão voltar ao topo — mobile */
  #btn-topo {
    order: 3;
    margin-left: 0;
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .nav-toggle {
    order: 2;
    margin-left: auto;
  }

  /* Ícone de vídeo/podcast */
  .bloco-midia-titulo img {
    width: 30px !important;
    height: auto !important;
    margin: 0 !important;
    float: none !important;
  }

  .bloco-midia-titulo h5,
  .bloco-midia-titulo h4 {
    font-size: 1.25rem;
  }

}
