/*===============

File Name: Beta - Mobile-First Responsive Menu;
Version: 1.0;
Author: Tiberiu Alexander;
Author URL: http://codecanyon.net/user/tiberiualexander/portfolio ;
E-mail: tiberiu.alexander@gmail.com ;
Created: 17/01/2014;

=================*/

/* The main container */
.flexnav {
	/* Some stylesheet reset */
	margin: 0;
	padding: 0;
	list-style: none;
	line-height: 1;

	/* Layout */
	display: block;
	overflow: visible;
	width: 100%;


	/* Background & typography */
	background: #2ac094;
	font-family: "Lato", Helvetica, sans-serif;
}

	/* Clearfix */
	.flexnav:after {
		content: "";
		display: table;
		clear: both; 
	}

/* The button which opens the menu in the mobile view */
.menu-button {
	display: none; /* The button is hidden by default */
	padding: 18px 22px;
	
	/* Typography */
	font-family: "Lato", Helvetica, sans-serif;
	font-size: 18px;
	color: #bee5da;
	text-transform: uppercase;
	line-height: 1;

	background: #2ac094;
	cursor: pointer;
}

/* The main link containers */
.flexnav>li {
	float: left;
	display: block;
	position: relative;
}

/* General styling for the links */
.flexnav li a {
	color: #bee5da;
	-webkit-transition: color .2s ease-out;
	-moz-transition: color .2s ease-out;
	-ms-transition: color .2s ease-out;
	-o-transition: color .2s ease-out;
	transition: color .2s ease-out;
}

/* The main links */
.flexnav>li>a {
	display: block;
	padding: 18px 22px;
	font-weight: 300;
	font-size: 18px;
	text-decoration: none;
	text-transform: uppercase;
}

/* The hover state of the links */
.flexnav li a:hover {
	color: #fff;
}

/* The links which contain submenus have extra right padding for the submenu indicator */
.flexnav>.item-with-ul>a {
	padding-right: 66px;
}

/* The buttons which shows/hides the menu on click/tap */
.touch-button {
	display: block;
	position: absolute;
	right: 0px;
	top: 0;
	width: 54px;
	height: 54px;
	z-index: 99;
	cursor: pointer;
	background: transparent;
}

/* The circle of the indicator */
.touch-button::after {
	content: '';
	display: block;
	position: absolute;
	width: 26px;
	height: 26px;
	border: 1px solid #bee5da;
	right: 13px;
	top: 13px;
	border-radius: 23px;
}

/* The arrow of the indicator */
.touch-button::before {
	content: '';
	display: block;
	width: 10px;
	height: 10px;
	position: absolute;
	border-bottom: 1px solid #bee5da;
	border-left: 1px solid #bee5da;
	right: 21px;
	top: 20px;
	-webkit-transform: rotate(-45deg);
	-moz-transform: rotate(-45deg);
	-ms-transform: rotate(-45deg);
	-o-transform: rotate(-45deg);
	transform: rotate(-45deg);
}

/* The hover/active state of the indicator */
.flexnav li:hover>.touch-button::before, .sm-screen .submenu-open::before {
	border-bottom-color: #fff;
	border-left-color: #fff;
}

.flexnav li:hover>.touch-button::after, .sm-screen .submenu-open::after {
	border-color: #fff;
}

/* The submenus */
.flexnav ul {
	position: absolute;
	list-style: none;
	left: 0;
	margin: 0;
	padding: 0;
}

/* Level 2+ submenus */
.flexnav ul ul {
	left: 244px;
	top: -1px;
}

.flexnav ul li {
	display: block;
	position: relative;
	padding: 0;
	margin: 0;
	border-top: 1px solid #20b78b;
}

/* The submenu links */
.flexnav ul li a {
	background: #2ac094;
	padding: 12px 22px;
	display: block;
	width: 200px;
	text-decoration: none;
}

/* The button which toggles level 2+ submenus */
.flexnav ul .touch-button {
	width: 40px;
	height: 40px;
	border-left: 1px solid #20b78b;
}

/* The menu icon (the indicator) */
.flexnav ul .touch-button::after {
	top: 8px;
	right: 8px;
	width: 22px;
	height: 22px;

}

.flexnav ul .touch-button::before {
	right: 17px;
	top: 16px;
	height: 7px;
	width: 7px;
	-webkit-transform: rotate(-135deg);
	-moz-transform: rotate(-135deg);
	-ms-transform: rotate(-135deg);
	-o-transform: rotate(-135deg);
	transform: rotate(-135deg);
}



/* Mobile view stylesheet */
@media all and (max-width: 800px) {
	.flexnav {
		overflow: hidden;
		max-height: 0px; 
	}

	.flexnav.show {
		overflow: visible;
		max-height: 2000px;
	}

	.flexnav li {
		float: none;
	}

	.flexnav ul li a {
		width: auto;
	}

	.flexnav>li {
		border-top: 1px solid #20b78b;
	}

	.flexnav ul, .flexnav ul ul {
		position: relative;
		left: 0;
		width: 100%;

	}

	.flexnav.show .touch-button, .menu-button .touch-button {
		border-left: 1px solid #20b78b;
		z-index: 999;
	}

	.flexnav ul .touch-button::before {
		-webkit-transform: rotate(-45deg);
		-moz-transform: rotate(-45deg);
		-ms-transform: rotate(-45deg);
		-o-transform: rotate(-45deg);
		transform: rotate(-45deg);
		right: 16px;
		top: 15px;
	}

	.menu-button {
		display: block;
	}

	.menu-button .touch-button::before {
		-webkit-transform: rotate(0deg);
		-moz-transform: rotate(0deg);
		-ms-transform: rotate(0deg);
		-o-transform: rotate(0deg);
		transform: rotate(0deg);
		border-left: 0;
		border-top: 2px solid #bee5da;
		border-bottom: 2px solid #bee5da;
		height: 2px;
		width: 12px;
		top: 22px;
	}

	.menu-button::after {
		display: block;
		width: 12px;
		height: 2px;
		content: '';
		position: absolute;
		background: #bee5da;
		right: 21px;
		top: 30px;
	}

	.flexnav ul li a {
		padding-left: 42px;
	}

	.flexnav ul ul li a {
		padding-left: 62px;
	}

	.flexnav ul ul ul li a {
		padding-left: 82px;
	}

	
}