.linkProjeto {
  text-decoration: none;
  color: #e2e2e2;
}

.linkProjeto:hover {
  color: #cac9c9;
}

.linkProjeto:active {
  color: #b8b7b7;
}

.projetosContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
}

.projetosContainer h1 {
  margin-left: -4rem;
  align-self: flex-start;
  justify-self: start;
}

.projetosContainer h4 {
  text-align: justify;
  text-justify: inter-word;
  font-weight: lighter;
}

.projetoItem {
  width: 50rem;
}

.projetoItem p {
  display: flex;
  flex-direction: row;
  text-align: center;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.projetoItem a,
.projetoItem button {
  margin: 0;
}

.projetoItem div {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.projetoImg {
  display: block;
  margin: auto;
  max-width: 100%;
  border-radius: 15px;
  cursor: pointer;
}

.enlargedImage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  border-radius: 0;
  z-index: 10;
  transition: scale 0.3s ease;
}

.imageOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 5;
  display: none;
}

.imageOverlay.active {
  display: block;
}

.imgContainer {
  padding: 1rem;
}

.imgPequena {
  border-radius: 5px;
  cursor: pointer;
  transition: filter 0.3s ease;
}

.imgPequena:hover {
  filter: brightness(70%);
}

.imgPequena:active {
  filter: brightness(50%);
}

.selectedImg {
  filter: brightness(30%);
  pointer-events: none;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 16;
}

#zoomedImage {
  max-height: 70vh;
  max-width: 80vw;
  width: auto;
  height: auto;
  box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.2);
  cursor: pointer;
  z-index: 16;
}

#overlay.active {
  visibility: visible;
  opacity: 1;
}

#overlay.fade-out {
  opacity: 0;
}

@media (max-width: 1200px) {
  .projetosContainer {
    margin-bottom: 5rem;
  }
  
  .projetosContainer h1 {
    margin: 3rem auto;
    align-self: center;
    justify-self: start;
  }
}

@media (max-width: 900px) {
  h1 {
    font-size: 4.4vmax !important;
  }

  .projetoItem h2 {
    margin: auto;
    text-align: center;
  }

  .projetoItem h4 {
    max-width: 80%;
    margin: 1rem auto 1rem auto;
  }

  .homeButton h2 {
    margin: 0.5rem auto 0.5rem auto;
  }

  .projetoImg {
    max-width: 80%;
  }

  .projetoItem {
    width: 100%;
    max-width: 100%;
  }

  .imgContainer {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 70%;
    margin: auto;
    justify-items: center;
    align-items: center;
  }

  .imgPequena {
    max-width: 5rem;
  }

  .projetosContainer {
    max-width: 100%;
  }
}

@media (max-width: 795px) {
  .projetoItem p {
    max-width: 80%;
    margin: auto;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
  }

  .tecnologias {
    display: none !important;
  }
}

@media (max-width: 430px) {
  .buttonContainer {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 1rem;
    max-width: 70%;
    margin: auto;
    justify-items: center;
    align-items: center;
  }

  .buttonContainer > :last-child {
    grid-column: span 2;
    justify-self: center;
  }
}
