/*! HTML5 Boilerplate v5.3.0 | MIT License | https://html5boilerplate.com/ */

/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/

/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */

html {
	color: #222;
	font-size: 1em;
	line-height: 1.4;
}

/*
* Remove text-shadow in selection highlight:
* https://twitter.com/miketaylr/status/12228805301
*
* These selection rule sets have to be separate.
* Customize the background color to match your design.
*/

::-moz-selection {
	background: #b3d4fc;
	text-shadow: none;
}

::selection {
	background: #b3d4fc;
	text-shadow: none;
}

/*
* A better looking default horizontal rule
*/

hr {
	display: block;
	height: 1px;
	border: 0;
	border-top: 1px solid #ccc;
	margin: 1em 0;
	padding: 0;
}

/*
* Remove the gap between audio, canvas, iframes,
* images, videos and the bottom of their containers:
* https://github.com/h5bp/html5-boilerplate/issues/440
*/

audio,
canvas,
iframe,
img,
svg,
video {
	vertical-align: middle;
}

/*
* Remove default fieldset styles.
*/

fieldset {
	border: 0;
	margin: 0;
	padding: 0;
}

/*
* Allow only vertical resizing of textareas.
*/

textarea {
	resize: vertical;
}

/* ==========================================================================
Browser Upgrade Prompt
========================================================================== */

.browserupgrade {
	margin: 0.2em 0;
	background: #ccc;
	color: #000;
	padding: 0.2em 0;
}

/* ==========================================================================
Author's custom styles
========================================================================== */
body {
	font-family: 'Roboto', sans-serif;
	font-size: 16px;
	color: #333;
}
a {
	text-decoration: none;
	color: #F95959;
}
.content {
	width: 940px;
	margin: 0 auto;
	margin-bottom: 60px;
	padding: 0;
	box-sizing: border-box;
	background-color: #FFF;
	box-shadow: 0 4px 7px 0 rgba(0,0,0,0.2);
	border-radius: 0 0 4px 4px;
	overflow: hidden;
	font-weight: 300;
}
.grass {
	height: 31px;
}
.clear {
	clear: both;
}
.last {
	margin-right: 0 !important;
}
.filler {
	height: 1px;
}
.lines {
	padding: 0 !important;
	border: none !important;
}

/* Main Header */
#main_header {
	position: relative;
	padding-top: 10px;
	background-color: #BFCE28;
	z-index: 2;
}
#main_header div {
	width: 940px;
	margin: 0 auto;
}
#main_header h1 {
	display: inline-block;
	margin: 0;
}
#main_header h2 {
	display: inline-block;
	margin: 0;
	padding-left: 30px;
	font-family: 'Comfortaa', sans-serif;
	font-size: 2.125em;
	font-weight: 300;
	color: #FFF;
	-webkit-transform: translateY(6px);
	transform: translateY(6px);
}
#main_header #social_media {
	position: relative;
	width: 890px;
	height: 0;
	padding: 0;
}
#main_header #social_media a {
	position: absolute;
	right: -35px;
	top: 10px;
}
#main_header #social_media a:last-of-type {
	top: 70px;
}
#main_header #social_media img {
	position: absolute;
}
#main_header #social_media img:nth-of-type(2n-1) {
	display: none;
}

#main_header #main_nav {
	position: relative;
	width: 940px;
	margin: 16px auto 0;
	box-sizing: border-box;
	background-color: rgba(255, 255, 255, .5);
	border-bottom: 1px solid rgba(255, 255, 255, 0);
	box-shadow: 0 4px 7px 0 rgba(0,0,0,0.2);
	border-radius: 4px 4px 0 0;
	text-transform: uppercase;
	font-weight: 300;
	color: #996528;
}
#main_header #main_nav::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 20px;
	left: 0;
	top: 63px;
	background-color: #FFF;
}
#main_header ul {
	padding-left: 0;
}
#main_header li {
	position: relative;
	display: inline-block;
	padding: 22px 20px 18px;
	list-style-type: none;
	cursor: pointer;
	font-family: 'Comfortaa', sans-serif;
}
#main_header li:hover {
	background-color: #F95959;
	color: #FFF;
}
#main_header a:first-of-type li:hover {
	border-radius: 4px 0 0 0;
}
#main_header li:hover a {
	color: #996528;
}
#main_header a {
	color: #996528;
	letter-spacing: 1px;
}
#main_header #search_item:hover {
	background: none;
	color: #996528;
	cursor: default;
}

