body {
  background-color: wheat;
  margin: 0;
  text-align: center;
}

h1 {
  font-size: 3em;
  margin-bottom: 1.5em;
  color: #444;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
  gap: 1em;
  padding: 0.7em;
}

.gallery img {
  width: 100%;
  height: 15em;
  object-fit: cover;
  border-radius: 0.75em;
  box-shadow: 0 0.25em 0.7em rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.4s ease;
}

.gallery img:hover {
  transform: scale(1.12);
}

@media (max-width: 48em) {
  .gallery img:hover {
    height: auto;
  }
}

img {
  height: auto;
  max-width: 100%;
  display: block;
}
