/* SIBERTEX — public shell.
 * The Power Admin pack assumes a backoffice with a sidebar: from 768px up it shifts .main with
 * margin-left: var(--sidebar-width). The public site has NO sidebar, so that offset would push every page
 * right and leave a dead gutter. Loaded AFTER the pack CSS and ONLY by _LayoutPowerAdminPublic.
 * The public chrome is a landing header (below), not the pack's admin header.
 */
@media (min-width: 768px) {
  .main { margin-left: 0; }
}

@media (min-width: 1200px) {
  .main { margin-left: 0; }
}

/* No sidebar on the public site: the pack pins .header at left:var(--sidebar-width) from 768px up, leaving
 * the sidebar gutter. Span it full width. */
.header { left: 0; }
/* More side breathing room across the public site (header + content + footer). */
.header { padding-inline: 1.25rem; }
.main .container, .footer-content { padding-inline: 1.25rem; }
@media (min-width: 992px) {
  .header { padding-inline: 2.5rem; }
  .main .container, .footer-content { padding-inline: 2.5rem; }
}
/* The pack hides .header-logo from 768px up (in the backoffice the logo lives in the sidebar). The public site
 * has no sidebar, so the header must always carry the logo. */
.header-logo { display: flex; }

/* Bridge Bootstrap's primary to the brand accent token, so buttons resolve to the accent (not Bootstrap blue)
 * — same pattern the backoffice uses. Token only. */
.btn-primary {
  --bs-btn-bg: var(--accent-color); --bs-btn-border-color: var(--accent-color);
  --bs-btn-hover-bg: var(--accent-color); --bs-btn-hover-border-color: var(--accent-color);
  --bs-btn-active-bg: var(--accent-color); --bs-btn-active-border-color: var(--accent-color);
}
/* Public header: the 6-item nav needs desktop width, so split desktop/mobile at lg (992) — not the pack's 768.
 * Loaded after the pack, so these win by source order (no !important). Below 992 the hamburger carries the menu. */
@media (max-width: 991.98px) {
  .header-actions-desktop { display: none; }
  .header-actions-mobile { display: flex; }
}
@media (min-width: 992px) {
  .header-actions-mobile { display: none; }
  .header-actions-desktop { display: flex; }
}

/* Icon-only header toggles (language flag, mobile hamburger): no Bootstrap caret. */
.lang-toggle::after,
.header-actions-mobile .dropdown-toggle::after { display: none; }
/* Cookie re-open: clean circular floating icon button (FE) — icon-only, brand accent, accessible via aria-label/title. */
#cookie-reopen {
  width: 2.75rem; height: 2.75rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--accent-color);
  --bs-btn-border-color: var(--accent-color);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--accent-color);
  --bs-btn-hover-border-color: var(--accent-color);
  --bs-btn-active-bg: var(--accent-color);
  --bs-btn-active-border-color: var(--accent-color);
  box-shadow: 0 4px 8px rgba(11, 13, 16, .06), 0 12px 28px rgba(11, 13, 16, .12);
}
#cookie-reopen .bi { font-size: 1.15rem; line-height: 1; }
#cookie-reopen .cookie-reopen-label { display: none; }   /* icon-only FAB; name stays in aria-label/title */
/* Language flag — circular, cropped from the rectangular SVG, with breathing room from the label. */
.lang-flag {
  width: 1.35rem; height: 1.35rem;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}
/* Icon chip — the pack's own accent chip (see apps-grid-icon): soft accent tint + accent glyph. Token only. */
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
  font-size: 1.25rem;
}

/* The header is fixed and opaque, so the page starts below it. Anchors get the same offset, otherwise
 * jumping to #precos lands the heading underneath the menu. */

/* CRITICAL — the pack sets `overflow-x: hidden` on BOTH <html> AND <body>. Any overflow other than `visible`
 * on an ancestor turns it into a scroll container, and that silently KILLS `position: sticky` for the whole
 * page: no section heading pins, anywhere, no matter how correct the sticky rule is. It fails without a single
 * warning. Both have to be undone — fixing only <html> leaves <body> still breaking it.
 * `overflow-x: clip` still cuts horizontal spill but creates NO scroll container, so sticky survives. */
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

.main {
  margin-top: 0;
  padding-top: 74px;
}

