
/*animation element*/

.animation-element {
  position: relative;
  width: 22%;
  margin: 0% 1.5% 3% 1.5%;
  float: left;
}
/*4 grid layout*/

.animation-element:nth-of-type(4n-3) {
  clear: left;
}

.animation-element:nth-of-type(4n-2) {}

.animation-element:nth-of-type(4n-1) {}

.animation-element:nth-of-type(4n-0) {
  clear: right;
}
/*left fancy animastion*/

@-moz-keyframes left_animation {
  0% {
    opacity: 0;
    -moz-transform: rotate(180deg) translate3d(100%, 100%, 0);
  }
  75% {
    opacity: 0.8;
    -moz-transform: rotate(-40deg);
  }
  100% {
    opacity: 1;
    -moz-transform: rotate(0deg) translate3d(0%, 0%, 0);
  }
}

@-webkit-keyframes left_animation {
  0% {
    opacity: 0;
    -webkit-transform: rotate(180deg) translate3d(100%, 100%, 0);
  }
  75% {
    opacity: 0.8;
    -webkit-transform: rotate(-40deg);
  }
  100% {
    opacity: 1;
    -webkit-transform: rotate(0deg) translate3d(0%, 0%, 0);
  }
}

@keyframes left_animation {
  0% {
    opacity: 0;
    transform: rotate(180deg) translate3d(100%, 100%, 0);
  }
  75% {
    opacity: 0.8;
    transform: rotate(-40deg);
  }
  100% {
    opacity: 1;
    transform: rotate(0deg) translate3d(0%, 0%, 0);
  }
}
/*right fancy animation*/

@-moz-keyframes right_animation {
  0% {
    opacity: 0;
    -moz-transform: rotate(180deg) translate3d(-100%, -100%, 0);
  }
  75% {
    opacity: 0.8;
    -moz-transform: rotate(40deg);
  }
  100% {
    opacity: 1;
    -moz-transform: rotate(0deg) translate3d(0%, 0%, 0);
  }
}

@-webkit-keyframes right_animation {
  0% {
    opacity: 0;
    -webkit-transform: rotate(180deg) translate3d(-100%, 100%, 0);
  }
  75% {
    opacity: 0.8;
    -webkit-transform: rotate(40deg);
  }
  100% {
    opacity: 1;
    -webkit-transform: rotate(0deg) translate3d(0%, 0%, 0);
  }
}

@keyframes right_animation {
  0% {
    opacity: 0;
    transform: rotate(180deg) translate3d(-100%, -100%, 0);
  }
  75% {
    opacity: 0.8;
    transform: rotate(40deg);
  }
  100% {
    opacity: 1;
    transform: rotate(0deg) translate3d(0%, 0%, 0);
  }
}
/*Multi-step animation*/

.multi-step-left .gallery,
.multi-step-right .gallery {
  position: relative;
  opacity: 0;
  /*prevents flicker as animation occurs*/
}

.multi-step-left.in-view .gallery {
  -moz-animation: left_animation 1300ms ease-in both;
  -webkit-animation: left_animation 1300ms ease-in both;
  animation: left_animation 1300ms ease-in both;
}

.multi-step-right.in-view .gallery {
  -moz-animation: right_animation 1300ms linear both;
  -webkit-animation: right_animation 1300ms linear both;
  animation: right_animation 1300ms linear both;
}

.gallery {
  float: left;
  width: 100%;
  height: auto;
  margin: 0% 1.33% 2.66% 1.33%;
}

.gallery .image {
  background: #F5F5F5;
  border: solid 1px #EAEAEA;
  height: 0px;
  width: 80%;
  width: calc(100% - 40px);
  padding-bottom: 100%;
  padding-bottom: calc(100% - 40px);
  background-size: cover;
  background-position: bottom center;
  position: relative;
  border-radius: 50%;
  margin-bottom: 10px;
}

.gallery:hover .image,
.gallery:active .image {}

.gallery .image-caption {
  position: relative;
  background: #fff;
  background: #efefef;
  color: #333;
  font-size: 95%;
  padding: 10px;
  margin: 0px 0px 10px 0px;
}

.gallery .image-caption i {
  color: #aaa;
  margin: 0px 7px 0px 0px;
  display: inline-block;
}

.gallery .image-caption i:last-child {
  margin: 0px 0px 0px 7px;
}

.gallery .readmore {
  padding: 5px 12px;
  cursor: pointer;
  text-align: center;
  background: #2c3e50;
  color: #fff;
  font-size: 90%;
  -moz-transition: all 350ms ease;
  -o-transition: all 350ms ease;
  -webkit-transition: all 350ms ease;
  transition: all 350ms ease;
}

.gallery .readmore:hover,
.gallery .readmore:active {
  background: #34495e;
}

.gallery .title {
  margin: 0px 0px 5px 0px;
  text-align: center;
  color: #2c3e50;
  font-weight: 400;
}

.gallery .subtitle {
  margin: 0px 0px 10px 0px;
  text-align: center;
}

.gallery .social {
  position: absolute;
  top: 0px;
  right: -40px;
  width: calc(35px);
}

.gallery .social i {
  width: 100%;
  display: block;
  text-align: center;
  height: 35px;
  font-size: 125%;
  background: #2c3e50;
  line-height: 35px;
  border-radius: 50%;
  color: rgb(255, 255, 255);
  margin-bottom: 5px;
  cursor: pointer;
  -moz-transition: all 350ms ease;
  -o-transition: all 350ms ease;
  -webkit-transition: all 350ms ease;
  transition: all 350ms ease;
}

.gallery .social i:hover,
.gallery .social i:active {
  background: #34495e;
}
/*media queries for small devices*/

@media screen and (max-width: 678px) {
  .main-container {
    margin: 25px;
  }
  .animation-element,
  .animation-element:nth-of-type(4n-3),
  .animation-element:nth-of-type(4n-2),
  .animation-element:nth-of-type(4n-1),
  .animation-element:nth-of-type(4n-0) {
    width: 100%;
    margin: 0% 0% 25px 0%;
  }
}