/* Centro de Imagem AJC · base visual comum a todas as páginas públicas
   Tamanhos em rem: o botão "A+" aumenta tudo junto. Escala de tipo: 15 / 18 / 21 / 26 / 36 / 52 / 80.
   Escala de espaço: 8 / 16 / 24 / 40 / 64 / 104. */

/* Atkinson Hyperlegible Next: letra desenhada pelo Braille Institute para quem enxerga pouco (sóbria e muito legível) */
@font-face { font-family: "Atkinson"; src: url("/assets/fontes/atkinson.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  --branco: #ffffff;
  --papel: #f7f3ec;
  --tinta: #1d1215;
  --tinta-2: #47383c;
  --linha: #e4dcd0;
  --vermelho: #a01f2d;
  --vermelho-escuro: #7c1421;
  --vermelho-claro: #fbe9ea;
  --marfim: #faf4e3; /* marfim dourado: fundo claro puxado do amarelo da logo */
  --marfim-linha: #e8d9ac;
  --amarelo: #f7c400;
  --amarelo-claro: #fff3c4;
  --ouro: #c9962b;
  --noite: #170c0e;
  --creme: #fff7e0;
  --verde: #1b7340;
  --verde-claro: #e3f3e9;

  --f-titulo: "Atkinson", "Segoe UI", Verdana, system-ui, sans-serif;
  --f-texto: "Atkinson", "Segoe UI", Verdana, system-ui, -apple-system, sans-serif;

  --e1: 0.5rem; --e2: 1rem; --e3: 1.5rem; --e4: 2.5rem; --e5: 4rem; --e6: 6.5rem;
  --raio: 1.125rem;
  --raio-p: 0.75rem;
  --largura: 72.5rem;
  --topo: 4.5rem;
  --sombra: 0 1px 2px rgba(29, 18, 21, 0.06), 0 12px 32px -16px rgba(29, 18, 21, 0.28);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topo) + 1rem); }
@media (max-width: 56.25em) { html { scroll-padding-bottom: 5.5rem; } } /* o foco nunca fica atrás da barra fixa do celular */
body {
  margin: 0;
  background: var(--branco);
  color: var(--tinta);
  font-family: var(--f-texto);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* navegadores antigos */
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--f-titulo); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.375rem, 7.4vw, 5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.25rem); }
h3 { font-size: 1.625rem; line-height: 1.12; }
p { text-wrap: pretty; }
strong { font-weight: 700; }

.largura { width: min(100% - 2.5rem, var(--largura)); margin-inline: auto; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.suave { color: var(--tinta-2); }
/* letra pequena sempre mais encorpada: idoso lê melhor traço firme do que traço fino */
small, .dica, .opcional, .etiqueta { font-weight: 500; }
.destaque { font-size: 1.3125rem; line-height: 1.5; }
.linha-leitura { max-width: 38em; }

/* Foco sempre visível, em fundo claro ou escuro */
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; box-shadow: 0 0 0 7px var(--amarelo); border-radius: 0.5rem; }
:focus:not(:focus-visible) { outline: none; }

