.am-overlay {
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 100;
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
  overflow: auto;
}

.am-close-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.am-modal {
  position: absolute;
  z-index: 101;
}

.am-modal-open {
  /* overflow: hidden; */
}
/* .am-modal-open #main_content, 
.am-modal-open footer{
  -webkit-filter: blur(5px);
  -moz-filter: blur(5px);
  -ms-filter: blur(5px);
  -o-filter: blur(5px);
  filter: blur(5px);
} */

.am-modal-open .am-overlay {
  opacity: 1;
}

.am-modal {
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
	-webkit-perspective: 1000;
  -moz-perspective: 1000;
  -o-perspective: 1000;
  perspective: 1000;
}

.am-modal.am-flipped .am-wrapper, .am-modal.am-flipped .am-wrapper {
	-webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
  transform: rotateY(180deg);
}

.am-wrapper {
	-webkit-transition: 0.6s;
	-webkit-transform-style: preserve-3d;
	-moz-transition: 0.6s;
	-moz-transform-style: preserve-3d;
	-o-transition: 0.6s;
	-o-transform-style: preserve-3d;
	transition: 0.6s;
	transform-style: preserve-3d;

	position: relative;
}

.am-front, .am-back {
	-webkit-backface-visibility: hidden !important;
  -moz-backface-visibility: hidden !important;
  -o-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
  

	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
}

.am-front {
	z-index: 2 !important;
}

.am-back {
  background: #f1f1f2;
	-webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
  transform: rotateY(180deg);
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

.am-modal-content {
  visibility: hidden;
}

.am-back > .am-modal-content > * {
  visibility: hidden;
}

.am-expanded.am-modal {
  width: 800px;
  top: 120px;
  margin-bottom: 50px;
  left: 50%;
  margin-left: -400px;
}

.am-expanded.am-back {
  width: 800px;
}

.am-sample {
  width: 100%;
  position: fixed;
  visibility: hidden;
  display: block;
}

.am-close {
  color: white;
  width: 25px;
  height: 25px;
  line-height: 100%;
  text-align: center;
  display: block;
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0.7;
  font-size: 24px;
}
.am-close:visited {
  color: white;
}
.am-close:hover, .am-close:active {
  color: white;
  opacity: 1;
}

.animated {
  visibility: visible !important;
  -webkit-animation-duration: 0.5s;
  -moz-animation-duration: 0.5s;
  -o-animation-duration: 0.5s;
  animation-duration: 0.5s;
  -webkit-animation-fill-mode: both;
  -moz-animation-fill-mode: both;
  -o-animation-fill-mode: both;
  animation-fill-mode: both;
}


@-webkit-keyframes scaleShow {
  0% {
    opacity: 0;
    -webkit-transform: scale(0.85) translateY(-5px);
    -moz-transform: scale(0.85) translateY(-5px);
    -o-transform: scale(0.85) translateY(-5px);
    transform: scale(0.85) translateY(-5px);
  }

  100% {
    opacity: 1;
    -webkit-transform: scale(1) translateY(0px);
    -moz-transform: scale(1) translateY(0px);
    -o-transform: scale(1) translateY(0px);
    transform: scale(1) translateY(0px);
  }
}

@-moz-keyframes scaleShow {
  0% {
    opacity: 0;
    -webkit-transform: scale(0.85) translateY(-5px);
    -moz-transform: scale(0.85) translateY(-5px);
    -o-transform: scale(0.85) translateY(-5px);
    transform: scale(0.85) translateY(-5px);
  }

  100% {
    opacity: 1;
    -webkit-transform: scale(1) translateY(0px);
    -moz-transform: scale(1) translateY(0px);
    -o-transform: scale(1) translateY(0px);
    transform: scale(1) translateY(0px);
  }
}

@keyframes scaleShow {
  0% {
    opacity: 0;
    -webkit-transform: scale(0.85) translateY(-5px);
    -moz-transform: scale(0.85) translateY(-5px);
    -o-transform: scale(0.85) translateY(-5px);
    transform: scale(0.85) translateY(-5px);
  }

  100% {
    opacity: 1;
    -webkit-transform: scale(1) translateY(0px);
    -moz-transform: scale(1) translateY(0px);
    -o-transform: scale(1) translateY(0px);
    transform: scale(1) translateY(0px);
  }
}

.scaleShow {
  -webkit-animation-name: scaleShow;
  -moz-animation-name: scaleShow;
  -o-animation-name: scaleShow;
  animation-name: scaleShow;
}

@-webkit-keyframes scaleHide {
  0% {
    opacity: 1;
    -webkit-transform: scale(1) translateY(0px);
    -moz-transform: scale(1) translateY(0px);
    -o-transform: scale(1) translateY(0px);
    transform: scale(1) translateY(0px);
  }

  100% {
    opacity: 0;
    -webkit-transform: scale(0.85) translateY(-5px);
    -moz-transform: scale(0.85) translateY(-5px);
    -o-transform: scale(0.85) translateY(-5px);
    transform: scale(0.85) translateY(-5px);
  }
}
@-moz-keyframes scaleHide {
  0% {
    opacity: 1;
    -webkit-transform: scale(1) translateY(0px);
    -moz-transform: scale(1) translateY(0px);
    -o-transform: scale(1) translateY(0px);
    transform: scale(1) translateY(0px);
  }

  100% {
    opacity: 0;
    -webkit-transform: scale(0.85) translateY(-5px);
    -moz-transform: scale(0.85) translateY(-5px);
    -o-transform: scale(0.85) translateY(-5px);
    transform: scale(0.85) translateY(-5px);
  }
}

@keyframes scaleHide {
  0% {
    opacity: 1;
    -webkit-transform: scale(1) translateY(0px);
    -moz-transform: scale(1) translateY(0px);
    -o-transform: scale(1) translateY(0px);
    transform: scale(1) translateY(0px);
  }

  100% {
    opacity: 0;
    -webkit-transform: scale(0.85) translateY(-5px);
    -moz-transform: scale(0.85) translateY(-5px);
    -o-transform: scale(0.85) translateY(-5px);
    transform: scale(0.85) translateY(-5px);
  }
}


.scaleHide {
  -webkit-animation-name: scaleHide;
  -moz-animation-name: scaleHide;
  -o-animation-name: scaleHide;
  animation-name: scaleHide;
}