/* 1. Estilização básica da galeria */
.galeria {
  display: flex;
  gap: 25px;
  justify-content: space-evenly;
  flex-wrap: wrap;

}

.galeria img {
  width: 300px;
  cursor: pointer;
  transition: transform 0.2s;
}

.galeria img:hover {
  transform: scale(1.2);
}

/* 2. Oculta o lightbox por padrão */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none; /* Escondido inicialmente */
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* 3. Exibe o lightbox quando a URL recebe o ID correspondente (#foto1 ou #foto2) */
.lightbox:target {
  display: flex;
}

/* 4. Estrutura interna do modal */
.lightbox .conteudo {
  position: relative;
  padding: 10px;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
}

/* 5. Botão de fechar visível no canto */
.lightbox .btn-fechar {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #333;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  text-decoration: none;
  font-weight: bold;
}

/* 6. Permite fechar clicando no fundo escuro */
.lightbox .fechar {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}