/* Puts hearing comments underneath file preview when screen width becomes smaller */
@media only screen and (max-width: 1024px) {
	.hearing_item .hearing_file {
		float: none;
		height: auto;
	}

	.hearing_item .hearing_file + .hearing_comment {
		padding-left: 0px;
		margin-left: 0px;
		margin-top: 10px;
	}

	.hearing_title {
		clear: both;
	}
}

/* Makes sure background does not get too small */
@media only screen and (max-width: 768px) {
    body {
        background:
                url(../img/background_2000.jpg) no-repeat top left fixed,
                #000000 none repeat scroll 0 0 ; /* secondary black background */
        background-size: 768px;
    }

    .item .item_image {
        height: auto;
        margin-top: 30px;
    }

    body .course_item .course_item_image_box {
        float: none;
        width: 100%;
    }

    body .course_item .course_item_image_box + .course_item_info {
        margin-top: 30px;
        margin-left: 0;
        padding-left: 0;
    }

    body .course_item_info {
        margin-left: 0;
    }

    .course_item_image_box {
        text-align: center;
    }

    .course_item_image {
        height: 200px;
    }
}

/* Adapts css to non-retina mobile devices */
@media only screen and (max-width: 640px) {

    .avinor_header, .avinor_footer, .menu_container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .container {
        width: 100%;
    }

    .subheader_pad{
        padding-bottom: 15px;
    }

    body .column {
        float: none;
        margin-top: 20px;
        margin-bottom: 20px;
        width: 100%;
    }

    body .column .block  {
        margin-bottom: 20px;
    }

    .column .block  img {
        width: 100%;
    }

    .company_container {
        margin: auto;
        width: 225px;
    }

    .company {
        margin: 10px;
    }

    .pds_menu_left {
        display: none;
    }

    .pds_menu_left_narrow {
        display: block;
    }

    body .article_text_title h2 {
        position: relative;
        white-space: normal;
        margin-bottom: -30px;
        padding-top: 20px;
    }

    body .item .item_image {
        float: none;
    }

    body .item .item_image + .item_info {
        margin-top: 30px;
        margin-left: 0;
        padding-left: 0;
    }

    body .item_info {
        margin-left: 0;
    }

    .line {
        display: none;
    }

    select{
        width: 100%;
    }
}

/* Switch to two rows in header */
@media only screen and (max-width: 530px) {
	.avinor_header_title{
		clear: both;
		float: left;
		padding-top: 0;
	}

	.logo{
		padding-top: 15px;
	}

	.logo_helper{
		padding-top: 1em;
		padding-bottom: 0;
	}
}

/* Stop images from being resized just in width, and not in height. */
@media only screen and (max-width: 360px) {
    .course_item_image {
        height: auto;
    }
}

/* Adapts css to retina mobile devices */
@media 
only screen and (-webkit-min-device-pixel-ratio: 2)      and (min-width: 320px),
only screen and (   min--moz-device-pixel-ratio: 2)      and (min-width: 320px),
only screen and (     -o-min-device-pixel-ratio: 2/1)    and (min-width: 320px),
only screen and (        min-device-pixel-ratio: 2)      and (min-width: 320px),
only screen and (                min-resolution: 192dpi) and (min-width: 320px),
only screen and (                min-resolution: 2dppx)  and (min-width: 320px){
	
	.container {
		width: 100%;
	}
	
	body .column {
		float: none;
		margin-top: 20px;
		margin-bottom: 20px;
		width: 100%;
	}
	
	body .column .block  {
		margin-bottom: 25px;
	}
	
	.column .block  img {
		width: 100%;
	}
	
	.company_container {
		margin: auto;
		width: 225px;
	}
	
	.company {
		margin: 10px;
	}
	
	.pds_menu_left {
		display: none;
	}
	
	.pds_menu_left_narrow {
		display: block;
	}
}

/* Adapts css to browser window size */
@media only screen and (min-width: 640px) {
	.container {
		width: 600px;
	}
	
	.company_container {
		width: 500px;
	}
	
	.pds_menu_left {
		display: none;
	}
	
	.pds_menu_left_narrow {
		display: block;
	}
}

@media only screen and (min-width: 768px) {
	.container {
		width: 710px;
	}
	
	.company_container {
		margin-left: 30px;
		width: 500px;
	}
	
	.pds_menu_left {
		display: block;
	}
	
	.pds_menu_left_narrow {
		display: none;
	}
}

@media only screen and (min-width: 1024px) {
	.container {
		width: 830px;
	}
	
	.company_container {
		margin-left: -30px;
		width: 700px;
	}
	
	.pds_menu_left {
		display: block;
	}
	
	
	.pds_menu_left_narrow {
		display: none;
	}
}

@media only screen and (min-width: 1300px) {
	.container {
		width: 1040px;
	}
	
	.pds_menu_left {
		display: block;
	}
	
	.company_container {
		margin-left: 70px;
		width: 700px;
	}
	
	.pds_menu_left_narrow {
		display: none;
	}

	.course_item .course_item_image_box {
		width: 30%;
	}
}

/* Fixes wrong header menu height in Chrome, Opera and Safari */
@media only screen and (-webkit-min-device-pixel-ratio:0) {
	.menu_container {
		height: 54px;
	}

	.pds_menu_right {
		height: 54px;
	}
}