#gallery {
  display: flex;
  flex-wrap: wrap;
  overflow-x: auto;
  max-height: 80vh;
  justify-content: center;
}

#gallery div {
  text-align: center;
  margin: 10px;
}

#gallery img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  cursor: pointer;
}

#gallery p {
  font-size: 16px;
  font-weight: bold;
  margin-top: 5px;
}

.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px;
}

.buttons button {
  padding: 10px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  margin: 5px;
}

@media (max-width: 600px) {
  ul {
    display: block;
    width: 100%;
  }

  li {
    width: 100%;
    text-align:center
  }

  #gallery img {
    width: 100%;
    height:auto
  }

  .buttons {
    flex-direction: column;
  }

  body{
    font-size :14px
  }

  li a{
    padding :10px
  }
}
