/* DAPI — base compartilhada pelas 3 direções de homepage (V1) */

:root {
  --navy: #063368;
  --navy-deep: #041f40;
  --navy-ink: #0a1a30;
  --aux: #00518a;
  --aux-soft: #3d7fc0;
  --gray: #6d6e71;
  --gray-soft: #8e949c;
  --paper: #f4f6f9;
  --sky: #e7eef7;
  --line: #d6dee8;
  --white: #ffffff;
  --gold: #a9823f;
  --ok: #1f7a4d;
  --warn: #9a5b00;

  --font-display: "Exo 2", "Exo", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-lamina: 28px;
  --radius: 14px;
  --radius-sm: 10px;
  --tilt: -15deg;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--navy-ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--aux-soft); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aux);
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--aux); }
.btn-ghost { border-color: currentColor; color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--sky); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--sky); }
.btn-outline-light { border-color: rgba(255,255,255,.55); color: var(--white); background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.btn svg { width: 18px; height: 18px; flex: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--aux); text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform .2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-dark {
  background: rgba(4,31,64,.92);
  border-bottom-color: rgba(255,255,255,.08);
  color: var(--white);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 50px; width: auto; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a {
  padding: 8px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none; color: inherit; opacity: .86;
  white-space: nowrap;
}
.main-nav a:hover { opacity: 1; background: rgba(6,51,104,.07); }
.is-dark .main-nav a:hover { background: rgba(255,255,255,.08); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-actions .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }

.lang {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.is-dark .lang { border-color: rgba(255,255,255,.2); }
.lang button {
  border: 0; background: transparent; color: inherit;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  padding: 5px 9px; border-radius: 999px; opacity: .7;
}
.lang button[aria-pressed="true"] { background: var(--navy); color: var(--white); opacity: 1; }
.is-dark .lang button[aria-pressed="true"] { background: var(--white); color: var(--navy); }

.burger {
  display: none; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: inherit;
  align-items: center; justify-content: center;
}
.is-dark .burger { border-color: rgba(255,255,255,.2); }
.burger svg { width: 22px; height: 22px; }

.mobile-menu {
  border-top: 1px solid var(--line);
  padding-block: 12px 20px;
}
.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu a {
  padding: 12px 4px; font-size: 18px; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.is-dark .mobile-menu, .is-dark .mobile-menu a { border-color: rgba(255,255,255,.1); }
.mobile-menu .lang { margin-top: 16px; }

@media (max-width: 1300px) { /* 8 itens no menu: abaixo disso, vira o menu de hambúrguer */
  .main-nav { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .header-actions .btn-ghost, .header-actions .btn-outline-light, .header-actions .lang { display: none; }
  .header-inner { gap: 12px; }
  .header-actions .btn-primary { padding: 0 14px; }
}

/* ---------- Lâmina (símbolo como forma) ---------- */
.lamina {
  border-radius: var(--radius-lamina);
  transform: rotate(var(--tilt));
}

/* ---------- Busca de exames ---------- */
.exam-search { position: relative; }
.search-anchor { position: relative; }
.exam-search label { display: block; font-weight: 600; margin-bottom: 8px; }
.search-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 20px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-field:focus-within { border-color: var(--aux); box-shadow: 0 0 0 4px rgba(0,81,138,.12); }
.search-field svg { width: 20px; height: 20px; color: var(--gray); flex: none; }
.search-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 17px; color: var(--navy-ink); padding: 10px 0;
}
.search-field input::placeholder { color: var(--gray-soft); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 40px -18px rgba(4,31,64,.35);
  padding: 6px; margin: 0; list-style: none;
  max-height: 340px; overflow: auto;
}
.search-results li a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--navy-ink);
}
.search-results li a:hover, .search-results li a:focus { background: var(--sky); outline: none; }
.search-results .res-name { font-weight: 600; }
.search-results .res-path { font-family: var(--font-mono); font-size: 12px; color: var(--gray); }
.search-results .res-empty { padding: 14px; color: var(--gray); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  border: 1px solid var(--line); background: var(--white); color: var(--navy);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500;
}
.chip:hover { border-color: var(--aux); }

/* ---------- Rodapé ---------- */
.site-footer {
  background: var(--navy-deep); color: rgba(255,255,255,.82);
  padding-block: 64px 32px; font-size: 15px;
}
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
}
.footer-grid h4 {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--white); margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-brand img { height: 56px; width: auto; }
.footer-brand p { margin-top: 12px; max-width: 34ch; }
.footer-phone {
  display: block; margin-top: 18px;
  font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--white);
}
.footer-units {
  display: grid; grid-template-columns: 1fr 1fr auto; align-items: start; gap: 16px 40px;
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 48px; padding-top: 32px;
}
.footer-units h4 {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--white); margin-bottom: 10px;
}
.footer-units p + p { margin-top: 4px; }
.footer-units-link { align-self: end; color: var(--white); font-weight: 600; text-decoration: none; white-space: nowrap; }
.footer-units-link::after { content: " →"; }
.footer-units-link:hover { text-decoration: underline; }
.footer-legal {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 40px;
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 48px; padding-top: 24px;
  font-size: 13px; color: rgba(255,255,255,.62);
}
.footer-legal strong { color: rgba(255,255,255,.88); font-weight: 600; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-units { grid-template-columns: 1fr 1fr; }
  .footer-units-link { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-units { grid-template-columns: 1fr; }
}

/* ---------- Rodapé compacto (Direção 3): diretor técnico junto de cada unidade ---------- */
.site-footer.is-compact { padding-block: 48px 24px; font-size: 14.5px; }
.is-compact .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; }
.is-compact .footer-grid h4 { margin-bottom: 10px; }
.is-compact .footer-grid ul { gap: 6px; }
.is-compact .footer-brand img { height: 58px; }
.footer-logos { display: flex; align-items: center; gap: 18px; }
.is-compact .footer-logos .footer-seal { height: 64px; width: auto; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.18); box-sizing: content-box; }
.is-compact .footer-phone { margin-top: 14px; font-size: 24px; text-decoration: none; }
.is-compact .footer-phone:hover { text-decoration: underline; }
.is-compact .footer-units { grid-template-columns: 1fr 1fr; gap: 20px 40px; margin-top: 32px; padding-top: 24px; }
.is-compact .footer-units h4 { margin-bottom: 6px; }
.is-compact .footer-units p + p { margin-top: 2px; }
.footer-dt { margin-top: 8px !important; font-size: 13px; color: rgba(255,255,255,.66); }
.footer-dt strong { color: rgba(255,255,255,.9); font-weight: 600; }
.footer-copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(255,255,255,.6); }
@media (max-width: 900px) { .is-compact .footer-grid { grid-template-columns: 1fr 1fr 1fr; } .is-compact .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .is-compact .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } .is-compact .footer-units { grid-template-columns: 1fr; } }

