.gallery-wrap,
#gallery {
  overflow: hidden;
}

#filters {
    margin: 1%;
    padding: 0;
    list-style: none;
    overflow: hidden;
    display: flex;
    justify-content: center;
}
div#gallery {
    width: 90%;
    margin: 0 auto;
}
#filters li {
  float: left;
}
#filters li span {
    display: block;
    padding: 5px 20px;
    text-decoration: none;
    cursor: pointer;
    transition: all ease-in-out 0.25s;
    display: inline-block;
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    margin-right: 5px;
    border-radius: 0 0 15px 15px;
}
#filters li:hover span {
  color: #000;
}

#filters li span.active {
  background: #b02024;
  color: #fff;
}

.gallery-item {
  float: left;
  width: 33.333%;
  padding: 10px;
  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%;
  }
}

.inside {
    padding: 20px;
    transition: 0.9s;
    background: #fff;
    border: 5px solid #f3f3f3;
    border-radius: 20px;
}
.inside h4 {
    text-align: center;
    clear: both;
    position: relative;
    top: 8px;
    font-size: 18px;
    padding: 5px 0;
}
.clearfix{
    clear: all;
        
}