/*
*
*   Masthead
*   #logo #hamburger #navigation #header
* 
*/

.masthead_top {
    padding: 1em 0;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.masthead_logo {
    display: block;
}

/*.masthead_logo:active {
    position: relative;
    top: 1px;
    left: 1px;
}*/

.masthead_title {
    font-size: 1.25em;
    margin: 0;
    padding: .5em .25em;
}

.masthead_title a:active {
    position: relative;
    top: 1px;
    left: 1px;
}

.masthead_hamburger {
    z-index: 10000;
    position: absolute;
    right: 0;
    top: 1.5em;
}

.masthead_menu {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 0;
    transition: all .2s ease-in-out;
    transform: translateX(280px);
    z-index: 10000;
    overflow-x: hidden;
}

body.js-menuInPagina .masthead_menu {
    overflow-x: visible;
}

.masthead_menu ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.masthead_menu a {
    text-decoration: none;
}

.masthead_menu.is-open {
    transform: translateX(0);
    width: 280px;
    overflow-y: hidden;
}

.masthead_menu_body {
    width: 320px;
    
}

body:not(.js-menuInPagina) .masthead_menu_container {
    position: absolute;
    top: 0; 
    bottom: 0; 
    left: 0; 
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Aggiusto il padding per il allineare il menù al banner dell'header */ 
@media screen and (min-width: 669px) and (max-width: 1279px) {
	.masthead_menu_container {
		padding-top: 22px;
	}
}

.masthead_menu_close {
    display: block;
    text-align: right;
    padding: 1em;
}

.masthead_menu a.is-active {
    font-weight: bold;
}

ul.masthead_menu_lang {
    padding: 1em;
}

.masthead_menu_lang li {
    display: inline-block;
    margin-right: .5em;
}

.masthead_usermenu {
    border-left: 8px solid;  
}

.masthead_usermenu_user {
    display: flex;
    justify-content: space-between;
}

.masthead_usermenu_user img {
    width: 73px;
    height: 100%;
}

.masthead_usermenu_user_name {
    padding: 1em 0.75em;
    font-weight: bold;
    text-transform: capitalize;
}

.masthead_usermenu_menu {
    padding: .50em .85em;
}

.masthead_usermenu_menu .fa-chevron-left, .masthead_usermenu_menu .fa-chevron-right, .masthead_usermenu_menu .fa-chevron-down {
    display: none;
}

.masthead_usermenu_menu ul li ul li {
    padding-bottom: .75em;
    font-size: 0.85em;
}

.masthead_menu_body > ul > li {
    border-left: 8px solid;
    padding: 0 1em;
    margin: 0;
    width: 280px;
}

.masthead_menu_body li a, .masthead_usermenu_menu > ul > li > a {
    position: relative;
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    font-size: .85em;
}

.masthead_menu_body li a {
    padding: 1em 0;
    border-bottom: 1px solid;
}

.masthead_usermenu_menu > ul > li > a {
    padding: 0 0 1em 0;
    font-weight: bold;
}

.masthead_menu_body ul li:last-child > a {
    border-bottom: none;
}

.masthead_menu_body ul > li.has-children:not(.masthead_menu_body_comunita) > ul {
    transition: transform .2s ease-in-out;
    transform: translateX(280px);
    height: 0;
    visibility: hidden;
    position: fixed;
}

body.js-menuInPagina .masthead_menu_body ul > li.has-children > ul {
    transform: translateX(0px);
}

.masthead_menu_body ul > li > a {
    margin-right: 1em;
}

.masthead_menu_body ul > li.has-children > ul.is-open {
    transform: translateX(0px);
    height: auto;
    visibility: visible;
    position: static;
}

body.js-menuInPagina .masthead_menu_body ul > li.has-children > ul.is-open  {
    transform: translateX(0px);
}

.masthead_menu_body ul > li.is-hidden {
    height: 0;
    overflow: hidden;
    visibility: hidden;
}

.masthead_menu_body ul > li.is-open > a {
    justify-content: center;
    position: relative;
    font-weight: bold;
    padding-left: 1.5em;
    padding-right: 1.5em;
}

.masthead_menu_body ul > li .fa-chevron-right {
   position: absolute;
   right: 0;
   top: 1.25em;
}

.masthead_menu_body ul > li.is-open a .fa-chevron-left  {
   position: absolute;
   left: 0;
   top: 1.25em;
}

.masthead_menu_body ul > li .fa-chevron-left {
    display: none;
}

.masthead_menu_body ul > li.is-open .fa-chevron-right {
    display: none;
}

.masthead_menu_body ul > li.is-open .fa-chevron-left {
    display: inline-block;
}

.masthead_menu_body > ul > li.masthead_menu_body_comunita a {
    border-bottom: none;
    font-weight: bold;
}

.masthead_menu_body ul > li.masthead_menu_body_comunita > ul {
    transform: translateX(0px);
    height: auto;
    visibility: visible;
    font-size: 0.85em;
}

.masthead_menu_body ul > li.masthead_menu_body_comunita > ul > li > a {
    border-bottom: 1px solid;
    font-weight: normal;
    text-transform: capitalize;
    font-size: 1em;
}

.masthead_menu_body ul > li.masthead_menu_body_comunita > ul > li:last-child a {
    border-bottom: none;
}

.masthead_menu_body_comunita .fa-chevron-left, .masthead_menu_body_comunita .fa-chevron-right, .masthead_menu_body_comunita .fa-chevron-down {
    display: none;
}

/* Menu in pagina */

body.js-menuInPagina .masthead_menu {
    position: static;
    width: 300px;
    min-height: auto;
    transform: translateX(0);
}

body.js-menuInPagina .masthead_hamburger {
     display: none;
} 

body.js-menuInPagina .masthead_menu_close {
    display: none;
}

body.js-menuInPagina .masthead_menu_lang {
    padding: 1em 0em;
}

body .masthead_menu_lang a {
    padding: .25em .5em;
}

body.secondaryMenuBottom .masthead {
    border-bottom: 7px solid #1461B7;
}
