/* Moldura USF-AN: a mesma dos micro-sites IDE e DL (faixa vermelha, cabeçalho branco fixo,
   rodapé «EU FAÇO PARTE»). Só modo claro. Pensado primeiro para o telemóvel. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.65 var(--f-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--navy); font-weight: 700; line-height: 1.18; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { text-wrap: pretty; }
.wrap { max-width: var(--wrap, 1180px); margin: 0 auto; padding: 0 clamp(16px, 3vw, 48px); }
@media (min-width: 1280px) { :root { --wrap: 1320px; } }
@media (min-width: 1500px) { :root { --wrap: 1400px; } }
@media (min-width: 1800px) { :root { --wrap: 1560px; } }
@media (min-width: 640px) { body { font-size: 15.5px; } }
.sr, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.saltar { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.saltar:focus { left: 8px; }

/* faixa vermelha */
.ua-faixa { background: var(--brand); color: #fff; font-size: 12px; }
.ua-faixa .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.ua-faixa b { font-weight: 600; letter-spacing: .02em; }
.ua-faixa a { color: #fff; text-decoration: none; position: relative; display: inline-flex; align-items: center; }
.ua-faixa a::after { content: ''; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }   /* alvo de toque de 44 px */
.ua-faixa a:hover { text-decoration: underline; }
.ua-faixa .so-largo { display: none; }
@media (min-width: 640px) { .ua-faixa .so-largo { display: inline; } }

/* cabeçalho */
.ua-topo { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--rule); }
.ua-topo .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; position: relative; }
.ua-marca { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.ua-marca img { height: 38px; width: auto; display: block; }
.ua-marca > span { display: none; color: var(--navy); font: 700 13.5px/1.2 var(--f-head); border-left: 1px solid var(--rule); padding-left: 12px; }
@media (min-width: 400px) { .ua-marca > span { display: block; } }
@media (min-width: 900px) { .ua-marca img { height: 46px; } .ua-topo .wrap { min-height: 72px; } }
.ua-nav { display: none; }
.ua-nav a { color: var(--ink); text-decoration: none; text-transform: uppercase; letter-spacing: .6px; font: 600 13px/1 var(--f-head);
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 11px; border-bottom: 2px solid transparent; white-space: nowrap; }
.ua-nav a:hover { color: var(--brand); }
.ua-nav a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }
.ua-nav a.ua-apres { color: #fff; background: var(--navy); border-radius: 3px; min-height: 38px; margin-left: 8px; border: 0; }
.ua-nav a.ua-apres:hover { background: #1d2c45; color: #fff; }
@media (min-width: 1280px) { .ua-nav { display: flex; flex: 1; justify-content: flex-end; gap: 2px; min-width: 0; } .ua-menu { display: none; } }
/* nome do site: sempre visível a partir de 400 px; entre 1280 e 1499 px (navegação completa, pouco espaço) só «Momento Atual» */
@media (min-width: 1280px) and (max-width: 1499px) { .ua-nav a { padding: 0 7px; letter-spacing: .2px; font-size: 12.5px; } .ua-marca span .l2 { display: none; } .ua-marca { gap: 10px; } .ua-marca > span { padding-left: 10px; } }
/* menu do telemóvel: <details>, sem JS */
.ua-menu { margin-left: auto; }
.ua-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--rule); border-radius: 3px; font: 600 13px/1 var(--f-head); text-transform: uppercase; letter-spacing: .6px; color: var(--navy); }
.ua-menu summary::-webkit-details-marker { display: none; }
.ua-menu summary svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.ua-menu nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--rule); box-shadow: 0 10px 24px rgba(15, 23, 42, .08); }
.ua-menu nav a { display: flex; align-items: center; min-height: 50px; padding: 0 20px; border-left: 4px solid transparent; border-top: 1px solid #EFF1F4;
  color: var(--ink); text-decoration: none; font: 600 14px/1 var(--f-head); text-transform: uppercase; letter-spacing: .6px; }
