.img-container {
  margin-top: -10rem;
  display: grid;
  gap: 50px;
  width: 100%;
  padding: 4% 2%;
  grid-template-columns: repeat(4, 1fr);
  box-sizing: border-box;
  height: auto;
}

.img-box1 {
  flex: 1;
  overflow: hidden;
  transition: 0.5s;
  border-radius: 20px;
  margin: 0 2%;
  height: min-content;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 30px rgba(170, 162, 155, 0.514);
  line-height: 0;
}

.img-box1>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .5s;
}

.img-box1>span {

  display: flex;
  text-align: center;
  justify-content: center;
  height: 10vh;
  line-height: 2.6;
}

.img-box1:hover {
  grid: 1 1 100%;
  width: 100%;
  height: 100%;
}

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.gallery {
  background: #EEE;
  max-width: 600px;
  margin: 0 auto;
  width: 50%;
  height: min-content;
}

.gallery-cell {
  width: 30%;
  height: auto;
  justify-content: center;
  margin-right: 10px;
  background: #8C8;
  border-radius: 5px;
  overflow: hidden;
}


.gallery-cell img {
  /* height: 100%; */
  /* width: 100%; */
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(151, 144, 144, 0.7);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay i {
  font-size: 2em;
  margin-bottom: 10px;
}

.image-container:hover .overlay {
  opacity: 1;
}

.image-container {
  position: relative;
  width: 100%;
}

.image-container p {
  text-align: center;
}

.image-container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width:500px) {
  .img-container {
    grid-template-columns: repeat(2, 2fr);
  }

  .gallery-cell {
    width: 100%;
    height: auto;
    justify-content: center;
    margin-right: 10px;
    background: #8C8;
    border-radius: 5px;
    overflow: hidden;
  }

}

@media (max-width:1100px) {
  .img-container {
    grid-template-columns: repeat(2, 2fr);
    height: auto;
  }

}