/* ACKNOWLEDGEMENT: This CSS code is based on a Youtube video:
https://youtu.be/gvPyJ0rc944    
by Andrew Wilson */

.container1 {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  grid-auto-rows: 350px 350px;
  grid-gap: 10px;
  grid-auto-flow: dense;
}

.gallery-item1 {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-item1 .image1 {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-item1 .image1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  cursor: pointer;
  transition: .5s ease-in-out;
}

.gallery-item1:hover .image1 img {
  transform: scale(1.3);
}

.gallery-item1 .text1 {
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  color: rgb(3,12,8);
  font-size: 22px;
  pointer-events: none;
  z-index: 4;
  transition: .3s ease-in-out;
  backdrop-filter: blur(7px) saturate(1.8);
  -webkit-backdrop-filter: blur(7px) saturate(1.8);
}

.gallery-item1:hover .text1 {
  opacity: 1;
  animation: move-down .3s linear;
  padding: 0.2em;
  width: 40%;
}

.h-2 {
  grid-row: span 2;
}

.w-2 {
  grid-column: span 2;
}

@media screen and (max-width:500px) {
  .container1 {
    grid-template-columns: repeat(2,1fr);
  }
}

@keyframes move-down {
  0% {
    top: 10%;
  }
  50% {
    top: 35%;
  }
  100% {
    top: 50%;
  }
}

