/* ==========================================================================
   Website oficial — Clube de Atletismo Estrelas do Marco de Canaveses
   --------------------------------------------------------------------------
   1.  Tipografia (self-hosted)
   2.  Tokens
   3.  Base
   4.  Utilitários
   5.  Intro animada
   6.  Header
   7.  Menu mobile
   8.  Rodapé
   9.  Hero e barra de informação rápida
   10. Componentes de conteúdo
   11. Formulários
   12. Páginas específicas
   13. Acessibilidade e movimento reduzido
   ========================================================================== */

/* 1. Tipografia ----------------------------------------------------------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Tokens --------------------------------------------------------------- */

:root {
  /* Identidade */
  --c-blue: #0d4ea6;
  --c-blue-600: #0a3f87;
  --c-blue-700: #083268;
  --c-navy: #0a2547;
  --c-navy-soft: #112e54;
  --c-yellow: #f5d40c;

  /* Superfícies claras */
  --c-bg: #ffffff;
  --c-bg-soft: #f6f7f9;
  --c-bg-tint: #eef2f7;
  --c-line: #e3e7ee;
  --c-line-strong: #d3d9e3;
  --c-text: #0e1a2b;
  --c-text-soft: #475569;
  --c-text-mute: #6b7a90;

  /* Superfícies escuras */
  --c-dark-bg: #0a2547;
  --c-dark-bg-2: #0d2c54;
  --c-dark-line: rgba(255, 255, 255, 0.12);
  --c-dark-text: #eef2f7;
  --c-dark-text-soft: #a7b6cf;

  /* Estados */
  --c-success: #0f7a4d;
  --c-success-bg: #e6f5ee;
  --c-danger: #b42318;
  --c-danger-bg: #fdecea;

  /* Tipos */
  --ff-display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ff-body: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Raios */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Sombras */
  --sh-1: 0 1px 2px rgba(13, 30, 60, 0.04), 0 1px 1px rgba(13, 30, 60, 0.03);
  --sh-2: 0 4px 14px rgba(13, 30, 60, 0.06), 0 1px 2px rgba(13, 30, 60, 0.04);
  --sh-3: 0 20px 50px -20px rgba(13, 30, 60, 0.22), 0 6px 16px rgba(13, 30, 60, 0.08);

  /* Layout */
  --container: 1240px;
  --pad-x: clamp(20px, 4vw, 56px);

  /* Header */
  --header-h: 92px;
  --header-h-scrolled: 68px;
  --header-logo: 56px;
  --header-logo-scrolled: 42px;
}

/* 3. Base ----------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* Compensa o header fixo ao saltar para uma âncora. */
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4, .h-display {
  font-family: var(--ff-display);
  color: var(--c-text);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 { font-weight: 800; font-size: clamp(38px, 5.4vw, 78px); letter-spacing: -0.022em; }
h2 { font-weight: 800; font-size: clamp(28px, 3.4vw, 50px); letter-spacing: -0.018em; }
h3 { font-weight: 700; font-size: clamp(20px, 2vw, 27px); letter-spacing: -0.012em; line-height: 1.15; }
h4 { font-weight: 700; font-size: 18px; line-height: 1.2; }

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--c-yellow); color: var(--c-navy); }

:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 2px;
  border-radius: 3px;
}

/*
   Rede de segurança contra scroll horizontal acidental.
   Fica no conteúdo e NUNCA em <html> ou <body>: aí, tanto "hidden" como
   "clip" transformariam a raiz num contentor não-scrollável e partiriam
   o scroll vertical, o header sticky e as âncoras.
*/
.site-main { display: block; overflow-x: clip; }

/* 4. Utilitários ---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: clamp(56px, 8vw, 112px); }
.section--tight { padding-block: clamp(40px, 5.5vw, 72px); }
.section--soft { background: var(--c-bg-soft); }

.section--dark {
  background: var(--c-dark-bg);
  color: var(--c-dark-text);
  position: relative;
  overflow: hidden;
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #fff; }

.section--dark .muted { color: var(--c-dark-text-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-blue);
}

.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.eyebrow.--on-dark { color: var(--c-yellow); }

.muted { color: var(--c-text-soft); }
.mono { font-family: var(--ff-mono); }

.text-link {
  color: var(--c-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link:hover { color: var(--c-blue-600); }
.lead { color: var(--c-text-soft); font-size: 17px; max-width: 60ch; }
.section--dark .lead { color: var(--c-dark-text-soft); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(28px, 4vw, 52px);
}

.section-head .left { max-width: 720px; display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 760px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 20px; }
}

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1000px) {
  .grid--4, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  text-align: center;
}

.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn--primary { background: var(--c-blue); color: #fff; }
.btn--primary:hover { background: var(--c-blue-600); }

.btn--accent { background: var(--c-yellow); color: var(--c-navy); font-weight: 700; }
.btn--accent:hover { background: #ffe23a; }

.btn--ghost { background: transparent; color: var(--c-text); border-color: var(--c-line-strong); }
.btn--ghost:hover { border-color: var(--c-blue); color: var(--c-blue); }

.btn--onDark { background: #fff; color: var(--c-navy); }
.btn--onDark:hover { background: var(--c-yellow); }

.btn--ghostDark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.34); }
.btn--ghostDark:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

.btn--sm { padding: 10px 16px; font-size: 13px; }
.btn--block { width: 100%; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--c-bg-tint);
  color: var(--c-text-soft);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--ff-display);
}

.chip.--blue { background: rgba(13, 78, 166, 0.08); color: var(--c-blue); }
.chip.--dark { background: rgba(255, 255, 255, 0.1); color: #fff; }
.chip.--warn { background: var(--c-danger-bg); color: var(--c-danger); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Marcas e resultados de um atleta, vindos da Lane. */
.marks__title {
  margin: 28px 0 12px;
  font-size: 18px;
}

