/* 
 *  Header Styles
 *  This styling is 'mobile first' the top section of the sheet is styling for mobile display
 *  But the bottom half (in the media query) is applied when the viewport is over a certain width
 */

/* Mobile */
#headerPnl{
	height: 80px;
	min-height: 60px;
	transition: height 0.2s, background 0.2s;

	position: relative;
	top:0;
	left:0;

	box-shadow: 0 1px rgba(150, 150, 150, 0.5);
	font-weight: 400;
	font-size: 20px;
}

/* Navigation panel */
#nav{
	display: none;
	position: absolute;
	top: 81px;
	left: 0px;
	width: 100%;
	background-color: #191919;

	padding: 0;
	box-shadow: 0 1px rgba(150, 150, 150, 0.5);
	z-index: 11;

	transition: top 0.2s;
}

#nav > div{
	margin: 0;
	padding: 0.5em;
}

#nav ul{
	width: 100%;
}

#nav > div > ul{
	-webkit-flex: 1 1 auto;
	flex: 1 1 auto;
	align-self: auto;
	-webkit-flex-direction: row;
	flex-direction: row;
}

#nav ul > li{
	float: none;
	text-align: left;
	padding: 8px 8px;
	margin: 0 0.5vw;
	-webkit-flex: 0 1 auto;
	flex: 0 1 auto;
	cursor: pointer;
	transition: all 0.1s;
	position: relative;

	border-bottom: 1px solid #BBBBBB;
}

/* background for hovered menu items, before hover */
#nav > div > ul > li:not(.active):before{
	position: absolute;
  display: block;
  top: 0;
  left: 0;
  content: '';
  height: 100%;
  width: 100%;
  opacity: 0;
  transform: scaleX(.2);
  transition: transform .1s ease-out,opacity .1s ease-out;
  z-index: -1;
}

#nav > div > ul > li:hover:before{
  opacity: 1;
  transform: scaleX(1);
}

#nav > div > ul > li:not(.active):hover{
	color: white;
}

/* style sub levels of the menu */
#nav ul[class*=SubLevel]{
	color: #282828;
	background: #FFFFFF;
	
	min-width: 200px;
	border-style: solid;
	border-width: 0;
	margin-top: 0.2em;
	border-radius: 0 0 4px 4px;
	display: block;
	height: 0;
	padding: 0 0.5em;
	overflow-y: hidden;
	transition: all 0.3s;
}

#nav > div > ul > li:hover ul[class*=SubLevel]{
	padding: 0.5em;
	height: auto;
	border-top-width: 8px;
}

@media(max-width: 640px) and (max-height: 640px){	
	/* override the default position of a sub level menu when in mobile mode */
	#nav > ul > li > div[class*=SubLevel] > ul{
		position: static;
	}
}
/****************/

.logoTop{
	display:none;
}



/* 
 * Sub menu styling
 */
#sub-menu-container{
	font-size: 16px;
}

#sub-menu{
	width: 100%;
	position: static;
	top: 80px;
	transition: top 0.2s;
	box-shadow: 0 1px rgba(150, 150, 150, 0.5);
	z-index: 9;
}

#sub-menu .fa.fa-lg{
	vertical-align: text-bottom;
}
/*********************/


/* Desktop
 *	The desktop design has two modes:
 *		top: 			when the page is scrolled to the top, headerPnl has 'top' class
 *		not top:	when the page is scrolled down x pixels the 'top' class is removed
 */
@media (min-height: 640px){
	#headerPnl{
		position: fixed;
		z-index:10;
	}

	#headerPnl + *:not(.title-banner){
		margin-top: 100px;
	}

	/* Top style */
	#headerPnl.top{
		height: 100px;
		min-height: 60px;
		box-shadow: none;
	}

	#headerPnl.top ~ .sub-menu{
		top: 100px;
		box-shadow: none;
	}

	#headerPnl.top #nav{
		top: 100px;
	}

	#headerPnl.top.transparent{
		background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 75%, rgba(0,0,0,0) 100%);
		color: #FFFFFF;
	}
	
	#headerPnl.top.transparent .logoTop{
		display: inline-block;
	}

	#headerPnl.top.transparent .logoDown{
		display: none;
	}

	#headerPnl + .title-banner + #sub-menu-container > #sub-menu{
		position: static;
	}

	#sub-menu.stuck{
		position: fixed !important;
		z-index: 9;
	}

	#headerPnl.top ~ #sub-menu-container > #sub-menu{
		top: 100px;
	}
}

@media (min-width: 640px) {
	/************/
	
	#nav{
		display: block !important;
		position: static;
		height: auto;
		padding: 0;

		background: none;
		box-shadow: none;
		transform: none !important;
	}

	#nav > div > ul{
		display: -webkit-flex !important;
		display: flex !important;
		-webkit-flex-flow: row wrap;
		flex-flow: row wrap;
		justify-content: flex-end;
		align-items: flex-end;
		
		font-size: 80%;
		font-weight: 700;
	}

	#nav div[class*=SubLevel]{
		left: -15px;
	}

	#nav > div > ul > li{
		display: inline-block;
	}
	
	#nav ul > li{
		border-bottom: none;
		border-radius: 4px;
		padding: 3px 15px;
	}
	
	#nav > div > ul > li:not(.active):before{
	  border-radius: 4px;
	}

	#nav > div > ul > li.hasChildren:hover:before,
	#nav > div > ul > li.hasChildren.active:hover{
		border-radius: 4px 4px 0 0;
	}

	.logo{
		position: static;
		transform: none;
	}

	#menuHamburger, #menuClose{
		display: none;
	}
}