
/* Estilo mobile first */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #0e364f;
  color: white;
}

header {
  background-image: url('../images/header-1.png');
  background-size: cover;
  background-position: center;
  height: 120px;
  width: 100%;
}

@media only screen and (min-width: 960px) {
    header {
    height: 500px;
    width: 100%;
  }
}

nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(33, 63, 145, 0.71);
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav ul li a {
  display: block;
  padding: 1em;
  text-decoration: none;
  color: #f4e736;
  font-weight: bold;
}

@media (max-width: 767px) {
  nav ul {
    display: none;
  }
}

section {
  padding: 1em;
  border-bottom: 1px solid #213f91;
}

h1, h2 {
  color: #f4e736;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  background-color: #213f91;
}

th, td {
  padding: 0.5em;
  text-align: center;
  border: 1px solid #f4e736;
}

#lista-equipas img, .equipa-logo {
  height: 24px;
  vertical-align: middle;
  margin-right: 6px;
}

.logo-equipa {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: middle;
}

.equipa {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* Secção de equipas estilo cartaz */
#lista-equipas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1em;
  justify-items: center;
  align-items: center;
  padding: 1em 0;
}

/* Grelha de equipas */
.grelha-equipas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

/* Cartão individual da equipa */
.cartao-equipa {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100px;
}

/* Logótipo grande */
.logo-grande {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 0.8em;
  display: block;
}

/* Nome da equipa */
.nome-equipa {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9em;
  color: white;
  text-align: center;
  margin: 0;
}


.jornada {
  margin-bottom: 2em;
}

.tabela-jogos {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.linha-jogo-grelha {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  background-color: #1c2b40;
  padding: 0.5em;
  border-radius: 6px;
}

.jogo-hora {
  font-size: 0.9em;
  color: #ccc;
}

.jogo-equipas {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  padding-left: 2em;
}

.jogo-equipas div {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.jogo-resultado {
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
}

.live {
  display: inline-block;
  background-color: red;
  color: white;
  font-size: 0.75em;
  padding: 0.2em 0.5em;
  margin-left: 0.5em;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
}

.intervalo {
  display: inline-block;
  background-color: orange;
  color: white;
  font-size: 0.75em;
  padding: 0.2em 0.5em;
  margin-left: 0.5em;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
}

.fase {
  margin-bottom: 2em;
}

.fase h3 {
  color: #f4e736;
  margin-bottom: 0.5em;
}

.fase .data {
  font-weight: normal;
  font-size: 0.9em;
  color: #ccc;
}

.fase p {
  margin: 0.3em 0;
}

#lista-calendario {
  padding: 1em;
  border-radius: 6px;
  margin-top: 1em;
}

@media (min-width: 768px) {
  nav ul {
    justify-content: center;
  }

  nav ul li a {
    padding: 1em 2em;
  }

  section {
    max-width: 800px;
    margin: 0 auto;
  }

  .equipas {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Scroll horizontal em ecrãs pequenos */
.tabela-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tabela com largura mínima para evitar colapso */
.tabela-scroll table {
  min-width: 600px;
  width: 100%;
  border-collapse: collapse;
  background-color: #213f91;
  margin-top: 1em;
}

.tabela-scroll th, .tabela-scroll td {
  padding: 0.5em;
  text-align: center;
  border: 1px solid #f4e736;
  color: white;
  font-size: 0.9em;
}

#marcadores table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  background-color: #213f91;
}

#marcadores th, #marcadores td {
  padding: 0.5em;
  text-align: center;
  border: 1px solid #f4e736;
  color: white;
}


/* =============================
   Rodapé
============================= */
footer {
  text-align: center;
  margin: 3rem -1rem -1rem;
  padding: 1rem;
  background-color: #061824;
  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;
}

.meias-finais {
  background-color: #4974a5;
  color: #fff;
}

.finais {
  background-color: #2B401C;
  color: #fff;
}

#classificacao-final table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  background-color: #213f91;
}

#classificacao-final th,
#classificacao-final td {
  padding: 0.5em;
  text-align: center;
  border: 1px solid #f4e736;
  color: white;
}

/* OPC */

.ver-mais {
  margin-top: 10px;
  padding: 6px 12px;
  background-color: #002c57;
  color: white;
  border: 1px solid #ffe600;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
}

.ver-mais:hover {
  background-color: #004080;
}

.tabela-marcadores-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

