/* base.css — o que todo site precisa, igual em todos. O visual de cada um fica no estilo.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
:where(ul[class], ol[class]) { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* foco visível em tudo que é clicável */
:focus-visible { outline: 3px solid var(--foco, #1a66ff); outline-offset: 3px; border-radius: 2px; }

.pular { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: #fff; color: #000; border-radius: 6px; text-decoration: none; font-weight: 600; }
.pular:focus { top: 12px; }
.so-leitor { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* âncoras não ficam escondidas atrás do topo fixo */
[id] { scroll-margin-top: var(--altura-topo, 72px); }

/* botão flutuante de WhatsApp */
.wa-flutuante {
  position: fixed; z-index: 60;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 20px 0 16px; border-radius: 999px;
  background: #1a7f45; color: #fff; text-decoration: none; font-weight: 600; font-size: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.wa-flutuante svg { width: 28px; height: 28px; flex: none; }
.wa-flutuante:hover { background: #146a39; }
@media (max-width: 380px) { .wa-flutuante__texto { display: none; } .wa-flutuante { padding: 0 14px; } }

/* faixa "site de demonstração" */
.faixa-demo { margin: 0; padding: 8px 16px; font: 500 13px/1.4 system-ui, sans-serif; text-align: center; background: #222; color: #f2f2f2; }
.faixa-demo a { color: #fff; font-weight: 700; }

/* mapa */
[data-mapa] { position: relative; aspect-ratio: 4 / 3; background: #ddd; overflow: hidden; }
[data-mapa] iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 900px) { [data-mapa] { aspect-ratio: 16 / 10; } }

/* tabela de horários */
[data-horario] > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
[data-horario] dd { text-align: right; font-variant-numeric: tabular-nums; }
[data-horario] .hoje { font-weight: 700; }

/* foto ampliada */
.foto-ampliada { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 92vh; overflow: visible; }
.foto-ampliada::backdrop { background: rgba(0, 0, 0, .85); }
.foto-ampliada img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 4px; }
.foto-ampliada figcaption { color: #fff; text-align: center; padding: 12px 8px 0; font: 500 15px/1.4 system-ui, sans-serif; }
.foto-ampliada .fechar { position: absolute; top: -48px; right: 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: #000; font-size: 28px; line-height: 1; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* mapa quando o arquivo é aberto direto no computador (sem publicar) */
.mapa-local { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 16px; text-align: center; color: #222; text-decoration: none; font: 15px/1.4 system-ui, sans-serif;
  background: repeating-linear-gradient(45deg, #e4e4e4 0 12px, #dcdcdc 12px 24px); }
.mapa-local strong { font-size: 17px; text-decoration: underline; }
