body {
  background: #111;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 250vh;
  transition: filter 0.3s ease;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
}

.gallery-item {
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-item img, .gallery-item video {
  max-width: 100%;
  max-height: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item video {
  display: none;
  position: absolute;
  object-fit: contain;
}

.gallery-item:hover{
  transform: scale(1.1);
  z-index: 2;
}

.gallery-item:hover img, .gallery-item:hover video{
  transform: scale(1.1);
}

.desaturated .gallery-item:not(:hover) img{
  filter: grayscale(100%) brightness(50%);
}
