/*Style for the first level menu bar*/
ul.menu{
  /* position:fixed; */
  top:0;
  width:100%;
  height:3em;
  margin:0;
  padding:0 10px;
  background:#333;
  color:#eee;
  box-shadow:0 -1px rgba(0,0,0,.5) inset;
}

ul.menu > li{
  float:left;
  list-style-type:none;
  position:relative;
}

label{
  position:relative;
  display:block;
  padding:0 18px 0 12px;
  line-height:3em;
  transition:background 0.3s;
  cursor:pointer;
}

label:after{
  content:"";
  position:absolute;
  display:block;
  top:50%;
  right:5px;
  width:0;
  height:0;
  border-top:4px solid rgba(255,255,255,.5);
  border-bottom:0 solid rgba(255,255,255,.5);
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  transition:border-bottom .1s, border-top .1s .1s;
  }

label:hover,
.menuinput:checked ~ label{background:rgba(0,0,0,.3);}

.menuinput:checked ~ label:after{
  border-top:0 solid rgba(255,255,255,.5);
  border-bottom:4px solid rgba(255,255,255,.5);
  transition:border-top .1s, border-bottom .1s .1s;
}

/*hide the inputs*/
.menuinput{display:none}

/*show the second levele menu of the selected voice*/
.menuinput:checked ~ ul.submenu{
  max-height:800px;
  transition:max-height 0.5s ease-in;
}

/*style for the second level menu*/
ul.submenu{
  max-height:0;
  padding:0;
  overflow:hidden;
  list-style-type:none;
  background:#444;
  box-shadow:0 0 1px rgba(0,0,0,.3);
  transition:max-height 0.5s ease-out;
  position:absolute;
  min-width:100%;
}

ul.submenu li a{
  display:block;
  padding:12px;
  color:#ddd;
  text-decoration:none;
  box-shadow:0 -1px rgba(0,0,0,.5) inset;
  transition:background .3s;
  white-space:nowrap;
}

ul.submenu li a:hover{
  background:rgba(0,0,0,.3);
}