:root {
  --azul-profundo: #173b5c;
  --azul-vivo: #2567b1;
  --verde: #4fa56d;
  --amarelo: #f8c400;
  --vermelho: #cf252b;
  --roxo: #6417c9;
  --creme: #fff8ea;
  --branco: #ffffff;
  --texto: #26323f;
  --cinza: #5f6c7b;
  --linha: #f8c400;
  --sombra: 0 18px 45px rgba(23, 59, 92, 0.14);
  --fonte-base: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--fonte-base);
  line-height: 1.6;
  color: var(--texto);
  background:
    radial-gradient(circle at 8% 10%, rgba(248, 196, 0, 0.22), transparent 20%),
    radial-gradient(circle at 92% 18%, rgba(100, 23, 201, 0.12), transparent 22%),
    radial-gradient(circle at 80% 82%, rgba(79, 165, 109, 0.14), transparent 24%),
    var(--creme);
}

body.alto-contraste {
  --azul-profundo: #000000;
  --azul-vivo: #000000;
  --verde: #000000;
  --amarelo: #ffd400;
  --vermelho: #000000;
  --roxo: #000000;
  --creme: #ffffff;
  --texto: #000000;
  --cinza: #000000;
  --linha: #000000;
  background: #ffffff;
}

a {
  color: inherit;
}

.pular {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--amarelo);
  color: #000;
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 999;
}

.pular:focus {
  left: 10px;
}

/* TOPO */

header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(23, 59, 92, 0.12);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topo {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  width: 150px;
  max-width: 150px;
  height: auto;
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--azul-profundo);
  font-weight: 800;
  font-size: 0.95rem;
}

.acessibilidade {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.acessibilidade button {
  border: 1px solid rgba(23, 59, 92, 0.16);
  background: #fff;
  color: var(--azul-profundo);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}

/* ESTRUTURA */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 20px 70px;
}

section {
  margin: 64px 0;
}

h1, h2, h3 {
  margin-top: 0;
  line-height: 1.1;
}

h2 {
  color: var(--azul-profundo);
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 12px;
}

.subtitulo {
  max-width: 780px;
  color: var(--cinza);
  margin: 0 0 34px;
  font-size: 1.08rem;
}

/* HERO */

.hero {
  position: relative;
  min-height: 500px;
  border-radius: 36px;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 18%, rgba(248, 196, 0, 0.34), transparent 18%),
    radial-gradient(circle at 10% 90%, rgba(79, 165, 109, 0.28), transparent 22%),
    linear-gradient(135deg, rgba(23, 59, 92, 0.98), rgba(37, 103, 177, 0.9));
  color: #fff;
  padding: 44px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 28px;
  box-shadow: var(--sombra);
}

.hero-texto {
  position: relative;
  z-index: 3;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.06;
  margin-bottom: 20px;
  max-width: 500px;
}

.hero p {
  color: #f6fbff;
  font-size: 1.14rem;
  max-width: 510px;
  margin: 0 0 24px;
}

.selo {
  display: inline-flex;
  align-items: center;
  background: var(--amarelo);
  color: #2e2200;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 900;
  margin-bottom: 18px;
}

.botoes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--amarelo);
  color: #211600;
  font-weight: 900;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn.secundario {
  background: #fff;
  color: var(--azul-profundo);
}

/* IMAGEM DA TURMA */

.hero-imagem-uai {
  position: relative;
  z-index: 2;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-imagem-uai img {
  width: 100%;
  max-width: 430px;
  height: 340px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 28px;
  border: 8px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.25);
  background: #fff;
}

.selo-imagem {
  position: absolute;
  z-index: 4;
  left: 14px;
  bottom: 12px;
  background: var(--amarelo);
  color: #241700;
  font-weight: 900;
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.decoracao {
  position: absolute;
  z-index: -1;
  opacity: 0.95;
}

.decoracao-azul {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: var(--azul-vivo);
  top: 22px;
  left: 10px;
  transform: rotate(-12deg);
}

.decoracao-amarela {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--amarelo);
  right: 18px;
  top: 30px;
}

