@import url(http://fonts.googleapis.com/css?family=Open+Sans);

body { 
  font-family: 'Open Sans', sans-serif;
  color: #666;
}

/* STRUCTURE */

#pagewrap {
	padding: 5px ;
	width: 1160px;
	margin: 20px auto;
	background-color: #2e578d;
	height:auto;
	padding-left: 15px;
}
header {
	height: 100px;
	padding: 0 15px;
}
#content {
	width: 350px;
	float: left;
	padding-top: 1px;
	padding-bottom: 9px;
	padding-right: 15px;
	padding-left: 10px;
	margin-right: 21px;
	margin-left: 10px;
	color: #ffffff;
}

#content2 {
	width: 350px;
	float: left;
	padding-top: 1px;
	padding-bottom: 9px;
	padding-right: 10px;
	padding-left: 1px;
	margin-left: 10px;
	color: #ffffff;
}

#middle {
	width: 360px; /* Account for margins + border values */
	float: left;
	padding: 5px 15px;
	margin-top: 0px;
	margin-right: 5px;
	margin-left: 5px;
	margin-bottom: 5px;
}

#sidebar {
	width: 270px;
	padding: 5px 15px;
	float: left;
}
footer {
	clear: both;
	padding: 0 15px;
}

/************************************************************************************
MEDIA QUERIES
*************************************************************************************/
/* for 980px or less */
@media screen and (max-width: 980px) {
	
	#pagewrap {
		width: 94%;
	}
	#content {
		width: 33%;
		padding: 1% 4%;
		display:block;
	}
	
	#content2 {
		width: 33%;
		padding: 1% 4%;
		display:block;
	}
	#middle {
		width: 41%;
		padding: 1% 4%;
		margin: 0px 0px 5px 5px;
		float: right;
	}
	
	#sidebar {
		clear: both;
		padding: 1% 4%;
		width: auto;
		float: none;
	}

	header, footer {
		padding: 1% 4%;
	}
	#pagewrap {
	padding: 5px ;
	width: 1160px;
	margin: 20px auto;
	background-color: #2e578d;
	height: 450px;
	padding-left: 15px;
}
}

/* for 700px or less */
@media screen and (max-width: 600px) {

	#content {
		width: auto;
		float: none;
		display:block;
	}
	
		#content2 {
		width: auto;
		float: none;
		display:block;
	}
	
	#middle {
		width: auto;
		float: none;
		margin-left: 0px;
	}
	
	#sidebar {
		width: auto;
		float: none;
	}

}

/* for 480px or less */
@media screen and (max-width: 480px) {

	header {
		height: auto;
	}
	h1 {
		font-size: 2em;
	}
	#sidebar {
		display: none;
		
	}

.futer {
	width:auto;
	background-color: #2e578d;
	height: 350px;
	position: relative;
}

.futerf {
	width:auto;
	background-color: #2e578d;
	height: 50px;
	position: relative;
}
}


#content {
	color: #ffffff;
}
#middle {
	color: #000000;
}
#sidebar {
	background: #f0efef;
}
header, #content, #content2, #middle, #sidebar {
	margin-bottom: 5px;
}

#header, #content, #content2, #middle, #sidebar, footer {
}
#pagewrap {
	background-image: #2e578d;
}


.futer {
	width: 100%;
	background-color: #2e578d;
	height: 240px;
	position: relative;
}

@media (max-width: 767px) {
.futer {
	width: 100%;
	background-color: #2e578d;
	height: 400px;
	position: relative;
}
}

@media (min-width: 768px) and (max-width: 991px) {
.futer {
	width: 100%;
	background-color: #2e578d;
	height: 280px;
	position: relative;
}
}