/* =============================
   Variáveis de Cores
============================= */
:root {
  --azul-escuro: #213f91;
  --azul-meio: #0e364f;
  --amarelo: #f4e736;
  --preto: #000000;
}

/* =============================
   Reset e Estilo Base
============================= */
html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: #fff;
  color: var(--azul-meio);
  padding: 1rem;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  color: var(--azul-escuro);
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

p {
  padding-top: 10px;
  text-align: center;
}


/* =============================
   Cabeçalho e Navegação
============================= */
header {
  background-color: var(--azul-escuro);
  transition: background-color 0.3s ease, padding 0.3s ease;
  color: white;
  padding: 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  margin: -1rem;
}
.logo {
  display: block;
  margin: 0 auto 1rem auto; 
  max-width: 45vh;
  height: auto;
  transition: max-width 0.3s ease;
}
/* Tamanho reduzido quando o header estiver "activo" */
header.sticky .logo {
  max-width: 20vh;
}

header.sticky {
  background-color: rgba(33, 63, 145, 0.8);
}

nav {
  margin-top: 1rem;
  /* background-color: var(--azul-escuro); */
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

nav li {
  margin: 0.25rem;
}

nav a {
  display: block;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: white;
  background-color: var(--azul-meio);
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.3s ease;
}

@media (max-width: 600px) {
  nav a {
  font-size: small;
  font-weight: 400;
}
}

nav a:hover,
nav a:focus {
  background-color: var(--amarelo);
  color: var(--azul-escuro);
}

/* =============================
   Conteúdo Principal
============================= */
main {
  width: 100%;
}

main section {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid var(--azul-escuro);
  border-radius: 0.5rem;
}

/* =============================
   Tabelas
============================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

table th, table td {
  border: 1px solid var(--azul-escuro);
  padding: 0.5rem;
  text-align: center;
}
@media (max-width: 600px) {
  table th, table td {
  padding: 0.2rem;
}
}

table th {
  background-color: var(--amarelo);
  color: var(--azul-escuro);
}

/* =============================
   Secção de Jogos
============================= */
.jogo-bloco {
  border: 2px solid var(--azul-escuro);
  margin: 1rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f9f9f9;
}

.jogo-cabecalho {
  background: var(--amarelo);
  color: var(--azul-escuro);
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

.jogo-conteudo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  /* gap: 1rem; */
  flex-wrap: wrap;
  background-color: white;
}

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

.jogo-conteudo .equipa img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 0.3rem;
}

.jogo-conteudo .vs {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--preto);
  text-align: center;
  width: 30%;
}

/* =============================
   Secção de Equipas
============================= */
#equipas {
  margin-top: 2rem;
  text-align: center;
  /* margin-top: 2rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center; */
}

#equipas h2 {
  margin-bottom: 1rem;
}


/* =============================
   Secção de Calendário
============================= */
#calendario {
  margin-top: 2rem;
  text-align: center;
}

#calendario h3 {
  margin-top: 2rem;
  color: var(--azul-escuro);
}

.lista-calendario {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  text-align: center;
}

.lista-calendario li {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #ddd;
  font-weight: 500;
}

.lista-calendario li.pausa {
  font-style: italic;
  color: grey;
  text-align: center;
}

.lista-calendario li.cerimonia {
  font-weight: bold;
  color: var(--azul-escuro);
  background-color: var(--amarelo);
  padding: 0.8rem;
  border-radius: 5px;
  text-align: center;
  margin-top: 1rem;
}

/* =============================
   Rodapé
============================= */
footer {
  text-align: center;
  margin: 3rem -1rem -1rem;
  padding: 1rem;
  background-color: var(--azul-escuro);
  color: white;
}
footer a {
  color: white;
  text-decoration: none;
  font-weight: 100;
  font-size: 1rem;
}
.developed {
  font-weight: 200;
  font-size: 0.8rem;
}

.footer-info,
.footer-dev {
  margin-bottom: 10px;
}

.footer-dev a {
  color: white;
  text-decoration: none;
}

.footer-dev a:hover {
  text-decoration: underline;
}

/* Efeito de destaque ao vivo */
.marcador-ao-vivo {
  margin-left: 1rem;
  font-weight: bold;
  color: white;
  background-color: red;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  animation: piscar 1s infinite;
}

@keyframes piscar {
  0%, 100% { background-color: red; }
  50% { background-color: var(--amarelo); }
}

.jogo-cabecalho {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.jogo-cabecalho .marcador-ao-vivo {
  margin-left: auto;
  font-weight: bold;
  color: white;
  background-color: red;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  animation: piscar 1s infinite;
}

/**/

/* Container externo de equipas */
#lista-equipas {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cada série (Série A, Série B) */
.bloco-serie {
  width: 100%;
  max-width: 960px;
  margin: 2rem auto;
  padding: 1rem;
  box-sizing: border-box;
  border: 1px solid var(--azul-escuro);
  border-radius: 0.5rem;
  background-color: #fff;
}

/* Título da série */
.bloco-serie h3 {
  text-align: center;
  font-size: 1.4rem;
  color: var(--azul-escuro);
  margin-bottom: 1rem;
}

/* Grelha de equipas */
.grupo-equipas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Em desktop: 4 por linha */
@media (min-width: 768px) {
  .grupo-equipas {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Cartão de equipa */
.grupo-equipas li {
  background-color: var(--azul-escuro);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 500;
  min-height: 140px;
  transition: transform 0.2s ease;
}

.grupo-equipas li img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

#estatisticas-gerais {
  text-align: center;
}

#estatisticas-gerais ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: inline-block;
  text-align: left;
}

#estatisticas-gerais li {
  margin-bottom: 0.5em;
}
/* =============================
   Estatísticas e Marcadores (Upgrade Visual)
============================= */

#estatisticas-gerais {
  max-width: 960px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#estatisticas-gerais h3 {
  text-align: center;
  font-size: 1.4rem;
  color: var(--azul-escuro);
  background-color: var(--amarelo);
  padding: 0.5rem;
  border-radius: 6px;
  margin: 1rem 0;
}

#estatisticas-gerais ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#estatisticas-gerais li {
  background-color: var(--azul-escuro);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

#estatisticas-gerais li strong {
  font-weight: 300;
  margin-right: 0.5rem;
}

@media (max-width: 600px) {
  #estatisticas-gerais li {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* PREMIOS*/
#lista-premios {
  max-width: 960px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#lista-premios h3 {
  text-align: center;
  font-size: 1.4rem;
  color: var(--azul-escuro);
  background-color: var(--amarelo);
  padding: 0.5rem;
  border-radius: 6px;
  margin: 1rem 0;
}

#lista-premios ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#lista-premios li {
  background-color: var(--azul-escuro);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

#lista-premios li strong {
  font-weight: 300;
  margin-right: 0.5rem;
}

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

