﻿.staff-members{
    justify-content: space-between;
    display: flex;
    flex-wrap: wrap;
    padding: 30px 0 0;
}

.staff {
    width: 100%;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    position: relative;
    /*margin: 2rem 1.25em 0 0.625em;*/
    /*margin-top: 2rem;*/
    -webkit-transform: scale(0.8, 0.8) rotate(0deg);
    -moz-transform: scale(0.8, 0.8) rotate(-0deg);
    display: inline-block;
    text-align: center;
    /*z-index: 1;*/
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.staff .polaroid-front .title{
    text-align: center;
    line-height: 1.2;
    margin: 35px 0;
}
.staff-gary .title {
    text-align: center;
    line-height: 1.2;
    margin: 15px 0;
}
.staff-gary {
    margin-bottom: 40px;
    border-bottom: 0px solid #AA0304;
    padding-bottom: 20px;
}

.staff .polaroid-front .title span:first-of-type ,
.staff-gary .title span:first-of-type {
    font-size: 1.0rem;
    display: block;
    height: 55px;
    margin-bottom: 20px;
}

.staff .polaroid-front .title span:last-of-type,
.staff-gary .title span:last-of-type {
    font-size: 0.8rem;
    display: block;
    text-transform: uppercase;
    /*letter-spacing: 1px;*/
    height: 30px;
}

.staff .polaroid-back .bio {
    font-size: 1.11rem;
    line-height: 1.4;
    visibility: hidden;
    position: fixed;
}

.staff .polaroid-back .bio blockquote {
    padding: 30px 0;
    position: relative;
}

.staff .polaroid {
    /*background: #fff;*/
    box-shadow: 0 0.2rem 1.2rem rgba(0, 0, 0, 0.2);

    /*flip speed*/
    transition: 0.7s;
    -webkit-transition: 0.7s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    position: relative;
    /*-webkit-backface-visibility: visible;
    backface-visibility: hidden;*/
    /*max-height: 5000px;*/
}

.staff:hover .polaroid.long-text, .staff:focus .polaroid.long-text,.staff:active .polaroid.long-text {
     min-height: 500px;
     /*max-height: 600px;*/
     transition: all .85s ease-out;
}


.staff .polaroid-front > img {
    max-width: 100%;
    min-width: 100%;
/*    min-height: 250px;*/
    height: auto;
}

.staff .polaroid:before {
    content: '';
    position: absolute;
    z-index: -1;
    transition: all 0.35s;
}

/* hide back of pane during swap */
.staff .polaroid-front, .staff .polaroid-back {
    -webkit-backface-visibility: hidden;
    /*-webkit-transform: translate3d(0,0,0);*/
    backface-visibility: hidden;
    visibility:visible;
    /*-webkit-perspective: 10000px;*/


}

/* front pane, placed above back */
.staff .polaroid-front {
    z-index: 2;
    transform: rotateY(0deg);
    position: relative;
    top:0;
    bottom: 0;
    padding: 1rem;
    width: 100%;
   /* height: 100%;*/
}

/* back, initially hidden pane */
.staff .polaroid-back {
    transform: rotateY(180deg);
    /*-webkit-transform: rotateY(180deg);*/
    background: #FFFFFF;
    position: absolute;
    top:0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: flex;
    align-items: center;
    text-align: left;
visibility: visible;
    z-index: 1;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.staff:hover .polaroid{
    transform: rotateY(180deg);
    /*-webkit-transform: rotateY(180deg);*/
}

.staff:hover .polaroid-back, .staff:focus .polaroid-back, .staff:active .polaroid-back{
    position: absolute;
    top:0;
    bottom: 0;
    padding: 1rem;
    width: 100%;
}
.staff:hover .polaroid-front,.staff:focus .polaroid-front,.staff:active .polaroid-front{
    position: relative;
    top:0;
    bottom: 0;
    padding: 1rem;
    z-index: 0;
}

.staff:hover, .staff:focus, .staff:active {
    filter: none;
    transform: scale(1, 1) rotate(0deg) !important;
    transition: all 0.8s ease 0s;
    right:0 !important;
    left: 0 !important;
    z-index: 10;
}


.no-transition{
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
    -webkit-transform: none !important;
    transform: none !important;

}


.staff:hover .bio,.staff:focus .bio,.staff:active .bio {
    visibility: visible;
    transition: all 1.75s;
    -webkit-transition: all 1.75s;
    -webkit-animation-name: fade;
    -webkit-animation-duration: 1.5s;
    animation-name: staff-fade;
    animation-duration: 1.5s;
}



@-webkit-keyframes staff-fade {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

@keyframes staff-fade {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}
/* flip the polaroid when hovered */
.staff:hover .polaroid,.staff:focus .polaroid,.staff:active .polaroid{
    transform: rotateY(180deg);
    z-index:10;
    -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, .7);
    -moz-box-shadow: 0 10px 20px rgba(0,0,0,.7);
    box-shadow: 0 10px 20px rgba(0,0,0,.7);
}

.staff:hover .polaroid:before,.staff:focus .polaroid:before,.staff:active .polaroid:before {
    content: '';
    position: absolute;
    z-index: -1;
    transform: rotate(0deg);
/*    height: 90%;
    width: 90%;*/
    bottom: 0;
    right: 5%;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
    transition: all 0.35s;
}


/* Rotate all even images 2 degrees */
.staff:nth-child(odd) {
    -webkit-transform: scale(0.8, 0.8) rotate(0deg);
    -moz-transform: scale(0.8, 0.8) rotate(0deg);
    right:0px;
    bottom: 0px;
}
.staff:nth-child(even) {
    -webkit-transform: scale(0.8, 0.8) rotate(0deg);
    -moz-transform: scale(0.8, 0.8) rotate(0deg);
    right:0px;
    bottom: 0px;
}

.staff:nth-child(3n) {
    left: 0px;
    -webkit-transform: scale(0.8, 0.8) rotate(0deg);
    -moz-transform: scale(0.8, 0.8) rotate(0deg);
    right:0px;
    bottom: 0px;
}

/* Rotate every fifth image by 5 degrees and offset it */
.staff:nth-child(5n) {
    -webkit-transform: scale(0.8, 0.8) rotate(0deg);
    -moz-transform: scale(0.8, 0.8) rotate(0deg);
    right:0px;
    bottom: 0px;
}

.staff:nth-child(3n+0) {
    -webkit-transform: scale(0.8, 0.8) rotate(0deg);
    -moz-transform: scale(0.8, 0.8) rotate(0deg);
    bottom: 0px;
    left: 0px;
}
.staff:nth-child(5n+0) {
    -webkit-transform: scale(0.8, 0.8) rotate(-0deg);
    -moz-transform: scale(0.8, 0.8) rotate(-0deg);
    bottom: 0px;
    left: 0px;
}


/*SMALL SCREEN*/
/*@media (min-width: 48em) {
    .staff {
        width: 49.8%;
    }
}
*/
/*MEDIUM SCREEN*/
/*@media (min-width: 64em) {
    .staff {
        width: 24.7%;
    }
*/
  /*  .staff:hover .polaroid {
        transition: all .85s ease-out;
    }*/


/*}*/

/*LARGE SCREEN 19.73=5 24.7=4 33.1=2   49.8=2 */
@media (min-width: 30em) {
    .staff {
        width: 19.73%;
    }
}