/* Cabeçalho do site (U26/U27): fixo, branco, escopo .uf-hdr para vencer o estilo global. */
.uf-hdr,
.uf-hdr *,
.uf-hdr *::before,
.uf-hdr *::after { box-sizing: border-box; }

/* Alturas do cabeçalho. --uf-faixa-h é atualizada pelo header-site.js (ResizeObserver), porque no celular a faixa quebra em linhas. */
:root {
  --uf-faixa-h: 52px;
  --uf-linha-h: 84px;
}
@media (max-width: 1023px) {
  :root { --uf-linha-h: 72px; }
}

/* Sticky com top negativo: a faixa rola para fora junto com a página e a linha principal gruda no topo.
   A altura de layout do cabeçalho nunca muda durante a rolagem, então não há reflow nem scroll anchoring. */
header.uf-hdr {
  position: sticky;
  top: calc(-1 * var(--uf-faixa-h, 52px));
  z-index: 1000;
  width: 100%;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  font-family: 'Open Sans', system-ui, sans-serif;
  color: #2C3550;
  margin: 0;
  padding: 0;
  box-shadow: none;
  overflow-anchor: none;
  transition: box-shadow .2s ease;
}
/* Linha principal grudada no topo (classe do IntersectionObserver): só sombra, nada que mexa no layout. */
header.uf-hdr.uf-hdr--scrolled { box-shadow: 0 6px 18px rgba(18, 3, 99, .08); }

/* Faixa de acessos: sai da tela pela rolagem natural (sticky com top negativo), sem colapsar. */
.uf-hdr__faixa {
  background: #F6F7FB;
  border-bottom: 1px solid #E5E7EB;
  overflow: hidden;
}
.uf-hdr__faixa-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  height: 40px;
  padding: 0 48px;
  font-size: 13px;
  color: #444C60;
}
.uf-hdr__faixa-link { color: #444C60; text-decoration: none; font-weight: 600; }
.uf-hdr__faixa-link:hover { color: #190C6D; text-decoration: underline; text-underline-offset: 4px; }

/* Linha principal. */
.uf-hdr__linha {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--uf-linha-h, 84px);
  padding: 0 48px;
}
.uf-hdr__logo { display: block; flex: none; }
.uf-hdr__logo img { display: block; height: 44px; width: auto; }

/* Menu global (menu.php) dentro do cabeçalho: texto escuro, sem fundo. */
.uf-hdr__nav { flex: 1; min-width: 0; }
.uf-hdr__nav .wrapper,
.uf-hdr__nav #main-nav,
.uf-hdr__nav nav { background: transparent; margin: 0; padding: 0; width: auto; }
.uf-hdr #main-nav .first-nav { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.uf-hdr #main-nav .first-nav > li { position: relative; }
.uf-hdr #main-nav .first-nav > li > a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0;
  font-family: 'Roboto Condensed', sans-serif; font-size: 16px; font-weight: 700; color: #120363; text-decoration: none; text-transform: uppercase;
}
.uf-hdr #main-nav .first-nav > li:hover > a,
.uf-hdr #main-nav .first-nav > li:focus-within > a { color: #190C6D; }

/* Dropdown: painel branco com sombra suave, abre ao passar o mouse ou com o foco do teclado. */
.uf-hdr #main-nav li ul {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: -12px;
  min-width: 260px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(18, 3, 99, .14);
  z-index: 1001;
}
.uf-hdr #main-nav li:hover > ul,
.uf-hdr #main-nav li:focus-within > ul { display: block; }
.uf-hdr #main-nav li li { position: relative; }
.uf-hdr #main-nav li li a {
  display: block; min-height: 40px; padding: 10px 14px; border-radius: 10px;
  font-family: 'Open Sans', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: #2C3550; text-decoration: none; text-transform: none;
}
.uf-hdr #main-nav li li a:hover,
.uf-hdr #main-nav li li a:focus-visible { background: #EEF0FF; color: #190C6D; }
.uf-hdr #main-nav li li ul { top: -10px; left: calc(100% + 8px); }