.marks {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}

.marks__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line);
}

.marks__row:last-child { border-bottom: 0; }

.marks__event {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.marks__event small {
  display: block;
  margin-top: 2px;
  color: var(--c-text-soft);
  font-size: 12.5px;
  font-weight: 500;
}

/* Tabular para as marcas alinharem umas debaixo das outras. */
.marks__value {
  flex: none;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.athlete-card__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-blue);
}

.card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover { border-color: var(--c-line-strong); box-shadow: var(--sh-2); }

/* Suporte de imagem: mantém o rácio e evita saltos de layout. */
.media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(13, 78, 166, 0.05) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #eef2f7 0%, #e3e9f1 100%);
  display: grid;
  place-items: center;
}

.media img { width: 100%; height: 100%; object-fit: cover; }

.media--16x10 { aspect-ratio: 16 / 10; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--1x1 { aspect-ratio: 1 / 1; }

.media--dark {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #122c54 0%, #0a2547 100%);
}

/* Marca discreta usada quando ainda não existe fotografia real. */
.media__placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  color: var(--c-text-mute);
}

.media__placeholder img { width: 46px; height: 46px; object-fit: contain; opacity: 0.32; }

.media__placeholder span {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.media--dark .media__placeholder { color: var(--c-dark-text-soft); }
.media--dark .media__placeholder img { opacity: 0.4; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--c-yellow);
  color: var(--c-navy);
  padding: 12px 20px;
  font-family: var(--ff-display);
  font-weight: 700;
  border-radius: 0 0 var(--r-md) 0;
}

.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 5. Intro animada -------------------------------------------------------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--c-navy);
  display: none;
  align-items: center;
  justify-content: center;
  will-change: opacity;
}

/* Só existe quando o JS decide reproduzi-la. Sem JS, nunca aparece. */
.intro-active .intro { display: flex; }

.intro__logo {
  width: min(220px, 42vw);
  height: auto;
  opacity: 0;
  transform: scale(0.94);
  transform-origin: center center;
  will-change: transform, opacity;
}

.intro--enter .intro__logo {
  animation: intro-in 520ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

/* Durante a viagem o logo é posicionado por JS (técnica FLIP). */
.intro--travel .intro__logo {
  opacity: 1;
  transform: none;
  animation: none;
  transition: transform 760ms cubic-bezier(0.65, 0.02, 0.28, 1);
}

.intro--fade { transition: opacity 300ms ease; opacity: 0; }
.intro--done { display: none !important; }

@keyframes intro-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

/* O logo do header só aparece quando a intro termina a viagem. */
.intro-active .site-header__logo img { opacity: 0; }
.intro-active .site-header__nav,
.intro-active .site-header__actions,
.intro-active .site-header__burger { opacity: 0; }

.intro-reveal .site-header__logo img { opacity: 1; transition: opacity 160ms ease; }

.intro-reveal .site-header__nav,
.intro-reveal .site-header__actions,
.intro-reveal .site-header__burger {
  opacity: 1;
  transition: opacity 420ms ease 120ms, transform 420ms ease 120ms;
}

/* 6. Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--c-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-yellow), transparent 45%, transparent 55%, var(--c-yellow));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-header.is-scrolled { box-shadow: 0 8px 28px -18px rgba(0, 0, 0, 0.8); }
.site-header.is-scrolled::after { opacity: 0.5; }

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--header-h);
  /* A altura muda sem provocar layout shift: só o header encolhe. */
  transition: height 0.25s ease;
}

.site-header.is-scrolled .site-header__inner { height: var(--header-h-scrolled); }

/*
   O logótipo é ancorado ao centro geométrico do viewport, e não ao espaço
   que sobra entre os menus. Fica sempre exatamente ao meio, em qualquer
   largura de ecrã.
*/
.site-header__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  line-height: 0;
  z-index: 2;
}

.site-header__logo img {
  height: var(--header-logo);
  width: auto;
  transition: height 0.25s ease, opacity 0.2s ease;
}

.site-header.is-scrolled .site-header__logo img { height: var(--header-logo-scrolled); }

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
}

/*
   Os dois grupos partilham o espaço em partes iguais (flex: 1 1 0), pelo que
   a fronteira entre eles cai exatamente no centro — onde está o logótipo.
   O padding reserva a área do logo para que nada lhe passe por cima.
*/
.site-header__nav--left { padding-right: calc(var(--header-logo) / 2 + 30px); }

.site-header__group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
  padding-left: calc(var(--header-logo) / 2 + 30px);
}

.site-header__group .site-header__nav { flex: 0 1 auto; }

/*
   Todos os itens da navegação — os links e o botão "Mais" — são exatamente
   o mesmo tipo de caixa: inline-flex, texto centrado na vertical e a mesma
   altura de linha. É isto que mantém "Mais ▾" alinhado com os restantes.
*/
.site-header__nav a,
.site-header__nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: var(--c-dark-text);
  background: none;
  border: 0;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-header__nav a:hover,
