/* =============================================================
   style.css — XXXIX Torneio Internacional Futebol Infantil
   Design System alinhado com a landing page
============================================================= */

/* ── Design System — Tokens ─────────────────────────────────── */
:root {
  /* Paleta principal (espelha a landing page) */
  --club-blue:        #0026a3;
  --club-dark:        #001470;
  --club-deeper:      #000d40;
  --club-light:       #e8edff;
  --club-glow:        rgba(0, 100, 255, 0.40);

  /* Paleta de suporte */
  --gold:             #f4c430;
  --gold-dark:        #c89a10;
  --white:            #ffffff;
  --off-white:        #f0f3ff;

  /* Glassmorphism */
  --glass-bg:         rgba(255, 255, 255, 0.06);
  --glass-bg-strong:  rgba(255, 255, 255, 0.11);
  --glass-border:     rgba(255, 255, 255, 0.14);
  --glass-border-strong: rgba(255, 255, 255, 0.22);

  /* Estados semânticos */
  --success:          #22c55e;
  --success-bg:       rgba(34, 197, 94, 0.15);
  --warning:          #f59e0b;
  --warning-bg:       rgba(245, 158, 11, 0.15);
  --error:            #ef4444;
  --error-bg:         rgba(239, 68, 68, 0.15);
  --neutral-dim:      rgba(255, 255, 255, 0.45);
  --neutral-faint:    rgba(255, 255, 255, 0.20);
  --neutral-line:     rgba(255, 255, 255, 0.10);

  /* Tipografia */
  --font:             'Montserrat', 'Segoe UI', sans-serif;

  /* Espaçamentos */
  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:   16px;
  --sp-lg:   24px;
  --sp-xl:   36px;
  --sp-2xl:  52px;

  /* Raios */
  --r-sm:    8px;
  --r-md:    14px;
  --r-lg:    20px;
  --r-pill:  999px;

  /* Sombras */
  --shadow-sm:   0 2px 8px  rgba(0, 0, 0, 0.25);
  --shadow-md:   0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg:   0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 28px rgba(0, 100, 255, 0.40);

  /* Transições */
  --ease: 0.28s cubic-bezier(.4, 0, .2, 1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  background-color: var(--club-deeper);
  color: var(--white);
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;

  /* Atmospheric background — espelha a landing page */
  background-image:
    radial-gradient(ellipse at 70% 10%,  rgba(0, 80, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 80%,  rgba(0, 20, 120, 0.35) 0%, transparent 55%),
    repeating-linear-gradient(
      0deg, transparent, transparent 56px,
      rgba(255,255,255,0.018) 56px, rgba(255,255,255,0.018) 58px
    ),
    repeating-linear-gradient(
      90deg, transparent, transparent 56px,
      rgba(255,255,255,0.018) 56px, rgba(255,255,255,0.018) 58px
    ),
    linear-gradient(160deg, #001a7a 0%, #000d40 60%, #000820 100%);
  background-attachment: fixed;
}

/* ── Escala Tipográfica ─────────────────────────────────────── */
h1, h2, h3, h4 {
  color: var(--white);
  text-align: center;
  padding-top: var(--sp-sm);
  padding-bottom: var(--sp-sm);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(20px, 5vw, 28px); }
h2 { font-size: clamp(17px, 4vw, 22px); }
h3 { font-size: clamp(14px, 3.5vw, 18px); }

p {
  padding-top: var(--sp-sm);
  text-align: center;
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
}

/* Classes de tipografia (mantidas para compatibilidade com o JS) */
.header-1   { font-size: 20px; line-height: 26px; font-weight: 700; }
.header-2   { font-size: 22px; line-height: 26px; font-weight: 700; }
.body-text-1 { font-size: 18px; line-height: 21px; }
.body-text-2 { font-size: 18px; line-height: 24px; }
.body-text-3 { font-size: 18px; line-height: 24px; }
.body-text-4 { font-size: 16px; line-height: 24px; }
.body-text-5 { font-size: 14px; line-height: 21px; }
.body-text-6 { font-size: 13px; line-height: 15px; }
.body-text-7 { font-size: 12px; line-height: 14px; font-weight: 600; }
.micro-text  { font-size: 10px; line-height: 12px; }
.no-kern { font-feature-settings: 'kern' off; }

/* Gradiente de boas-vindas */
.Welkom {
  background: linear-gradient(90deg, #60c6ff 0%, #7fffb2 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Header & Navegação ─────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 20, 112, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--sp-md) var(--sp-md) var(--sp-sm);
  text-align: center;
  transition: padding var(--ease), background var(--ease), box-shadow var(--ease);
}

header.sticky {
  background: rgba(0, 15, 80, 0.92);
  box-shadow: var(--shadow-md);
}

.logo {
  display: block;
  margin: 0 auto var(--sp-md);
  max-width: 45vh;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 80, 255, 0.45));
  transition: max-width var(--ease), filter var(--ease);
}

header.sticky .logo {
  max-width: 18vh;
  filter: drop-shadow(0 2px 8px rgba(0, 80, 255, 0.35));
}

/* Navegação */
nav { margin-top: var(--sp-sm); }

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  gap: var(--sp-xs);
}

nav a {
  display: block;
  padding: 6px 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--ease), color var(--ease),
              border-color var(--ease), transform var(--ease);
}