#search_item {
	float: right;
}
#header_search {
	position: relative;
}
#header_search input {
	width: 0;
	font-size: 1em;
	font-weight: 300;
	border: none;
	border-bottom: solid 0 #996528;
	background: none;
	color: #996528;
	font-family: "Roboto", sans-serif;
	transition: all .3s ease-out;
}
#header_search::before {
	content: '\f22c';
	display: inline-block;
	position: absolute;
	left: -34px;
	top: -10px;
	padding: 8px 13px 8px 15px;
	border-radius: 50%;
	border: solid 1px rgba(0, 0, 0, 0);
	font-family: 'fontello';
	font-size: 1.1em;
	cursor: pointer;

	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
}
.search_icon::before {
	border: solid 1px #996528 !important;
}
#header_search input:focus {
	outline: none;
	border-bottom: solid 1px #996528;
}
#header_search input::-webkit-input-placeholder {
	color: #b99263;
	font-weight: 300;
}
#header_search input::-moz-placeholder {
	color: #b99263;
	font-weight: 300;
}
#header_search input:-ms-input-placeholder {
	color: #b99263;
	font-weight: 300;
}
#header_search input:-moz-placeholder {
	color: #b99263;
	font-weight: 300;
}

/* Content Container */
.content h3 {
	margin: 0;
	padding: 40px 0 40px;
	text-align: center;
	text-transform: uppercase;
	font-family: 'Comfortaa', sans-serif;
	font-size: 2.125em;
	font-weight: 300;
	color: #BFCE28;
	box-shadow: 0 2px 3px 0 rgba(0,0,0,0.2);
}
.content header,
.content footer {
	background-color: #FFF;
}
.content header {
	position: relative;
	margin-bottom: 30px;
}
.content article {
	position: relative;
	padding-bottom: 150px;
	min-height: calc(100vh - 590px);
	background-color: #FCFCFC;
}
.content .grass {
	position: absolute;
	width: 100%;
	bottom: 110px;
	background: transparent url(../img/white_grass-background.png) bottom;
	z-index: 3;
}
.content footer {
	position: absolute;
	width: 100%;
	height: 110px;
	bottom: 0;
	box-shadow: 0 -5px 40px 0 rgba(0,0,0,0.2);
}
.content footer img {
	display: none;
	position: absolute;
	right: 20px;
}
.content #file_type,
.content #file_size {
	color: #333;
}
.content #file_size {
	float: right;
}

/* Main Footer */
.main_footer {
	box-shadow: 0 -5px 40px 0 rgba(0,0,0,0.2);
	background-color: #F2AE4C;
	color: #996528;
}
.main_footer .grass {
	position: relative;
	background: transparent url(../img/yellow_grass-background.png) bottom;
	-webkit-transform: translateY(-30px); /* Background's image + article's padding = 50px. */
	transform: translateY(-30px);
}
#footer_content {
	width: 940px;
	margin: -25px auto 0;
	padding: 0 30px;
	box-sizing: border-box;
}
#footer_content .column {
	float: left;
	width: 240px;
	margin-right: 50px;
	padding-top: 15px;
	font-weight: 300;
}
#footer_content .column.first {
	width: 585px;
}
#footer_content h3 {
	margin: 0 0 15px;
	text-transform: uppercase;
	font-size: 1em;
	font-weight: 400;
}
#mTel_logo_footer {
	margin-bottom: 15px;
	text-align: center;
}
#legal {
	background-color: #E5A548;
	color: #654920;
}
#legal p {
	width: 940px;
	margin: 0 auto;
	padding: 5px 30px;
	box-sizing: border-box;
	font-size: 0.7em;
	text-align: right;
	font-weight: 300;
	font-variant: small-caps;
}

.page {
	background: url(../img/background1.svg) center bottom,
	url(../img/background2.svg) center bottom,
	url(../img/background3.svg) center bottom,
	url(../img/background4.svg) center bottom;
	background-repeat: no-repeat;
	background-color: transparent;
	background-size: 100%;
	background-position-y: calc(100% + 150px), calc(100% + 100px), calc(100% + 50px), 100%;
}

/* Library */
#home .content article ul {
	padding: 0;
	list-style-type: none;
}
#home .content article ul li {
	padding: 0 30px;
	line-height: 34px;
}
#home .content article ul li:nth-child(2n) {
	background-color: #F4F4F4;
}

