/* YouTube Custom Styles 
    Reference: https://webdesign.tutsplus.com/tutorials/how-to-lazy-load-embedded-youtube-videos--cms-26743
*/

.youtube {
    background-color: #000;
    margin-bottom: 30px;
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    cursor: pointer;
    background-image: url(../img/youtube-overlay.png) no-repeat;
    background-position: center top;
}
.youtube img {
    width: 100%;
    top: -16.84%;
    left: 10px;
    opacity: 0.9;
    transition: .5s ease-in-out;
}

.youtube .play-button {
    width: 68px;
    height: 48px;
    background-color: #333;
    box-shadow: 0 0 30px rgba( 0,0,0,0.6 );
    z-index: 1;
    opacity: 0.8;
    border-radius: 8px;
}

.youtube .play-button:after {
    border-style: solid;
    border-width: 1em 0 1em 1.732em;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.75);
    content: ' ';
    font-size: 0.65em;
    height: 0;
    margin: -1em 0 0 -0.75em;
    top: 50%;
    left: 50%;
    position: absolute;
    width: 0;
}

.youtube .play-button:hover {
    background-color: #CC181E;
    transition: all 150ms ease-out;
    opacity: 1;
}
.youtube img,
.youtube .play-button {
    cursor: pointer;
}
.youtube img,
.youtube iframe,
.youtube .play-button {
    position: absolute;
}
.youtube .play-button {
    top: 50%;
    left: 50%;
    transform: translate3d( -50%, -50%, 0 );
}
.youtube iframe {
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
}
.youtube .video-title {
    position: absolute;
    color: #fff;
    top: 3%;
    left: 3%;
    font-weight: 400;
    z-index: 2;
    font-size: 18px;
}
.youtube .overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 47px;
    width: 100%;
    opacity: 0.8;
    z-index: 1;
    background: #000; /* For browsers that do not support gradients */
    background: -webkit-linear-gradient(rgba(0,0,0,1),rgba(255,0,0,0)); /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(rgba(0,0,0,1),rgba(255,0,0,0)); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(rgba(0,0,0,1),rgba(255,0,0,0)); /* For Firefox 3.6 to 15 */
    background: linear-gradient(rgba(0,0,0,1),rgba(255,0,0,0));/* Standard syntax */
}


@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .youtube img {
        height: auto;
    }
}

