
/* Media Queries */ 

/* Smaller than standard 960 (devices and browsers) */
@media only screen and (max-width: 959px) {

	#main {
		top: 67px; /* header height */
	}
	.modern-mobile.fixed-header #main {
		margin-top: 67px;
	}
	nav ul {
		height: 40px;
	}
	nav li a,
	nav li a:visited,
	nav li a:focus {
		display: inline-block;
		height: 40px;
		width: auto;
		padding: 23px 15px 0 15px;		
	}
	nav li a span {
		display: none;
	}

}

/* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 959px) {

	header h1,
	header h1 a,
	header h1.logo a img {
		max-height: 60px;
	}
	
	/* Fix for skeleton when a column have both alpha and omega classes */
	.column.alpha.omega,
	.columns.alpha.omega {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	
	/* Helper classes */
	.hide-for-tables, /* misspelled, kept for compatibility */
	.hide-for-tablets,
	.hide-for-mobile { /* since added ".hide-for-mobileS" (which doesn't hide for tablets), keeping this version for compatibility */
		display: none;
	}
	.tablets-only {
		display: block;
	}
	
	/* Re-position the arrows for menu items that have dropdown submenus */
	nav > ul > li.spark-has-submenu:after {
		margin-left: -8px;
		margin-top: 1px;
	}
}

/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 767px) {

	.container .column.box,
	.container .columns.box,
	.container .box .column,
	.container .box .columns {
		width: 280px;
	}
	.box.featured {
		margin-top: 10px;
		margin-bottom: 10px;
	}
	.container .row.box {
		padding: 10px;
	}
	
	header h1.logo {
		margin-top: 5px; /* Header's height is 60px in tablet mode and logo (mobile version) is expected to be 50px so we center it vertically. */
	}

	label,
	legend {
		text-align: left;
		padding: 0 0 10px 5px;
	}
	label span,
	legend span { 
		display: inline;
		margin-left: 10px;
	}

	/* Helper classes */
	.hide-for-mobiles {
		display: none;
	}
	.mobiles-only {
		display: block;
	}
	
	/* Re-position the arrows for menu items that have dropdown submenus */
	nav > ul > li.spark-has-submenu:after {
		left: 50%;
		margin-left: -3px;
		margin-top: 17px;
	}
}

/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {

	nav li a,
	nav li a:visited,
	nav li a:focus {
		padding: 23px 10px 0 10px;		
	}

	.container .column.box,
	.container .columns.box,
	.container .box .column,
	.container .box .columns {
		width: 400px;
	}
	
}

/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {

	#main {
		top: 57px; /* header height (including top border) */
	}
	.modern-mobile.fixed-header #main {
		margin-top: 57px;
	}
	
	nav li a,
	nav li a:visited,
	nav li a:focus {
		padding: 17px 2px 0 2px;		
	}
	nav ul.nav {
		height: 30px;
		margin: 0;
	}

	header h1.logo {
		margin-top: 0; /* Remove previously added margin as now the header is 50px */
	}
	
	/* Re-position the arrows for menu items that have dropdown submenus */
	nav > ul > li.spark-has-submenu:after {
		margin-top: 12px;
	}
	
	/* Nested submenu dropdown */
	nav ul.sub-menu {
		top: 57px;
	}
}
