#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

#overlay.overlay-show {
  display: flex; /* Adiciona a propriedade display flex quando a classe overlay-show é aplicada */
}

#overlay-content {
  position: relative;
  display: flex;
  justify-content: center;
  height: auto;
  width: 50%;
  height: 100%;
  align-items: center;
}

#overlay-img {
  max-width: 80%;
  max-height: 80%;
}

#fechar-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

@media(max-width: 800px) {
  .foto {
    width: calc(93%/2);
    padding: 0;
  }
  
  .foto .img-container {
    height: 100px;
    width: 100%;
  }

  #overlay-content {
    width: 100%;
  }

  #overlay-img {
    max-width: 80%;
  }

  #fechar-overlay {
    top: 40px; 
}
}