.ua-menu nav a[aria-current] { color: var(--brand); border-left-color: var(--brand); background: #fdf3f3; }

/* botões */
.ua-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 3px;
  font: 700 13.5px/1 var(--f-head); text-transform: uppercase; letter-spacing: .4px; text-decoration: none; background: var(--navy); color: #fff; border: 1px solid var(--navy); cursor: pointer; }
.ua-btn:hover { background: #1d2c45; }
.ua-btn.linha { background: transparent; color: var(--navy); }
.ua-btn.linha:hover { background: var(--navy); color: #fff; }
.ua-btn.verm { background: var(--brand); border-color: var(--brand); }
.ua-btn.verm:hover { background: var(--brand-dark); }

/* rodapé */
.ua-rodape { background: #F6F6F6; border-top: 1px solid var(--rule); margin-top: 64px; padding-top: 40px; }
.ua-rodape .grelha { display: grid; gap: 32px; padding-bottom: 36px; }
@media (min-width: 760px) { .ua-rodape .grelha { grid-template-columns: 1fr 1.3fr 1fr; } }
.ua-rodape h2 { font-size: 16.5px; margin-bottom: 12px; }
.ua-rodape p, .ua-rodape li { font-size: 13.5px; color: var(--ink-2); margin: 0 0 8px; }
.ua-rodape ul { list-style: none; padding: 0; margin: 0; }
.ua-rodape a { color: var(--ink-2); }
.ua-rodape a.ua-btn { color: #fff; text-decoration: none; }
.ua-rodape .socio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.ua-rodape .socio img { width: 130px; height: auto; }
.ua-rodape .socio .eu { color: var(--brand); font: 700 27px/1.1 var(--f-head); text-transform: uppercase; margin: 0; }
.ua-rodape .socio .da { color: var(--navy); font: 600 13.5px/1 var(--f-head); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 4px; }
.ua-rodape .base { background: var(--brand); color: rgba(255, 255, 255, .95); font-size: 12px; padding: 13px 0; }
.ua-rodape .base .wrap { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
@media (min-width: 640px) { .ua-rodape .base .wrap { flex-direction: row; justify-content: space-between; } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #CDD2DA; border-radius: 10px; border: 2px solid var(--page); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* telemóvel: barra de secções fixa por baixo do cabeçalho (scroll-spy em inicio.js) */
.ua-secs { position: sticky; top: 61px; z-index: 40; background: #fff; border-bottom: 1px solid var(--rule); }
.ua-secs .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 7px; padding-bottom: 7px; scrollbar-width: none; }
.ua-secs .wrap::-webkit-scrollbar { display: none; }
.ua-secs a { flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid #9AA0AC; border-radius: 999px;
  color: var(--ink); text-decoration: none; font: 500 13px/1 var(--f-body); white-space: nowrap; }
.ua-secs a { position: relative; }
.ua-secs a::after { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }   /* alvo de toque de 44 px */
.ua-secs a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
html:has(.ua-secs) { scroll-padding-top: 112px; }
@media (min-width: 900px) { .ua-secs { top: 73px; } html:has(.ua-secs) { scroll-padding-top: 124px; } }
@media (min-width: 1280px) { .ua-secs { display: none; } html:has(.ua-secs) { scroll-padding-top: 88px; } }

/* cabeçalho compacto ao fazer scroll (≥900 px) */
@media (min-width: 900px) {
  .ua-topo .wrap, .ua-marca img, .ua-nav a { transition: min-height .2s ease, height .2s ease; }
  .topo-compacto .ua-topo .wrap { min-height: 50px; }
  .topo-compacto .ua-marca img { height: 30px; }
  .topo-compacto .ua-marca > span { display: none; }
  .topo-compacto .ua-nav a { min-height: 40px; font-size: 12.5px; }
  .topo-compacto .ua-nav a.ua-apres { min-height: 32px; }
  .topo-compacto .ua-secs { top: 50px; }
  html.topo-compacto:has(.ua-secs) { scroll-padding-top: 100px; }
}
@media (min-width: 1280px) { html.topo-compacto:has(.ua-secs) { scroll-padding-top: 64px; } }
@media (prefers-reduced-motion: reduce) { .ua-topo .wrap, .ua-marca img, .ua-nav a { transition: none; } }