.decoracao-roxa {
  width: 100px;
  height: 100px;
  border-radius: 28px 28px 58px 28px;
  background: var(--roxo);
  right: 14px;
  bottom: 20px;
  transform: rotate(12deg);
}

/* LINHA DO TEMPO ELEGANTE */

.timeline-elegante {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(170px, 1fr));
  gap: 18px;
  margin: 64px 0 20px;
  padding: 20px 0 10px;
}

.timeline-elegante::before {
  content: "";
  position: absolute;
  top: 78px;
  left: 70px;
  right: 70px;
  border-top: 3px dashed var(--linha);
  z-index: 0;
}

.timeline-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
  text-align: center;
}

.timeline-ano {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--azul-profundo);
  margin-bottom: 12px;
}

.timeline-ponto {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--azul-vivo);
  border: 5px solid var(--creme);
  box-shadow: 0 0 0 4px rgba(23, 59, 92, 0.14);
  margin-bottom: 18px;
}

.timeline-item:nth-child(2) .timeline-ponto {
  background: var(--verde);
}

.timeline-item:nth-child(3) .timeline-ponto {
  background: var(--vermelho);
}

.timeline-item:nth-child(4) .timeline-ponto {
  background: var(--roxo);
}

.timeline-item:nth-child(5) .timeline-ponto {
  background: var(--amarelo);
}

.timeline-item:nth-child(6) .timeline-ponto {
  background: var(--azul-profundo);
}

.timeline-item:nth-child(7) .timeline-ponto {
  background: var(--verde);
}

.timeline-item:nth-child(8) .timeline-ponto {
  background: var(--roxo);
}

.timeline-card {
  width: 100%;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(23, 59, 92, 0.12);
  border-radius: 26px;
  padding: 20px 16px;
  box-shadow: 0 16px 34px rgba(23, 59, 92, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(23, 59, 92, 0.16);
}

.timeline-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 196, 0, 0.22);
  color: var(--azul-profundo);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.timeline-card h3 {
  color: var(--azul-profundo);
  font-size: 1.08rem;
  line-height: 1.18;
  margin: 0 0 10px;
}

.timeline-card p {
  color: var(--texto);
  font-size: 0.88rem;
  line-height: 1.42;
  margin: 0;
}

.timeline-item.destaque .timeline-card {
  border-top: 6px solid var(--azul-vivo);
}

.timeline-item.destaque-final .timeline-card {
  border-top: 6px solid var(--roxo);
  background:
    radial-gradient(circle at 90% 10%, rgba(248, 196, 0, 0.25), transparent 24%),
    rgba(255, 255, 255, 0.94);
}

/* CHAMADA LIVRO */

.chamada-livro {
  border-radius: 34px;
  padding: 42px;
  background:
    radial-gradient(circle at 90% 10%, rgba(248,196,0,0.55), transparent 18%),
    radial-gradient(circle at 10% 90%, rgba(79,165,109,0.30), transparent 20%),
    #ffffff;
  border: 1px solid rgba(23, 59, 92, 0.12);
  box-shadow: var(--sombra);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.chamada-texto {
  margin-bottom: 0;
}

/* PÁGINA DO LIVRO */

.livro-page {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 28px;
  align-items: stretch;
}

.painel-livro {
  background: #fff;
  border-radius: 34px;
  padding: 38px;
  box-shadow: var(--sombra);
  border: 1px solid rgba(23, 59, 92, 0.12);
}

.painel-livro h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
  color: var(--azul-profundo);
  margin: 0 0 18px;
}

.recursos {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.recurso {
  background: var(--creme);
  border: 1px solid rgba(23, 59, 92, 0.12);
  border-radius: 20px;
  padding: 16px 18px;
}

.recurso strong {
  color: var(--azul-profundo);
}

.observacao {
  margin-top: 22px;
  color: var(--cinza);
}

.capa-simples {
  background:
    radial-gradient(circle at 85% 12%, var(--amarelo), transparent 18%),
    radial-gradient(circle at 10% 80%, var(--verde), transparent 20%),
    linear-gradient(135deg, var(--azul-profundo), var(--azul-vivo));
  border-radius: 34px;
  padding: 36px;
  min-height: 500px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sombra);
}

