main {
  margin: 15px 8px;
}
#gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(150px, auto));
  gap: 1rem;
  justify-content: center;
  align-items: center;
}
.gallery-item {
  display: flex;
  position: relative;
}
.gallery-item img{
  display: block;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  padding: 8px;
  border: 1px solid black;
  background: white;
}
.gallery-item:hover img{
  cursor: pointer;
} 
.image-wrap .item-overlay {
  position: absolute;
  width: 100%;
  height: auto;
  padding: 6px 8px;
  background-color: rgba(0,0,0,0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 200;
}
.item-overlay {
  bottom: 1rem;
}
.image-wrap {
  position: relative;
}
.image-wrap:hover .item-overlay{
  opacity: 1;
}