/* Grammar Captive Template */
/* Credit:  This page is an adaption of the three-column responsive design posted at http://codepen.io/Cheesetoast/pen/KFAaq */

@import url(https://fonts.googleapis.com/css?family=Open+Sans);
@charset "UTF-8";

body { 
  font-family: 'Open Sans', sans-serif;
  color: #666;
}

/************************************************************************************
STRUCTURE
*************************************************************************************/

#pagewrap {
	padding: 5px;
	width: 960px;
	margin: auto;
/*	margin: 20px auto; */
}
header {
	height: -webkit-auto;
	height: auto;
/*	padding: 15px 15px 5px 15px; */
	padding: 0px 15px;
}

header h1 {
	font-size: 3em;
}

#content {
	width: 190px;
	float: left;
	padding: 5px 15px;
/*	margin: 5px 5px 5px 0px; */
}

#middle {
	width: 504px; /* Account for margins + border values */
	float: left;
/*	padding: 5px 15px; */
	padding: 5px 10px;
	margin: 0px 5px 5px 5px;
}

#sidebar {
/*	width: 156px; */
/*	padding: 0px 15px 10px 15px; */
	width: 171px;
	padding: 5px 15px;
	float: left;
}

footer {
	clear: both;
	display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 10px 15px;
}

.footer_item_right {
	text-align: right;
	text-align: -moz-right;
	text-align: -webkit-right;
}

/************************************************************************************
Banner Styling
************************************************************************************/

div.flex_container1 {
	display: -webkit-flex;
	display: flex;
	flex-direction: row;
	-webkit-flex-direction: row;
	justify-content: space-between;
	flex-wrap: wrap;
	align-items: center;
}

#newsletter_subscription.flex_container2 {
	display: -webkit-flex;
	display: flex;
	flex-direction: column;
	-webkit-flex-direction: column;
	justify-content: flex-end;
}

#newsletter_subscription_referral #sevengates_background {
	vertical-align:middle;
	text-align:center;
	padding-top:15px;
	padding-bottom:10px;
/*		background-image:  url('_images/gates/opacity/onegate/brandenburg.png'); 
background-repeat: no-repeat;
height: 121px;
width: 120px;
*/		}

#newsletter_subscription_referral #sevengates_text {
	position: relative;
	line-height:1.4em;
	height: auto;
	width: auto;
	-moz-right: 30px;
	-webkit-right: 30px;
	right:30px;
	top: -110px;
	z-index: 10;
	text-align:left;
	height: 0px;
}

#newsletter_subscription:link {color:#ffffff;text-decoration:none;}
#newsletter_subscription:visited {color:#ffffff;}
#newsletter_subscription:hover {color:#5a4149;}
#newsletter_subscription:active {color:#fadb9d;}

/************************************************************************************
MEDIA QUERIES
*************************************************************************************/
/* for 980px or less */
@media screen and (max-width: 982px) {
	
	#pagewrap {
		width: 94%;
	}
	#content {
		width: 28%;
		padding: 1% 4%;
	}
	#middle {
		width: 54%;
		padding: 1% 4%;
		margin: 0px 0px 5px 5px;
		float: right;
	}
	
	#sidebar {
		clear: both;
		padding: 1% 4%;
		width: auto;
		float: none;
	}

	#sidebar #gate_images {
		display: -webkit-flex;
		display: flex;
		-webkit-flex-direction: row;
		flex-direction: row;
		direction: row;
		flex-wrap: wrap;
		justify-content: center;
		background-color:#f9f9f9;
	}
	
	header, footer {
		padding: 1% 4%;
	}
}

/* for 700px or less */
@media screen and (max-width: 700px) {

	#content {
		width: auto;
		float: none;
	}
	
	#middle {
		width: auto;
		width: -moz-auto;
		float: none;
		margin-left: 0px;
	}
	
	#sidebar {
/*		clear: both;   */
/*		padding: 1% 4%; */
		width: auto;
		width: -moz-auto;
		float: none;
	}
}

/* for 480px or less */
@media screen and (max-width: 480px) {

	header {
		height: auto;
	}
	
	header h1 {
		font-size: 2.0em;
	}
	
	#sidebar {
		width: none;
	}
	
#newsletter_subscription_referral #sevengates_text {
	position: relative;
	line-height:1.4em;
	height: auto;
	width: auto;
	-moz-right: 0px;
	-webkit-right: 0px;
	right:0px;
	top: -110px;
	z-index: 10;
	text-align:left;
	height: 0px;
}

	footer {
		clear: both;
		display: -webkit-flex;
		display: flex;
		-webkit-flex-direction: column;
		flex-direction: column;
		padding: 5px 15px;
	}

	.footer_item_right {
		text-align: left;
		text-align: -moz-left;
		text-align: -webkit-left;
	}		
}
/************************************************************************************
STYLE FORMATTING
*************************************************************************************/
header {
	background-color: #999999;
	color: #ffffff;
}

#content {
	background: #5a4149;
	color: #fff;
}

header, #content, #middle, #sidebar {
	margin-bottom: 5px;
}

/* #pagewrap, header, #content, #middle, #sidebar, footer { */
   #pagewrap, #sidebar, footer {
	border: solid 1px #ccc;
}

#sidebar {
	text-align: center;
}

footer {
	background: #5a4149;
	color: #ffffff;
	font-size: 0.8em;
}

/************************************************************************************
LINKAGE
*************************************************************************************/

#content a:link {color:#fff; text-decoration: none;}
#content a:visited {color:#fadb9d;}
#content a:hover {font-weight: 800;text-decoration: none;color:#fff;}
#content a:active {color:#5a4149;}

footer a:link {color:#fff; text-decoration: none;}
footer a:visited {color:#fadb9d;}
footer a:hover {font-weight: 800;text-decoration: none;color:#fff;}
footer a:active {color:#5a4149;}