.capa-simples::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 34px;
  background: var(--vermelho);
  right: -40px;
  bottom: 80px;
  transform: rotate(15deg);
}

.capa-simples::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--roxo);
  left: -45px;
  bottom: -20px;
}

.capa-conteudo {
  position: relative;
  z-index: 2;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.logo-capa-horizontal {
  width: 280px;
  max-width: 100%;
  height: auto;
  background: rgba(255,255,255,0.9);
  padding: 16px;
  border-radius: 24px;
}

.capa-conteudo h2 {
  color: #fff;
}

.capa-conteudo p {
  color: #fff;
  font-size: 1.15rem;
}

.video-box {
  margin-top: 28px;
  background: #fff;
  border-radius: 30px;
  padding: 28px;
  box-shadow: var(--sombra);
  border: 1px solid rgba(23, 59, 92, 0.12);
}

.video-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(23,59,92,0.92), rgba(37,103,177,0.85));
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.video-placeholder strong {
  font-size: 1.5rem;
}

/* RODAPÉ */

footer {
  background: var(--azul-profundo);
  color: #fff;
  text-align: center;
  padding: 36px 20px;
}

.rodape-conteudo {
  max-width: 700px;
  margin: 0 auto;
}

.rodape-conteudo p {
  margin: 4px 0;
}

.rodape-conteudo a {
  color: #fff;
  text-decoration: none;
}

/* RESPONSIVO */

@media (max-width: 1100px) {
  .timeline-elegante {
    display: flex;
    overflow-x: auto;
    gap: 18px;
    padding: 20px 4px 24px;
    scroll-snap-type: x mandatory;
  }

  .timeline-elegante::before {
    left: 80px;
    right: auto;
    width: calc(8 * 190px);
  }

  .timeline-item {
    min-width: 190px;
    scroll-snap-align: start;
  }
}

@media (max-width: 980px) {
  .hero,
  .livro-page,
  .chamada-livro {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 30px;
  }

  .hero-imagem-uai {
    height: auto;
    min-height: 0;
    margin-top: 12px;
  }

  .hero-imagem-uai img {
    max-width: 380px;
    height: 300px;
  }
}

@media (max-width: 760px) {
  .topo {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    justify-content: flex-start;
  }

  .logo-img {
    width: 130px;
    max-width: 130px;
  }

  .timeline-elegante {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    gap: 26px;
    padding-left: 18px;
  }

  .timeline-elegante::before {
    top: 0;
    bottom: 0;
    left: 31px;
    right: auto;
    width: 0;
    border-top: none;
    border-left: 3px dashed var(--linha);
  }

  .timeline-item {
    display: grid;
    grid-template-columns: 70px 34px 1fr;
    grid-template-rows: auto;
    align-items: start;
    text-align: left;
    justify-items: start;
    min-width: 0;
  }

  .timeline-ano {
    grid-column: 1;
    margin: 2px 0 0;
  }

  .timeline-ponto {
    grid-column: 2;
    margin: 0;
  }

  .timeline-card {
    grid-column: 3;
    min-height: auto;
    padding: 18px;
  }
}

