
/* Global CSS that are applied for all screen sizes */

nav {
    font-family:'Lato',sans-serif;
    font-size: 1.2em;
    color: white;
    text-align: center;
    background-color: #4ec4ce;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1;
}

nav li,
nav a {
    color: white;
    display: block;
    -webkit-transition: color .5s, background .5s, height .5s;
	-moz-transition: color .5s, background .5s, height .5s;
	-o-transition: color .5s, background .5s, height .5s;
	-ms-transition: color .5s, background .5s, height .5s;
	transition: color .5s, background .5s, height .5s;
}

nav a:hover{
    font-style:normal;
	color:#333333;
}

/* First-level menu */

nav>ul {
    height: 45px;
    line-height: 45px;
	margin-left: auto;
	margin-right: auto;
	width: 950px;
}

nav>ul>li {
    display: inline-block;
    float: left;
	border-right: 1px solid #333333;
}

nav>ul>li>a {
    width: auto;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: 10px;
    margin-right:10px;
    cursor: pointer;
}

nav>ul>li.active {
    background-color: #333333;
}

/* Second-level menu */

nav>ul>li ul { 
    display: none;
	margin-left: 15px;
}

nav>ul>li ul>li {
	border-top: 1px solid #333333;
}

nav>ul>li ul>li>a {
    width: auto;
    padding-left: 10px;
    padding-right: 10px;
}

nav>ul>li:hover>ul {
    display: block;
    position: absolute;
    list-style-type: none;
    background-color: #4ec4ce;
}

nav>ul>li>ul>li.active>a {
	background-color:#333333;
    /*border-radius: 20px;*/
    border: 3px solid #4ec4ce;
}	

/* Hover effect */

nav>ul:hover>li, 
nav>ul:hover>li a {
	color: rgba(249, 249, 249, .5);
}

/*nav>ul:hover>li.active>a,*/
nav>ul:hover>li>a:hover,
nav>ul:hover>li.active>ul>li.active>a,
nav>ul:hover>li>ul>li>a:hover {
	color: white;
}

/* Hide checkbox */

#menu-toggle {
	display: none;
}

/* Side menu for small screens */

@media (max-width: 820px) 
{    
    /* Hide the menu */
	
	nav {
		overflow-y: auto;
		max-height: 100%;
	}
    
	nav>ul {
        display: none;
		height: 466px;
    }
	
	nav>ul>li:hover>ul {
		position: relative;
	}
    
    /* draw menu button */
    
    nav>label>div {
        background: #4ec4ce;
        height: 36px;
		line-height: 36px;
        cursor: pointer;
		width:45px;
		margin-left: auto;
		margin-right: auto;
    }
    
    .bar1, .bar2, .bar3 {
        width: 45px;
        height: 5px;
        background-color: white;
        margin-top: 7px;
        margin-left: 7px;
        transition: 0.4s;
    }
    
    /* Animate menu button */
    
    #menu-toggle:checked ~ nav>label>div>div.bar1 {
        -webkit-transform: rotate(45deg) translate(5px, 12px);
        transform: rotate(45deg) translate(5px, 12px);
    }
    
	#menu-toggle:checked ~ nav>label>div>div.bar2 {
        opacity: 0;
    }
    
    #menu-toggle:checked ~ nav>label>div>div.bar3 {
        -webkit-transform: rotate(-45deg) translate(5px, -12px);
        transform: rotate(-45deg) translate(5px, -12px);
    }
    
    /* Show menu vertically */
    
	#menu-toggle:checked ~ nav>ul
	{
        display: block;
        list-style: none;
        width: auto;
    }
    
    nav>ul>li {
        display: block;
        float: none;
        background-color: #4ec4ce;
        margin-left: 0px;
        border-top: 1px solid #333333;
    }
    
    /* Show sub-menu vertically */
	
    #menu-toggle:checked ~ nav>ul>li>ul {
        display: block;
		list-style: none;
        width: auto;
		background-color: #333333;
    }
	
	nav>ul>li>ul>li{
		width: 80%;
		margin-left: auto;
        margin-right: auto;
		background-color: #4ec4ce;
	}
	
    /* Highlight */
	
	/*nav>ul>li>a,
	nav>ul>li>ul>li>a */
    nav>ul>li>a {
		margin-left: 0px;
		margin-right:0px;
        width: auto;
        padding-left: 10px;
        padding-right: 10px;
	}
	
	nav>ul>li.active {
        background-color: #4ec4ce;
    }
	
	nav>ul>li.active>a {
		background-color: #333333;
		border: 3px solid #4ec4ce;
	}
}