#projetos {
  padding: 30px 0 100px;
  text-align: center;
  background: linear-gradient(to bottom, #0f1c2e 0%, #1a2742 50%, #aec6ec 150%);
  position: relative;
}

#projetos h2 {
  text-shadow: 0 0 10px #00f7ff44;
  font-size: 56px;
  margin-bottom: 60px;
  margin-top: 40px;
}

#projetos{
  scroll-margin-top: -80px;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px); /* só movimenta */
  }
  to {
    opacity: 1;
    transform: translateX(0); /* só movimenta */
  }
}

.projeto-img1, .projeto-img2, .projeto-img3, 
.projeto-img4, .projeto-img5, .projeto-img6 {
  opacity: 0;
  display: inline-block;
  transition: transform 0.8s ease, opacity 0.8s ease, filter 0.8s ease, z-index 0s;
}

.projeto-img1.visible, .projeto-img2.visible, .projeto-img3.visible, 
.projeto-img4.visible, .projeto-img5.visible, .projeto-img6.visible {
  animation: slideInRight 0.8s ease forwards;
}

.elemento {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

@media screen and (min-width: 569px) {

  .elemento-widget-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 10px;
    max-width: 1320px;
    width: 100%;
    align-items: center;
    justify-items: center;
    transition: transform 0.8s ease, opacity 0.8s ease, filter 0.8s ease;
  }
}

.elemento-widget-container a {
  position: relative;
  aspect-ratio: 4/6;
  border-radius: 10px;
}

.elemento-widget-container a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* ----------------- Estatísticas -------------------- */

.estatisticas-time {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 70px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  color: white;
}

.stat h3 {
  font-size: 40px;
  color: #00c8ff;
  margin-bottom: 5px;
}

.stat p {
  font-size: 0.9rem;
  margin: 0;;
}

/* ===== Animações ===== */

.estatisticas-time .stat {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.estatisticas-time .stat.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====================== Hover ========================= */

@media (hover: hover) and (pointer: fine) {

  .elemento-widget-container > * {
    transition: 
      transform 0.8s ease, 
      opacity 0.8s ease, 
      filter 0.8s ease;
  }

  /* Quando o mouse estiver sobre o container, as imagens não selecionadas ficam apenas mais escuras e menores */
  .elemento-widget-container:hover > :not(:hover) {
    filter: brightness(0.9); /* reduz o brilho levemente */
    transform: scale(0.96);  /* leve redução de tamanho */
    opacity: 1.0;            /* fica um pouco mais transparente */
  }

  /* A imagem sobre a qual o mouse está passa ganha leve destaque */
  .elemento-widget-container a:hover img,
  .elemento-widget-container .projeto-img:hover {
    filter: brightness(1.2); /* mais clara */
    transform: scale(2.05);  /* leve zoom */
    opacity: 1;
    z-index: 2;
  }
}


/* ================== Celular ====================== */

@media screen and (max-width: 568px) {

  .elemento {
    padding: 0 8px 0 8px;
  }

  .elemento-widget-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto; 
    gap: 6px;
    align-items: center;
    justify-content: center;
  }

  .elemento-widget-container a {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 10px;
  }

  .elemento-widget-container a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }
  

  /* =================== Estatísticas no celular =================== */ 

  .estatisticas-time {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 50px;
  }

  .estatisticas-time .stat {
    text-align: center;
    color: white;
  }

  .estatisticas-time .stat h3 {
    font-size: 32px;
  }

  .estatisticas-time .stat p {
    font-size: 0.9rem;
    margin: 0;
  }

  #projetos h2 {
    font-size: 42px;
    margin-bottom: 60px;
    margin-top: 40px;
  }
}


/* ============== TITULO DOS PROJETOS =============== */

/* Cada projeto é um bloco com posicionamento relativo */
.projeto {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 16px;
}

/* Imagem base */
.projeto img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