/* Notícias (só no blog). */
.uf-hdr__noticias {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: 'Roboto Condensed', sans-serif; font-size: 16px; font-weight: 700; color: #190C6D;
  text-decoration: none; text-transform: uppercase; border-bottom: 3px solid #FFCF00;
}

/* Ações à direita: busca, WhatsApp e Inscreva-se. */
.uf-hdr__acoes { display: flex; align-items: center; gap: 14px; flex: none; margin-left: auto; }
.uf-hdr__busca { position: relative; display: flex; align-items: center; margin: 0; }
.uf-hdr__busca input[type="search"] {
  width: 200px; height: 44px; padding: 0 52px 0 18px; border: 1px solid #D5D8E1; border-radius: 999px;
  font: inherit; font-size: 14px; color: #120363; background: #FFFFFF;
}
.uf-hdr__busca-btn {
  position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: #190C6D; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.uf-hdr__contato {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid #C9E8D1; border-radius: 999px;
  color: #0B6B3A; font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none;
}
.uf-hdr__contato:hover { background: #F0FAF4; }
.uf-hdr__cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px;
  background: #FFCF00; color: #190C6D; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.uf-hdr__cta:hover { background: #FFDB4D; color: #190C6D; }

/* Botão do menu (celular): escondido no desktop. */
.uf-hdr__toggle { display: none; }

/* Blog: sem menu, só Notícias. */

/* Foco visível. */
.uf-hdr a:focus-visible, .uf-hdr button:focus-visible, .uf-hdr input:focus-visible { outline: 2px solid #190C6D; outline-offset: 3px; }

/* Celular e tablet. */
@media (max-width: 1023px) {
  .uf-hdr__linha { padding: 0 16px; gap: 12px; }
  .uf-hdr__logo img { height: 34px; }
  .uf-hdr__faixa-inner { padding: 0 16px; gap: 16px; justify-content: center; }
  .uf-hdr__nav { display: none; }
  .uf-hdr__toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
    border: 1px solid #D5D8E1; border-radius: 12px; background: #FFFFFF;
  }
  .uf-hdr__busca input[type="search"] { width: 44px; padding: 0; color: transparent; cursor: pointer; }
  .uf-hdr__busca--aberta input[type="search"] { width: 180px; padding: 0 52px 0 16px; color: #120363; cursor: text; }
  .uf-hdr__contato span { display: none; }
  .uf-hdr__contato { width: 44px; padding: 0; justify-content: center; }
  .uf-hdr__cta { padding: 0 14px; font-size: 14px; }
  .uf-hdr__acoes { gap: 8px; }
}
@media (max-width: 480px) {
  .uf-hdr__contato { display: none; }
  .uf-hdr__busca input[type="search"] { display: none; }
  .uf-hdr__busca--aberta input[type="search"] { display: block; position: absolute; right: 0; top: 0; width: 200px; }
}
/* U30: destaque para Medicina. Cor de marca escura, com o mesmo tamanho do CTA. */
.uf-hdr__medicina {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid #190C6D;
  border-radius: 999px;
  background: #190C6D;
  color: #FFFFFF;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}
.uf-hdr__medicina svg { flex: none; color: #FFCF00; }
.uf-hdr__medicina:hover { background: #120363; border-color: #120363; color: #FFFFFF; text-decoration: none; }
.uf-hdr__medicina:focus-visible { outline: 2px solid #190C6D; outline-offset: 3px; }

/* Celular e tablet: o rótulo some, fica só o ícone, com a mesma área de toque de 44px. */
@media (max-width: 1023px) {
  .uf-hdr__medicina { padding: 0; width: 44px; justify-content: center; }
  .uf-hdr__medicina span { display: none; }
}
/* U33: menu da home (dropdown-menu) sobre o fundo branco do cabeçalho novo. */
.uf-hdr #menu,
.uf-hdr #menu a,
.uf-hdr #menu .menu-link {
  color: #120363;
}
.uf-hdr #menu > ul > li > a.menu-link,
.uf-hdr #menu li.menu-item > a.menu-link {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: #120363;
  background: transparent;
  text-decoration: none;
}
.uf-hdr #menu li.menu-item:hover > a.menu-link,
.uf-hdr #menu li.menu-item:focus-within > a.menu-link {
  color: #190C6D;
}
.uf-hdr #menu .submenu-wrapper {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(18, 3, 99, .14);
}
.uf-hdr #menu .submenu-wrapper a,
.uf-hdr #menu .sub-menus a {
  color: #2C3550;
  text-transform: none;
  font-weight: 600;
}
.uf-hdr #menu .submenu-wrapper a:hover,
.uf-hdr #menu .submenu-wrapper a:focus-visible {
  color: #190C6D;
  background: #EEF0FF;
}
/* U34: redes sociais na faixa de acessos: mesmo estilo do footer, em tamanho menor. */
.uf-hdr__faixa-inner .uf-hdr__redes { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.uf-hdr__faixa-inner .uf-hdr__redes a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #F0F2F8;
  color: #002077;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}
.uf-hdr__faixa-inner .uf-hdr__redes a svg { display: block; flex-shrink: 0; }
.uf-hdr__faixa-inner .uf-hdr__redes a:hover,
.uf-hdr__faixa-inner .uf-hdr__redes a:focus-visible {
  background: #FFCF00;
  color: #190C6D;
}
.uf-hdr__faixa-inner .gtranslate_wrapper { display: flex; align-items: center; margin-left: 8px; }
.uf-hdr__faixa-inner .gtranslate_wrapper img { width: 18px; height: auto; }
/* U35: links de acesso da faixa com o mesmo hover das redes sociais (fundo amarelo, texto escuro). */
.uf-hdr__faixa-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  transition: background-color .18s ease, color .18s ease;
}
.uf-hdr__faixa-link:hover,
.uf-hdr__faixa-link:focus-visible {
  background: #FFCF00;
  color: #190C6D;
  text-decoration: none;
}
/* U36: seletor de idioma com bandeiras em círculos, no mesmo padrão das redes sociais. */
.uf-hdr__faixa-inner .gtranslate_wrapper { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.uf-hdr__faixa-inner .gtranslate_wrapper a.glink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #F0F2F8;
  border: 2px solid transparent;
  overflow: hidden;
  transition: background-color .18s ease, border-color .18s ease;
}
.uf-hdr__faixa-inner .gtranslate_wrapper a.glink img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}
.uf-hdr__faixa-inner .gtranslate_wrapper a.glink:hover,
.uf-hdr__faixa-inner .gtranslate_wrapper a.glink:focus-visible {
  background: #FFCF00;
  border-color: #FFCF00;
}
.uf-hdr__faixa-inner .gtranslate_wrapper a.gt-current-lang {
  border-color: #190C6D;
}
/* U36: menu da home em uma linha só no desktop (evita quebra sobre o banner). */
@media (min-width: 1024px) {
  .uf-hdr #menu > ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
    gap: 14px;
  }
  .uf-hdr #menu > ul > li.menu-item > a.menu-link {
    font-size: 15px;
    letter-spacing: 0;
  }
  .uf-hdr .uf-hdr__nav { min-width: 0; overflow: visible; }
}
/* U37: redes e idiomas da faixa no mesmo tamanho (28px) dos links de acesso. */
.uf-hdr__faixa-inner .uf-hdr__redes { gap: 6px; }
.uf-hdr__faixa-inner .uf-hdr__redes a {
  width: 28px;
  height: 28px;
}
.uf-hdr__faixa-inner .uf-hdr__redes a svg {
  width: 15px;
  height: 15px;
}
.uf-hdr__faixa-inner .gtranslate_wrapper a.glink {
  width: 28px;
  height: 28px;
}
.uf-hdr__faixa-inner .gtranslate_wrapper a.glink img {
  width: 18px;
  height: 18px;
}
/* U38: faixa de acessos mais alta, com todos os itens centralizados na mesma linha. */
.uf-hdr__faixa {
  max-height: 52px;
}
.uf-hdr__faixa-inner {
  height: 52px;
  align-items: center;
}
.uf-hdr__faixa-inner .uf-hdr__redes,
.uf-hdr__faixa-inner .gtranslate_wrapper {
  align-self: center;
}
/* U39: menu recolhido em ícone entre 1024px e 1439px. Em 1440px ou mais, o menu fica na linha como antes. */
.uf-hdr__menu-btn { display: none; }

