.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  grid-gap: 5rem;
  max-width: 80rem;
}

.gallery-panel {
  cursor: pointer;
  position: relative;
  background: rgb(0, 0, 0);
  padding: 0.1rem;
}

.gallery-panel img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  opacity: 1;
  display: block;
  transition: 0.5s ease;
  backface-visibility: hidden;
}

.gallery-content {
  transition: 0.5s ease;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  text-align: center;
}

.gallery-panel:hover img {
  opacity: 0.5;
}

.gallery-panel:hover .gallery-content {
  opacity: 1;
}

.gallery-text {
  background-color: #ddac13;
  color: #000;
  font-weight: bold;
  font-size: 1rem;
  padding: 16px 32px;
}
