/* Larger than below */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (min-width: 1200px)
and (max-width: 1400px),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (min-width: 1200px)
and (max-width: 1400px),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (min-width: 1200px)
and (max-width: 1400px),
only screen 
and (min-device-pixel-ratio: 1)
and (min-width: 1200px)
and (max-width: 1400px),
only screen 
and (in-resolution: 72dpi)
and (min-width: 1200px)
and (max-width: 1400px),
only screen 
and (min-resolution: 1dppx)
and (min-width: 1200px)
and (max-width: 1400px),
only screen
and (min-width: 1200px)
and (max-width: 1400px) {
    .slideshow #slide_holder, .slideshow #slide_holder div {
        min-height: 400px;
    }
}

/* bigger than average */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (min-width: 1024px)
and (max-width: 1200px),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (min-width: 1024px)
and (max-width: 1200px),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (min-width: 1024px)
and (max-width: 1200px),
only screen 
and (min-device-pixel-ratio: 1)
and (min-width: 1024px)
and (max-width: 1200px),
only screen 
and (in-resolution: 72dpi)
and (min-width: 1024px)
and (max-width: 1200px),
only screen 
and (min-resolution: 1dppx)
and (min-width: 1024px)
and (max-width: 1200px),
only screen
and (min-width: 1024px)
and (max-width: 1200px) {
    .slideshow #slide_holder, .slideshow #slide_holder div {
        min-height: 340px;
    }
}

/* Landscape and big portrait devices - general styling */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (min-device-pixel-ratio: 1)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (in-resolution: 72dpi)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (min-resolution: 1dppx)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (min-device-pixel-ratio: 1)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (in-resolution: 72dpi)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (min-resolution: 1dppx)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait) {
    header .socialIcons {
        padding-left: 0;
    }

    .serviceArea .serviceContent {
        overflow: auto;
    }

    .slideshow #slide_holder, .slideshow #slide_holder div {
        min-height: 300px;
    }

    .slideshow #slide_holder {
        padding-bottom: 120px;
    }
    
    footer ul {
        width: 35%;
    }
    
    footer ul li {
        width: 100%;
        margin: 0 0 10px;
    }

    footer ul li:last-child {
        margin-bottom: 0;
    }
}