@media (min-width: 1024px) and (max-width: 1439px) {
  .uf-hdr__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border: 1px solid #D5D8E1;
    border-radius: 12px;
    background: #FFFFFF;
    color: #190C6D;
    cursor: pointer;
  }
  .uf-hdr__nav {
    display: none;
  }
  .uf-hdr__nav.is-aberto {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1002;
    padding: 16px 48px 24px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 16px 40px rgba(18, 3, 99, .14);
  }
  .uf-hdr__nav.is-aberto #menu > ul {
    display: block;
    white-space: normal;
  }
  .uf-hdr__nav.is-aberto #menu > ul > li.menu-item {
    display: block;
    width: 100%;
    border-bottom: 1px solid #EEF0F5;
  }
  .uf-hdr__nav.is-aberto #menu > ul > li.menu-item > a.menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    font-size: 16px;
  }
  .uf-hdr__nav.is-aberto #menu .submenu-wrapper {
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 12px 12px;
  }
  .uf-hdr__nav.is-aberto #menu .sub-menus {
    display: block;
  }
}
/* U40: painel dos dropdowns ocupa a largura da linha do menu (de "A UNIVERSO" até "EAD") em telas de 1440px ou mais. */
@media (min-width: 1440px) {
  .uf-hdr #menu {
    position: relative;
  }
  .uf-hdr #menu .has-submenu .submenu-wrapper {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
  }
}
/* U41: menu recolhido (1024px a 1439px): mostra só o submenu do item aberto, e o painel cresce com o conteúdo. */
@media (min-width: 1024px) and (max-width: 1439px) {
  .uf-hdr__nav.is-aberto #menu,
  .uf-hdr__nav.is-aberto #menu > ul {
    height: auto;
  }
  .uf-hdr__nav.is-aberto #menu > ul > li.menu-item {
    height: auto;
  }
  .uf-hdr__nav.is-aberto #menu .submenu-wrapper {
    display: none;
    height: auto;
    max-height: none;
    width: auto;
    overflow: visible;
  }
  .uf-hdr__nav.is-aberto #menu li.menu-item.open > .submenu-wrapper {
    display: block !important;
  }
  .uf-hdr__nav.is-aberto #menu .sub-menus {
    height: auto;
    max-height: none;
  }
}
/* U42: painel do menu recolhido com rolagem interna, dentro da área visível. */
@media (min-width: 1024px) and (max-width: 1439px) {
  .uf-hdr__nav.is-aberto {
    max-height: calc(100vh - 136px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}
/* U45: cabeçalho no celular (até 1023px). Faixa quebra em linhas; menu abre em painel vertical pelo botão. */
@media (max-width: 1023px) {
  .uf-hdr__faixa-inner {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    padding: 6px 12px;
  }
  .uf-hdr__faixa-link { font-size: 12px; white-space: nowrap; }
  .uf-hdr__redes { margin-left: 0; }
  .uf-hdr__faixa-inner .gtranslate_wrapper { margin-left: 0; }

  .uf-hdr__toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #D5D8E1;
    border-radius: 12px;
    background: #FFFFFF;
    color: #190C6D;
  }
  .uf-hdr__toggle span,
  .uf-hdr__toggle span::before,
  .uf-hdr__toggle span::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #190C6D;
  }
  .uf-hdr__toggle span { position: relative; }
  .uf-hdr__toggle span::before,
  .uf-hdr__toggle span::after { content: ""; position: absolute; left: 0; }
  .uf-hdr__toggle span::before { top: -6px; }
  .uf-hdr__toggle span::after { top: 6px; }

  .uf-hdr__nav.is-aberto {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1002;
    max-height: calc(100vh - 124px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 16px 16px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 16px 40px rgba(18, 3, 99, .14);
  }
  .uf-hdr__nav.is-aberto #menu > ul { display: block; white-space: normal; }
  .uf-hdr__nav.is-aberto #menu > ul > li.menu-item { display: block; width: 100%; border-bottom: 1px solid #EEF0F5; height: auto; }
  .uf-hdr__nav.is-aberto #menu > ul > li.menu-item > a.menu-link {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 48px; font-size: 16px;
  }
  .uf-hdr__nav.is-aberto #menu .submenu-wrapper { display: none; position: static; height: auto; max-height: none; width: auto; overflow: visible; box-shadow: none; border: 0; background: transparent; padding: 0 0 12px 12px; }
  .uf-hdr__nav.is-aberto #menu li.menu-item.open > .submenu-wrapper { display: block !important; }
  .uf-hdr__nav.is-aberto #menu .sub-menus { height: auto; max-height: none; }
}
/* U46: correções do cabeçalho no celular (até 1023px). */
@media (max-width: 1023px) {
  .uf-hdr__faixa {
    max-height: none;
  }
  .uf-hdr__toggle span,
  .uf-hdr__toggle span::before,
  .uf-hdr__toggle span::after {
    background: #190C6D !important;
    width: 20px !important;
    height: 2px !important;
  }
  .uf-hdr__nav.is-aberto #menu {
    display: block !important;
    height: auto !important;
    position: static;
  }
  .uf-hdr__nav.is-aberto #menu > ul {
    display: block !important;
    height: auto !important;
  }
}
/* U47: âncoras (#subscription, #infrastructure...) não ficam escondidas sob o cabeçalho fixo.
   Depois de rolar, só a linha principal fica visível (a faixa saiu da tela). */
