/* overall */

* {
	margin: 0; padding: 0; border: 0; box-sizing: border-box;
}

body {
	background-color: #ABC;
	font-family: verdana;
	color: #222;
}

header {
	background-image: linear-gradient(blue,black);
	height: 90px;
}

h1 {
	text-align: center;
	line-height: 90px;
	color: #FF0;
}

article {
	width: 80%;
	margin: 30px auto;
	padding: 10px;
	border: 4px solid #500;
	border-radius: 20px;
	overflow: hidden;
}


/* nav 1 */

#nav1 li {
	list-style-type: none;
	width: 200px; height: 40px;
	margin: 4px;
	position: relative;
}

#nav1 li a {
	display: block;
	width: 200px; height: 40px;
	border: 2px solid red;
	text-align: center;
	line-height: 40px;
	text-decoration: none;
	background-color: black;
	color: white;
}

#nav1 li span {
	display: block;
	width: 240px; height: 40px;
	position: absolute;
	top: 0px; left: 0px;
	border: 2px solid green;
	line-height: 40px;
	padding-left: 4px;
	z-index: -1;
	transition: left 400ms ease-in-out;
}

#nav1 li span img {
	position: absolute;
	top: 0px; right: 0px;
}

#nav1 a:hover + span {
	left: 210px;
}

/* nav 2 */

#nav2 nav {
	width: 250px;
	float: left;

}

#nav2 div {
	margin-left: 260px; position: relative; z-index: -2;
	transition: color 400ms ease-in-out;
}

#nav2 nav:hover + div {
	color: #999;
}

#nav2 li {
	list-style-type: none;
	width: 200px; height: 40px;
	margin: 4px;
	position: relative;
}

#nav2 li a {
	display: block;
	width: 200px; height: 40px;
	border: 2px solid red;
	text-align: center;
	line-height: 40px;
	text-decoration: none;
	background-color: black;
	color: white;
}

#nav2 li span {
	display: block;
	width: 240px; height: 40px;
	position: absolute;
	top: 0px; left: 0px;
	border: 2px solid green;
	line-height: 40px;
	padding-left: 4px;
	z-index: -1;
	overflow: hidden;
	transition: left 400ms ease-in-out;
	background-color: #EEE;
}

#nav2 li span img {
	position: absolute;
	top: 0px; right: 0px;
}

#nav2 a:hover + span {
	left: 210px;
}

/* nav 3 */

#nav3 li {
	list-style-type: none;
	width: 240px; height: 160px;
	float: left;
	position: relative;
	overflow: hidden;
}

#nav3 li a:first-child {
	display: block;
	width: 240px; height: 160px;
	text-indent: -300px;
	overflow: hidden;
}

#nav3 a.m1 {
	background-image: url(beach.jpg);
}

#nav3 a.m2 {
	background-image: url(mountains.jpg);
}

#nav3 a.m3 {
	background-image: url(city.jpg);
}

#nav3 li a:last-child {
	display: block;
	width: 240px; height: 160px;
	background-color: rgba(0,0,60,.6);
	position: absolute;
	top: 241px; left: 0px;
	text-align: center;
	text-decoration: none;
	color: #FFF;
	font-size: 2.5em;
	padding-top: 10px;
	transition: top 400ms ease-in-out;
}

#nav3 li:hover a:last-child {
	top: 0px;
	}

/* nav 4 */

#nav4 li {
	width: 240px; height: 160px;
	float: left;
	position: relative;
	overflow: hidden;
}

#nav4 a {
	display: block;
	width: 240px; height: 160px;
	
}

#nav4 span.filter {
	display: block;
	width: 240px; height: 160px;
	background-color: rgba(0,0,0,.7);
	position: absolute;
	top: 0px; left: 0px;
}

#nav4 span.label1, #nav4 span.label2 {
	padding: 2px;
}

#nav4 span.label1 {
	background-color: #FFF;
	color: #222;
	text-transform: uppercase;
	font-weight: bold;
	font-size: 1em;
	position: absolute; top: 10px; left: 260px;
	transition: left 300ms ease-in-out;
}

#nav4 span.label2 {
	background-color: #FFF;
	color: #222;
	text-transform: uppercase;
	font-size: .8em;
	position: absolute; top: 40px; left: -190px;
	transition: left 300ms ease-in-out 200ms;
}

#nav4 li:hover span.filter {
	display: none;
}

#nav4 li:hover span.label1 {
	position: absolute; top: 10px; left: 10px;
}

#nav4 li:hover span.label2 {
	position: absolute; top: 40px; left: 10px;
}

/* nav 5 */

#nav5 ul {
	list-style-type: none;
}

#nav5 .parent-menu > li {
	width: 190px; height: 30px;
	float: left;
	margin: 0px 5px;
	position: relative;
	z-index: 10;
}

#nav5 a {
	display: block;
	width: 190px; height: 30px;
	text-align: center;
	text-decoration: none;
	border: 2px solid black;
	border-radius: 4px;
	line-height: 25px;
	background-color: #123;
	color: #EEE;
}

#nav5 a:hover {
	background-color: #FF0;
	color: #123;
}

#nav5 .sub-menu {
	position: relative; left: 0px; top: -35px; /* i adjusted this from -34px to -35px after the recording */
	z-index: -1;
}

#nav5 .sub-menu > li {
	width: 190px; height: 30px;
	position: absolute; left: 0px; top: 0px;
	transition: top 400ms ease-in-out;
	padding-top: 5px; /* i adjusted this from 4px to 5px after the recording */
}

#nav5 li:hover .sub-menu li:nth-child(1) { left: 0px; top: 35px; }
#nav5 li:hover .sub-menu li:nth-child(2) { left: 0px; top: 70px; }
#nav5 li:hover .sub-menu li:nth-child(3) { left: 0px; top: 105px; }
#nav5 li:hover .sub-menu li:nth-child(4) { left: 0px; top: 140px; }
#nav5 li:hover .sub-menu li:nth-child(5) { left: 0px; top: 175px; }