section[id] { scroll-margin-top: 90px; }

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

/* ── Landing header ───────────────────────────────────────────────────────── */
/* The header is FIXED, so it must be opaque: with a transparent background the page scrolls through it and
 * the content collides with the menu. It keeps a solid backdrop at all times; scrolling only adds the edge
 * (border + shadow) — the class is .scr, set by home-fx.js. */
.lp-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 74px;
  padding-inline: max(1.5rem, calc((100vw - 1180px) / 2));
  color: rgba(244, 244, 245, 0.72);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid #e6e9ee;
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.lp-head.scr {
  border-bottom-color: rgba(244, 244, 245, 0.1);
  box-shadow: 0 2px 4px rgba(11, 13, 16, .04), 0 8px 24px rgba(11, 13, 16, .07);
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: #f4f4f5;
  text-decoration: none;
  white-space: nowrap;
}

.lp-brand img { height: 22px; width: auto; }

.lp-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  margin-inline: auto;
}

.lp-nav a {
  position: relative;
  font-size: 0.875rem;
  color: rgba(244, 244, 245, 0.62);
  text-decoration: none;
  padding-block: 0.4rem;
  transition: color 0.25s ease;
}

.lp-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.lp-nav a:hover { color: #f4f4f5; }
.lp-nav a:hover::after { width: 100%; }

@media (min-width: 992px) {
  .lp-nav { display: flex; }
}

.lp-head-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

@media (min-width: 992px) {
  .lp-head-right { margin-left: 0; }
}

/* Language: EN · PT, current one lit (same idea as the reference) */
.lp-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lp-lang a { color: rgba(244, 244, 245, 0.4); text-decoration: none; transition: color 0.25s ease; }
.lp-lang a:hover { color: #f4f4f5; }
.lp-lang .is-on { color: #f4f4f5; font-weight: 600; }

.lp-head-link {
  font-size: 0.875rem;
  color: rgba(244, 244, 245, 0.62);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.lp-head-link:hover { color: #f4f4f5; }

.lp-head-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 244, 245, 0.18);
  font-size: 0.8125rem;
  color: #f4f4f5;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.lp-head-cta:hover {
  background: #f7f8fa;
  border-color: rgba(244, 244, 245, 0.3);
  color: #f4f4f5;
  transform: translateY(-1px);
}

/* Footer, quiet. It carries five links (incl. the three legal ones), so it MUST wrap — a single flex row
 * overflows the viewport on a phone. On narrow screens it stacks and centres instead of straining. */
.footer {
  border-top: 1px solid var(--border-color);
  padding-block: 2.5rem;
  color: var(--muted-color);
  font-size: 0.8125rem;
}

.footer-content {
  width: min(1180px, 92vw);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.footer-links a { color: var(--muted-color); text-decoration: none; transition: color 0.25s ease; }
.footer-links a:hover { color: var(--accent-color); }

@media (max-width: 768px) {
  .footer-content { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-copyright { width: 100%; }
}

/* The Google reCAPTCHA badge floats bottom-right on EVERY page (position: fixed) and collides with the
 * back-to-top button. Google explicitly allows hiding it as long as the required disclaimer is shown in the
 * form — and it is (_RecaptchaDisclaimer, inside the contact form). So: hidden here, disclaimer stays there. */
.grecaptcha-badge {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ── Back to top ──────────────────────────────────────────────────────────── */
/* Lives in the public layout, so every page has it — it used to exist only on the Home. */
.lp-totop {
  position: fixed;
  right: 1.5rem;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent-color);
  color: var(--contrast-color);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease, visibility .35s, background .25s ease, color .25s ease;
}

.lp-totop.show { opacity: 1; visibility: visible; transform: none; }
.lp-totop:hover { background: color-mix(in srgb, var(--accent-color), black 12%); color: var(--contrast-color); }

@media (prefers-reduced-motion: reduce) {
  .lp-totop { transition: none; }
}

/* ── Mobile menu ──────────────────────────────────────────────────────────── */
.lp-burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.lp-burger span {
  display: block;
  height: 1px;
  width: 100%;
  background: #0b0d10;
  transition: transform .3s ease, opacity .3s ease;
}

.lp-burger.on span:first-child { transform: translateY(3px) rotate(45deg); }
.lp-burger.on span:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (min-width: 992px) {
  .lp-burger { display: none; }
}

.lp-menu {
  position: fixed;
  inset: 74px 0 auto 0;
  z-index: 999;
  display: grid;
  gap: 0;
  padding: 0 max(1.25rem, 5vw);
  max-height: 0;
  overflow: hidden;
  background: #ffffff;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: max-height .4s cubic-bezier(.16, 1, .3, 1), border-color .4s ease;
}

.lp-menu.open {
  max-height: 70vh;
  border-bottom-color: rgba(244, 244, 245, 0.1);
  overflow-y: auto;
}

.lp-menu a {
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(244, 244, 245, 0.08);
  color: rgba(244, 244, 245, 0.72);
  text-decoration: none;
  font-size: 1rem;
}

.lp-menu a:active { color: #f4f4f5; }

.lp-menu-lang {
  display: none;
  gap: 1.25rem;
  padding: 1.25rem 0 1.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
}

.lp-menu-lang a { border: 0; padding: 0; color: rgba(244, 244, 245, 0.4); }
.lp-menu-lang a.is-on { color: #f4f4f5; font-weight: 600; }

@media (min-width: 992px) {
  .lp-menu { display: none; }
}

/* ── Small screens, down to folds ─────────────────────────────────────────── */
/* On phones the hero already shows "Registar", so repeating it in the bar is noise — and an existing customer
 * would find no "Entrar" anywhere. So below 600px the roles swap: the bar carries "Entrar" (promoted to the
 * pill) and "Registar" moves into the menu. Both stay reachable. */
@media (max-width: 600px) {
  .lp-lang { font-size: 0.64rem; gap: 0.4rem; }
  .lp-head-right { gap: 0.75rem; }

  .lp-head-cta { display: none; }

  .lp-head-link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(244, 244, 245, 0.18);
    font-size: 0.8125rem;
    color: #f4f4f5;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .lp-head { height: 66px; padding-inline: 1.1rem; gap: 1rem; }
  .lp-menu { inset-block-start: 66px; }
  .lp-brand img { height: 20px; }
  .lp-brand span { font-size: 0.875rem; }
  .lp-head-cta { padding: 0.45rem 0.85rem; font-size: 0.75rem; }
  .lp-head-cta i { display: none; }
  .lp-head-link { padding: 0.4rem 0.85rem; font-size: 0.75rem; }
  .main { padding-top: 66px; }
}

/* Fold-class widths: the language pair moves out of the bar and into the menu. */
@media (max-width: 380px) {
  .lp-lang { display: none; }
  .lp-menu-lang { display: flex; }
  .lp-brand span { font-size: 0.8125rem; }
  .lp-brand img { height: 18px; }
}

@media (max-width: 360px) {
  .lp-head { padding-inline: 0.85rem; }
  .lp-head-cta, .lp-head-link { padding: 0.4rem 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-head, .lp-head-cta, .lp-nav a::after, .lp-menu, .lp-burger span { transition: none; }
}

/* ── Cookie consent — brand accent (same look as the backoffice) + always on top ──────────────────
   The banner + its re-open pin show in every zone. On the public FE Bootstrap's .btn-primary is blue,
   but the brand is the accent token — remap it here (colour by token only, never a hex) and keep both
   the banner and the pin above page content so the pin is always reachable (withdrawal, Art. 7(3)). */
#cookie-consent { z-index: 1045; }
#cookie-consent .btn-primary {
  --bs-btn-bg: var(--accent-color);
  --bs-btn-border-color: var(--accent-color);
  --bs-btn-hover-bg: var(--accent-color);
  --bs-btn-hover-border-color: var(--accent-color);
  --bs-btn-active-bg: var(--accent-color);
  --bs-btn-active-border-color: var(--accent-color);
  --bs-btn-disabled-bg: var(--accent-color);
  --bs-btn-disabled-border-color: var(--accent-color);
}
#cookie-consent .btn-outline-primary {
  --bs-btn-color: var(--accent-color);
  --bs-btn-border-color: var(--accent-color);
  --bs-btn-hover-bg: var(--accent-color);
  --bs-btn-hover-border-color: var(--accent-color);
  --bs-btn-active-bg: var(--accent-color);
  --bs-btn-active-border-color: var(--accent-color);
}
#cookie-consent .form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}
#cookie-reopen {
  z-index: 1045;
  --bs-btn-bg: var(--accent-color);
  --bs-btn-border-color: var(--accent-color);
  --bs-btn-hover-bg: var(--accent-color);
  --bs-btn-hover-border-color: var(--accent-color);
}

/* 2026-07-30 — avatar de iniciais no chip de utilizador do shell público (classe NOVA, aditiva; substitui a
   fotografia demo do pack). Só tokens; nada do FE aprovado é alterado. */
.avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  color: var(--contrast-color);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  user-select: none;
}

/* ── Pré-lançamento (2026-09-02) — banner de cookies na linguagem da landing ─────────────────────────────── */
/* O cartão era Bootstrap cru: canto duro, sombra pesada, botões todos do mesmo peso. Passa a falar a língua
   do FE — raio grande, linha ténue, "Aceitar tudo" é a única ação cheia — sem tocar no markup partilhado. */
/* O banner dependia da grelha Bootstrap para ter largura — em páginas onde a grelha não governa, esticava a
   ecrã inteiro. Passa a ter dimensão própria: cartão compacto ancorado ao canto inferior esquerdo, sempre. */
#cookie-consent {
  left: 1.25rem !important;
  right: auto !important;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
  width: min(430px, calc(100vw - 2.5rem));
}
#cookie-consent .container-fluid { padding: 0; }
#cookie-consent .row { margin: 0; }
#cookie-consent [class*="col-"] { flex: 0 0 100%; width: 100%; max-width: 100%; padding: 0; }

#cookie-consent .card {
  border-radius: 18px;
  border: 1px solid var(--lp-line, rgba(11,13,16,.10));
  box-shadow: 0 8px 20px rgba(11,13,16,.07), 0 24px 60px rgba(11,13,16,.12);
  overflow: hidden;
}
#cookie-consent .card-body { padding: 1.5rem 1.6rem 1.25rem; }
#cookie-consent .h5 {
  font-family: "Share Tech", var(--lp-serif, serif);
  font-weight: 400;
  letter-spacing: .01em;
  font-size: 1.35rem;
}
#cookie-consent .btn { border-radius: 999px; padding-inline: 1.1rem; }
#cookie-consent .btn-outline-secondary {
  --bs-btn-color: inherit;
  --bs-btn-border-color: var(--lp-line, rgba(11,13,16,.18));
  --bs-btn-hover-bg: rgba(11,13,16,.05);
  --bs-btn-hover-color: inherit;
  --bs-btn-hover-border-color: var(--lp-line, rgba(11,13,16,.28));
}
#cookie-consent .border-top, #cookie-consent .border-bottom { border-color: var(--lp-line, rgba(11,13,16,.10)) !important; }