html {
  scroll-padding-top: var(--uf-linha-h, 84px);
}
/* U48: redes e idiomas em um grupo só, na mesma linha. */
.uf-hdr__utilitarios { display: flex; align-items: center; gap: 24px; }
.uf-hdr__faixa-inner .uf-hdr__utilitarios > * { margin: 0; }
@media (max-width: 1023px) {
  .uf-hdr__utilitarios { gap: 12px; }
}
/* U48: botão do menu (celular) desenhado só pelas regras do cabeçalho novo. Não usa mais a classe .toggle,
   que tinha margem, padding e pseudo-elementos do menu antigo e desalinhava o ícone com a logo. */
@media (max-width: 1023px) {
  header.uf-hdr .uf-hdr__toggle {
    margin: 0;
    padding: 0;
    min-height: 0;
    line-height: normal;
    font-size: 0;
    align-self: center;
  }
  header.uf-hdr .uf-hdr__toggle span {
    top: auto;
    transform: none;
  }
}
/* U49: submenus no celular e no tablet sem a altura mínima de 350px do menu de desktop (deixava espaço vazio nos itens curtos). */
@media (max-width: 1439px) {
  .uf-hdr__nav.is-aberto #menu ul.sub-menus { min-height: 0; }
}
/* Movimento reduzido: sem transições no cabeçalho. */
@media (prefers-reduced-motion: reduce) {
  header.uf-hdr,
  .uf-hdr *,
  .uf-hdr *::before,
  .uf-hdr *::after { transition: none !important; }
}