/* --- FORÇA FUNDO BRANCO EM QUALQUER TEMA DO NAVEGADOR --- */
@media (prefers-color-scheme: dark) {
  html, body {
    background: #f8f9f8 !important;
    color: #1a2a1a !important;
  }
  body::before {
    background: url('assets/folha-bg.svg') no-repeat center center !important;
    background-size: contain !important;
    opacity: 0.13 !important;
  }
}

/* --- RESET & BASE --- */
html {
  box-sizing: border-box;
  font-size: 18px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', Arial, sans-serif;
  background: #f8f9f8;
  color: #1a2a1a;
  min-height: 100vh;
  position: relative;
  transition: background 0.3s, color 0.3s;
}
body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 520px;
  height: 780px;
  max-width: 95vw;
  max-height: 90vh;
  z-index: 0;
  transform: translate(-50%, -50%);
  background: url('assets/folha-bg.svg') no-repeat center center;
  background-size: contain;
  opacity: 0.13;
  pointer-events: none;
  filter: blur(0.5px) grayscale(0.2);
}

/* --- NAVIGATION --- */
.header-modern {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 16px rgba(45,106,58,0.08);
  border-bottom: 1.5px solid #e6f2e6;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(2px);
  transition: box-shadow 0.2s;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 1.2rem 0.7rem 1.2rem;
  gap: 1.2rem;
}
.header-titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}
.logo-link, .capa-mini, .capa {
  transition: transform 0.18s cubic-bezier(.4,1.6,.6,1);
}
.logo-link:hover .capa-mini, .capa:hover {
  transform: scale(1.07) rotate(-2deg);
  box-shadow: 0 4px 32px rgba(45,106,58,0.13);
}
.capa {
  width: 120px;
  border-radius: 18px;
  box-shadow: 0 4px 32px rgba(45,106,58,0.10);
  border: 2px solid #e6f2e6;
  background: #f8f9f8;
  margin-bottom: 1rem;
}
.capa-mini {
  width: 44px;
  vertical-align: middle;
  border-radius: 10px;
  margin-right: 0.7rem;
  border: 1.5px solid #e6f2e6;
  background: #f8f9f8;
}
nav {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.2rem;
}
nav a {
  color: #2d6a3a;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.08rem;
  padding-bottom: 2px;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  outline: none;
}
nav a:hover, nav a:focus {
  color: #fff;
  background: #2d6a3a;
}

/* --- HERO & CARDS --- */
.intro.card, .conteudo.card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 32px rgba(45,106,58,0.10);
  border: 1.5px solid #e6f2e6;
  position: relative;
  z-index: 1;
  margin: 2.5rem auto 2.5rem auto;
  padding: 2.7rem 2.2rem;
  max-width: 950px;
  transition: box-shadow 0.18s, border 0.18s;
}
.intro.card:hover, .conteudo.card:hover {
  box-shadow: 0 6px 40px rgba(45,106,58,0.13);
  border: 1.5px solid #b6e2b6;
}
.intro.card {
  text-align: center;
  max-width: 650px;
  padding: 2.2rem 1.7rem;
}

/* --- TITLES & TYPOGRAPHY --- */
h1 {
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  margin: 0.5rem 0 0.2rem 0;
  font-weight: 700;
  color: #2d6a3a;
  text-shadow: 0 2px 8px #e6f2e6;
}
h2, .section-title {
  font-size: 1.35rem;
  font-weight: 500;
  color: #3a5c3a;
  margin: 0 0 0.7rem 0;
  letter-spacing: 0.01em;
}
.autor {
  color: #7cae7c;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}
h3, h4, h5, h6 {
  color: #2d6a3a;
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
  font-weight: 600;
}

/* --- LISTS, BLOCKS, HR --- */
ul, ol {
  padding-left: 2.1em;
}
li {
  margin-bottom: 0.5em;
}
.section-divider, hr {
  border: none;
  border-top: 2px solid #e6f2e6;
  margin: 2.5em 0;
  width: 100%;
  transition: border-color 0.2s;
}
.card:hover .section-divider, .card:hover hr {
  border-top: 2px solid #b6e2b6;
}

/* --- FOOTER --- */
.footer-modern {
  text-align: center;
  color: #7cae7c;
  font-size: 1rem;
  padding: 2.5rem 1rem 1.2rem 1rem;
  background: #f8f9f8;
  margin-top: 3rem;
  border-top: 2px solid #e6f2e6;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 12px;
  background: #e6f2e6;
}
::-webkit-scrollbar-thumb {
  background: #3a5c3a;
  border-radius: 8px;
  border: 2px solid #e6f2e6;
}
::-webkit-scrollbar-thumb:hover {
  background: #5fcf80;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
  }
  .intro.card, .conteudo.card {
    padding: 1.2rem 0.5rem;
  }
}
@media (max-width: 600px) {
  h1 {
    font-size: 1.3rem;
  }
  .capa {
    width: 80px;
  }
  body::before {
    width: 90vw;
    height: 60vw;
    min-width: 220px;
    min-height: 180px;
  }
}

/* --- DARK MODE READY --- */
@media (prefers-color-scheme: dark) {
  html, body, .header-modern, .intro.card, .conteudo.card, .footer-modern {
    background: #fff !important;
    color: #1a2a1a !important;
    border-color: #e6f2e6 !important;
  }
  nav a, nav a:hover, nav a:focus {
    color: #2d6a3a !important;
    background: transparent !important;
    border-bottom: none !important;
  }
  .section-divider, hr {
    border-top: 2px solid #e6f2e6 !important;
  }
}
.regulatorio-uniforme {
  font-size: 12pt !important;
  line-height: 1.6 !important;
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
  font-family: 'Inter', Arial, sans-serif !important;
}
/* Justificar texto da seção de simulações */
.simulacoes-justificado {
  text-align: justify;
}