.site-header__nav button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.site-header__nav > a.is-active,
.site-header__more.is-active { color: var(--c-yellow); }

.site-header__nav > a.is-active::after,
.site-header__more.is-active::after {
  content: '';
  position: absolute;
  left: 13px; right: 13px; bottom: 3px;
  height: 2px;
  background: var(--c-yellow);
  border-radius: 2px;
}

.site-header__actions { display: flex; align-items: center; gap: 10px; }

.site-header__burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  border-radius: var(--r-md);
  align-items: center;
  justify-content: center;
}

.site-header__burger svg { width: 20px; height: 20px; }
.site-header__burger:hover { background: rgba(255, 255, 255, 0.08); }

/* Submenu "Mais" — flex para não criar o espaço de linha extra que um
   elemento inline cria por baixo (e que desalinhava o botão). */
.has-submenu { position: relative; display: flex; align-items: center; }

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 208px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 5;
}

.site-header__nav--right .submenu { left: auto; right: 0; }
.has-submenu.is-open .submenu { display: flex; }

/* Ponte invisível sobre o intervalo entre o botão e a lista: sem ela, o
   rato "cai" nesses 8px e o submenu fecha antes de lá chegar. */
.submenu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

/* Com rato, abre ao passar por cima. */
@media (hover: hover) and (pointer: fine) {
  .has-submenu:hover .submenu { display: flex; }
  .has-submenu:hover .site-header__chevron { transform: rotate(180deg); }
}

/* Sem JavaScript, o teclado continua a chegar aos links do submenu. */
html:not(.js) .has-submenu:focus-within .submenu { display: flex; }

.submenu a {
  color: var(--c-text);
  padding: 10px 12px;
  font-size: 14px;
  border-radius: var(--r-sm);
}

.submenu a:hover { background: var(--c-bg-soft); color: var(--c-blue); }
.submenu a.is-active { color: var(--c-blue); }
.submenu a.is-active::after { display: none; }

/* A seta de "Mais": item flexível à direita da palavra, na mesma linha,
   centrado na vertical. Roda quando o submenu abre, sem mexer na altura. */
.site-header__chevron {
  width: 12px;
  height: 12px;
  flex: none;
  transition: transform 0.2s ease;
}

.has-submenu.is-open .site-header__chevron { transform: rotate(180deg); }

@media (max-width: 1180px) {
  .site-header__nav a,
  .site-header__nav button { padding: 10px 10px; font-size: 13.5px; }
}

@media (max-width: 1040px) {
  :root { --header-h: 76px; --header-h-scrolled: 62px; --header-logo: 46px; --header-logo-scrolled: 38px; }

  .site-header__nav,
  .site-header__actions .btn--desktop { display: none; }

  /*
     Mobile: hamburger encostado à esquerda, logo no centro geométrico,
     acesso à Área Pais/Atletas à direita. O logo continua posicionado em
     absoluto, por isso a barra pode ser distribuída livremente à volta dele.
  */
  .site-header__group { flex: 1 1 auto; padding-left: 0; }

  .site-header__actions {
    flex: 1 1 auto;
    width: 100%;
    justify-content: space-between;
  }

  .site-header__burger { display: inline-flex; order: -1; }
}

/* Botão compacto da Área Pais/Atletas em mobile. */
.header-app-link {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 13px;
}

.header-app-link svg { width: 16px; height: 16px; }
.header-app-link:hover { background: rgba(255, 255, 255, 0.1); }

@media (max-width: 1040px) { .header-app-link { display: inline-flex; } }
@media (max-width: 380px) { .header-app-link span { display: none; } .header-app-link { padding: 9px 11px; } }

/* 7. Menu mobile ---------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--c-navy);
  display: flex;
  flex-direction: column;
  padding: 20px var(--pad-x) 32px;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  /* Ao fechar: a visibilidade só muda no fim, para se ver o fade-out. */
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

/* Ao abrir: visível IMEDIATAMENTE. Se a visibilidade estivesse em transição,
   o menu ainda estaria "hidden" no instante do .focus() e o foco do teclado
   não conseguia entrar nele. */
.mobile-menu.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
}

.mobile-menu__inner {
  padding-inline: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  margin-bottom: 12px;
}

.mobile-menu__top img { height: 44px; width: auto; }

