/* DROPDOWN ANIMATIONS */
/*********************************************************************/
.animated {
  -webkit-animation-duration: .2s;
  animation-duration: .2s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

@keyframes flip {
  0% {
    -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
    -ms-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
    transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
    -webkit-animation-timing-function: ease-out;
    animation-timing-function: ease-out;
  }

  40% {
    -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
    -ms-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
    transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
    -webkit-animation-timing-function: ease-out;
    animation-timing-function: ease-out;
  }

  50% {
    -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
    -ms-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
    transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
    -webkit-animation-timing-function: ease-in;
    animation-timing-function: ease-in;
  }

  80% {
    -webkit-transform: perspective(400px) scale3d(.95, .95, .95);
    -ms-transform: perspective(400px) scale3d(.95, .95, .95);
    transform: perspective(400px) scale3d(.95, .95, .95);
    -webkit-animation-timing-function: ease-in;
    animation-timing-function: ease-in;
  }

  100% {
    -webkit-transform: perspective(400px);
    -ms-transform: perspective(400px);
    transform: perspective(400px);
    -webkit-animation-timing-function: ease-in;
    animation-timing-function: ease-in;
  }
}

.animated.flip {
  -webkit-backface-visibility: visible;
  -ms-backface-visibility: visible;
  backface-visibility: visible;
  -webkit-animation-name: flip;
  animation-name: flip;
}

@-webkit-keyframes flipInX {
  0% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    -webkit-transition-timing-function: ease-in;
    transition-timing-function: ease-in;
    opacity: 0;
  }

  30% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    -webkit-transition-timing-function: ease-in;
    transition-timing-function: ease-in;
  }

  100% {
    -webkit-transform: perspective(400px);
    transform: perspective(400px);
  }
}

@keyframes flipInX {
  0% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    -ms-transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    -webkit-transition-timing-function: ease-in;
    transition-timing-function: ease-in;
    opacity: 0;
  }

  30% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    -ms-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    -webkit-transition-timing-function: ease-in;
    transition-timing-function: ease-in;
  }

  100% {
    -webkit-transform: perspective(400px);
    -ms-transform: perspective(400px);
    transform: perspective(400px);
  }
}

.flipInX {
  -webkit-backface-visibility: visible !important;
  -ms-backface-visibility: visible !important;
  backface-visibility: visible !important;
  -webkit-animation-name: flipInX;
  animation-name: flipInX;
}

@-webkit-keyframes flipOutX {
  0% {
    -webkit-transform: perspective(400px);
    transform: perspective(400px);
  }

  30% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    opacity: 1;
  }

  100% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    opacity: 0;
  }
}

@keyframes flipOutX {
  0% {
    -webkit-transform: perspective(400px);
    -ms-transform: perspective(400px);
    transform: perspective(400px);
  }

  30% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    -ms-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
    opacity: 1;
  }

  100% {
    -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    -ms-transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    transform: perspective(400px) rotate3d(1, 0, 0, 30deg);
    opacity: 0;
  }
}

.flipOutX {
  -webkit-animation-name: flipOutX;
  animation-name: flipOutX;
  -webkit-animation-duration: .2s;
  animation-duration: .2s;
  -webkit-backface-visibility: visible !important;
  -ms-backface-visibility: visible !important;
  backface-visibility: visible !important;
}

/* MODAL ANIMATION */
/*********************************************************************/

.mfp-slide-bottom .mfp-with-anim {
  opacity: 0;
  -webkit-transition: all 0.2s ease-out;
  -moz-transition: all 0.2s ease-out;
  -o-transition: all 0.2s ease-out;
  transition: all 0.2s ease-out;

  -webkit-transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
  -moz-transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
  -ms-transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
  -o-transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
  transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
}

.mfp-slide-bottom.mfp-ready .mfp-with-anim {
  opacity: 1;
  -webkit-transform: translateY(0) perspective( 600px ) rotateX( 0 );
  -moz-transform: translateY(0) perspective( 600px ) rotateX( 0 );
  -ms-transform: translateY(0) perspective( 600px ) rotateX( 0 );
  -o-transform: translateY(0) perspective( 600px ) rotateX( 0 );
  transform: translateY(0) perspective( 600px ) rotateX( 0 );
}

.mfp-slide-bottom.mfp-removing .mfp-with-anim {
  opacity: 0;
  -webkit-transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
  -moz-transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
  -ms-transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
  -o-transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
  transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
}

.mfp-slide-bottom.mfp-bg {
  opacity: 0.01;
  -webkit-transition: opacity 0.3s ease-out;
  -moz-transition: opacity 0.3s ease-out;
  -o-transition: opacity 0.3s ease-out;
  transition: opacity 0.3s ease-out;
}

.mfp-slide-bottom.mfp-ready.mfp-bg {
  opacity: 0.6;
}

.mfp-slide-bottom.mfp-removing.mfp-bg {
  opacity: 0;
}