/* Gallery */
/* Programs */
#images_container figure,
#programs_container figure {
	position: relative;
	width: 280px;
	min-height: 158px;
	margin: 0;
	margin-bottom: 20px;
	overflow: hidden;
	border-radius: 4px;
}
#images_container img,
#programs_container img {
	display: block;
	width: 100%;
	min-height: 158px;
	background-color: #ccc;
}
#images_container figcaption,
#programs_container figcaption {
	position: absolute;
	width: 100%;
	bottom: 0;
	padding: 10px;
	box-sizing: border-box;
	color: #fff;
	background-color: rgba(223, 231, 147, .7);
}
#images_container figcaption .grass,
#programs_container figcaption .grass {
	position: absolute;
	width: 100%;
	bottom: 0;
	background: transparent url(../img/light_green_grass-background.png);
	opacity: .7;
}

/* Gallery */
#images_container {
	padding: 0 10px 0 30px;
}
#images_container figcaption {
	opacity: 0;
	transition: .3s linear;
}
#images_container figcaption .grass {
	top: -31px;
	left: 0;
}
#images_container figure:hover figcaption {
	opacity: 1;
}

/* Programs */
#programs_container {
	padding: 0 30px;
}
#programs_container a {
	display: block;
	float: left;
}
#programs_container figure {
	margin-right: 20px;
}
#programs_container a:nth-of-type(3n) figure {
	margin-right: 0;
}
#programs_container img {
	height: 280px;
}
#programs_container figcaption {
	bottom: -20px;
	transition: .5s ease-out;
}
#programs_container figcaption strong {
	font-weight: 400;
	font-variant: small-caps;
}
#programs_container figcaption span {
	display: inline-block;
	padding: 0;
	padding-top: 10px;
	height: 0;
	overflow: hidden;
	opacity: 0;
	transition: all .5s ease-out;
}
#programs_container figure .grass {
	position: absolute;
	top: -31px;
	left: 0;
}
#programs_container figure:hover span {
	height: 220px;
	opacity: 1;
	transition: all .5s ease-out, opacity .3s .3s linear;
}


/* Single program */
#single_program #single_program_content {
	float: right;
	width: 670px;
	padding: 0 30px 0 0;
	margin-left: 20px;
	box-sizing: border-box;
}
#single_program h4,
#single_program h5,
#single_program h6 {
	margin-top: 0;
	text-align: center;
	text-transform: uppercase;
	font-family: 'Comfortaa', sans-serif;
	font-weight: 400;
	letter-spacing: 1px;
}
#single_program_content h4 {
	font-size: 2.125em;
	font-weight: 300;
	margin-bottom: 30px;
}
#single_program_content h5 {
	font-size: 1.5em;
	font-weight: 300;
	margin: 30px 0 20px;
}
#single_program_content h6 {
	font-size: 1.125em;
	margin: 30px 0 15px;
}
#single_program_content dl ul {
	padding: 0;
	margin: 0;
	list-style: none;
}
#single_program_content dd li span {
	padding-left: 41px;
	padding-top: 0;
	padding-bottom: 0;
	box-sizing: border-box;
	width: 100%;
}
#single_program_content dd li span::before {
	content: "•";
	position: absolute;
	display: inline-block;
	color: #333;
	-webkit-transform: translateX(-20px);
	transform: translateX(-20px);
}
#single_program_content dd li:first-of-type span {
	padding-top: 12px;
}
#single_program_content dd li:last-of-type span {
	padding-bottom: 12px;
}
#single_program_content dt,
#single_program_content dd {
	display: inline-block;
	width: 50%;
	margin: 0;
	margin-top: -6px;
	box-sizing: border-box;
}
#single_program_content dt {	
	vertical-align: top;
}
#single_program_content dt span{
	float: right;
	border-right: 5px solid #F9F9E5;
}
#single_program_content dd span{
	float: left;
}
#single_program_content dt span,
#single_program_content dd span {
	padding: 12px 21px;
}
#single_program_content dt:nth-of-type(2n+1) span,
#single_program_content dd:nth-of-type(2n+1) span {
	background-color: #EFF2C7;
}
#single_program_content dt:nth-of-type(2n) span,
#single_program_content dd:nth-of-type(2n) span {
	background-color: #F9F9E5;
}
#single_program_content p {
	margin: 7px 0;
}
#single_program_content p span {
	font-variant: small-caps;
}
#single_program_content ul,
#single_program_content ol {
	margin: 20px 0;
	padding-left: 20px;
}
#single_program_content ul ul {
	margin: 15px 0;
}
#single_program_content table {
	width: 100%;
}
#single_program_content tr:nth-child(2n) {
	background-color: #F4F4F4;
}
#single_program_content td {
	padding: 5px 10px;
}
#single_program_content td:nth-child(2n) {
	text-align: right;
}