/* ---------- Chat (entrada do Eliz Atende) ---------- */
.chat-launcher {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 22px 0 18px;
  border: 0; border-radius: 999px;
  background: var(--navy); color: var(--white);
  font-weight: 600; font-size: 16px;
  box-shadow: 0 16px 34px -14px rgba(4,31,64,.6);
}
.chat-launcher:hover { background: var(--aux); }
.chat-launcher svg { width: 22px; height: 22px; }
.chat-launcher .dot {
  width: 9px; height: 9px; border-radius: 50%; background: #4cd38a;
  box-shadow: 0 0 0 3px rgba(76,211,138,.25);
}
.chat-panel {
  position: fixed; right: 20px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 61;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  display: flex; flex-direction: column;
  background: var(--white); color: var(--navy-ink);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 28px 60px -20px rgba(4,31,64,.45);
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; background: var(--navy); color: var(--white);
}
.chat-head img { width: 30px; height: auto; }
.chat-head strong { display: block; font-size: 16px; }
.chat-head span { font-size: 13px; opacity: .8; }
.chat-head button {
  margin-left: auto; width: 36px; height: 36px; border-radius: 10px;
  border: 0; background: rgba(255,255,255,.12); color: var(--white); font-size: 20px; line-height: 1;
}
.chat-body {
  flex: 1; overflow: auto; padding: 18px; display: grid; gap: 10px; align-content: start;
  background: var(--paper);
}
.msg {
  max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45;
}
.msg.bot { background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.user { background: var(--navy); color: var(--white); justify-self: end; border-bottom-right-radius: 4px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button {
  border: 1px solid var(--aux); background: var(--white); color: var(--aux);
  border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600;
}
.quick button:hover { background: var(--sky); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 14px; font: inherit; font-size: 15px;
}
.chat-form button {
  border: 0; border-radius: 999px; background: var(--navy); color: var(--white);
  padding: 0 16px; font-weight: 600;
}
.chat-note {
  font-size: 11.5px; color: var(--gray); text-align: center; padding: 0 12px 10px;
}
@media (max-width: 640px) {
  .chat-launcher .label { display: none; }
  .chat-launcher { padding: 0 17px; }
}

/* ---------- Faixa de concept ---------- */
.concept-bar {
  background: var(--navy-ink); color: rgba(255,255,255,.8);
  font-size: 13px; text-align: center; padding: 8px 16px;
}
.concept-bar a { color: var(--white); font-weight: 600; }

/* ---------- Placeholder de foto ---------- */
.photo-slot {
  position: relative; overflow: hidden;
  background:
    linear-gradient(160deg, rgba(0,81,138,.35), rgba(6,51,104,.85)),
    repeating-linear-gradient(-15deg, rgba(255,255,255,.06) 0 2px, transparent 2px 22px),
    var(--navy);
  color: rgba(255,255,255,.9);
  display: flex; align-items: flex-end;
}
.photo-slot figcaption {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em;
  padding: 14px 16px; opacity: .85;
}

/* ---------- Cabeçalho com a aba da logo (herança do site atual) ---------- */
.tab-header { background: none; backdrop-filter: none; border-bottom: 0; }
.top-strip { background: var(--white); position: relative; }
.top-strip-inner { display: flex; justify-content: flex-end; align-items: center; gap: 18px; min-height: 40px; }
.top-tools { display: flex; align-items: center; gap: 20px; }
.top-phone { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--navy); text-decoration: none; white-space: nowrap; }
.top-phone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.top-item { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.top-item:hover { color: var(--aux); }
@media (max-width: 920px) { .top-tools .top-search { display: none; } }
.top-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top-strip .lang { padding: 2px; }
.top-search { position: relative; width: 320px; }
@media (max-width: 1180px) { .top-search { width: 240px; } }
.top-search .search-field { padding: 0 14px; min-height: 30px; gap: 8px; border-width: 1px; }
.top-search .search-field svg { width: 16px; height: 16px; }
.top-search .search-field input { font-size: 14px; padding: 5px 0; }
.top-search .search-results { top: calc(100% + 6px); left: auto; right: 0; z-index: 60; width: 440px; }
.search-results .res-group { padding: 10px 14px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.search-results .res-all { display: block; margin-top: 4px; padding: 12px 14px; border-top: 1px solid var(--line); font-weight: 600; color: var(--aux); text-decoration: none; }
.search-results .res-all:hover { background: var(--sky); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.menu-search { width: 100%; margin-bottom: 8px; }
.menu-search .search-field { min-height: 44px; }
.menu-search .search-results { min-width: 0; left: 0; right: 0; color: var(--navy-ink); }
.top-strip .lang button { padding: 3px 8px; }
.tab-header .bar { background: var(--navy); color: var(--white); }
.tab-header .header-inner { position: relative; min-height: 76px; }
.brand-tab {
  position: absolute; left: 0; top: -21px; z-index: 3; width: 258px;
  isolation: isolate;
  transform-origin: left top; transition: transform .3s ease;
}
/* Sombra só abaixo da linha onde a aba nasce da faixa branca (48 de 338,6 no desenho),
   para a aba parecer continuação da faixa, sem sombra em cima */
.brand-tab::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("logo-fundo.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(0 14px 18px rgba(4,31,64,.22));
  clip-path: inset(14.2% -60px -80px -60px);
}
.brand-tab img { position: relative; width: 100%; height: auto; display: block; }
.tab-header .main-nav { margin-left: 278px; }
.tab-header .main-nav a:hover { background: rgba(255,255,255,.1); }
.tab-header .main-nav { gap: 2px; align-items: center; }
.tab-header .main-nav a { padding: 8px 6px; font-size: 14.5px; }
.tab-header .header-inner { gap: 16px; }
.tab-header .burger { border-color: rgba(255,255,255,.3); }
.tab-header .mobile-menu { border-top-color: rgba(255,255,255,.12); }
.tab-header .mobile-menu a { border-bottom-color: rgba(255,255,255,.12); }
.tab-header .mobile-menu .lang { border-color: rgba(255,255,255,.25); }
.tab-header .mobile-menu .lang button[aria-pressed="true"] { background: var(--white); color: var(--navy); }
/* Ao rolar, a aba encolhe e fica dentro da barra */
.tab-header.is-stuck .brand-tab { transform: scale(.66); }
@media (max-width: 640px) {
  .top-strip-inner { min-height: 36px; padding-left: var(--gutter); justify-content: flex-end; }
  .top-tools .lang { display: none; }
  .top-phone { font-size: 14px; }
  .tab-header .header-inner { min-height: 64px; }
  .brand-tab { width: 156px; top: -13px; }
  .tab-header .header-actions .btn-light { padding: 0 14px; }
  .tab-header.is-stuck .brand-tab { transform: scale(.72); }
}

/* ---------- DAPI Blog e DAPI News (cards compartilhados pela home e pelas páginas) ---------- */
.post-card { display: grid; gap: 14px; align-content: start; text-decoration: none; color: inherit; }
.post-cover { aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: var(--sky); }
.post-cover img, .post-cover .photo-slot { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.post-card:hover .post-cover img { transform: scale(1.03); }
.post-meta { display: grid; gap: 6px; }
.post-meta time, .bn-list time { font-family: var(--font-mono); font-size: 12.5px; color: var(--gray); }
.post-meta h3 { font-size: 20px; font-weight: 600; color: var(--navy); line-height: 1.25; }
.post-card.is-big .post-meta h3 { font-size: 24px; }
.post-meta p { font-size: 15.5px; color: #4a4d52; }
.post-card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

.bn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.bn-col { display: grid; gap: 18px; align-content: start; border-radius: 28px; padding: 30px; background: var(--white); }
.bn-col > h3 { font-size: 26px; font-weight: 600; color: var(--navy); margin-top: -8px; }
.bn-news { background: var(--navy); }
.bn-news .eyebrow { color: #e3c48a; }
.bn-news > h3, .bn-news .post-meta h3, .bn-news .bn-list strong { color: var(--white); }
.bn-news .post-meta time, .bn-news .bn-list time, .bn-news .post-meta p { color: rgba(255,255,255,.72); }
.bn-news .bn-list li { border-top-color: rgba(255,255,255,.16); }
.bn-news .btn-ghost { color: var(--white); }
.bn-news .btn-ghost:hover { background: rgba(255,255,255,.1); }
.bn-list { list-style: none; padding: 0; margin: 0; }
.bn-list li { border-top: 1px solid var(--line); }
.bn-list a { display: grid; gap: 4px; padding: 14px 0; text-decoration: none; }
.bn-list strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--navy); line-height: 1.3; }
.bn-list a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.bn-col > .btn { justify-self: start; }
@media (max-width: 900px) { .bn-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .bn-col { padding: 22px; border-radius: 22px; } .bn-col > h3 { font-size: 22px; } }

/* ---------- Menu com grupos (como no site atual: Sobre o DAPI, Exames, Atendimento...) ---------- */
.nav-drop { position: relative; }
.nav-drop > .nav-top {
  display: inline-flex; align-items: center; padding: 8px 6px; border: 0; border-radius: 8px; background: none;
  font: 500 14.5px var(--font-body); color: inherit; opacity: .86; cursor: pointer; white-space: nowrap; text-decoration: none;
  line-height: inherit; /* o atalho font zera a altura da linha; sem isso os itens com submenu ficam mais baixos que os links */
}
.nav-drop > .nav-top:hover, .nav-drop.is-open > .nav-top, .nav-drop > .nav-top[data-ativo] { opacity: 1; background: rgba(255,255,255,.12); }
.nav-panel {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 70; min-width: 240px; padding: 8px;
  display: none; background: var(--white); border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(4,31,64,.45);
}
.nav-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-drop.is-open .nav-panel { display: grid; }
@media (hover: hover) { .nav-drop:hover .nav-panel { display: grid; } }
.nav-drop:focus-within .nav-panel { display: grid; }
.nav-panel a { padding: 10px 12px; border-radius: 10px; color: var(--navy-ink); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; opacity: 1; }
.nav-panel a:hover, .nav-panel a:focus-visible { background: var(--sky); color: var(--navy); }
.nav-drop-wide .nav-panel { grid-template-columns: 1fr 1fr; min-width: 520px; }
.nav-drop-wide.is-open .nav-panel { display: grid; }
.m-group { border-bottom: 1px solid rgba(255,255,255,.12); }
.m-group summary { list-style: none; cursor: pointer; padding: 12px 4px; font-size: 18px; font-weight: 500; display: flex; justify-content: space-between; }
.m-group summary::-webkit-details-marker { display: none; }
.m-group summary::after { content: "+"; font-size: 22px; opacity: .7; }
.m-group[open] summary::after { content: "−"; }
.m-group > div { display: grid; padding: 0 0 10px 12px; }
.mobile-menu .m-group a { font-size: 16px; padding: 9px 4px; border-bottom: 0; opacity: .9; }

/* Menu mobile em tela cheia, por cima da página */
.mobile-menu:not([hidden]) {
  position: fixed; inset: 0; z-index: 200; max-width: none; overflow-y: auto; overscroll-behavior: contain;
  background: var(--navy); color: var(--white); padding-block: 0 40px; border: 0;
}
.m-top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; margin-bottom: 8px; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.12); }
.m-top img { height: 34px; width: auto; }
.m-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255,255,255,.3); background: none; color: var(--white); cursor: pointer; }
.m-close svg { width: 20px; height: 20px; }
body.menu-aberto { overflow: hidden; }
body.menu-aberto .chat-launcher, body.menu-aberto .chat-panel { display: none; }

/* ---------- Navegação do paciente (D2, D3 e páginas internas): menu só do paciente, outros públicos na faixa do topo, mapa no rodapé ---------- */
/* menu encostado nos botões, e não na logo */
.nav-paciente .main-nav { margin-left: auto; }
.nav-paciente .header-actions { margin-left: 28px; gap: 12px; }
/* setinha nos itens que abrem lista */
/* menu com mais respiro: 6 itens cabem com folga */
.nav-paciente .main-nav { gap: 6px; }
.nav-paciente .main-nav > a, .nav-paciente .nav-drop > .nav-top { padding: 10px 14px; font-size: 15px; }
.nav-paciente .nav-drop > .nav-top { gap: 10px; }
.nav-paciente .nav-drop > .nav-top::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); transition: transform .2s ease, margin .2s ease; opacity: .8; }
.nav-paciente .nav-drop.is-open > .nav-top::after, .nav-paciente .nav-drop:hover > .nav-top::after { transform: rotate(225deg); margin-top: 3px; }
.top-aud { display: flex; gap: 4px; margin-right: 6px; padding-right: 16px; border-right: 1px solid var(--line); }
.top-aud a { padding: 4px 8px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--gray); text-decoration: none; }
.top-aud a:hover { color: var(--navy); background: var(--sky); }
.m-aud-t { margin: 20px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.m-aud { display: flex; flex-wrap: wrap; gap: 8px; }
.mobile-menu .m-aud a { padding: 8px 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; font-size: 15px; }
.is-compact .footer-grid.is-mapa { grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr; }
@media (max-width: 1100px) { .is-compact .footer-grid.is-mapa { grid-template-columns: 1fr 1fr; } .is-compact .footer-grid.is-mapa .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 1261px) and (max-width: 1300px) { /* com o espaçamento maior, o menu cabe até 1260 px */
  .nav-paciente .main-nav { display: flex; }
  .nav-paciente .burger { display: none; }
}
@media (max-width: 760px) { .top-aud { display: none; } }
@media (max-width: 1260px) { /* sem o menu na linha, os botões voltam a encostar na direita */
  .nav-paciente .header-actions { margin-left: auto; }
}

/* ---------- Menu mobile: campo para filtrar os itens do menu (criado pelo app.js) ---------- */
.m-search { position: relative; margin: 8px 0 6px; }
.m-search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); opacity: .7; pointer-events: none; }
.m-search input { width: 100%; height: 48px; padding: 0 14px 0 44px; border: 1px solid rgba(255,255,255,.3); border-radius: 12px;
  background: rgba(255,255,255,.08); color: var(--white); font: inherit; font-size: 16px; }
.m-search input::placeholder { color: rgba(255,255,255,.65); }
.m-search input:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.m-vazio { margin: 12px 4px 0; font-size: 15px; opacity: .8; }

/* Menu mobile: desliza da direita ao abrir e volta ao fechar (o app.js troca a classe is-open) */
.mobile-menu:not([hidden]) { opacity: 0; transform: translateX(32px); transition: opacity .26s ease, transform .28s cubic-bezier(.2,.7,.2,1); }
.mobile-menu.is-open:not([hidden]) { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .mobile-menu:not([hidden]) { transition: none; } }
