/* ------------------------
Responsive Design Updates
--------------------------- */

/* -- Remove Fixed Widths -- */
#page-wrapper {
	min-width: 0;
}
#page-wrapper > header,
#page-wrapper > footer {
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	width: 100%;
	max-width: 960px;
}
#page-wrapper > header {
	padding: 15px 20px 20px;
}
main > section {
		-moz-box-sizing: border-box;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		padding-right: 20px;
		padding-left: 20px;
	width: 100%;
}
.summary-section > .row-fluid {
	width: 100%;
	max-width: 830px;
}
#main-content {
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	width: 100%;
	max-width: 830px;
}

/* -- Global Updates -- */
iframe {
	max-width: 100%;
	max-height: 320px;
}
main img {
	max-width: 100%;
}
input[type='text'],
textarea {
	font-size: 16px;
}
.hero-panel {
	max-width: 960px;
}

@media (max-width: 800px) {
	/* Add padding to left/right of all content */
	main > section {
		-moz-box-sizing: border-box;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		padding-right: 20px;
		padding-left: 20px;
	}

	/* Sticky Content Menus */
	#home-menu,
	#software-menu {
		display: none; /* No sticky menus at this size */
		visibility: visible !important;
	}
	#home-menu ul,
	#software-menu ul {
		display: block;
		margin: 0 20px;
		border-radius: 5px;
		text-align: left;
	}
	#home-menu ul li,
	#software-menu ul li {
		display: block;
		padding: 0;
		border-top: 1px solid #98a7b3;
		background: none;
	}
	#home-menu li:first-child,
	#software-menu li:first-child {
		border-top-width: 0;
	}
	#home-menu a,
	#software-menu a {
		display: block;
		padding: .25em 0;
	}
	.js-homeMenu-clone {
		display: none !important;
	}

	/* -- Sidebars -- */
	.sidebar {
		-moz-box-sizing: border-box;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		float: none;
		margin: 0 0 20px;
		width: 100%;
	}

	/* -- Teaser Images -- */
	.teaser-image img {
		float: none;
		margin: 0 0 20px;
		max-width: 100%;
		max-height: 100%;
	}
}

/* -- Site Header -- */
@media (max-width: 800px) {
	#page-wrapper > header {
		padding: 10px 20px 20px;
	}
	.user-menu {
		display: none;
	}
	#page-wrapper .search.logo {
		height: auto;
	}
	.search.logo .span5 {
		float: none;
		width: 100%;
		text-align: center;
	}
	.search.logo img {
		max-height: 50px;
	}
	.search.logo .span7 {
		float: none;
		margin-left: 0;
		width: 100%;
	}
	#block-search-form {
		position: absolute;
		right: 0;
		width: 307px;
	}
	form#quick-search {
		float: none;
		margin-left: 40px;
	}
	#main-menu {
		display: block;
		margin: 0 0 .5em;
		padding: .5em 1em;
		border-radius: 5px;
		text-align: left;
		background: #6b8497;
	}
	#main-menu li {
		display: block;
		padding: 0;
		border-top: 1px solid #98a7b3;
		background: none;
	}
	#main-menu li.first {
		border-top-width: 0;
	}
	#main-menu a {
		display: block;
		padding: .25em 0;
		color: #fff;
	}
	#main-menu a:hover,
	#main-menu a:focus {
		border-bottom-width: 0;
	}

	/* Mobile Menu */
	.js-bearMenu-wrapper {
		position: relative;
		z-index: 1;
	}
	.js-bearMenu-toggler {
		float: left;
		margin: 15px 0;
		white-space: nowrap;
		cursor: pointer;
	}
	.js-bearMenu-toggler:after {
		content: '\f0c9';
		font: 28px/1 FontAwesome;
		color: #40627c;
	}
	.js-bearMenu-wrapper .nav {
		margin-bottom: 10px;
		margin-left: 0;
	}
	#page-wrapper .js-bearMenu-wrapper li ul {
		display: block;
		padding: 0 1em;
		background: #566a79; /* Old browsers */
		background: -moz-linear-gradient(top,  #566a79 0%, #6b8497 57%); /* FF3.6+ */
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#566a79), color-stop(57%,#6b8497)); /* Chrome,Safari4+ */
		background: -webkit-linear-gradient(top,  #566a79 0%,#6b8497 57%); /* Chrome10+,Safari5.1+ */
		background: -o-linear-gradient(top,  #566a79 0%,#6b8497 57%); /* Opera 11.10+ */
		background: -ms-linear-gradient(top,  #566a79 0%,#6b8497 57%); /* IE10+ */
		background: linear-gradient(to bottom,  #566a79 0%,#6b8497 57%); /* W3C */
		filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#566a79', endColorstr='#6b8497',GradientType=0 ); /* IE6-9 */
	}
	.js-bearMenu-sticky #page-wrapper > header {
		position: fixed;
		z-index: 2;
		top: 0;
		padding: 0 20px;
		min-height: 0;
		background: url(/sites/all/themes/bear/img/satin-weave.gif),
		            url(/sites/all/themes/bear/img/header-shadow.png) center bottom no-repeat;
		box-shadow: 0 0 20px #344049;
	}
	.js-bearMenu-sticky #page-wrapper > header .span5 {
		display: none;
	}
}

/* -- Site Footer -- */
@media (max-width: 800px) {
	#footer-menu {
		display: none;
	}
}

