.grid {
  padding: 10px;
  margin: 0 auto;
  list-style: none;
  text-align: center;
}

.grid li {
  display: inline-block;
  width: 25%;
  margin: 0;
  padding: 20px;
  text-align: left;
  position: relative;
  margin-left: -4px;
}

.grid figure {
  margin: 0;
  position: absolute;
  top: 29px;
  left: 28px;
  width: 78.2%;
  height: 155px;
}

.grid figure img {
  max-width: 100%;
  display: block;
  position: relative;
}

.grid figcaption {
  position: absolute;
  top: 0;
  left: 0;
  padding: 20px;
  background: #292929;
  color: #fff;
}

.grid figcaption h3 {
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 1.111em;
}

.grid figcaption a {
  text-align: center!important;
  padding: 5px 10px;
  border-radius: 2px;
  display: inline-block;
  background: #00ade5;
  color: #fff;
  text-decoration: none;
  margin-top: 10px;
}
/* Individual Caption Styles */
/* Caption Style 3 */

.cs-style-3 figure {
  overflow: hidden;
  cursor: pointer;
}

.cs-style-3 figure img {
  -webkit-transition: -webkit-transform 0.4s;
  -moz-transition: -moz-transform 0.4s;
  transition: transform 0.4s;
}

.no-touch .cs-style-3 figure:hover img, .cs-style-3 figure.cs-hover img {
  -webkit-transform: translateY(-50px);
  -moz-transform: translateY(-50px);
  -ms-transform: translateY(-50px);
  transform: translateY(-50px);
}

.cs-style-3 figcaption {
  text-align: center;
  height: 100px;
  width: 100%;
  top: auto;
  bottom: 0;
  opacity: 0;
  -webkit-transform: translateY(100%);
  -moz-transform: translateY(100%);
  -ms-transform: translateY(100%);
  transform: translateY(100%);
  -webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s;
  -moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s;
  transition: transform 0.4s, opacity 0.1s 0.3s;
}

.no-touch .cs-style-3 figure:hover figcaption, .cs-style-3 figure.cs-hover figcaption {
  opacity: 1;
  -webkit-transform: translateY(0px);
  -moz-transform: translateY(0px);
  -ms-transform: translateY(0px);
  transform: translateY(0px);
  -webkit-transition: -webkit-transform 0.4s, opacity 0.1s;
  -moz-transition: -moz-transform 0.4s, opacity 0.1s;
  transition: transform 0.4s, opacity 0.1s;
}

.cs-style-3 figcaption a {
  position: relative;
}

.grid1 {
  padding: 10px;
  margin: 0 auto;
  list-style: none;
  text-align: center;
}

.grid1 li {
  float: right;
  width: 24%;
  margin-left: 1%;
  padding: 5px;
  text-align: left;
  position: relative;
  margin-bottom: 30px;
}

.grid1 figure {
  margin: 0;
  width: 100%;
  border: 1px solid #dedede;
}

.grid1 figure img {
  width: 100%;
  display: block;
}

.grid1 figcaption {
  position: absolute;
  top: -10px;
  left: -10px;
  padding: 20px;
  background: rgba(0, 173, 229, .8);
  color: #fff;
}

.grid1 h3 {
  margin: 0;
  padding: 5px 0;
  font-size: 1em;
  text-align: center;
}

.grid1 figcaption a {
  text-align: center!important;
  padding: 5px 10px;
  border-radius: 2px;
  display: inline-block;
  color: #fff;
  text-decoration: none;
  margin-top: 10px;
  font-size: 3em;
}
/* Caption Style 1 */

.cs-style-1 figcaption {
  height: 80%;
  width: 100%;
  opacity: 0;
  text-align: center;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
  -moz-transition: -moz-transform 0.3s, opacity 0.3s;
  transition: transform 0.3s, opacity 0.3s;
}

.no-touch .cs-style-1 figure:hover figcaption, .cs-style-1 figure.cs-hover figcaption {
  opacity: 1;
  -webkit-transform: translate(10px, 10px);
  -moz-transform: translate(10px, 10px);
  -ms-transform: translate(10px, 10px);
  transform: translate(10px, 10px);
}

.cs-style-1 figcaption h3 {
  margin-top: 70px;
}

.cs-style-1 figcaption span {
  display: block;
}

.cs-style-1 figcaption a {
  margin-top: 15%;
}
/*** folio changes by or ***/

.cs-style-1 figcaption {
  height: 64%;
  width: 100%;
}

.grid1 figcaption {
  background: rgba(55, 55, 55, 0.8);
}

/*--------------------------------------------------

media query

--------------------------------------------------*/
@media screen and (min-width:100px) and (max-width:320px) {

.grid li{ width: 100%; }
.grid li img{ width: 100%; }
.grid figure{ width: 80.5%; height: 160px; }
.grid1 li{ width: 100%; }
}


@media screen and (min-width:321px) and (max-width:559px) {

.grid li{ width: 100%; }
.grid li img{ width: 100%; }
.grid figure{ width: 83.5%; height: 200px; }
.grid1 li{ width: 100%; }
}


@media screen and (min-width:560px) and (max-width:959px) {
  .grid li{ width: 50%; }
  .grid li img{ width: 100%; }
  .grid figure{ top: 29px;left: 32px;width: 83.5%;height: 217px; }
  .grid1 li { width: 49%; }
}


@media screen and (min-width:960px) and (max-width:1024px) {
.grid li{ width: 33.33%; }
 .grid li img{ width: 100%; }
.grid li:last-child{ display: none; }
.grid figure {left: 29px;width: 82.2%;height: 170px;}
}


@media screen and (min-width:1025px) and (max-width:1200px) {

}


@media screen and (min-width:1200px) and (max-width:1400px) {

}

@media screen and (min-width:1401px)and (max-width:1600px) {

}

