@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #001224;
}

::-webkit-scrollbar-thumb {
  background: #4070f4;
  border-radius: 10px;
}

:root {
  --card-height: 300px;
  --card-width: calc(var(--card-height) / 1.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins';
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 85px;
  background: #000611;
  color: white;
  padding: 18px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease-in-out;
  overflow: hidden;
  z-index: 999;
}

.sidebar:hover {
  width: 250px;
}

.sidebar:hover .logo_closed {
  display: none;
}

.sidebar:hover .logo_open {
  display: flex;
  opacity: 1;
  transition: 0.4s ease-in-out;
}

.logo_items {
  gap: 8px;
  transition: 1s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav_image {
  display: flex;
  width: 50px;
  justify-content: center;
  transition: 0.4s ease-in-out;
}

.logo_closed {
  width: 50px;
  transition: 0.4s ease-in-out;
}

.logo_open {
  opacity: 0;
  display: none;
  width: 150px;
  transition: 0.4s ease-in-out;
}

.menu_container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 30px;
  overflow-y: auto;
  transition: 1s ease-in-out;
}

.menu_container::-webkit-scrollbar {
  display: none;
}

.flex {
  display: flex;
  align-items: center;
}

.item {
  list-style: none;
}

.link {
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 7.5px;
  color: white;
}

.link:hover {
  color: #fff;
  background: linear-gradient(180deg, #13326E, #264FAB, #4077FF);
  animation: animacao_link 0.1s ease-in-out;
}

@keyframes animacao_link {
  0% {
    background: linear-gradient(180deg, #13316e7a, #264eab73, #4076ff6e);
  }

  100% {
    background: linear-gradient(180deg, #13326E, #264FAB, #4077FF);
  }

}

.link span {
  white-space: nowrap;

}

.link i {
  height: 60px;
  min-width: 50px;
  display: flex;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}


body {
  background: linear-gradient(to bottom, #091D3F, #091D3F, #0B2550, #091D3F, #0A2148, #0A2148);
  color: white;
  margin-left: 85px;
}


#BANNER_RANKING {
  display: flex;
  width: 100%;
  object-fit: cover;
  background: linear-gradient(360deg, #001f3f, #00356d);
  box-shadow: 3px 3px 25px black;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

.intro {
  margin-bottom: 50px;
  font-size: 1.6em;
  text-align: center;
  margin-top: 50px;
}

.ranking-table {
  display: flex;
  justify-content: center;
}

#titulo {
  color: white;
  text-align: center;
  font-size: 40px;
  margin-top: 20px;
  margin-bottom: 20px;
}

#tabela-geral,
#tabela-geral-completa {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 40px;
}

table {
  width: 90%;
  max-width: 950px;
  margin: 20px;
  border-collapse: collapse;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

th,
td {
  border: none;
  padding: 15px;
  text-align: center;
  font-size: 1em;
}

th {
  background-color: #0056b3;
  color: white;
  font-size: 1.0em;
  text-transform: uppercase;
  letter-spacing: 1px;
}


tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.1);
}

#ranking-geral {
  display: flex;
  justify-content: center;
  align-items: center;
}

#intro-ranking {
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;

}

.containerRanking {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: -20px;
  padding: 40px;
  width: 1150px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 2px solid #0066d3;
  box-shadow: 0px 0px 15px rgba(0, 102, 211, 0.7);
}

#sloganranking h1 {
  color: white;
  text-align: center;
  margin: 10px 0;
  font-size: 40px;
  margin-bottom: 30px;
}

#sloganranking p {
  color: white;
  text-align: left;
  justify-content: left;
  align-items: left;
  margin: 10px 0;
  font-size: 20px;
}

.filtro-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin: 30px auto;
  padding: 20px;
  background-color: #002c56;
  border-radius: 12px;
  max-width: 670px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid white;
}

.filtro-form label {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.filtro-form select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.filtro-form select:focus {
  border-color: #007bff;
  outline: none;
}

.filtro-form button {
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.filtro-form button:hover {
  background-color: #0056b3;
}

.info-ranking {
  text-align: center;
  margin: 20px 0;
  color: white;
}

.info-ranking h2 {
  font-size: 2em;
  font-weight: bold;
}

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: white;
  color: #002c56;
  border: none;
  border-radius: 50%;
  font-size: 35px;
  cursor: pointer;
  opacity: 0.8;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-90deg);
  padding-bottom: 3px;
  border: 1px solid #002c56;
}

#backToTop:hover {
  opacity: 1;
  transform: scale(1.1) rotate(-90deg);
}

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: white;
  color: #002c56;
  border: none;
  border-radius: 50%;
  font-size: 35px;
  cursor: pointer;
  opacity: 0.8;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-90deg);
  padding-bottom: 3px;
  border: 1px solid #002c56;
}

#backToTop:hover {
  opacity: 1;
  transform: scale(1.1) rotate(-90deg);
}