/* -- Home Page Updates -- */
@media (max-width: 900px) {
	/* Carousel */
	.hero-panel .span6 {
		float: none;
		margin-left: 0;
		width: 100%;
	}
	.hero-panel .span6:first-child {
		display: none;
	}
}
@media (max-width: 800px) {
	.summary-section {
		margin-top: 20px;
	}
}
@media (max-width: 640px) {
	#featured-projects .thumb-image {
		float: none;
		margin-bottom: 1em;
		width: 100%;
		text-align: center;
	}
	#featured-projects .summary {
		float: none;
		margin-left: 0;
		width: 100%;
	}
	#featured-projects h2 {
		font-size: 1.2em;
	}
	#our-software .content-col,
	#recent-publications .content-col {
		float: none;
		margin-left: 0;
		width: 100%;
	}
	#our-software .graphic-col-right,
	#recent-publications .graphic-col-left {
		display: none;
	}
}
@media (max-width: 500px) {
	#our-software .thumbnails li {
		float: none;
		margin: 0 0 1em;
		width: 100%;
	}
	#news-events .event-date {
		float: none;
		width: 100%;
	}
	#news-events .event-summary {
		float: none;
		margin-left: 0;
		width: 100%;
	}
}

/* -- Thumbnail Galleries -- */
@media (min-width: 360px) {
	.thumbnail-gallery:after {
		content: '';
		display: block;
		clear: left;
	}
	.thumbnail-gallery li {
		float: left;
		width: 50%;
	}
	.thumbnail-gallery li:nth-child(2n + 1) {
		clear: left;
	}
}
@media (min-width: 700px) {
	.thumbnail-gallery li {
		width: 33.333%;
	}
	.thumbnail-gallery li:nth-child(2n + 1) {
		clear: none;
	}
	.thumbnail-gallery li:nth-child(3n + 1) {
		clear: left;
	}
}
@media (min-width: 800px) {
	.thumbnail-gallery li {
		width: 25%;
	}
	.thumbnail-gallery li:nth-child(3n + 1) {
		clear: none;
	}
	.thumbnail-gallery li:nth-child(4n + 1) {
		clear: left;
	}
}
@media (min-width: 900px) {
	.thumbnail-gallery li {
		width: 20%;
	}
	.thumbnail-gallery li:nth-child(4n + 1) {
		clear: none;
	}
	.thumbnail-gallery li:nth-child(5n + 1) {
		clear: left;
	}
}
