#overlay { position: absolute; visibility: hidden; top: 0; opacity: 0; transition: 0.3s; overflow-x: hidden; width: 100%; height: 100%; z-index: -1; background-color: rgba(0, 0, 0, .9); transition: all ease-out 0.3s; -webkit-transition: all ease-out 0.3s; z-index: -1; opacity: 0; }
#nav { width: 94%; margin: 0 auto; left: 3%; top: 0px; }
.mobilelinks { display: none; }

#menu { text-align: center; left: 0%; top: 0; z-index:2000; }
#menu a { color: #fff; }
#menu ul { margin: 0; padding: 0;  }

#menu ul li { display: inline-block; position: relative; margin: 0px 30px 0px 30px; }
#menu ul li a { display: inline-block; padding: 28px 0px 28px 0px; color: #fff; text-decoration: none; text-transform: uppercase; transition: 0.3s; font-size: 16px; font-family: 'Roboto', sans-serif; font-weight: 500; }
#menu ul li a:hover { color: #ccc; }
#menu ul li a:after { position: absolute; content: ''; width: 0%; height: 0px; bottom: 0; left: 50%; background-color: #fff; opacity: 0; }
#menu ul li a:hover:after { position: absolute; content: ''; width: 100%; height: 4px; left: 0%; opacity: 1; transition: 0.3s; }
#menu ul li a.selected { color: #ccc; }
#menu ul li a.selected:after { position: absolute; content: ''; width: 100%; height: 4px; left: 0%; opacity: 1; transition: 0.3s; }

#hamburger { position: absolute; display: none; top: 10px; left: 1%; margin: 10px; padding: 5px; cursor: pointer; z-index: 4000; width: 30px; height: 25px; transform: rotate(0deg); transition: .25s; cursor: pointer; }
#hamburger:hover { opacity: .7; }
#hamburger span { position: absolute; display: block; height: 4px; width: 100%; background: #fff; border-radius: 9px; opacity: 1; left: 0; transform: rotate(0deg); transition: .25s; }
#hamburger span:nth-child(1) { top: 0px; transform-origin: center center; }
#hamburger span:nth-child(2) { top: 10px; transform-origin: center center; }
#hamburger span:nth-child(3) { top: 20px; transform-origin: center center; }
#hamburger.open span:nth-child(1) { transform: rotate(45deg); top: 10px; left: 0px; }
#hamburger.open span:nth-child(2) { width: 0%; opacity: 0; }
#hamburger.open span:nth-child(3) { transform: rotate(-45deg); top: 10px; left: 0px; }

@media screen and (max-width: 1050px) {
	#menu ul li { margin: 0px 20px 0px 20px; }
	#menu ul li a { padding: 25px 0px 25px 0px; font-size: 14px; }
	#nav { height: 65px !important; }
}

@media screen and (max-width: 850px) {
	#header_main { top: 0px !important; }
	#hamburger { display: block; }
	#menu { position: sticky; width: 100%; left: 0; overflow: auto; height: 100vh; opacity: 0; transform: translateX(-100%); transition: 0s; padding-top: 66px;}
	
	#nav { top: 0px; } 
	#menu ul { text-align: left; background-color: transparent; }
	#menu ul li { display: block; border-right: none; }
	#menu ul li a { display: block; padding: 15px 0px 5px 0px; font-size: 14px; }
	#menu ul li a:after { left: 0%; }
	#menu ul li a:hover:after {  height: 0px; }
	#menu ul li:hover > a { color: #a36209; }

	#menu ul li a.selected { color: #a36209; }
	#menu ul li a.selected:after { height: 0px; }

	.mobilelinks { display: block; margin: 0px 20px 0px 20px;text-align: left; background-color: transparent; margin-top: 30px; }
	.mobilelinks h2 { font-family: 'Gelasio', serif; font-size: 22px; font-weight: 500; color: #fff; line-height: 1.1; text-align: left; padding: 30px 0; margin-top: 30px; border-top: 1px solid rgba(255, 255, 255, .5); }
	.mobilelinks p { font-size: 16px; font-weight: 500; color: #fff; line-height: 1.1; text-align: left; margin-bottom: 5px; }
	.mobilelinks { display: block; border-right: none; }
	.mobilelinks a { display: inline-block; padding: 0px; font-size: 14px; line-height: initial; text-transform: inherit; text-decoration: none; }
	.mobilelinks a:hover { color: #a36209 !important; text-decoration: underline !important; transition: 0.2s; }
	.mobilelinks a > i { margin-right: 10px; }
	
	html.open-menu { overflow: hidden; }
	html.open-menu #overlay { visibility: visible; opacity: 1; transition: .5s; }
	html.open-menu #container { overflow-y: hidden; overflow-x: hidden;}
	html.open-menu #menu { z-index: 3000; transition: .25s; opacity: 1; transform: translateX(0px); }
	html.open-menu #header { z-index: 3000;}
}