.mobile-menu__close {
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu__close svg { width: 20px; height: 20px; }

.mobile-menu nav { display: flex; flex-direction: column; }

.mobile-menu nav a {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 21px;
  color: #fff;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu nav a.is-active { color: var(--c-yellow); }
.mobile-menu nav a svg { width: 16px; height: 16px; opacity: 0.45; }

.mobile-menu__foot {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-menu__foot .mono {
  font-size: 11px;
  color: var(--c-dark-text-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.is-locked { overflow: hidden; }

/* 8. Rodapé --------------------------------------------------------------- */

.site-footer {
  background: var(--c-navy);
  color: var(--c-dark-text);
  padding: clamp(56px, 7vw, 84px) 0 28px;
  position: relative;
  overflow: hidden;
}

.site-footer__mark {
  position: absolute;
  right: -110px;
  bottom: -130px;
  width: 440px;
  opacity: 0.05;
  pointer-events: none;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 44px;
  position: relative;
}

.site-footer h2 {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--c-yellow);
  margin-bottom: 18px;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: var(--c-dark-text-soft); font-size: 14px; }
.site-footer a:hover { color: #fff; }
.site-footer li { color: var(--c-dark-text-soft); font-size: 14px; }

.site-footer__brand { display: flex; flex-direction: column; gap: 18px; }
.site-footer__brand img { width: 58px; height: auto; }
.site-footer__brand p { color: var(--c-dark-text-soft); font-size: 14px; max-width: 34ch; line-height: 1.65; }
.site-footer__brand strong { color: #fff; }

.site-footer__bottom {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--c-dark-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--c-dark-text-soft);
  position: relative;
  flex-wrap: wrap;
}

.site-footer__socials { display: flex; gap: 10px; }

.site-footer__socials a {
  width: 38px; height: 38px;
  border: 1px solid var(--c-dark-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.site-footer__socials a:hover { background: rgba(255, 255, 255, 0.08); }
.site-footer__socials svg { width: 16px; height: 16px; }

@media (max-width: 940px) { .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* 9. Hero e informação rápida --------------------------------------------- */

.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: var(--c-navy);
}

.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 37, 71, 0.28) 0%, rgba(10, 37, 71, 0.8) 78%, rgba(10, 37, 71, 0.97) 100%),
    linear-gradient(90deg, rgba(10, 37, 71, 0.88) 0%, rgba(10, 37, 71, 0.5) 55%, transparent 100%);
}

/* Textura discreta quando ainda não há fotografia real do clube. */
.hero__bg--empty {
  background:
    radial-gradient(75% 60% at 26% 28%, rgba(13, 78, 166, 0.55), transparent 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 15px),
    linear-gradient(180deg, #0d4ea6 0%, #0a2547 78%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding: clamp(56px, 8vw, 116px) 0 clamp(48px, 6vw, 88px);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: end;
}

.hero__copy { max-width: 780px; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { color: #fff; font-size: clamp(44px, 6.2vw, 92px); line-height: 0.97; }
.hero .lead { font-size: clamp(16px, 1.4vw, 19px); color: #d6deee; max-width: 52ch; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.hero__side { display: flex; flex-direction: column; gap: 12px; align-self: end; }

.hero__panel {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-md);
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

a.hero__panel:hover { border-color: rgba(245, 212, 12, 0.55); background: rgba(255, 255, 255, 0.09); }

.hero__panel .k {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-yellow);
}

.hero__panel .v {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 19px;
  color: #fff;
  margin-top: 7px;
  line-height: 1.25;
}

.hero__panel .s {
  display: block;
  font-size: 13px;
  color: var(--c-dark-text-soft);
  margin-top: 5px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 34px; }
  .hero__side { flex-direction: column; }
}

/* Barra de informação rápida */
.quickbar {
  background: var(--c-navy-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.quickbar__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.quickbar__item {
  background: var(--c-navy-soft);
  padding: 18px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 14px;
}

.quickbar__item svg { width: 20px; height: 20px; color: var(--c-yellow); flex: none; }
.quickbar__item .k {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-dark-text-soft);
}
.quickbar__item .v { font-family: var(--ff-display); font-weight: 700; font-size: 15px; margin-top: 3px; }
.quickbar__item a:hover .v { color: var(--c-yellow); }

/* 10. Componentes de conteúdo --------------------------------------------- */

.page-intro {
  padding-top: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--c-line);
  background: var(--c-bg-soft);
}

.page-intro__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.page-intro h1 { font-size: clamp(34px, 4.4vw, 62px); margin-top: 14px; }
.page-intro .lead { margin-top: 16px; }

@media (max-width: 760px) { .page-intro__inner { grid-template-columns: 1fr; } }

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  margin-bottom: 22px;
}

.crumbs a:hover { color: var(--c-blue); }
.crumbs .sep { opacity: 0.5; }
.crumbs [aria-current] { color: var(--c-text); }

/* Cartão de notícia */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card .media { border-radius: 0; }
.news-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 11px; flex: 1; }

.news-card__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--c-text-mute);
}

.news-card__meta .cat { color: var(--c-blue); font-weight: 600; }
.news-card h3 a:hover { color: var(--c-blue); }
.news-card__excerpt { color: var(--c-text-soft); font-size: 15px; }

.news-card__read {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--c-blue);
  margin-top: auto;
  padding-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.news-card__read svg { width: 14px; height: 14px; }

.news-card--feature { display: grid; grid-template-columns: 1.15fr 1fr; }
.news-card--feature .media { height: 100%; min-height: 300px; aspect-ratio: auto; }
.news-card--feature .news-card__body { padding: clamp(26px, 3.2vw, 44px); justify-content: center; }
.news-card--feature h3 { font-size: clamp(23px, 2.4vw, 34px); }

@media (max-width: 820px) {
  .news-card--feature { grid-template-columns: 1fr; }
  .news-card--feature .media { min-height: 0; aspect-ratio: 16 / 10; }
}

/* Linha de competição */
.event-list { border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }

.event {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--c-line);
  transition: background 0.15s ease;
}

.event:last-child { border-bottom: 0; }
.event:hover { background: var(--c-bg-soft); }

.event__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  background: var(--c-bg-tint);
  border-radius: var(--r-md);
  color: var(--c-navy);
}