nav a:hover,
nav a:focus {
  background: var(--gold);
  color: var(--club-dark);
  border-color: var(--gold);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  nav a { font-size: 10px; padding: 5px 9px; }
}

/* ── Layout Principal ───────────────────────────────────────── */
main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-md);
}

main section {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--neutral-line);
}

/* ── Section Label (substituição do border-top simples) ─────── */
main section > h2:first-child,
main section > h3:first-child {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: var(--sp-md);
}

/* ── Pill Label para secções ────────────────────────────────── */
.section-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--club-blue);
  background: var(--gold);
  padding: 4px 14px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-sm);
}

/* ── Tabelas ────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--sp-md);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

table th,
table td {
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  border-bottom: 1px solid var(--neutral-line);
}

table th {
  background: var(--gold);
  color: var(--club-dark);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

table td { color: rgba(255,255,255,0.88); }

table tr:last-child td { border-bottom: none; }

table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04);
}

table tr:hover td {
  background: rgba(255, 255, 255, 0.09);
}

/* Primeira linha da classificação com destaque gold */
#tabela-classificacao table tr:nth-child(2) td {
  color: var(--gold);
  font-weight: 700;
}

#tabela-classificacao h3 {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: var(--sp-xs) var(--sp-md);
  margin: var(--sp-md) auto var(--sp-xs);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#tabela-final-geral td { font-size: 13px; }

/* ── Bloco de Jogo ──────────────────────────────────────────── */
.jogo-bloco {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  margin: var(--sp-sm) 0;
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (hover: hover) {
  .jogo-bloco:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
}

.jogo-cabecalho {
  background: linear-gradient(90deg, var(--club-blue) 0%, #0039d0 100%);
  border-bottom: 1px solid var(--glass-border);
  color: rgba(255,255,255,0.90);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  padding: var(--sp-xs) var(--sp-md);
}

/* Badge AO VIVO no cabeçalho — removido; o estado aparece sempre por baixo do resultado */

.jogo-conteudo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-md);
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.jogo-conteudo .equipa {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-weight: 700;
  color: var(--white);
  width: 30%;
}

.jogo-conteudo .equipa img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: var(--sp-xs);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}

.jogo-conteudo .vs {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  text-align: center;
  width: 30%;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Estado AO VIVO / Terminado */
.status-jogo {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}

.status-jogo.terminado {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--neutral-dim);
}

.status-jogo.ao-vivo {
  background: var(--error-bg);
  border: 1px solid var(--error);
  color: var(--error);
  animation: piscar-opacidade 1.5s infinite;
}

/* ── Equipas ────────────────────────────────────────────────── */
#lista-equipas {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
}