/* Os dois botões flutuantes do shell público — cookies (esquerda) e topo (direita) — em ESPELHO: o mesmo
   círculo, o mesmo afastamento, a mesma sombra; só muda o lado e o glifo. */
.lp-totop,
#cookie-reopen {
  width: 44px; height: 44px;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 4px 8px rgba(11,13,16,.06), 0 12px 28px rgba(11,13,16,.14);
}
#cookie-reopen {
  /* As utilitárias bottom-0/start-0 do markup levam !important — sem o mesmo peso aqui, o botão colava
     à borda enquanto o do topo flutuava a 1.5rem. O alinhamento é forçado ao milímetro do gémeo. */
  position: fixed;
  left: 1.5rem !important;
  right: auto !important;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
  margin: 0 !important; z-index: 900;
  /* As variáveis --bs-btn-* não pegam nesta página — o gémeo pinta-se como o .lp-totop se pinta:
     propriedades diretas, mesmo laranja, mesmo glifo branco. */
  background: var(--accent-color) !important;
  color: var(--contrast-color, #fff) !important;
  border: none !important;
  border-radius: 50%;
}
#cookie-reopen:hover { background: color-mix(in srgb, var(--accent-color), black 12%) !important; color: var(--contrast-color, #fff) !important; }
#cookie-reopen .bi { font-size: 1.15rem; }
.lp-totop { right: 1.5rem; }
