/**
 * For reference: http://tympanus.net/codrops/2012/01/02/fullscreen-background-image-slideshow-with-css3/
 */
html,
body {
    height: 100%;
}

body {
    padding: 0;
}

.site-header {
    margin: 20px;
}

.cb-slideshow {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cb-slideshow { 
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.cb-slideshow-image { 
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    color: transparent;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: none;
    opacity: 0;
    z-index: 1;
    -webkit-backface-visibility: hidden;
    -webkit-animation: imageAnimation 56s linear infinite 0s;
    -moz-animation: imageAnimation 56s linear infinite 0s;
    -o-animation: imageAnimation 56s linear infinite 0s;
    -ms-animation: imageAnimation 56s linear infinite 0s;
    animation: imageAnimation 56s linear infinite 0s; 
}

.cb-slideshow-title { 
    z-index: 2;
    position: absolute;
    top: 20px;
    left: 285px;
    margin-right: 20px;
    opacity: 0;
    -webkit-animation: titleAnimation 56s linear infinite 0s;
    -moz-animation: titleAnimation 56s linear infinite 0s;
    -o-animation: titleAnimation 56s linear infinite 0s;
    -ms-animation: titleAnimation 56s linear infinite 0s;
    animation: titleAnimation 56s linear infinite 0s; 
}

/**
 * Site main
 */
.cb-slideshow-link { 
    display: block;
    padding: 8px 12px;
    font-size: 26px;
    background-color: rgba(0,0,0,.7);
}

.cb-slideshow-slide:nth-child(1) .cb-slideshow-image { 
    background-image: url(../images/slideshow-01.jpg) 
}

.cb-slideshow-slide:nth-child(2) .cb-slideshow-image { 
    background-image: url(../images/slideshow-02.jpg);
    -webkit-animation-delay: 8s;
    -moz-animation-delay: 8s;
    -o-animation-delay: 8s;
    -ms-animation-delay: 8s;
    animation-delay: 8s; 
}

.cb-slideshow-slide:nth-child(3) .cb-slideshow-image { 
    background-image: url(../images/slideshow-03.jpg);
    -webkit-animation-delay: 16s;
    -moz-animation-delay: 16s;
    -o-animation-delay: 16s;
    -ms-animation-delay: 16s;
    animation-delay: 16s; 
}

.cb-slideshow-slide:nth-child(4) .cb-slideshow-image { 
    background-image: url(../images/slideshow-04.jpg);
    -webkit-animation-delay: 24s;
    -moz-animation-delay: 24s;
    -o-animation-delay: 24s;
    -ms-animation-delay: 24s;
    animation-delay: 24s; 
}

.cb-slideshow-slide:nth-child(5) .cb-slideshow-image { 
    background-image: url(../images/slideshow-05.jpg);
    -webkit-animation-delay: 32s;
    -moz-animation-delay: 32s;
    -o-animation-delay: 32s;
    -ms-animation-delay: 32s;
    animation-delay: 32s; 
}

.cb-slideshow-slide:nth-child(6) .cb-slideshow-image { 
    background-image: url(../images/slideshow-06.jpg);
    -webkit-animation-delay: 40s;
    -moz-animation-delay: 40s;
    -o-animation-delay: 40s;
    -ms-animation-delay: 40s;
    animation-delay: 40s; 
}

.cb-slideshow-slide:nth-child(7) .cb-slideshow-image { 
    background-image: url(../images/slideshow-07.jpg);
    -webkit-animation-delay: 48s;
    -moz-animation-delay: 48s;
    -o-animation-delay: 48s;
    -ms-animation-delay: 48s;
    animation-delay: 48s; 
}

.cb-slideshow-slide:nth-child(2) .cb-slideshow-title { 
    -webkit-animation-delay: 8s;
    -moz-animation-delay: 8s;
    -o-animation-delay: 8s;
    -ms-animation-delay: 8s;
    animation-delay: 8s; 
}

.cb-slideshow-slide:nth-child(3) .cb-slideshow-title { 
    -webkit-animation-delay: 16s;
    -moz-animation-delay: 16s;
    -o-animation-delay: 16s;
    -ms-animation-delay: 16s;
    animation-delay: 16s; 
}

.cb-slideshow-slide:nth-child(4) .cb-slideshow-title { 
    -webkit-animation-delay: 24s;
    -moz-animation-delay: 24s;
    -o-animation-delay: 24s;
    -ms-animation-delay: 24s;
    animation-delay: 24s; 
}

.cb-slideshow-slide:nth-child(5) .cb-slideshow-title { 
    -webkit-animation-delay: 32s;
    -moz-animation-delay: 32s;
    -o-animation-delay: 32s;
    -ms-animation-delay: 32s;
    animation-delay: 32s; 
}

.cb-slideshow-slide:nth-child(6) .cb-slideshow-title { 
    -webkit-animation-delay: 40s;
    -moz-animation-delay: 40s;
    -o-animation-delay: 40s;
    -ms-animation-delay: 40s;
    animation-delay: 40s; 
}

.cb-slideshow-slide:nth-child(7) .cb-slideshow-title { 
    -webkit-animation-delay: 48s;
    -moz-animation-delay: 48s;
    -o-animation-delay: 48s;
    -ms-animation-delay: 48s;
    animation-delay: 48s; 
}

/* Keyframes need to be recalculated based on the duration of the slideshow */

/* Animation for the slideshow images */
@-webkit-keyframes imageAnimation { 
    0% { opacity: 0; -webkit-animation-timing-function: ease-in; }
    7% { opacity: 1; -webkit-animation-timing-function: ease-out; }
    14% { opacity: 1 }
    21% { opacity: 0 }
    100% { opacity: 0 }
}
@-moz-keyframes imageAnimation { 
    0% { opacity: 0; -moz-animation-timing-function: ease-in; }
    7% { opacity: 1; -moz-animation-timing-function: ease-out; }
    14% { opacity: 1 }
    21% { opacity: 0 }
    100% { opacity: 0 }
}

@-o-keyframes imageAnimation { 
    0% { opacity: 0; -o-animation-timing-function: ease-in; }
    7% { opacity: 1; -o-animation-timing-function: ease-out; }
    14% { opacity: 1 }
    21% { opacity: 0 }
    100% { opacity: 0 }
}

@-ms-keyframes imageAnimation { 
    0% { opacity: 0; -ms-animation-timing-function: ease-in; }
    7% { opacity: 1; -ms-animation-timing-function: ease-out; }
    14% { opacity: 1 }
    21% { opacity: 0 }
    100% { opacity: 0 }
}

@keyframes imageAnimation { 
    0% { opacity: 0; animation-timing-function: ease-in; }
    7% { opacity: 1; animation-timing-function: ease-out; }
    14% { opacity: 1 }
    21% { opacity: 0 }
    100% { opacity: 0 }
}

/* Animation for the title */
@-webkit-keyframes titleAnimation { 
    0% { opacity: 0 }
    7% { opacity: 1 }
    12% { opacity: 1 }
    14% { opacity: 0 }
    100% { opacity: 0 }
}

@-moz-keyframes titleAnimation { 
    0% { opacity: 0 }
    7% { opacity: 1 }
    12% { opacity: 1 }
    14% { opacity: 0 }
    100% { opacity: 0 }
}

@-o-keyframes titleAnimation { 
    0% { opacity: 0 }
    7% { opacity: 1 }
    12% { opacity: 1 }
    14% { opacity: 0 }
    100% { opacity: 0 }
}

@-ms-keyframes titleAnimation { 
    0% { opacity: 0 }
    7% { opacity: 1 }
    12% { opacity: 1 }
    14% { opacity: 0 }
    100% { opacity: 0 }
}

@keyframes titleAnimation { 
    0% { opacity: 0 }
    7% { opacity: 1 }
    12% { opacity: 1 }
    14% { opacity: 0 }
    100% { opacity: 0 }
}


/**
 * Only show the slideshow on screens larger than 1024px
 */
@media screen and (min-device-width: 1025px) {

    .body-home {
        background-image: none;
    }

    .cb-slideshow {
        display: block;
    }

}