.grid {
  max-width: 100%;
  margin: 0 auto;
  list-style: none;
  text-align: center;
}

.grid li {
  display: inline-block;
  width: 33%;
  margin: 0;
  padding: 20px;
  text-align: left;
  position: relative;
}

.grid figure {
  margin: 0;
  position: relative;
}

.grid figure img {
  max-width: 100%;
  display: block;
  position: relative;
}

.grid figcaption {
  position: absolute;
  top: 0;
  left: 0;
  padding: 20px;
  background: #424242;
  border: 1px solid white;
  -moz-box-shadow: inset 2px 2px 3px #000;
  -webkit-box-shadow: inset 2px 2px 3px #000;
  box-shadow: inset 2px 2px 3px #000;
  color: white;
  -moz-border-radius:5px;
  -webkit-border-radius:5px;
  border-radius:5px;
}

.grid figcaption h3 {
  margin: 0;
  padding: 0;
  color: #fff;
}

.grid figcaption span:before {
  content: '';
}

.grid figcaption a {
  text-align: center;
  padding: 5px 10px;
  border-radius: 2px;
  display: inline-block;
  background: #ed4e6e;
  color: #fff;
}

/* Individual Caption Styles */

/* Caption Style 6 */
.cs-style-6 figure img {
  z-index: 10;
  -webkit-transition: -webkit-transform 0.4s;
  -moz-transition: -moz-transform 0.4s;
  transition: transform 0.4s;
}

.no-touch .cs-style-6 figure:hover img,
.cs-style-6 figure.cs-hover img {
  -webkit-transform: translateY(-50px) scale(0.5);
  -moz-transform: translateY(-50px) scale(0.5);
  -ms-transform: translateY(-50px) scale(0.5);
  transform: translateY(-50px) scale(0.5);
}

.cs-style-6 figcaption {
  height: 100%;
  width: 100%;
}

.cs-style-6 figcaption h3 {
  margin-top: 38%;
}

.cs-style-6 figcaption a {
  position: absolute;
  bottom: 0px;
  right: 0px;
}

@media screen and (max-width: 31.5em) {
  .grid {
    padding: 10px 10px 100px 10px;
  }
  .grid li {
    width: 100%;
    min-width: 300px;
  }
}