.event__date .day { font-family: var(--ff-display); font-weight: 800; font-size: 28px; line-height: 1; }

.event__date .mon {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 6px;
  color: var(--c-text-soft);
}

.event__date.--next { background: var(--c-blue); color: #fff; }
.event__date.--next .mon { color: rgba(255, 255, 255, 0.72); }

.event__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.event__body .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.event__body h3 { font-size: 19px; }
.event__body h3 a:hover { color: var(--c-blue); }

.event__body .loc {
  color: var(--c-text-soft);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event__body .loc svg { width: 14px; height: 14px; flex: none; }
.event__cta { display: flex; align-items: center; gap: 12px; }

@media (max-width: 760px) {
  .event { grid-template-columns: 70px minmax(0, 1fr); gap: 16px; row-gap: 14px; }
  .event__cta { grid-column: 2 / -1; justify-self: start; }
  .event__date .day { font-size: 23px; }
}

/* Cartão de atleta */
.athlete-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  height: 100%;
}

.athlete-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: transparent; }
.athlete-card .media { border-radius: 0; }

.athlete-card__avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(38px, 5vw, 56px);
  color: rgba(13, 78, 166, 0.28);
  letter-spacing: 0.02em;
}

.athlete-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.athlete-card__name { font-family: var(--ff-display); font-weight: 800; font-size: 19px; line-height: 1.15; }

.athlete-card__cat {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-text-mute);
}

.athlete-card__spec {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--c-line);
  font-size: 13.5px;
  color: var(--c-text-soft);
}

/* Galeria */
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.gallery-grid .tile { position: relative; overflow: hidden; border-radius: var(--r-md); grid-column: span 3; }
.gallery-grid .tile .media { aspect-ratio: 1 / 1; height: 100%; }
.gallery-grid .tile.--wide { grid-column: span 6; }
.gallery-grid .tile.--wide .media { aspect-ratio: 16 / 10; }
.gallery-grid .tile.--tall { grid-column: span 4; }

.gallery-grid a.tile { display: block; }
.gallery-grid .tile img { transition: transform 0.4s ease; }
.gallery-grid .tile:hover img { transform: scale(1.04); }

.gallery-grid .tile__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(10, 37, 71, 0.85));
  color: #fff;
  font-size: 12.5px;
  text-align: left;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-grid .tile:hover .tile__caption,
.gallery-grid .tile:focus-visible .tile__caption { opacity: 1; }

@media (max-width: 900px) {
  .gallery-grid .tile,
  .gallery-grid .tile.--wide,
  .gallery-grid .tile.--tall { grid-column: span 6; }
}

@media (max-width: 520px) {
  .gallery-grid .tile,
  .gallery-grid .tile.--wide,
  .gallery-grid .tile.--tall { grid-column: span 12; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(6, 20, 39, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[open], .lightbox.is-open { display: flex; }

.lightbox__figure { max-width: min(1100px, 92vw); max-height: 86vh; display: flex; flex-direction: column; gap: 14px; }
.lightbox__figure img { max-height: 76vh; width: auto; margin-inline: auto; object-fit: contain; border-radius: var(--r-md); }
.lightbox__figure figcaption { color: #dbe3f0; font-size: 14px; text-align: center; }

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255, 255, 255, 0.18); }

.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox svg { width: 20px; height: 20px; }

/* Tabela de resultados */
.results-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }

.results-table thead th {
  text-align: left;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-bg-soft);
  font-weight: 600;
}

.results-table tbody td { padding: 16px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.results-table tbody tr:hover td { background: var(--c-bg-soft); }

.results-table .pos { font-family: var(--ff-display); font-weight: 800; font-size: 18px; color: var(--c-navy); width: 64px; }
.results-table .pos.--gold { color: #a8811b; }
.results-table .pos.--silver { color: #64748b; }
.results-table .pos.--bronze { color: #93693a; }

.results-table .who { display: flex; align-items: center; gap: 12px; }

.results-table .who .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-bg-tint);
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--ff-display);
  font-weight: 700;
  color: var(--c-navy);
  font-size: 13px;
}

.results-table .who a:hover { color: var(--c-blue); }
.results-table .perf { font-family: var(--ff-mono); font-weight: 600; color: var(--c-navy); }
.results-table .cat { color: var(--c-text-soft); font-size: 14px; }

@media (max-width: 760px) {
  .results-table thead { display: none; }
  .results-table, .results-table tbody, .results-table tr, .results-table td { display: block; width: 100%; }
  .results-table tr { padding: 14px 4px; border-bottom: 1px solid var(--c-line); }
  .results-table td { padding: 3px 0; border: 0; }
  .results-table .pos { font-size: 14px; width: auto; }
  .results-table td[data-label]::before {
    content: attr(data-label) ' · ';
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-text-mute);
  }
}

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

.filters .filter {
  padding: 8px 15px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--c-line-strong);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--c-text-soft);
  transition: all 0.15s ease;
}

.filters .filter:hover { border-color: var(--c-blue); color: var(--c-blue); }
.filters .filter.is-active { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }

.filters-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 28px; }
.filters-form .field { min-width: 190px; }

/* Paginação */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }

.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text-soft);
  border: 1px solid transparent;
  padding: 0 12px;
}