/* Portrait devices (and landscape mobiles) - general styling */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (in-resolution: 72dpi)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (min-resolution: 1dppx)
and (max-width: 800px)
and (orientation: portrait),
only screen
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (in-resolution: 72dpi)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (min-resolution: 1dppx)
and (max-width: 768px)
and (orientation: landscape),
only screen
and (max-width: 768px)
and (orientation: landscape) {
    header {
        width: 96%;
        height: 60px;
        padding: 10px 2%;
        position: fixed;
        top: 0;
        left: 0;
        background-color: #ffffff;
        box-shadow: 1px 1px 4px #bd0000;
        z-index: 40;
    }

    .m-menu {
        display: block;
        height: 50px;
        width: 50px;
        position: absolute;
        top: 15px;
        right: 2%;
        background: -webkit-linear-gradient(bottom, #ffffff 0%, #ffffff 5%, #bd0000 5%, #bd0000 25%, #ffffff 25%, #ffffff 40%, #bd0000 40%, #bd0000 60%, #ffffff 60%, #ffffff 75%, #bd0000 75%, #bd0000 95%, #ffffff 95%, #ffffff 100%);
        background: -moz-linear-gradient(bottom, #ffffff 0%, #ffffff 5%, #bd0000 5%, #bd0000 25%, #ffffff 25%, #ffffff 40%, #bd0000 40%, #bd0000 60%, #ffffff 60%, #ffffff 75%, #bd0000 75%, #bd0000 95%, #ffffff 95%, #ffffff 100%);
        background: -o-linear-gradient(bottom, #ffffff 0%, #ffffff 5%, #bd0000 5%, #bd0000 25%, #ffffff 25%, #ffffff 40%, #bd0000 40%, #bd0000 60%, #ffffff 60%, #ffffff 75%, #bd0000 75%, #bd0000 95%, #ffffff 95%, #ffffff 100%);
        background: linear-gradient(bottom, #ffffff 0%, #ffffff 5%, #bd0000 5%, #bd0000 25%, #ffffff 25%, #ffffff 40%, #bd0000 40%, #bd0000 60%, #ffffff 60%, #ffffff 75%, #bd0000 75%, #bd0000 95%, #ffffff 95%, #ffffff 100%);
        cursor: pointer;
    }
    
    header img {
        margin: 0;
        width: auto;
        height: 100%;
    }

    header .socialIcons {
        width: 30%;
        margin: 0 10px;
        padding-left: 0;
    }

    header .socialIcons img {
        margin: 15px 5px;
        max-width: 35px;
        width: 20%;
        height: auto;
    }

    header h1 {
        margin: 15px 10% 15px 0;
    }

    nav {
        text-align: center;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        padding: 0;
        -webkit-transition: all 500ms ease-in-out;
        -moz-transition: all 500ms ease-in-out;
        -o-transition: all 500ms ease-in-out;
        transition: all 500ms ease-in-out;
        -webkit-transform: translateY(-100%);
        -moz-transform: translateY(-100%);
        -o-transform: translateY(-100%);
        transform: translateY(-100%);
        z-index: -1;
    }

    nav.openMenu {
        overflow: hidden;
        -webkit-transform: translateY(0);
        -moz-transform: translateY(0);
        -o-transform: translateY(0);
        transform: translateY(0);
        z-index: 35;
        box-shadow: 1px 1px 4px #bd0000;
        height: auto;
    }

    nav ul {
        width: 100%;
        height: auto;
        overflow: auto;
        -webkit-flex-flow: column;
        -moz-flex-flow: column;
        -ms-flex-flow: column;
        flex-flow: column;
    }

    nav ul li {
        width: 100%;
        padding: 0;
        box-shadow: 0 1px 2px #ffffff;
    }

    nav ul li:last-child {
        box-shadow: none;
    }

    nav ul li a {
        display: block;
        padding: 10px 0;
    }

    #content {
        margin-top: 80px;
    }

    .slideshow {
        padding: 0;
        width: 100%;
    }
    
    .slideshow #slide_holder, .slideshow #slide_holder div {
        min-height: 180px;
    }

    .slideshow #slide_holder {
        padding-bottom: 120px;
    }
    
    .slideshow .slideOv {
        width: 100%;
    }

    .contentArea {
        width: 96%;
    }

    .contentArea h1 {
        line-height: 140%;
    }
    
    .home.window, .home.door, .testi, .window, .door {
        display: inline-block;
        width: 46%;
        padding: 0 1.5%;
    }
    
    .serviceArea img {
        height: auto;
        max-height: none;
    }

    .testi:hover {
        -webkit-transition: all 500ms ease-in-out;
        -moz-transition: all 500ms ease-in-out;
        -o-transition: all 500ms ease-in-out;
        transition: all 500ms ease-in-out;
        -webkit-transform: translateX(56%);
        -moz-transform: translateX(56%);
        -o-transform: translateX(56%);
        transform: translateX(56%);
    }

    .testi div {
        bottom: 20px;
    }

    .testi div:before {
        display: none;
    }

    .testi:hover div {
        -webkit-animation: testimonial 500ms ease-in-out none alternate;
        -moz-animation: testimonial 500ms ease-in-out none alternate;
        -o-animation: testimonial 500ms ease-in-out none alternate;
        animation: testimonial 500ms ease-in-out none alternate;
        -webkit-transition: all 500ms ease-in-out;
        -moz-transition: all 500ms ease-in-out;
        -o-transition: all 500ms ease-in-out;
        transition: all 500ms ease-in-out;
        -webkit-transform: translateX(-120%);
        -moz-transform: translateX(-120%);
        -o-transform: translateX(-120%);
        transform: translateX(-120%);
    }

    @keyframes testimonial {
        0% {
            -webkit-transform: scale(0, 0);
            -moz-transform: scale(0, 0);
            -ms-transform: scale(0, 0);
            -o-transform: scale(0, 0);
            transform: scale(0, 0);
            -webkit-transform: translateX(0%);
            -moz-transform: translateX(0%);
            -o-transform: translateX(0%);
            transform: translateX(0%);
        }
        100% {
            -webkit-transform: scale(1, 1);
            -moz-transform: scale(1, 1);
            -ms-transform: scale(1, 1);
            -o-transform: scale(1, 1);
            transform: scale(1, 1);
            -webkit-transform: translateX(-104%);
            -moz-transform: translateX(-104%);
            -o-transform: translateX(-104%);
            transform: translateX(-104%);
        }
    }
    
    .door.doorOpen .doorArea {
        -webkit-transform: translateX(-55%) rotateY(-85deg);
        -moz-transform: translateX(-55%) rotateY(-85deg);
        -ms-transform: translateX(-55%) rotateY(-85deg);
        -o-transform: translateX(-55%) rotateY(-85deg);
        transform: translateX(-55%) rotateY(-85deg);
    }

    form .contactInput {
        width: calc(48% - 40px);
        margin-top: 30px;
    }

    footer {
        width: 96%;
        padding: 20px 2%;
    }
    
    footer ul {
        display: none;
    }

    footer .companyInfo {
        width: 100%;
        text-align: left;
    }
}

/* Landscape large tablets */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (min-width: 768px) 
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (min-width: 768px) 
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (min-width: 768px) 
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (min-device-pixel-ratio: 1)
and (min-width: 768px) 
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (in-resolution: 72dpi)
and (min-width: 768px) 
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (min-resolution: 1dppx)
and (min-width: 768px) 
and (max-width: 1024px) 
and (orientation: landscape),
only screen
and (min-width: 768px) 
and (max-width: 1024px) 
and (orientation: landscape) {
    header, nav, .contentArea, footer {
        width: 80%;
    }

    nav {
        padding: 0 10%;
    }

    footer {
        padding: 20px 10%;
    }
}

/* Landscape small tablets */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (min-width: 600px) 
and (max-width: 800px) 
and (orientation: landscape),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (min-width: 600px) 
and (max-width: 800px) 
and (orientation: landscape),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (min-width: 600px) 
and (max-width: 800px) 
and (orientation: landscape),
only screen 
and (min-device-pixel-ratio: 1)
and (min-width: 600px) 
and (max-width: 800px) 
and (orientation: landscape),
only screen 
and (in-resolution: 72dpi)
and (min-width: 600px) 
and (max-width: 800px) 
and (orientation: landscape),
only screen 
and (min-resolution: 1dppx)
and (min-width: 600px) 
and (max-width: 800px) 
and (orientation: landscape),
only screen
and (min-width: 600px) 
and (max-width: 800px) 
and (orientation: landscape) {
    nav, .contentArea, footer {
        width: 90%;
    }

    nav {
        padding: 0 5%;
    }

    footer {
        padding: 20px 5%;
    }
}

/* Portrait small tablets */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 680px) 
and (orientation: portrait),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (max-width: 680px) 
and (orientation: portrait),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 680px) 
and (orientation: portrait),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 680px) 
and (orientation: portrait),
only screen 
and (in-resolution: 72dpi)
and (max-width: 680px) 
and (orientation: portrait),
only screen 
and (min-resolution: 1dppx)
and (max-width: 680px) 
and (orientation: portrait),
only screen
and (max-width: 680px) 
and (orientation: portrait),
only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 680px) 
and (orientation: landscape),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (max-width: 680px) 
and (orientation: landscape),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 680px) 
and (orientation: landscape),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 680px) 
and (orientation: landscape),
only screen 
and (in-resolution: 72dpi)
and (max-width: 680px) 
and (orientation: landscape),
only screen 
and (min-resolution: 1dppx)
and (max-width: 680px) 
and (orientation: landscape),
only screen
and (max-width: 680px) 
and (orientation: landscape) {
    header .socialIcons, header h1 {
        display: none;
    }
    
    nav.openMenu {
        height: auto;
        width: 100%;
    }
    
    nav.openMenu ul {
        height: 100%;
        overflow: auto;
    }

    .slideshow {
        padding-bottom: 40px;
    }

    .services, form {
        display: block;
        width: 100%;
        padding-top: 30px;
    }

    .serviceArea, .home.door, .door, .home.window, .window {
        width: 100%;
        text-align: center;
    }

    .home.door ul, .home.window ul {
        height: auto;
        padding: 20px 0;
        max-height: calc(100% - 45px);
    }

    .home.door ul {
        top: 10px;
        padding: 20px 0;
    }

    .home.door ul {
        top: 30px;
        padding: 20px 0;
    }

    .home.door ul li, .home.window ul li {
        margin: 10px 0;
    }

    .testi:hover {
		-webkit-transform: none;
		-moz-transform: none;
		-ms-transform: none;
		-o-transform: none;
		transform: none;
        -webkit-animation: none;
        -moz-animation: none;
        -o-animation: none;
        animation: none;
    }

    .testi:hover div {
		-webkit-transform: none;
		-moz-transform: none;
		-ms-transform: none;
		-o-transform: none;
		transform: none;
        -webkit-animation: none;
        -moz-animation: none;
        -o-animation: none;
        animation: none;
        bottom: 50px;
    }

    .contentArea li {
        width: 48%;
    }

    form .contactInput {
        width: calc(100% - 40px);
        margin-top: 30px;
    }
    
    form .contactText {
        width: calc(100% - 40px);
    }
    
    form .submit {
        margin: 30px 0 0 50%;
        width: 50%;
    }
}

/* Portrait small tablets */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 500px) 
and (orientation: portrait),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (max-width: 500px) 
and (orientation: portrait),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 500px) 
and (orientation: portrait),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 500px) 
and (orientation: portrait),
only screen 
and (in-resolution: 72dpi)
and (max-width: 500px) 
and (orientation: portrait),
only screen 
and (min-resolution: 1dppx)
and (max-width: 500px) 
and (orientation: portrait),
only screen
and (max-width: 500px) 
and (orientation: portrait),
only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 500px) 
and (orientation: landscape),
only screen 
and (-moz-min-device-pixel-ratio: 1)
and (max-width: 500px) 
and (orientation: landscape),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 500px) 
and (orientation: landscape),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 500px) 
and (orientation: landscape),
only screen 
and (in-resolution: 72dpi)
and (max-width: 500px) 
and (orientation: landscape),
only screen 
and (min-resolution: 1dppx)
and (max-width: 500px) 
and (orientation: landscape),
only screen
and (max-width: 500px) 
and (orientation: landscape) {
    .slideshow {
        padding-bottom: 20px;
    }

    .contentArea li {
        width: 100%;
    }
}