@media screen and (max-width: 1100px) {
  .navbar {
    left: 65%;
  }
}

@media screen and (max-width: 800px) {
  .sidebar {
    left: 0;
    z-index: 1000;
  }

  .sidebar.close {
    left: -100%;
  }

  #sidebar-close {
    display: block;
  }

  #lock-icon {
    display: none;
  }

  .navbar {
    left: 0;
    max-width: 100%;
    transform: translateX(0%);
  }

  #sidebar-open {
    display: block;
  }
}
#top3-ultima-edicao {
  margin-top: 20px;
  margin-left: 50px;
  margin-right: auto;
  align-items: center;
}
#top3-ultima-edicao h2 {
  font-size: 2.4em;
  font-weight: bold;
  text-align: center;
  margin: 14px 0;
}

.cards-info-2 {
  display: flex;
  flex-wrap: wrap;
  overflow-y: auto;
}

.cards-info-2 #container {
  width: 380px;
  height: 230px;
  border-radius: 20px;
  margin: 24px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(22px);
  border: 2px solid var(--light-blue-color-3);
  box-shadow: 0px 0px 15px var(--box-shadow-blue);
  color: var(--white);
  transition: 0.2s ease-in-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cards-info-2 #container:hover {
  box-shadow: 8px 8px 1px var(--dark-blue-color);
  transform: scale(1.02);
}

/* Topo do card: nome da equipe + numero */
.cards-info-2 #container .topo-card {
  background-color: var(--dark-blue-color);
  border-top-right-radius: 20px;
  border-top-left-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 68px;
  position: relative;
}

.cards-info-2 #container .topo-card h1 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: bold;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 1px;
  flex: 1;
  text-align: left;
}

/* Centraliza vertical e horizontalmente as infos */
.cards-info-2 #container .equipes {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;  
  padding: 7px 0;
  margin-left: 12px;
}

.cards-info-2 #container .lista_competidores {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px;
}

.cards-info-2 #container .lista_competidores .competidor {
  font-size: 15px;
  align-items: center;
}

.cards-info-2 #container .equipes .competidor_nome {
  color: var(--dark-blue-color);
  font-weight: bold;
  font-size: 17px;
}

.cards-info-2 #container .equipes .nome_escrito {
  font-size: 14px;
}

.cards-info-2 #container .equipes .escola_nome {
  font-size: 14px;
}

@media (max-width: 600px) {
  #top3-ultima-edicao {
    margin: 0;
}
  .cards-info-2 #container {
    height: 290px;
  }

  .cards-info-2 #container .topo-card {
    height: 70px;
  }

  .cards-info-2 #container .equipes {
    margin-left: 2px;
  }

  .cards-info-2 #container .equipes .nome_escrito {
    font-size: 17px;
  }

  .cards-info-2 #container .equipes .escola_nome {
    font-size: 16px;
  }
}

footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  background-color: #0A2148;
  padding: 20px;
}

footer ul {
  list-style-type: none;
  display: flex;
  gap: 50px;
}

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

footer ul a:hover {
  color: #4070f4;
  transition: 0.3s ease-in-out;
}

.footer-linha {
  border: none;
  height: 2px;
  background-color: rgb(0, 166, 255);
  margin: 10px auto;
  width: 70%;
}


/* Responsividade adicional */
@media screen and (max-width: 1024px) {
  .containerRanking {
    width: 90%;
    padding: 20px;
  }

  table {
    max-width: 90%;
  }

  #BANNER_RANKING {
    flex-direction: column;
    text-align: center;
  }

  #intro-ranking {
    height: 90vh;
  }

  .filtro-form {
    flex-direction: column;
  }

  #tabela-classificados {
    display: flex;
    flex-direction: column;
    max-height: -webkit-fill-available;
    overflow: auto;
  }

  #tabela-completo {
    display: flex;
    max-height: -webkit-fill-available;
    overflow: auto;
  }
}

@media screen and (max-width: 800px) {
  .sidebar {
    width: 70px;
  }

  .sidebar:hover {
    width: 200px;
  }

  body {
    margin-left: 70px;
  }

  .containerRanking {
    width: 95%;
    padding: 20px;
  }

  table {
    font-size: 0.9em;
  }

  th,
  td {
    padding: 10px;
  }

  #titulo {
    font-size: 30px;
  }

  #sloganranking h1 {
    font-size: 30px;
  }

  #sloganranking p {
    font-size: 16px;
  }
}

@media screen and (max-width: 500px) {
  .sidebar {
    width: 60px;
  }

  .sidebar:hover {
    width: 180px;
  }

  body {
    margin-left: 60px;
  }

  table {
    font-size: 0.8em;
  }

  th,
  td {
    padding: 8px;
  }

  #titulo,
  #sloganranking h1 {
    font-size: 24px;
  }

  #sloganranking p {
    font-size: 14px;
  }

  footer ul {
    flex-direction: column;
    gap: 10px;
  }

  #backToTop {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}