#single_program aside {
	float: left;
	width: 220px;
	padding: 0;
	margin-left: 30px;
	margin-top: 20px; /* Because of the grass. */
	box-sizing: border-box;
	background-color: #FFF;
	box-shadow: 0 0 10px 0 rgba(0,0,0,0.2);
	border-radius: 0 0 4px 4px;
}
#single_program aside .grass {
	position: relative;
	width: 100%;
	bottom: 0;
	background: transparent url(../img/light_green_grass-background.png);
	-webkit-transform: translateY(-30px);
	transform: translateY(-30px);
}
#single_program aside h5 {
	margin-top: -30px; /* Because of the grass. */
	padding: 15px 0;
	box-sizing: border-box;
	background-color: #dfe793;
	text-transform: initial;
	font-size: 1.3125em;
}
#single_program aside nav {
	margin-top: -30px;
	padding: 10px 15px;
	list-style: none;
}
#single_program aside ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
#single_program aside ul li {
	margin: 10px 0;
}
#single_program aside ul a {
	color: #996528;
}

/* Contacts */
#contacts h4,
#contacts dt {
	padding: 0 15px 0 30px;
	box-sizing: border-box;
}
#contacts h4 {
	margin: 40px 0 10px;
	font-family: 'Comfortaa', sans-serif;
	font-weight: 300;
	font-size:  1.25em;
	color: #996528;
}
#contacts dl {
	margin: 0;
}
#contacts dt,
#contacts dd {
	display: inline-block;
	width: calc(100% - 180px);
	margin: 0;
	line-height: 30px;
}
#contacts dt {
	width: 180px;
	font-variant: small-caps;
	color: #BFCE28;
	vertical-align: top;
}
#contacts dd {
    padding: 0 10px;
    box-sizing: border-box;
}
#contacts dt:nth-of-type(2n),
#contacts dd:nth-of-type(2n) {
	background-color: #F4F4F4;
}
#contacts dt br {
	display: none;
}
#map {
	margin: 30px auto;
	width: 100%;
	height: 200px;
}

/* Mobile */
/* Mobile 1st step */
@media screen and (max-width: 1100px) {
	#main_header #social_media a {
		position: absolute;
		right: 25px;
		top: -120px;
	}
	#main_header #social_media a:last-of-type {
		right: 80px;
		top: -120px;
	}
	#main_header #social_media img:nth-of-type(2n-1) {
		display: initial;
	}
	#main_header #social_media img:nth-of-type(2n) {
		display: none;
	}
}
@media screen and (max-width: 940px) {
	#main_header {
		width: 100%;
		padding: 15px 20px 0;
		box-sizing: border-box;
	}
	#main_header div {
		width: 100%;
	}
	#main_header #main_nav {
		width: 100%;
	}
	#main_header #social_media {
		width: 100%;
	}
	#main_header #social_media a {
		right: 50px;
	}
	#main_header #social_media a:last-of-type {
		right: 105px;
	}

	.content {
		width: calc(100% - 40px);
	}
	#single_program #single_program_content {
		width: 100%;
		padding: 0 30px;
		margin-left: 0;
	}
	#single_program aside {
		width: calc(100% - 60px);
		margin-top: 40px;
	}

	#programs_container a:nth-of-type(3n) figure {
		margin-right: 20px;
	}

	#footer_content {
		width: 100%;
	}
	#footer_content .column {
		display: inline-block;
		float: none;
		vertical-align: top;
	}
	#mTel_logo_footer {
		text-align: left;
	}
	#legal p {
		width: 100%;
	}
}
@media screen and (max-width: 750px) {
	#main_header h2 {
		font-size: 1.8em;
	}
	#main_header #main_nav {
		border: none;
    	padding-left: 10px;
    	box-sizing: border-box;
	}
	#main_header #main_nav::after {
		top: 40px;
	}
	#main_header li {
		padding: 13px 10px 10px;
		font-size: .8em;
	}
	#header_search::before {
		left: -30px;
		top: -9px;
		padding: 6px 10px 6px 12px;
	}
	#main_header #social_media a {
		right: 35px;
		top: -80px;
	}	
	#main_header #social_media a:last-of-type {
		right: 75px;
		top: -80px;
	}
	#main_header #social_media img {
		width: 35px;
	}

	.content h3 {
		margin: 0;
		padding: 20px 0 20px;
		font-size: 1.8em;
	}
	.content .grass {
		bottom: 80px;
	}
	.content footer {
		height: 80px;
	}
	.content footer img {
		width: 80px;
	}

	#footer_content .column {
		margin-right: 0;
		width: 100%;
	}
}
@media screen and (max-width: 600px) {
	#main_header h2 {
		width: 300px;
	}
	#main_header h1 img {
		position: relative;
		top: -15px;
	}
	#main_header ul {
		padding-right: 160px;
	}
	#main_header #main_nav::after {
		top: 80px;
	}
	#search_item {
		float: none;
	}
	#header_search::before {
		left: -5px;
		top: -6px;
		padding: 5px 8px 3px 9px;
	}
	#header_search input {
		padding-left: 30px;
	}
	#main_header a li:hover,
	#main_header a:first-of-type li:hover {
		border-radius: 4px;
	}
	#main_header #social_media a {
		right: 45px;
		top: -70px;
	}
	#main_header #social_media a:last-of-type {
		right: 85px;
		top: -70px;
	}

	#programs_container a {
		float: none;
	}
	#programs_container figure {
		width: 100%;
	}

	#single_program_content dt,
	#single_program_content dd {
		width: 100%;
		margin: 0;
	}
	#single_program_content dt span,
	#single_program_content dd span {
		float: none;
		display: inline-block;
		width: calc(100% - 42px);
		border: none;
	}
	#single_program_content dt span {
		padding-bottom: 0;
		font-weight: 400;
	}
	#single_program_content dd span,
	#single_program_content dd li:first-of-type span {
		padding-top: 0;
	}
	#single_program_content dd ul span {
		padding-bottom: 0;

	}
	#single_program_content dd li:last-of-type span {
		padding-bottom: 12px;
	}

	#footer_content .column.first {
		width: 100%;
	}
}
@media screen and (max-width: 460px) {
	#main_header h2 {
	    width: 220px;
	    padding-left: 20px;
	}
	#main_header #main_nav::after {
		top: 120px;
	}
	#main_header #social_media a,
	#main_header #social_media a:last-of-type {
		top: -110px;
	}
}
@media screen and (max-width: 400px) {
	#images_container figure {
		width: calc(100% - 60px);
	}
	#main_header h1 img {
		top: 0;
	}
	#main_header h2 {
		padding-left: 0;
		width: 260px;
	}
	#main_header ul {
		padding-right: 190px;
	}
	#header_search input {
		width: initial;
	}
	#main_header #social_media a,
	#main_header #social_media a:last-of-type {
		top: -190px;
	}
	#main_header #main_nav::after {
		top: 200px; 
	}

	#contacts dt,
	#contacts dd {
		width: 100%;
		padding: 0 30px;
	}
	#contacts dd {
		padding-left: 60px;
	}
	#contacts dt br {
		display: none !important;
	}
}