.bloco-serie {
  width: 100%;
  padding: var(--sp-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bloco-serie h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-dim);
  margin-bottom: var(--sp-md);
}

.grupo-equipas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-sm);
  list-style: none;
  padding: 0;
}

@media (min-width: 480px) {
  .grupo-equipas { grid-template-columns: repeat(4, 1fr); }
}

.grupo-equipas li {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xs);
  font-weight: 600;
  font-size: 11px;
  color: rgba(255,255,255,0.88);
  text-align: center;
  transition: transform var(--ease), background var(--ease);
}

@media (hover: hover) {
  .grupo-equipas li:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.14);
  }
}

.grupo-equipas li img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.50));
}

/* ── Estatísticas ───────────────────────────────────────────── */
#estatisticas-gerais {
  width: 100%;
  padding: var(--sp-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#estatisticas-gerais h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--club-dark);
  background: var(--gold);
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--r-sm);
  margin: var(--sp-md) 0 var(--sp-sm);
}

#estatisticas-gerais ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

#estatisticas-gerais li {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--white);
  padding: 12px var(--sp-md);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

#estatisticas-gerais li strong {
  font-weight: 700;
  color: var(--gold);
  margin-right: var(--sp-xs);
}

@media (max-width: 600px) {
  #estatisticas-gerais li {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Prémios ────────────────────────────────────────────────── */
#lista-premios {
  width: 100%;
  padding: var(--sp-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#lista-premios ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

#lista-premios li {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--white);
  padding: 12px var(--sp-md);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

#lista-premios li strong {
  font-weight: 700;
  color: var(--gold);
  margin-right: var(--sp-xs);
}

/* Quando o vencedor ainda não está definido */
#lista-premios li:not(:has(strong + *:not(:empty))) {
  opacity: 0.6;
}

@media (max-width: 600px) {
  #lista-premios li {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Calendário ─────────────────────────────────────────────── */
#calendario { text-align: center; }

#calendario h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--neutral-dim);
  margin-top: var(--sp-md);
  margin-bottom: var(--sp-xs);
}

.lista-calendario {
  list-style: none;
  padding: 0;
  margin: var(--sp-sm) 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.lista-calendario li {
  padding: 11px var(--sp-md);
  border-bottom: 1px solid var(--neutral-line);
  font-weight: 500;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.lista-calendario li:last-child { border-bottom: none; }

.lista-calendario li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--club-blue);
  flex-shrink: 0;
}

.lista-calendario li.pausa {
  font-style: italic;
  color: var(--neutral-dim);
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lista-calendario li.pausa::before { display: none; }

.lista-calendario li.cerimonia {
  font-weight: 800;
  color: var(--club-dark);
  background: var(--gold);
  justify-content: center;
  letter-spacing: 0.04em;
  border-bottom: none;
}

.lista-calendario li.cerimonia::before { display: none; }

/* ── Texto de Boas-vindas / Intro ───────────────────────────── */
#intro p {
  max-width: 600px;
  margin: var(--sp-sm) auto;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
}

/* ── Rodapé ─────────────────────────────────────────────────── */
footer {
  text-align: center;
  margin-top: var(--sp-2xl);
  padding: var(--sp-lg) var(--sp-md);
  background: rgba(0, 10, 50, 0.65);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.40);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.footer-info,
.footer-dev {
  margin-bottom: var(--sp-xs);
}

.footer-dev a,
footer a {
  color: rgba(255,255,255,0.60);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--ease);
}

.footer-dev a:hover { color: var(--gold); }
.developed { font-weight: 300; }

/* ── Animações ──────────────────────────────────────────────── */
@keyframes piscar-fundo {
  0%, 100% { background-color: var(--error); }
  50%       { background-color: #b91c1c; }
}

@keyframes piscar-opacidade {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1; }
}

/* ── Scroll Reveal (para main.js reutilizar) ─────────────────── */
.reveal-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}


a {
  color: var(--off-white);
  text-decoration: none;
}

a:hover {
  color: var(--warning);
}