@media (max-width: 520px) {
  main {
    padding: 24px 14px 54px;
  }

  .hero {
    border-radius: 26px;
    padding: 24px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero-imagem-uai img {
    height: 260px;
  }

  .painel-livro,
  .video-box,
  .chamada-livro,
  .capa-simples {
    border-radius: 26px;
    padding: 24px;
  }

  .acessibilidade button {
    font-size: 0.86rem;
  }

  .logo-capa-horizontal {
    width: 220px;
  }
  /* CORREÇÃO FINAL — LINHA DO TEMPO ELEGANTE */

#linha-do-tempo {
  scroll-margin-top: 190px;
}

.timeline-elegante {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(8, minmax(180px, 1fr)) !important;
  gap: 18px !important;
  margin: 64px 0 20px !important;
  padding: 20px 0 10px !important;
}

.timeline-elegante::before {
  content: "" !important;
  position: absolute !important;
  top: 78px !important;
  left: 70px !important;
  right: 70px !important;
  border-top: 3px dashed var(--linha) !important;
  z-index: 0 !important;
}

.timeline-item {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-rows: auto auto 1fr !important;
  justify-items: center !important;
  text-align: center !important;
}

.timeline-ano {
  font-size: 1.08rem !important;
  font-weight: 900 !important;
  color: var(--azul-profundo) !important;
  margin-bottom: 12px !important;
}

.timeline-ponto {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: var(--azul-vivo) !important;
  border: 5px solid var(--creme) !important;
  box-shadow: 0 0 0 4px rgba(23, 59, 92, 0.16) !important;
  margin-bottom: 18px !important;
}

.timeline-item:nth-child(2) .timeline-ponto {
  background: var(--verde) !important;
}

.timeline-item:nth-child(3) .timeline-ponto {
  background: var(--vermelho) !important;
}

.timeline-item:nth-child(4) .timeline-ponto {
  background: var(--roxo) !important;
}

.timeline-item:nth-child(5) .timeline-ponto {
  background: var(--amarelo) !important;
}

.timeline-item:nth-child(6) .timeline-ponto {
  background: var(--azul-profundo) !important;
}

.timeline-item:nth-child(7) .timeline-ponto {
  background: var(--verde) !important;
}

.timeline-item:nth-child(8) .timeline-ponto {
  background: var(--roxo) !important;
}

.timeline-card {
  width: 100% !important;
  min-height: 260px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(23, 59, 92, 0.12) !important;
  border-radius: 26px !important;
  padding: 20px 16px !important;
  box-shadow: 0 16px 34px rgba(23, 59, 92, 0.10) !important;
}

.timeline-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 22px 42px rgba(23, 59, 92, 0.16) !important;
}

.timeline-tag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(248, 196, 0, 0.22) !important;
  color: var(--azul-profundo) !important;
  border-radius: 999px !important;
  padding: 5px 10px !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  margin-bottom: 12px !important;
}

.timeline-card h3 {
  color: var(--azul-profundo) !important;
  font-size: 1.08rem !important;
  line-height: 1.18 !important;
  margin: 0 0 10px !important;
}

.timeline-card p {
  color: var(--texto) !important;
  font-size: 0.88rem !important;
  line-height: 1.42 !important;
  margin: 0 !important;
}

.timeline-item.destaque .timeline-card {
  border-top: 6px solid var(--azul-vivo) !important;
}

.timeline-item.destaque-final .timeline-card {
  border-top: 6px solid var(--roxo) !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(248, 196, 0, 0.25), transparent 24%),
    rgba(255, 255, 255, 0.94) !important;
}

/* RESPONSIVO DA LINHA DO TEMPO */

@media (max-width: 1100px) {
  .timeline-elegante {
    display: flex !important;
    overflow-x: auto !important;
    gap: 18px !important;
    padding: 20px 4px 24px !important;
    scroll-snap-type: x mandatory !important;
  }

  .timeline-elegante::before {
    left: 80px !important;
    right: auto !important;
    width: calc(8 * 200px) !important;
  }

  .timeline-item {
    min-width: 200px !important;
    scroll-snap-align: start !important;
  }
}

@media (max-width: 760px) {
  .timeline-elegante {
    display: grid !important;
    grid-template-columns: 1fr !important;
    overflow: visible !important;
    gap: 26px !important;
    padding-left: 18px !important;
  }

  .timeline-elegante::before {
    top: 0 !important;
    bottom: 0 !important;
    left: 31px !important;
    right: auto !important;
    width: 0 !important;
    border-top: none !important;
    border-left: 3px dashed var(--linha) !important;
  }

  .timeline-item {
    display: grid !important;
    grid-template-columns: 70px 34px 1fr !important;
    grid-template-rows: auto !important;
    align-items: start !important;
    text-align: left !important;
    justify-items: start !important;
    min-width: 0 !important;
  }

  .timeline-ano {
    grid-column: 1 !important;
    margin: 2px 0 0 !important;
  }

  .timeline-ponto {
    grid-column: 2 !important;
    margin: 0 !important;
  }

  .timeline-card {
    grid-column: 3 !important;
    min-height: auto !important;
    padding: 18px !important;
  }
}
}