/* =========================================================
   AULA.CSS
   Estilos das páginas de aula
   ========================================================= */


/* =========================================================
   FUNDO DA PÁGINA
   ======================================================= */

body {
  background:#fcfcfc;
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

.aula {
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

/* ========================================================
   ESTRUTURA GERAL
   ========================================================= */

.aula {{
  width: 100%;
  max-width: 1050px;
  margin: 2rem auto 4rem;
  padding: 2.5rem 3rem;
  box-sizing: border-box;

  background: #fcfcfc;
  border: 1px solid #e5e7eb;
  border-radius: 18px;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.04);
}


/* =========================================================
   CABEÇALHO DA AULA
   ========================================================= */

.aula-cabecalho {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.aula-cabecalho h1 {
  margin: 0;

  font-family:"Inter",
    Arial,
    Helvetica,
    sans-serif;

  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;

  color: #202123;
}


/* =========================================================
   CONTEÚDO DA AULA
   ========================================================= */

.aula-conteudo {
  width: 100%;

  font-family:"Inter",
    Arial,
    Helvetica,
    sans-serif;

  font-size: 20px;
  font-weight: 400;
  line-height: 1.7;

  color: #202123;
  text-align: left;
}

.aula-conteudo p {
  max-width: 78ch;
  margin: 0 0 1.25rem;
}


/* =========================================================
   TÍTULOS DA AULA
   ========================================================= */

.aula-conteudo h2,
.aula-conteudo h3,
.aula-conteudo h4 {
  max-width: 78ch;
  scroll-margin-top: 2rem;

  font-family:"Inter",
    Arial,
    Helvetica,
    sans-serif;

  color: #202123;
}

.aula-conteudo h2 {
  margin: 3.5rem 0 1.25rem;
  padding-bottom: 0.6rem;

  border-bottom: 2px solid #e5e7eb;

  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

.aula-conteudo h3 {
  margin: 2.75rem 0 1rem;

  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
}

.aula-conteudo h4 {
  margin: 2.25rem 0 0.9rem;

  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}


/* Evita espaço exagerado no primeiro título */

.aula-conteudo > h2:first-child,
.aula-conteudo > h3:first-child,
.aula-conteudo > h4:first-child {
  margin-top: 0;
}


/* =========================================================
   ÍNDICE
   ========================================================= */

.indice-aula {
  margin: 2rem 0 3rem;
  padding: 1.5rem 1.75rem;

  border: 1px solid #e1e4e8;
  border-radius: 14px;

  background: #f7f7f8;
}

.indice-aula h2 {
  margin: 0 0 1.1rem;

  font-family:"Inter",
    Arial,
    Helvetica,
    sans-serif;

  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;

  color: #202123;
}

.indice-aula .indice-lista {
  margin: 0;
  padding: 0;
  list-style: none;
}

.indice-aula .indice-lista li {
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;

  line-height: 1.5;
}

.indice-aula .indice-lista li::marker {
  content: "";
}

.indice-aula a {
  color: #34495e;
  text-decoration: none;
}

.indice-aula a:hover {
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.indice-capitulo {
  margin-left: 0 !important;
  font-weight: 700;
}

.indice-secao {
  margin-left: 1.5rem !important;
  font-weight: 600;
}

.indice-subsecao {
  margin-left: 3rem !important;
  font-weight: 400;
}


/* =========================================================
   LISTAS DO CONTEÚDO
   ========================================================= */

.aula-conteudo ul,
.aula-conteudo ol {
  max-width: 78ch;

  margin: 0 0 1.4rem 1.6rem;
  padding-left: 1rem;
}

.aula-conteudo li {
  margin-bottom: 0.65rem;
  padding-left: 0.2rem;
}

.aula-conteudo li::marker {
  color: #4b5563;
}


/* =========================================================
   TEXTOS E DESTAQUES
   ========================================================= */

.aula-conteudo strong {
  font-weight: 700;
  color: #202123;
}

.aula-conteudo em {
  color: #343541;
}

.aula-conteudo mark {
  padding: 0.08rem 0.25rem;
  border-radius: 3px;
  background: #fef08a;
}

.texto-vermelho {
  color: #b42318;
}

.texto-verde {
  color: #15803d;
}


/* =========================================================
   LINKS
   ========================================================= */

.aula-conteudo a {
  color: #2563a5;

  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.aula-conteudo a:hover {
  color: #173f70;
}


/* =========================================================
   IMAGENS
   ========================================================= */

.aula-conteudo img {
  display: block;

  max-width: 100%;
  height: auto;

  margin: 2.25rem auto;

  border-radius: 8px;
}

.legenda-figura,
.legenda-tabela {
  margin-top: -1.25rem;
  margin-bottom: 2rem;

  text-align: center;

  font-size: 16px;
  font-style: italic;
  line-height: 1.5;

  color: #6b7280;
}


/* =========================================================
   TABELAS
   ========================================================= */

.aula-conteudo table {
  width: 100%;
  margin: 2rem 0;

  border: 1px solid #9ca3af !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;

  background: #ffffff;

  font-size: 17px;
  line-height: 1.5;
}

.aula-conteudo table tr {
  border: 0;
}

.aula-conteudo table th,
.aula-conteudo table td {
  padding: 13px 15px !important;

  border: 1px solid #9ca3af !important;

  text-align: left;
  vertical-align: top;

  color: #202123;
}

.aula-conteudo table tr:first-child th,
.aula-conteudo table tr:first-child td {
  background: #e9ecef;
  font-weight: 700;
}

.aula-conteudo table tr:nth-child(even) td {
  background: #f8f9fa;
}

.aula-conteudo table tr:hover td {
  background: #f1f3f5;
}

.aula-conteudo table p {
  max-width: none;
  margin: 0;
}

.tabela-responsiva {
  width: 100%;
  margin: 2rem 0;

  overflow-x: auto;

  border-radius: 8px;
}

.tabela-responsiva table {
  min-width: 650px;
  margin: 0;
}


/* =========================================================
   BLOCOS ESPECIAIS
   ========================================================= */

.aviso,
.importante,
.exemplo,
.questao,
.gabarito,
.jurisprudencia {
  max-width: 78ch;

  margin: 2rem 0;
  padding: 1.15rem 1.4rem;

  border-radius: 8px;
}

.aviso {
  border-left: 5px solid #d97706;
  background: #fff7ed;
}

.importante {
  border-left: 5px solid #b91c1c;
  background: #fef2f2;
}

.exemplo {
  border-left: 5px solid #2563eb;
  background: #eff6ff;
}

.questao {
  border-left: 5px solid #7c3aed;
  background: #f5f3ff;
}

.gabarito {
  border-left: 5px solid #15803d;
  background: #f0fdf4;
}

.jurisprudencia {
  border-left: 5px solid #475569;
  background: #f8fafc;
}

.aviso p:last-child,
.importante p:last-child,
.exemplo p:last-child,
.questao p:last-child,
.gabarito p:last-child,
.jurisprudencia p:last-child {
  margin-bottom: 0;
}


/* Quando o bloco especial estiver dentro de uma tabela */

.aula-conteudo table .aviso,
.aula-conteudo table .importante,
.aula-conteudo table .exemplo,
.aula-conteudo table .questao,
.aula-conteudo table .gabarito,
.aula-conteudo table .jurisprudencia {
  max-width: none;
  margin: 0;
}


/* =========================================================
   CÓDIGO
   ========================================================= */

.codigo,
.aula-conteudo pre {
  max-width: 100%;

  margin: 2rem 0;
  padding: 1.25rem;

  overflow-x: auto;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  background: #f7f7f8;

  font-family:
    Consolas,
    "Courier New",
    monospace;

  font-size: 16px;
  line-height: 1.6;

  color: #202123;
}

.aula-conteudo code {
  font-family:
    Consolas,
    "Courier New",
    monospace;

  font-size: 0.92em;
}


/* =========================================================
   LINHAS E SEPARADORES
   ========================================================= */

.aula-conteudo hr {
  margin: 3rem 0;

  border: 0;
  border-top: 1px solid #e5e7eb;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 1100px) {
  .aula {
    max-width: calc(100% - 2rem);
  }
}


@media (max-width: 768px) {
  body {
    background: #ffffff;
  }

  .aula {
    max-width: 100%;
    margin: 0;
    padding: 1.5rem 1.15rem 3rem;

    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .aula-cabecalho {
    margin-bottom: 1.5rem;
  }

  .aula-cabecalho h1 {
    font-size: 30px;
  }

  .aula-conteudo {
    font-size: 18px;
    line-height: 1.7;
  }

  .aula-conteudo p,
  .aula-conteudo ul,
  .aula-conteudo ol,
  .aula-conteudo h2,
  .aula-conteudo h3,
  .aula-conteudo h4,
  .aviso,
  .importante,
  .exemplo,
  .questao,
  .gabarito,
  .jurisprudencia {
    max-width: none;
  }

  .aula-conteudo h2 {
    margin-top: 3rem;
    font-size: 27px;
  }

  .aula-conteudo h3 {
    margin-top: 2.4rem;
    font-size: 23px;
  }

  .aula-conteudo h4 {
    margin-top: 2rem;
    font-size: 20px;
  }

  .indice-aula {
    margin: 1.5rem 0 2.5rem;
    padding: 1.15rem;

    border-radius: 10px;
  }

  .indice-secao {
    margin-left: 1rem !important;
  }

  .indice-subsecao {
    margin-left: 2rem !important;
  }

  .aula-conteudo table {
    display: block;

    width: 100%;
    overflow-x: auto;

    font-size: 16px;
  }

  .aula-conteudo table th,
  .aula-conteudo table td {
    min-width: 180px;
    padding: 10px 12px !important;
  }

  .aula-conteudo img {
    margin: 1.75rem auto;
  }
}


@media (max-width: 480px) {
  .aula {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .aula-cabecalho h1 {
    font-size: 27px;
  }

  .aula-conteudo {
    font-size: 17px;
    line-height: 1.65;
  }

  .aula-conteudo h2 {
    font-size: 25px;
  }

  .aula-conteudo h3 {
    font-size: 22px;
  }

  .aula-conteudo h4 {
    font-size: 19px;
  }

  .indice-subsecao {
    margin-left: 1.25rem !important;
  }
}