.all {
	max-width: 900px;
	margin: auto;
}

#nav {
	width: 960px;
	font-family: nato, 'Open Sans', sans-serif;
	font-weight: 400;
	position: absolute;
	top: 35px;
}
#nav * {
	vertical-align: middle;
	list-style-type: none;
	text-decoration: none;
	background-repeat: no-repeat;
	line-height: 35px;
	margin: 0px;
	padding: 0px;
	z-index: 999;
}

#nav > span {
	display: none;
}
#nav > a {
	display: none;
}
#nav li {
	position: relative;
	text-align: center;
	float: left;
	width: 140px;
}
#nav li a {
	color: #4d4e53;
	display: block;
}
#nav li a:active {
	background-color: #ec6e65 !important;
}
#nav span:after {
	width: 0;
	height: 0;
	border: 0.313em solid transparent; /* 5 */
	border-bottom: none;
	border-top-color: #4d4e53;
	content: '';
	vertical-align: middle;
	display: inline-block;
	position: relative;
	right: -0.313em; /* 5 */
}

/* first level */
#nav > ul {
	height: 35px;
	background-color: #eeeeee;
}
#nav > ul > li {
	width: 140px;
	height: 100%;
	float: left;
}
#nav > ul > li > a {
	height: 100%;
	font-size: 14px;
	text-align: center;
}
#nav > ul > li:hover > a,
#nav > ul:not( :hover ) > li.active > a {
	color: #eeeeee;
	background-color: #6a86b4;
}

/* second level */
#nav li ul {
	border: 1px solid #9aa6af;
	width: 138px;
	background-color: #eeeeee;
	display: none;
	position: absolute;
	left: 0px;
	top: 100%;
}
#nav li:hover ul {
	display: block;
}
#nav li ul a {
	border-top: 1px solid #9aa6af;
}
#nav li ul li a:hover,
#nav li ul:not( :hover ) li.active a {
	color: #eeeeee;
	background-color: #ec6e65;
}

/* third level */
#nav li ul li ul {
	border: 1px solid #9aa6af;
	background-color: #e2e2e2;
	display: none;
	position: absolute;
	top: 0px;
	left: 140px;
	width: 200px;
}
#nav li:hover ul li ul {
	display: none;
}
#nav li ul li:hover ul {
	display: block;
	position: absolute;
	top: 0px;
	left: 140px;
}
#nav li ul li ul a {
	width: 200px;
	border-top: 1px solid #9aa6af;
}

@media only screen and ( max-width: 1000px ) {
	#nav {
		width: 100%;
		margin: 0px;
	}
}

header {
	height: 70px;
}

@media only screen and ( max-width: 700px ) {

	#nav {
		position: relative;
		top: auto;
		left: auto;
		background-color: #eee;
	}
	#navw * {
		font-size: 75%;
	}
	#nav li {
		text-align: left;
		float: none;
	    width: 100%;
	}
	#nav li ul {
		background-color: #141e23;
	}
	#nav li a {
		color: #fff;
	}
	#nav > ul {
		background-color: #1d2d35;
	}
	#nav > a {
		width: 35px;
		height: 35px;
		text-align: left;
		text-indent: -9999px;
		background-color: #1d2d35;
		position: relative;
	}
	#nav > a:before,
	#nav > a:after {
		position: absolute;
		border: 2px solid #fff;
		top: 35%;
		left: 25%;
		right: 25%;
		content: '';
	}
	#nav > ul > li:hover > a,
	#nav > ul:not( :hover ) > li.active > a {
		color: #eeeeee;
		background-color: #596d7f;
	}
	#nav > a:after {
		top: 60%;
	}
	#nav:not( :target ) > a:first-of-type,
	#nav:target > a:last-of-type {
		display: block;
	}
	#nav span:after {
		border-top-color: #eeeeee;
	}

	/* first level */
	#nav > ul {
		height: auto;
		display: none;
		position: absolute;
		left: 0;
		right: 0;
	}
	#nav:target > ul {
		display: block;
	}
	#nav > ul > li {
		width: 100%;
		float: none;
	}
	#nav > ul > li > a {
		height: auto;
		text-align: left;
		padding: 0 0.833em;
	}
	#nav > ul > li:not( :last-child ) > a {
		border-right: none;
		border-bottom: 1px solid #42454c;
	}

	/* second level */
	#nav li ul {
		background-color: #313940;
		position: static;
		padding: 1.25em;
		padding-top: 0;
		width: calc(100% - 1.25em);
	}
	#nav li ul a {
		border-top: 1px solid #42454c;
	}
	#nav li ul li a:hover,
	#nav li ul:not( :hover ) li.active a {
		color: #eeeeee;
		background-color: #596d7f;
	}

	/* third level */
	#nav ul li ul li ul {
		width: 100%;
		background-color: #313940;
	}
	#nav ul li:hover ul li ul {
		display: none;
	}
	#nav ul li ul li:hover ul {
		display: block;
		position: relative;
		top: 0px;
		left: 0px;
	}
	#nav ul li ul li ul {
		position: static;
		padding: 1.25em;
		padding-top: 0;
		border: none;
	}
	#nav ul li ul li ul li a {
		width: 100%;
	}

}

