@import 'https://fonts.googleapis.com/css?family=Lato|Roboto+Slab:700';
html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  background: #f1f1f1;
  color: #444;
  font-family: "Lato", sans-serif;
  font-size: 1em;
  line-height: 1.625;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3 {
  font-family: "Roboto Slab", serif;
}

.wrap {
  margin: 0 auto;
  max-width: 1000px;
  width: 100%;
}

h1 {
  text-align: center;
  margin: 50px 0;
}

.gallery-wrap,
#gallery {
  overflow: hidden; margin:0 -14px;
}

#filters {
  margin:40px 0 10px 0;
  padding: 0;
  list-style: none; overflow: hidden; display: flex; flex-wrap: wrap; justify-content: center;
}

#filters li {
  float: left; margin:3px;
}

#filters li span {
  display: block;
  padding:0;
  text-decoration: none;
  color:#000;
  cursor: pointer;
   transition: all ease-in-out 0.25s; background:#F6F6F6; padding:12px 30px; border-radius:5px;
}

#filters li:hover span {
  color: #000;
}

#filters li span.active {
  background: #48CFE0;
  color: #fff;
}

.gallery-item {
  float: left;
  width:25%;
  padding:0 14px 0 14px;
  position: relative;
  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%;
  }
}