/* =========================================================
   Acessibilidade (todas as páginas do site)
   - painel "Acessibilidade" (botão fixo no canto inferior esquerdo)
   - tamanho do texto, alto contraste, links destacados,
     animações pausadas, leitura em uma coluna
   - ajustes globais de toque e foco
   As preferências ficam no navegador (localStorage "a11y") e são
   aplicadas no <html> por um script no <head>, antes de desenhar a página.
   ========================================================= */

/* ---------- tamanho do texto (as fontes do site estão em rem) ---------- */
html.a11y-t1 { font-size: 112.5%; }
html.a11y-t2 { font-size: 125%; }
html.a11y-t3 { font-size: 137.5%; }
html.a11y-t4 { font-size: 150%; }

/* ---------- foco sempre visível e mais grosso ---------- */
:focus-visible { outline: 3px solid var(--cyan, #00e3ef); outline-offset: 3px; }
[data-tema="claro"] :focus-visible { outline-color: #005f66; }

/* ---------- alvos de toque mínimos (44px) ---------- */
.header__toggle { flex-shrink: 0; min-width: 44px; min-height: 44px; }
.tema-btn { min-width: 44px; min-height: 44px; }

/* ---------- botão e painel ---------- */
.a11y-btn {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1200;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #0b57d0;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.a11y-btn svg { width: 30px; height: 30px; }
.a11y-btn:hover { background: #0842a0; }
.a11y-btn:focus-visible { outline: 3px solid #ffd400; outline-offset: 3px; }

.a11y-painel {
  position: fixed;
  left: 20px;
  bottom: 84px;
  z-index: 1201;
  width: min(360px, calc(100vw - 40px));
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  padding: 20px 20px 16px;
  border: 2px solid #fff;
  border-radius: 16px;
  background: #121212;
  color: #fff;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.a11y-painel[hidden] { display: none; }
.a11y-painel h2 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; color: #fff; }
.a11y-painel > p { margin: 0 0 14px; font-size: 0.9375rem; color: #d6d6d6; }
.a11y-grupo { margin: 0 0 14px; padding: 0; border: 0; }
.a11y-grupo legend { margin-bottom: 8px; padding: 0; font-weight: 700; font-size: 1rem; color: #fff; }
.a11y-tamanho { display: flex; align-items: center; gap: 8px; }
.a11y-tamanho output { min-width: 64px; text-align: center; font-weight: 700; font-size: 1.0625rem; }
.a11y-painel button {
  min-height: 48px;
  border: 2px solid #8a8a8a;
  border-radius: 10px;
  background: #1f1f1f;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.a11y-painel button:hover { border-color: #fff; }
.a11y-painel button:focus-visible { outline: 3px solid #ffd400; outline-offset: 2px; }
.a11y-tamanho button { min-width: 56px; font-size: 1.125rem; }
.a11y-opcoes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.a11y-opcoes button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
}
.a11y-opcoes button::after {
  content: 'Desligado';
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 99px;
  background: #3a3a3a;
  font-size: 0.8125rem;
  font-weight: 700;
}
.a11y-opcoes button[aria-pressed="true"] { border-color: #ffd400; }
.a11y-opcoes button[aria-pressed="true"]::after { content: 'Ligado'; background: #ffd400; color: #000; }
.a11y-rodape { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.a11y-rodape button { flex: 1 1 140px; padding: 8px 12px; }
.a11y-dica { margin: 12px 0 0; font-size: 0.875rem; color: #cfcfcf; }
.a11y-dica a { color: #9fdcff; }

@media (max-width: 760px) {
  .a11y-btn { left: 16px; bottom: 16px; width: 52px; height: 52px; }
  .a11y-painel { left: 12px; right: 12px; bottom: 80px; width: auto; }
}

/* ---------- destacar links ---------- */
html.a11y-links a:not(.btn):not(.a11y-btn):not(.whats-float):not(.header__logo):not(.pf-card) { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px; }
html.a11y-links a.btn, html.a11y-links .nav a { outline: 2px dashed currentColor; outline-offset: 3px; }

/* ---------- pausar animações ---------- */
html.a11y-pausa *, html.a11y-pausa *::before, html.a11y-pausa *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
html.a11y-pausa .reveal, html.a11y-pausa .rv, html.a11y-pausa .pf-revela { opacity: 1 !important; transform: none !important; }

/* ---------- alto contraste: fundo preto, texto branco, links amarelos ---------- */
html.a11y-contraste { color-scheme: dark; }
html.a11y-contraste body,
html.a11y-contraste body :where(header, nav, main, section, article, aside, footer, div, p, span, li, ul, ol, dl, dt, dd, h1, h2, h3, h4, h5, h6, small, strong, b, em, address, label, legend, fieldset, form, figure, figcaption, blockquote, table, th, td, button, input, select, textarea, time, mark):not(.pj-cores *):not(.pj-cor):not(.pf-card__midia *):not(.pj-palco *):not(.pj-quadro *):not(.pj-galeria *) {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none !important;
  box-shadow: none !important;
  border-color: #fff !important;
}
html.a11y-contraste body a, html.a11y-contraste body a * {
  color: #ffeb3b !important;
  -webkit-text-fill-color: #ffeb3b !important;
  background-image: none !important;
}
html.a11y-contraste body a:not(.whats-float):not(.header__logo) { text-decoration: underline !important; }
html.a11y-contraste .btn { border: 2px solid #ffeb3b !important; background: #000 !important; }
html.a11y-contraste :focus-visible { outline: 3px solid #ffeb3b !important; }
html.a11y-contraste .glow, html.a11y-contraste .footer__glow, html.a11y-contraste [class*="__glow"], html.a11y-contraste .veu-final { display: none !important; }
html.a11y-contraste .a11y-btn { background: #000 !important; border-color: #ffeb3b !important; }
html.a11y-contraste .a11y-opcoes button[aria-pressed="true"]::after { background: #ffeb3b !important; color: #000 !important; -webkit-text-fill-color: #000 !important; }
html.a11y-contraste img:not([src$=".svg"]) { filter: none; }

/* ---------- leitura em uma coluna (páginas de serviço no computador) ---------- */
html.a11y-vertical .faixa { max-width: 760px; margin-inline: auto; }

/* ---------- texto ampliado: botões crescem em vez de cortar o texto ---------- */
html[class*="a11y-t"] .btn { height: auto; min-height: 52px; padding-block: 10px; }
html[class*="a11y-t"] .btn .btn__roll { height: auto; overflow: visible; line-height: 1.3; white-space: normal; text-align: center; }
html[class*="a11y-t"] .btn .btn__roll > span { transform: none !important; }
html[class*="a11y-t"] .btn .btn__roll > span::after { display: none; }