.pagination a:hover { background: var(--c-bg-soft); color: var(--c-blue); }
.pagination .is-current { background: var(--c-blue); color: #fff; }

/* Estado vazio */
.empty {
  text-align: center;
  padding: clamp(40px, 6vw, 68px) 24px;
  border: 1px dashed var(--c-line-strong);
  border-radius: var(--r-lg);
  background: var(--c-bg-soft);
}

.empty .icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--c-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-blue);
  margin-bottom: 16px;
}

.empty .icon svg { width: 22px; height: 22px; }
.empty h2, .empty h3 { margin-bottom: 8px; font-size: 22px; }
.empty p { color: var(--c-text-soft); max-width: 44ch; margin: 0 auto; }
.empty .btn { margin-top: 22px; }

.section--dark .empty { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.16); }
.section--dark .empty p { color: var(--c-dark-text-soft); }
.section--dark .empty .icon { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: var(--c-yellow); }

/* Artigo */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 72px; padding-block: clamp(40px, 5vw, 64px) clamp(56px, 7vw, 88px); }
.article__body { max-width: 720px; }
.article__lede { font-size: 20px; color: var(--c-text); line-height: 1.55; margin-bottom: 26px; font-weight: 500; }
.article__body p { font-size: 17px; line-height: 1.75; color: #1f2a3a; margin-bottom: 20px; }
.article__body h2 { font-size: 27px; margin: 38px 0 14px; }

.article__body blockquote {
  margin: 32px 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--c-yellow);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 21px;
  color: var(--c-navy);
}

.article__figure { margin: 0 0 30px; }
.article__figure figcaption { font-family: var(--ff-mono); font-size: 11px; color: var(--c-text-mute); margin-top: 10px; }
.article__aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: flex; flex-direction: column; gap: 28px; }

.article__aside h2 {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-soft);
  margin-bottom: 12px;
}

.article__share { display: flex; gap: 8px; }

.article__share a {
  width: 38px; height: 38px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-soft);
  transition: all 0.15s ease;
}

.article__share a:hover { color: var(--c-blue); border-color: var(--c-blue); }
.article__share svg { width: 16px; height: 16px; }

.related-list { display: flex; flex-direction: column; gap: 16px; }
.related-list a { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; align-items: center; }
.related-list .media { aspect-ratio: 1 / 1; border-radius: var(--r-sm); }
.related-list .t { font-family: var(--ff-display); font-weight: 700; font-size: 14px; line-height: 1.3; }
.related-list .d { font-family: var(--ff-mono); font-size: 10px; color: var(--c-text-mute); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px; }
.related-list a:hover .t { color: var(--c-blue); }

@media (max-width: 940px) {
  .article { grid-template-columns: 1fr; gap: 44px; }
  .article__aside { position: static; }
}

/* Calendário */
.cal-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cal-controls { display: flex; align-items: center; gap: 10px; }

.cal-controls a {
  width: 40px; height: 40px;
  border: 1px solid var(--c-line-strong);
  background: #fff;
  border-radius: 50%;
  color: var(--c-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cal-controls a:hover { border-color: var(--c-blue); color: var(--c-blue); }
.cal-controls svg { width: 16px; height: 16px; }
.cal-month { font-family: var(--ff-display); font-weight: 800; font-size: 21px; min-width: 210px; text-align: center; }

/* Ecrãs estreitos: as setas vão para as pontas e o mês ocupa o espaço entre
   elas, em vez de uma largura mínima fixa que transbordava a 320px. */
@media (max-width: 480px) {
  .cal-controls { width: 100%; justify-content: space-between; }
  .cal-month { min-width: 0; flex: 1; font-size: 18px; }
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-line);
  gap: 1px;
}

.calendar .dayhead {
  background: var(--c-bg-soft);
  padding: 11px 12px;
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--c-text-mute);
}

.calendar .cell {
  background: #fff;
  min-height: 104px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--ff-display);
}

.calendar .cell .n { font-weight: 700; font-size: 14px; color: var(--c-text); }
.calendar .cell.--out { background: var(--c-bg-soft); }
.calendar .cell.--out .n { color: var(--c-text-mute); opacity: 0.5; }

.calendar .cell.--today .n {
  background: var(--c-blue);
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.calendar .pill {
  background: rgba(13, 78, 166, 0.09);
  color: var(--c-blue);
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  display: block;
}

.calendar .pill:hover { background: var(--c-blue); color: #fff; }
.calendar .pill.--cancelled { background: var(--c-danger-bg); color: var(--c-danger); text-decoration: line-through; }

@media (max-width: 760px) {
  .calendar .cell { min-height: 62px; padding: 6px; }
  .calendar .cell .n { font-size: 11px; }
  .calendar .pill { font-size: 0; padding: 0; height: 6px; border-radius: 3px; background: var(--c-blue); }
  .calendar .dayhead { padding: 8px 4px; font-size: 9px; text-align: center; }
}

/* Faixa de chamada à ação */
.cta-strip { background: var(--c-navy); color: #fff; position: relative; overflow: hidden; }

.cta-strip::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(13, 78, 166, 0.55), transparent 62%);
}

.cta-strip__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 52px;
  align-items: center;
  padding: clamp(48px, 6.5vw, 92px) 0;
}

