﻿/* Box-sizing FTW*/
*, *:after, *:before {
  box-sizing: border-box; 
}

.nav, .nav ul, .nav li{
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav {
  display: inline-block;
  position:relative;
  height: 2.200em;
  line-height: 2.000em;
  margin: 0px auto;
  padding: 0 1em;  
}

/*clearfix */
.nav:before,
.nav:after {
	content:""; display:table;
}

.nav:after {
	clear: both;
}

.nav {
  zoom: 1;
}

.nav li {
    display:block;
    float: left;
    position: relative;
    background-color:#ECCF57;
    /* border-bottom: 1px solid #fff; */
}

.nav > li:first-child{
   /* border-bottom: 1px solid #d2d2d2; */
}

.nav li a {
  font-size: 1em;
  height:2.150em;
  padding: 0 1.100em;
  position:relative;
  display: block;
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid gray;
  z-index: 200; /*prevent issues with link's pseudo elements and the proximity detection*/
}

.nav > li:first-child a {
  /* border-left: 1px solid #fff; */
}

.nav li:hover{
  background:#d5d5d5;
}

.nav li a:hover {
  color:#000;
  background:#d5d5d5;
  box-shadow: inset 0 0.188em 0.500em rgba(0, 0, 0, 0.125);
}

.nav li a:active {
  color:#666;
  background: #e6e6e6;
}

/* Dropdown
   ========================================================================== */

/* Target menu item with dropdown inside */
.nav li a:nth-last-child(2){
  padding-right: 2.500em;
}

.nav li a:nth-last-child(2):after{
  content: "\25BC"; /* add down-pointing triangle to dropdown parent */
  position: absolute;
  right: 1.250em;	
}

.nav li li a:nth-last-child(2):after{
  content: "\25B6"; /* add left down-pointing triangle to any deeper level sub menu parents */
}

/* dropdown funcionality*/
.nav li ul  {
  display:none;
  border: 1px solid #d2d2d2;
  position: absolute;
  background: #F1F1F1;
  white-space: nowrap;
  box-shadow: inset 0 0.063em 0.063em 0 rgba(0,0,0,0.25), 0 0.063em 0.625em 0 rgba(0,0,0,0.10);
}

/* positioning for second and deeper level sub menus */
.nav ul ul {
    left: 100%; 
    top: 0;
}

.nav li:hover > ul {
    display: block; /* show sub menus when hovering over a parent */
    z-index: 10;
}

/*sub nav items*/
.nav li li {
    float:none;
    position:relative;
    border-right: 0 !important;
}

.nav li li a{
    border-right: 0 !important;
}

/*proximity detection for submenu*/
.nav li ul:before {
    display:block;
    content: "";
    width: 160%;
    height: 120%;
    background: none !important;
    position: absolute;
    left: -30%;
}

/* proximity detection for second and deeper level sub menus */
.nav ul ul:before {
	height: 150%;
	top: -20%;
}