/* ==========================================================================
   GLOBAL SNAP SCROLL (todas as páginas)
   ==========================================================================
   - Ativado via `html.snap-page-active`
   - Não interfere na Home (`html.home-page-active`) nem no Sobre (`html.about-page-active`)
*/

html.snap-page-active:not(.home-page-active):not(.about-page-active),
html.snap-page-active:not(.home-page-active):not(.about-page-active) body {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

/* Alvos de snap */
html.snap-page-active:not(.home-page-active):not(.about-page-active) .snap-section {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-height, 85px);
  padding-bottom: var(--header-height, 85px);
  box-sizing: border-box;
}

/* Rodapé SEM depender de classe JS: garante que seja alcançável e visível no fim */
html.snap-page-active:not(.home-page-active):not(.about-page-active) body > footer {
  scroll-snap-align: end;
  scroll-snap-stop: always;
  min-height: auto;
  height: auto;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Footer como alvo de snap (aparece somente no fim) */
html.snap-page-active:not(.home-page-active):not(.about-page-active) footer.snap-footer.snap-section {
  scroll-snap-align: end;
  scroll-snap-stop: always;
  min-height: auto;
  height: auto;
  padding-top: 0;
  padding-bottom: 0;
  display: block;
}

/* Evita “área branca” no fim/início da página por causa do align:center */
html.snap-page-active:not(.home-page-active):not(.about-page-active) .snap-section:first-of-type {
  scroll-snap-align: start;
}
html.snap-page-active:not(.home-page-active):not(.about-page-active) .snap-section:last-of-type {
  scroll-snap-align: end;
  padding-bottom: 0;
}

/* Evitar que elementos “cortem” degradês/transições */
html.snap-page-active:not(.home-page-active):not(.about-page-active) .snap-section {
  overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
  html.snap-page-active:not(.home-page-active):not(.about-page-active),
  html.snap-page-active:not(.home-page-active):not(.about-page-active) body {
    scroll-behavior: auto;
  }
}