.pular { position: absolute; left: 1rem; top: -6rem; z-index: 100; background: var(--tinta); color: #fff; padding: 0.875rem 1.25rem; border-radius: var(--raio-p); font-weight: 700; text-decoration: none; }
.pular:focus { top: 1rem; }

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 3.5rem; padding: 0.75rem 1.625rem;
  border: 2px solid transparent; border-radius: 0.875rem;
  font-family: var(--f-texto); font-size: 1.125rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  background: var(--tinta); color: #fff;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.botao:hover { transform: translateY(-2px); }
.botao:active { transform: translateY(0) scale(0.985); }
.botao--acao { background: var(--vermelho); color: #fff; }
.botao--acao:hover { background: var(--vermelho-escuro); }
.botao--contorno { background: #fff; color: var(--tinta); border-color: var(--tinta); }
.botao--contorno:hover { background: var(--papel); }
.botao--luz { background: var(--amarelo); color: var(--tinta); }
.botao--luz:hover { background: #ffd21f; }
.botao--grande { min-height: 4rem; font-size: 1.25rem; padding-inline: 2rem; }
.botao--cheio { width: 100%; }
.botao[disabled], .botao[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.botao svg { width: 1.375rem; height: 1.375rem; flex: none; }
.link { color: var(--vermelho); font-weight: 700; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.link:hover { color: var(--vermelho-escuro); }

.etiqueta { display: inline-block; font-size: 1.0625rem; line-height: 1.3; padding: 0.3125rem 0.75rem; border-radius: 0.5rem; }
.etiqueta--vaga { background: var(--verde-claro); color: #0f4d29; }
.etiqueta--neutra { background: var(--papel); color: var(--tinta-2); }
.etiqueta--aviso { background: var(--amarelo-claro); color: #5c4400; }
.etiqueta--erro { background: var(--vermelho-claro); color: var(--vermelho-escuro); }

/* ---------- faixa de acessibilidade ---------- */
.acess { background: var(--tinta); color: #f1e9e2; font-size: 1rem; }
.acess__linha { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; }
.acess__lema { display: flex; align-items: center; gap: 0.5rem; }
.acess__lema::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--amarelo); }
.acess__botoes { display: flex; gap: 0.25rem; margin-left: auto; }
.acess__botoes button {
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.625rem; border: 0; border-radius: 0.5rem;
  background: transparent; color: inherit; font-weight: 700; font-size: 1rem;
}
.acess__botoes button:hover { background: rgba(255, 255, 255, 0.12); }
.acess__botoes button[aria-pressed="true"] { background: var(--amarelo); color: var(--tinta); }
.acess__botoes button { white-space: nowrap; }
@media (max-width: 43.75em) { .acess__lema { display: none; } .acess__botoes { margin-inline: auto; gap: 0; } .acess__botoes button { padding: 0 0.4375rem; min-width: 2.5rem; } .acess .largura { width: min(100% - 1rem, var(--largura)); } }

.aviso-topo { background: var(--amarelo); color: var(--tinta); text-align: center; font-weight: 700; padding: 0.75rem 1.25rem; }

/* ---------- cabeçalho ---------- */
.topo { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--linha); color: var(--tinta); }
.topo__linha { display: flex; align-items: center; gap: 1.5rem; min-height: var(--topo); }
.marca { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; min-height: 3rem; }
.marca svg, .marca img { width: 2.75rem; height: 2.75rem; flex: none; }
.marca__nome { display: grid; line-height: 1.1; }
.marca__nome strong { font-family: var(--f-titulo); font-size: 1.1875rem; letter-spacing: -0.01em; }
.marca__nome small { font-size: 0.9375rem; color: var(--tinta-2); }
.menu { display: flex; gap: 0.25rem; margin-left: auto; }
.menu a { display: flex; align-items: center; min-height: 3rem; padding: 0 0.875rem; border-radius: 0.625rem; font-weight: 700; font-size: 1.0625rem; text-decoration: none; }
.menu a:hover { background: var(--papel); }
.menu a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--vermelho); border-radius: 0; }
.topo__agendar { min-height: 3rem; }
.topo__menu { display: none; margin-left: auto; min-height: 3rem; padding: 0 1rem; border: 2px solid var(--tinta); border-radius: 0.75rem; background: #fff; font-weight: 700; }
@media (max-width: 56.25em) {
  .marca__nome strong { font-size: 1.0625rem; }
  .topo__linha { gap: 0.75rem; }
  .topo__menu { display: inline-flex; align-items: center; gap: 0.5rem; }
  .topo__agendar { display: none; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 0.5rem 1.25rem 1rem; background: #fff; border-bottom: 1px solid var(--linha); box-shadow: 0 24px 32px -24px rgba(29, 18, 21, 0.4); }
  .menu.aberto { display: flex; }
  .menu a { min-height: 3.5rem; font-size: 1.1875rem; border-bottom: 1px solid var(--linha); border-radius: 0; padding: 0 0.25rem; }
  .menu a:last-child { border-bottom: 0; }
  .menu a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--vermelho); padding-left: 0.875rem; }
}

/* ---------- barra de ações no celular ---------- */
.barra { display: none; }
@media (max-width: 56.25em) {
  .barra {
    display: grid; grid-template-columns: 1.35fr 1fr auto; gap: 0.5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--linha); box-shadow: 0 -12px 28px -20px rgba(29, 18, 21, 0.5);
    transition: transform 0.3s ease;
  }
  .barra.recolhida { transform: translateY(110%); visibility: hidden; transition: transform 0.3s ease, visibility 0s linear 0.3s; }
  .barra .botao { min-height: 3.25rem; padding-inline: 0.75rem; font-size: 1.0625rem; }
  .barra__whats { width: 3.25rem; padding: 0; background: #1b7340; }
  body.com-barra { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
}

/* ---------- rodapé ---------- */
.rodape { background: var(--noite); color: #e9dfd6; padding: 1.75rem 0 1.125rem; font-size: 1.0625rem; }
.rodape a { text-underline-offset: 0.2em; }
.rodape__grade { display: grid; grid-template-columns: auto auto auto; justify-content: space-between; gap: 0.75rem 2.5rem; align-items: center; }
.rodape__horario .horario__linha { justify-content: flex-start; gap: 0 0.75rem; }
@media (min-width: 56.26em) { .rodape__fim { padding-right: 11rem; } } /* espaço para o botão flutuante de WhatsApp */
.rodape__quem { display: flex; align-items: center; gap: 1.125rem; }
.rodape__contato { display: grid; gap: 0.125rem; overflow-wrap: anywhere; }
.rodape__contato a, .rodape__links a { display: inline-flex; align-items: center; min-height: 2.5rem; }
.rodape__horario .horario__linha { padding: 0.1875rem 0; border-bottom: 0; }
.rodape__fim { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.16); display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; justify-content: space-between; font-size: 0.9375rem; color: #c9bcb2; }
.rodape__links { display: flex; flex-wrap: wrap; gap: 0 1.125rem; }
.rodape__gov { color: var(--amarelo); font-weight: 700; }
@media (max-width: 68em) { .rodape__grade { grid-template-columns: 1fr 1fr; gap: 0.75rem 2rem; align-items: start; } .rodape__quem { grid-column: 1 / -1; } }
@media (max-width: 40em) { .rodape__grade { grid-template-columns: 1fr; gap: 0.625rem; } .rodape__fim { margin-top: 0.75rem; } }

.horario__linha { display: flex; flex-wrap: wrap; gap: 0.125rem 1rem; justify-content: space-between; padding: 0.625rem 0; border-bottom: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 18%, transparent); }
.horario__linha dt { font-weight: 700; }

/* ---------- formulários ---------- */
.campo { display: grid; gap: 0.375rem; }
.campo > label, .campo > .rotulo { font-weight: 700; font-size: 1.0625rem; }
.campo .dica { font-size: 1.0625rem; color: var(--tinta-2); }
.campo input[type="text"], .campo input[type="tel"], .campo input[type="password"], .campo input[type="search"], .campo input[type="number"], .campo input[type="date"], .campo select, .campo textarea {
  width: 100%; min-height: 3.5rem; padding: 0.75rem 1rem;
  border: 2px solid #8b7b7f; border-radius: var(--raio-p); background: #fff; font-size: 1.1875rem;
}
.campo textarea { min-height: 6.5rem; resize: vertical; }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { border-color: var(--tinta); }
.campo.com-erro input, .campo.com-erro select, .campo.com-erro textarea { border-color: var(--vermelho); background: #fffafa; }
.campo .erro { display: flex; gap: 0.5rem; align-items: flex-start; color: var(--vermelho-escuro); font-weight: 700; font-size: 1.0625rem; }
.campo .erro::before { content: "!"; flex: none; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--vermelho); color: #fff; display: grid; place-items: center; font-size: 0.875rem; }
.opcional { font-weight: 500; color: var(--tinta-2); }

.aviso { display: block; padding: 1rem 1.25rem; border-radius: var(--raio-p); background: var(--amarelo-claro); border-left: 6px solid var(--amarelo); }
.aviso--erro { background: var(--vermelho-claro); border-left-color: var(--vermelho); }
.aviso--certo { background: var(--verde-claro); border-left-color: var(--verde); }
.aviso > * + * { margin-top: 0.5rem; }
.vazio { padding: 1.5rem; border: 2px dashed var(--linha); border-radius: var(--raio); color: var(--tinta-2); }

.toast { position: fixed; left: 50%; bottom: 6rem; z-index: 80; transform: translate(-50%, 2rem); opacity: 0; pointer-events: none; max-width: min(92vw, 30rem); padding: 1rem 1.25rem; border-radius: var(--raio-p); background: var(--tinta); color: #fff; font-weight: 700; transition: transform 0.25s ease, opacity 0.25s ease; }
.toast.visivel { transform: translate(-50%, 0); opacity: 1; }

/* ---------- conteúdo sempre visível sem JavaScript ou sem movimento ---------- */
html:not(.js) [data-fx], html.fx-reduzido [data-fx] { opacity: 1 !important; transform: none !important; }
html:not(.js) .fx-palco { position: static; height: auto; overflow: visible; display: block; }
html.sem-movimento *, html.sem-movimento *::before, html.sem-movimento *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- alto contraste ---------- */
html.alto-contraste { --tinta: #000; --tinta-2: #1a1a1a; --linha: #000; --vermelho: #7a0012; --vermelho-escuro: #4d000b; --papel: #fff; --verde: #0b4d27; }
html.alto-contraste body { background: #fff !important; color: #000 !important; }
html.alto-contraste .etiqueta, html.alto-contraste .aviso, html.alto-contraste .campo input, html.alto-contraste .campo select { border: 2px solid #000; }
html.alto-contraste a:not(.botao) { text-decoration: underline; }

@media print {
  .acess, .topo, .barra, .rodape, .nao-imprimir { display: none !important; }
  body { font-size: 12pt; padding: 0 !important; }
}

/* ---------- notícias do centro (página inicial e /noticias/) ---------- */
.noticias { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; }
.noticia { display: grid; grid-template-rows: auto 1fr; height: 100%; border: 1px solid var(--linha); border-radius: var(--raio); background: #fff; overflow: hidden; text-decoration: none; box-shadow: var(--sombra); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.noticia:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(29, 18, 21, 0.08), 0 20px 40px -18px rgba(90, 64, 0, 0.4); }
.noticia__capa { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--marfim); }
.noticia__capa--marca { display: grid; place-items: center; }
.noticia__capa--marca svg, .noticia__capa--marca img { width: 4.5rem; height: 4.5rem; }
.noticia__corpo { display: grid; gap: 0.5rem; align-content: start; padding: 1.125rem 1.25rem 1.25rem; }
.noticia__corpo small { font-size: 1rem; color: var(--vermelho); font-weight: 600; }
.noticia__corpo strong { font-family: var(--f-titulo); font-size: 1.375rem; line-height: 1.15; }
.noticia__corpo span { color: var(--tinta-2); font-size: 1.0625rem; }
.noticia__corpo em { font-style: normal; font-weight: 700; color: var(--vermelho); text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 22.5em) { .acess__botoes button { font-size: 0.9375rem; padding: 0 0.3125rem; min-width: 2.25rem; } }
.rodape__logo { flex: none; padding: 0.5rem 0.75rem; border-radius: 0.625rem; background: #fff; }
.rodape__logo img { width: 9.5rem; height: auto; }
@media (max-width: 26em) { .rodape__logo img { width: 7.5rem; } .rodape__quem { gap: 0.75rem; } }
/* telas médias (tablet deitado, notebook pequeno): o menu de cinco itens continua numa linha só */
.menu a, .marca__nome strong { white-space: nowrap; }
@media (min-width: 56.26em) and (max-width: 76em) {
  .topo__linha { gap: 0.75rem; }
  .menu { gap: 0; }
  .menu a { padding-inline: 0.5rem; font-size: 1rem; }
  .marca__nome strong { font-size: 1.0625rem; }
  .marca__nome small { display: none; }
  .topo__agendar { padding-inline: 1rem; }
}
@media (min-width: 56.26em) and (max-width: 64em) {
  .menu a { padding-inline: 0.375rem; font-size: 0.9375rem; }
  .menu a[href="/noticias/"] { display: none; } /* segue no rodapé e na página inicial */
  .topo__linha { gap: 0.5rem; }
  .marca { gap: 0.5rem; }
}
@media (max-width: 22.5em) { .marca__nome strong { white-space: normal; font-size: 1rem; } .marca { gap: 0.5rem; } }

/* ---------- WhatsApp flutuante (só em telas largas; no celular ele está na barra de baixo) ---------- */
.zap { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 45; display: none; align-items: center; justify-content: center; width: 3.75rem; height: 3.75rem; border-radius: 50%; background: #1b7340; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 1px 2px rgba(29, 18, 21, 0.2), 0 1rem 2rem -0.75rem rgba(27, 115, 64, 0.8); transition: transform 0.2s ease; }
.zap svg { width: 2.125rem; height: 2.125rem; }
.zap:hover { transform: translateY(-3px); background: #155c33; }
@media (min-width: 56.26em) { .zap { display: inline-flex; } }
@media print { .zap { display: none !important; } }
@media (min-width: 68.01em) { .rodape__endereco { max-width: 17em; } .rodape__horario .horario__linha { flex-wrap: nowrap; white-space: nowrap; } }
.rodape__cnpj { display: inline-flex; align-items: center; min-height: 2.5rem; }

/* ---------- degradê da marca: do amarelo da logo ao vermelho da fachada ---------- */
:root { --degrade: linear-gradient(100deg, #a01f2d 0%, #c2342a 55%, #d9641a 100%); --degrade-claro: linear-gradient(120deg, #f7c400 0%, #f9b233 60%, #f08a24 100%); }

/* ---------- quem atende (médicos com foto) ---------- */
.medicos { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1.25rem; }
.medico { display: grid; justify-items: center; align-content: start; gap: 0.25rem; padding: 1.25rem 1rem 1.125rem; border-radius: var(--raio); background: #fff; border: 1px solid var(--linha); box-shadow: var(--sombra); text-align: center; }
.medico__foto { width: 7.5rem; height: 7.5rem; border-radius: 50%; object-fit: cover; margin-bottom: 0.625rem; background: var(--marfim); box-shadow: 0 0 0 4px #fff, 0 0 0 7px #f7c400; }
.medico__foto--vazia { display: grid; place-items: center; font-family: var(--f-titulo); font-size: 2.75rem; font-weight: 700; color: var(--vermelho); }
.medico strong { font-family: var(--f-titulo); font-size: 1.25rem; line-height: 1.15; }
.medico span { color: var(--vermelho); font-weight: 600; font-size: 1.0625rem; }
.medico small { color: var(--tinta-2); font-size: 1rem; }
.medico .link { display: inline-flex; align-items: center; min-height: 2.75rem; }
@media (max-width: 30em) { .medicos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; } .medico { padding: 1rem 0.625rem 0.75rem; } .medico__foto { width: 6rem; height: 6rem; } .medico strong { font-size: 1.125rem; } }
.botao .botao__icone { flex: none; width: 1.875rem; height: 1.875rem; margin-left: -0.375rem; }
/* página inicial: botão para a lista completa de profissionais, ocupando a linha inteira */
.medicos > li.medicos__todos { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: 0.5rem; border: none; background: none; box-shadow: none; }
/* profissional ainda sem foto: cartão compacto, alinhado à esquerda */
.medico--compacto { justify-items: start; text-align: left; padding: 1rem 1.125rem; box-shadow: none; border-left: 4px solid var(--amarelo); }
.medico--compacto strong { font-size: 1.125rem; }
