.gallery-wrap,
#gallery {
  overflow: hidden;
}

#filters {
  margin: 1%;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

#filters li {
  float: left;
}

#filters li span {
  display: block;
  padding: 5px 20px;
  text-decoration: none;
  color: #666;
  cursor: pointer;
  text-transform: uppercase;
  transition: all ease-in-out 0.25s;
}

#filters li:hover span {
  color: #000;
}

#filters li span.active {
  background: #2e3192;
  border-radius: 50px;
  color: #fff;
}

.gallery-item {
  float: left;
  width: 25%;
  position: relative;
  z-index: 10;
  display: none;
}

.inside {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.details,
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  opacity: 0;
}

.details {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s ease-in-out;
}
.details h2 {
  color: #fff;
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  margin: 0;
}
.details p {
  color: #fff;
  font-size: 1em;
  letter-spacing: 2px;
  text-align: center;
  margin: 0;
  text-transform: uppercase;
}

.inside img {
  float: left;
  width: 100%;
}

.overlay {
  background: rgba(31, 186, 231, 0.8);
  z-index: 1;
  transition: all 0.7s ease-in-out;
}

.gallery-item:hover .details,
.gallery-item:hover .overlay {
  opacity: 1;
}

@media (max-width: 30em) {
  .wrap {
    padding-left: 1em;
    padding-right: 1em;
  }

  .gallery-item {
    float: none;
    width: 100%;
  }
}