.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease-in-out;
}

.gallery-item h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background-color: #0000008e;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover h1 {
  opacity: 1;
}