/* Identidade das páginas públicas. O conteúdo de cada recurso mantém seus estilos. */
:root {
  --portal-azul: #071a3a;
  --portal-borda: #d9e2eb;
  --portal-largura: 1180px;
}

body.portal-publico {
  margin: 0;
  padding-top: 0;
}

.portal-publico .hm-main,
.portal-publico .hps-main,
.portal-publico .hps-footer {
  margin-left: 0;
}

.portal-header,
.portal-menu,
.portal-footer {
  box-sizing: border-box;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.portal-header {
  position: relative;
  z-index: 2147483500;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #f7f6f0;
  color: var(--portal-azul);
  box-shadow: none;
}

.portal-header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(var(--portal-largura), calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.portal-brand img {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.portal-brand strong {
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
}

.portal-brand small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.portal-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-left: auto;
  padding: 8px 15px;
  border: 1px solid var(--portal-borda);
  border-radius: 12px;
  background: #fff;
  color: var(--portal-azul);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

/* O menu funciona com o elemento details, inclusive sem JavaScript. */
.portal-menu {
  flex: 0 0 auto;
}

.portal-menu>summary {
  position: relative;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--portal-azul);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.portal-menu>summary::-webkit-details-marker {
  display: none;
}

.portal-menu>summary svg {
  width: 20px;
  height: 20px;
}

.portal-menu[open]>summary {
  position: fixed;
  top: 16px;
  left: 244px;
  width: 44px;
  padding: 8px;
}

.portal-menu[open]>summary span {
  display: none;
}

.portal-menu[open]>summary svg {
  transform: rotate(90deg);
}

.portal-menu-panel {
  position: fixed;
  z-index: 1001;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(312px, 94vw);
  height: 100dvh;
  padding: 18px 16px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0 20px 20px 0;
  background: linear-gradient(180deg, #071a3a, #0a2b5f);
  color: #fff;
  box-shadow: 16px 0 45px rgb(3 13 30 / 20%);
}

.portal-menu-brand {
  padding-right: 46px;
}

.portal-menu-brand img {
  width: 40px;
  height: 40px;
}

.portal-menu-brand strong {
  font-size: 14px;
}

.portal-menu-brand small {
  color: #bdd0eb;
  font-size: 9px;
}

.portal-menu-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.portal-menu-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.portal-menu-links a:hover,
.portal-menu-links a:focus-visible,
.portal-menu-links a[aria-current] {
  background: rgb(255 255 255 / 12%);
}

.portal-menu-links .portal-menu-group {
  margin-top: 8px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  border-radius: 0;
}

.portal-menu-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgb(3 13 30 / 48%);
}

.portal-publico .portal-resource-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--portal-borda);
  background: #fff;
  font: 700 13px system-ui, sans-serif;
}

.portal-publico .portal-resource-nav a {
  color: #17375e;
  text-decoration: none;
}

.portal-header :focus-visible,
.portal-footer :focus-visible {
  outline: 3px solid #357bdf;
  outline-offset: 4px;
}

.portal-menu :focus-visible {
  outline-color: #f1c84b;
}

.portal-skip {
  position: fixed;
  z-index: 1100;
  left: 16px;
  top: -80px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--portal-azul);
}

.portal-skip:focus {
  top: 12px;
}

/* Mesmo conteúdo e assinatura do rodapé da home. */
.portal-footer {
  clear: both;
  width: 100%;
  margin: 0;
  padding: 10px 0 11px;
  background: #071a3a;
  color: #c1cee0;
}

.portal-footer .hm-footer-old {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: min(var(--portal-largura), calc(100% - 40px));
  margin: 0 auto;
}

.portal-footer p {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
}

.portal-footer a {
  color: inherit;
  text-decoration: none;
}

.portal-footer .hm-footer-social {
  display: flex;
  gap: 7px;
}

.portal-footer .hm-footer-social a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 9px;
}

.portal-footer svg {
  display: block;
}

.portal-conexoes {
  padding: 36px 20px;
  background: #eef4fb;
  color: #17375e;
}

.portal-conexoes>div {
  max-width: 1180px;
  margin: 0 auto;
}

.portal-conexoes h2 {
  margin: 0 0 18px;
  font-size: clamp(22px, 3vw, 30px);
}

.portal-conexoes nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-conexoes a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid #c7d7eb;
  border-radius: 12px;
  background: #fff;
  color: #17375e;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 620px) {
  .portal-header-inner {
    width: calc(100% - 24px);
    gap: 9px;
    min-height: 68px;
  }

  .portal-brand {
    gap: 8px;
  }

  .portal-brand img {
    width: 40px;
    height: 40px;
  }

  .portal-brand strong {
    font-size: 13px;
  }

  .portal-brand small {
    font-size: 8px;
  }

  .portal-menu>summary {
    padding: 8px;
  }

  .portal-menu>summary span {
    display: none;
  }

  .portal-login {
    padding: 8px 10px;
    font-size: 12px;
  }

  .portal-footer .hm-footer-old {
    flex-direction: column;
    width: calc(100% - 24px);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {

  .portal-header,
  .portal-skip,
  .portal-menu {
    display: none;
  }

  .portal-footer {
    background: none;
    color: #000;
  }
}