/* Kids don't do that at home! */
@media screen and (max-width: 685px) {
	#contacts dt br:nth-of-type(1),
	#contacts dt br:nth-of-type(2) {
		display: initial;
	}
}
@media screen and (max-width: 490px) {
	#contacts dt br:nth-of-type(3) {
		display: initial;
	}
}
@media screen and (max-width: 420px) {
	#contacts dt br:nth-of-type(4) {
		display: initial;
	}
}



























/* ==========================================================================
Helper classes
========================================================================== */

/*
* Hide visually and from screen readers
*/

.hidden {
	display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*/

.visuallyhidden {
	border: 0;
	clip: rect(0 0 0 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

/*
* Extends the .visuallyhidden class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
	clip: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	position: static;
	width: auto;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
	visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
	content: " "; /* 1 */
	display: table; /* 2 */
}

.clearfix:after {
	clear: both;
}

/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */

@media only screen and (min-width: 35em) {
	/* Style adjustments for viewports that meet the condition */
}

@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
	/* Style adjustments for high resolution devices */
}

/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
http://www.phpied.com/delay-loading-your-print-css/
========================================================================== */

@media print {
	*,
	*:before,
	*:after,
	*:first-letter,
	*:first-line {
		background: transparent !important;
color: #000 !important; /* Black prints faster:
http://www.sanbeiji.com/archives/953 */
box-shadow: none !important;
text-shadow: none !important;
}

a,
a:visited {
	text-decoration: underline;
}

a[href]:after {
	content: " (" attr(href) ")";
}

abbr[title]:after {
	content: " (" attr(title) ")";
}

/*
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/

a[href^="#"]:after,
a[href^="javascript:"]:after {
	content: "";
}

pre,
blockquote {
	border: 1px solid #999;
	page-break-inside: avoid;
}

/*
* Printing Tables:
* http://css-discuss.incutio.com/wiki/Printing_Tables
*/

thead {
	display: table-header-group;
}

tr,
img {
	page-break-inside: avoid;
}

img {
	max-width: 100% !important;
}

p,
h2,
h3 {
	orphans: 3;
	widows: 3;
}

h2,
h3 {
	page-break-after: avoid;
}