.cta-strip h2 { color: #fff; font-size: clamp(30px, 3.8vw, 52px); max-width: 16ch; }
.cta-strip p { color: var(--c-dark-text-soft); margin-top: 14px; font-size: 17px; max-width: 50ch; }
.cta-strip__actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 760px) { .cta-strip__inner { grid-template-columns: 1fr; gap: 26px; } }

/* Horários de treino */
.training-list { display: grid; gap: 12px; }

.training-item {
  display: grid;
  grid-template-columns: 118px auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: #fff;
}

.training-item .day { font-family: var(--ff-display); font-weight: 700; font-size: 15px; text-transform: capitalize; }
.training-item .hours { font-family: var(--ff-mono); font-weight: 600; font-size: 15px; color: var(--c-blue); }
.training-item .place { color: var(--c-text-soft); font-size: 14.5px; }
.training-item .note { display: block; color: var(--c-text-mute); font-size: 13px; margin-top: 3px; }

.section--dark .training-item { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.14); }
.section--dark .training-item .day { color: #fff; }
.section--dark .training-item .hours { color: var(--c-yellow); }
.section--dark .training-item .place { color: var(--c-dark-text-soft); }
.section--dark .training-item .note { color: var(--c-dark-text-soft); opacity: 0.8; }

@media (max-width: 700px) {
  .training-item { grid-template-columns: 1fr; gap: 4px; padding: 15px 16px; }
}

/* Parceiros */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.partner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 148px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.partner:hover { border-color: var(--c-line-strong); box-shadow: var(--sh-2); }
.partner img { max-height: 62px; width: auto; object-fit: contain; }
.partner__name { font-family: var(--ff-display); font-weight: 700; font-size: 15px; }
.partner__desc { color: var(--c-text-soft); font-size: 13.5px; }

.partner--principal { min-height: 200px; }
.partner--principal img { max-height: 96px; }

.partner-tier + .partner-tier { margin-top: 44px; }

.partner-tier__label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-tier__label::after { content: ''; flex: 1; height: 1px; background: var(--c-line); }

/* Blocos de texto institucional */
.prose { max-width: 68ch; }
.prose p { font-size: 17px; line-height: 1.75; color: var(--c-text-soft); margin-bottom: 18px; }
.prose h2 { font-size: 27px; margin: 34px 0 14px; color: var(--c-text); }
.prose blockquote { margin: 28px 0; padding-left: 20px; border-left: 3px solid var(--c-yellow); font-family: var(--ff-display); font-weight: 600; font-size: 20px; color: var(--c-navy); }
.prose ul { padding-left: 20px; margin: 0 0 18px; color: var(--c-text-soft); font-size: 16.5px; line-height: 1.75; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 3px; }

/* Acordeão (Guia para Pais) */
.accordion { border-top: 1px solid var(--c-line); }
.accordion__item { border-bottom: 1px solid var(--c-line); }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  padding: 22px 4px;
  background: none;
  border: 0;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--c-text);
}

.accordion__trigger:hover { color: var(--c-blue); }
.accordion__trigger svg { width: 18px; height: 18px; flex: none; color: var(--c-blue); transition: transform 0.2s ease; }
.accordion__trigger[aria-expanded='true'] svg { transform: rotate(45deg); }
.accordion__panel { padding: 0 4px 24px; max-width: 76ch; }
.accordion__panel p { color: var(--c-text-soft); font-size: 16px; line-height: 1.7; margin-bottom: 12px; }
.accordion__panel ul { padding-left: 20px; color: var(--c-text-soft); font-size: 16px; line-height: 1.7; }
.accordion__panel[hidden] { display: none; }

/* Faixa de números — só é usada quando existem dados reais. */
.stats-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.stats-band .cell { background: #fff; padding: 26px 26px 30px; }
.stats-band .num { font-family: var(--ff-display); font-weight: 800; font-size: clamp(32px, 3.6vw, 50px); letter-spacing: -0.02em; color: var(--c-blue); line-height: 1; }
.stats-band .lbl { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-text-mute); margin-top: 11px; }

/* Split de conteúdo com imagem */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split__copy { display: flex; flex-direction: column; gap: 16px; }
.split--reverse .split__media { order: 2; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* Cartão de informação (contactos) */
.info-card { border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 26px; background: #fff; display: flex; flex-direction: column; gap: 16px; }
.info-card h2 { font-size: 20px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--c-text-soft); }
.info-row svg { width: 18px; height: 18px; color: var(--c-blue); flex: none; margin-top: 2px; }
.info-row a:hover { color: var(--c-blue); }
/* Quando um contacto ainda nao foi publicado, dize-lo e melhor do que
   deixar o cartao quase vazio. Ver page-contactos.php. */
.info-note { margin: 0; font-size: 15px; line-height: 1.55; color: var(--c-text-soft); }

/* 11. Formulários --------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }

.field > label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--c-text-soft);
}

.field .optional { text-transform: none; letter-spacing: 0; color: var(--c-text-mute); }

.field input,
.field textarea,
.field select {
  font: inherit;
  font-family: var(--ff-body);
  padding: 13px 15px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--c-text);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(13, 78, 166, 0.14);
}

.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: 13px; color: var(--c-text-mute); }

.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: var(--c-danger); }

.field .error {
  font-size: 13px;
  color: var(--c-danger);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field .error::before { content: '!'; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--c-danger); color: #fff; font-size: 10px; font-weight: 700; flex: none; }

.field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--c-blue); }
.field--check label { font-family: var(--ff-body); font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--c-text-soft); }
.field--check a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 2px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .row-2 { grid-template-columns: 1fr; } }

/* Honeypot: fora do ecrã, invisível e ignorado por leitores de ecrã. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}

.alert {
  padding: 16px 18px;
  border-radius: var(--r-md);
  font-size: 15px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid transparent;
}

.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert--success { background: var(--c-success-bg); color: #0b5c3a; border-color: rgba(15, 122, 77, 0.24); }
.alert--error { background: var(--c-danger-bg); color: #8c2018; border-color: rgba(180, 35, 24, 0.22); }
.alert strong { display: block; font-family: var(--ff-display); margin-bottom: 2px; }

.form-card {
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3.5vw, 40px);
  background: #fff;
  box-shadow: var(--sh-2);
}

/* 12. Páginas específicas ------------------------------------------------- */

.notfound {
  min-height: 68vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(56px, 8vw, 96px) 20px;
  background: radial-gradient(62% 62% at 50% 18%, rgba(13, 78, 166, 0.08), transparent 62%), var(--c-bg);
}

.notfound__code {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(104px, 20vw, 240px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--c-blue) 0%, var(--c-navy) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound h1 { font-size: clamp(26px, 3vw, 38px); margin-top: 6px; }
.notfound p { color: var(--c-text-soft); max-width: 46ch; margin: 16px auto 26px; font-size: 17px; }
.notfound__links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Perfil de atleta */
.profile { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; padding-block: clamp(40px, 5vw, 64px) clamp(48px, 6vw, 80px); }
.profile__photo { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--c-line); }
.profile__photo .media { aspect-ratio: 4 / 5; }
.profile__facts { display: grid; gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; margin-top: 26px; }
.profile__fact { background: #fff; padding: 18px 22px; }
.profile__fact .k { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-text-mute); }
.profile__fact .v { font-family: var(--ff-display); font-weight: 700; font-size: 17px; margin-top: 5px; }

@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } }

/* Lista de competições vindas da Lane: provas e prazo. */
.event__body .event__provas { font-size: 13.5px; }
.event__body .event__provas svg { color: var(--c-text-mute); }
.event__deadline {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-blue);
}
.event__cta { flex-wrap: wrap; justify-content: flex-end; }

/* 13-A. Responsive fino ---------------------------------------------------
   Correções de implementação, sem mudar o desenho: nada sai da largura do
   ecrã, os botões longos quebram linha em vez de empurrar a página, e as
   margens respeitam as zonas seguras dos iPhone. */

/* overflow-x: clip não existe no Safari anterior ao 16: aí a rede de
   segurança contra scroll horizontal não funcionava. */
@supports not (overflow: clip) {
  .site-main { overflow-x: hidden; }
}

.container {
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
}

/* Texto editorial: um URL ou uma palavra muito longa nunca rompe a coluna. */
.article__body,
.prose,
.page-intro h1,
.news-card h3,
.event__body h3,
.site-footer li,
.site-footer a,
.crumbs { overflow-wrap: anywhere; }

.article__body iframe,
.article__body video,
.article__body embed,
.article__body object,
.article__body table { max-width: 100%; }

.site-footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

.mobile-menu {
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
}

@media (max-width: 760px) {
  .event { padding: 18px 16px; }
  .event__cta { justify-content: flex-start; }
  .cta-strip__actions,
  .cta-strip__inner > .btn { width: 100%; }
}

@media (max-width: 560px) {
  :root { --pad-x: 18px; }

  /* Botões com texto comprido ("Entrar na Área Pais/Atletas") passam a
     poder quebrar linha e nunca excedem a largura disponível. */
  .btn { white-space: normal; max-width: 100%; }

  .section-head .btn,
  .cta-strip .btn,
  .hero__ctas .btn { width: 100%; }

  .hero h1 { font-size: clamp(40px, 12vw, 56px); }
  .page-intro h1 { font-size: clamp(30px, 9vw, 40px); }

  .site-footer__grid { gap: 30px; }
  .site-footer__mark { width: 300px; right: -90px; bottom: -90px; }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 40px;
    letter-spacing: 0.08em;
  }

  .site-footer__bottom > span { line-height: 1.7; }

  .article { gap: 36px; }
  .article__body p { font-size: 16px; }
  .article__lede { font-size: 18px; }

  .event { grid-template-columns: 58px minmax(0, 1fr); gap: 14px; }
  .event__date { padding: 10px 0; }
  .event__date .day { font-size: 21px; }
}

@media (max-width: 360px) {
  :root { --pad-x: 16px; }
  .site-header__actions { gap: 6px; }
  .btn { padding: 13px 18px; }
}

/* 13. Acessibilidade e movimento reduzido --------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* A intro nunca é reproduzida com movimento reduzido. */
  .intro { display: none !important; }
  .intro-active .site-header__logo img,
  .intro-active .site-header__nav,
  .intro-active .site-header__actions,
  .intro-active .site-header__burger { opacity: 1; }

  .gallery-grid .tile:hover img { transform: none; }
}

@media print {
  .site-header, .site-footer, .mobile-menu, .intro, .cta-strip, .quickbar { display: none !important; }
  body { color: #000; }
  a { text-decoration: underline; }
}
