/* Menu */

.menu--desktop {
  display: block;
}

.menu--mobile {
  display: none;
}

@media (max-width: 1180px) {
  .menu--desktop {
    display: none;
  }

  .menu--mobile {
    display: block;
  }
}

/* Menu items */

.menu__item {
  position: relative;
}

.menu__link {
  font-size: 0.917rem;
  line-height: 1.667rem;
  text-decoration: none;
}

.menu__link:hover,
.menu__link:focus,
.menu__link:active {
  text-decoration: none;
}

.menu__link--active-link,
.menu__link--active-branch {
  font-weight: bold;
}

/*
@media (min-width: 768px) and (max-width: 1150px) {
  .menu__link {
    font-size: 0.833rem;
  }
}
*/
@media (max-width: 1180px) {
  .menu__item {
    display: block;
    width: 100%;
  }

  .menu__link {
    display: block;
    font-size: 1.083rem;
  }
}

/* Menu items - top level */

.menu__item--depth-1 {
  display: inline-block;
  padding: 0.7rem 0.875rem;
  text-transform: uppercase;
}

.menu__item--depth-1 > .menu__link--active-link:after {
  bottom: -3px;
  content: '';
  height: 2px;
  left: 0;
  position: absolute;
  width: 100%;
}

@media (max-width: 1180px) {
  .menu__item--depth-1 {
    /*border-top: 2px solid #CED4DB;*/
    padding: 0;
  }

  .menu__item--depth-1 > .menu__link {
    padding: 0.35rem 1.225rem;
  }

  .menu__item--depth-1 > .menu__link--active-link:after {
    content: none;
  }
}

/* Menu items - submenus */

.menu__submenu {
  /*box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.2);*/
  border-radius: 3px;
  display: none;
  /*left: 0;*/
  position: absolute;
  text-align: left;
  text-transform: none;
  top: 55%;
  width: 270px;
  z-index: 99;
}

.menu__item--open > .menu__submenu {
  display: block;
}

.menu__submenu--level-2 {
  transform: translateX(0)!important;
}

/* Keeps the first menu item's drop down menu aligned to the left of the top level menu item */

.menu__item--depth-1:first-child .menu__submenu--level-2 {
  transform: unset;
}
.menu__submenu .menu__item {
  /*border-bottom: 1px solid #D1D6DC;*/
  padding: 0;
  width: 100%;
}

.menu__submenu .menu__link {
  display: block;
 /*padding: 0.7rem 1.05rem;*/
  transition: background-color 0.3s;
  width: 100%;
  /*padding: 20px 24px 0px 24px;*/
  padding-top:20px;
  padding-right:24px;
  padding-left:24px;
}

.menu__submenu--level-3 {
  left: 100%;
  top: 0;
}

/* Flyouts for the last two top level menu items go left to keep page responsive */

.menu__item--depth-1:nth-last-child(-n+2) .menu__submenu--level-3 {
  left: auto;
  right: 100%;
  top: 0;
}

/* Accounts for child toggle */

.menu__submenu .menu__item--has-submenu > .menu__link {
  padding-right: 3rem;
}

/* Creates the triangle at the top of the submenu drop down */
/*
@media (min-width: 768px) {
  .menu__submenu--level-2 > .menu__item:first-child:before {
    border-radius: 6px;
    box-shadow: 0 2px 9px 0 rgb(0 0 0 / 20%);
    content: '';
    display: block;
    height: 30px;
    left: 125px;
    margin-left: 1rem;
    overflow: hidden;
    position: absolute;
    top: -12px;
    transform: rotate(45deg);
    transition: background-color .3s;
    width: 30px;
    z-index: 2;
  }
*/
  /* Keeps triangle to the left for the first menu item's drop down menu */

  .menu__item--depth-1:first-child > .menu__submenu--level-2 > .menu__item:first-child:before {
    left: 0;
  }

  .menu__submenu--level-2 > .menu__item:first-child > .menu__link {
    position: relative;
    z-index: 2;
  }
  .header__navigation.open {
    height: 100%;
  }
}

@media (max-width: 1180px) {
  .menu__submenu {
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: static;
    transform: unset;
    width: 100%;
  }

  .menu__submenu .menu__item {
    background-color: #FFF;
    border-bottom: none;
    border-top: 2px solid #EBEFF3;
    padding: 0;
  }

  .menu__submenu .menu__link {
    display: block;
    /*padding: 0.7rem 2rem;*/
    transition: none;
    width: 100%;
    /*padding: 20px 24px 0px 24px*/
  }



  .menu__submenu .menu__item .menu__link:hover,
  .menu__submenu .menu__item .menu__link:focus {
    background-color: inherit;
    transition: none;
  }

  .menu__item--has-submenu > .menu__link {
    width: 70%;
  }

  .menu__submenu--level-3 .menu__item .menu__link {
    padding: 0.7rem 3rem;
  }
}

/* Menu icons */

@media(min-width: 1180px) {
  .menu__submenu .menu__child-toggle {
    margin-left: auto;
    padding: 0 1.05rem;
  }
  .menu__submenu:last-child .menu__link {
  padding-bottom:20px;
}
  .menu__child-toggle {
    position: absolute;
    right: 5px;
    top: 30px;
    z-index: 2;
  }

  .menu__item--depth-1 > .menu__child-toggle {
    position: static;
    right: 0;
    top: 0;
    vertical-align: middle;
  }
  /*
  .menu__child-toggle-icon {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top-style: solid;
    border-top-width: 7px;
    display: block;
    height: 0;
    margin-left: 1px;
    width: 0;
  }*/
}
/*
ul.menu__submenu li:last-child  .menu__link  {
  padding-bottom: 20px;
}*/

@media (max-width: 1180px) {
  .menu__child-toggle {
    background-position: center right 30px;
    background-repeat: no-repeat;
    background-size: 20px;
    border: none;
    cursor: pointer;
    height: 55px;
    /*padding: 15px 0;*/
    padding:0;
    position: absolute;
    right: 0;
    top: -16px;
    width: 30%;
  }

  .menu__child-toggle-icon {
    background-image: url("data:image/svg+xml,%3Csvg width='13' height='8' viewBox='0 0 13 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.87045 0.249878C1.65896 0.249923 1.45181 0.309807 1.27292 0.42261C1.09404 0.535414 0.950718 0.696531 0.85953 0.887345C0.768343 1.07816 0.733008 1.29088 0.757609 1.50093C0.78221 1.71098 0.865742 1.90978 0.998554 2.07435L5.27285 7.36735C5.43042 7.56248 5.62966 7.71988 5.85596 7.828C6.08226 7.93613 6.32988 7.99225 6.58069 7.99225C6.83149 7.99225 7.07912 7.93613 7.30542 7.828C7.53172 7.71988 7.73096 7.56248 7.88853 7.36735L12.1639 2.07435C12.2968 1.90978 12.3803 1.71098 12.4049 1.50093C12.4295 1.29088 12.3942 1.07816 12.303 0.887345C12.2118 0.696531 12.0685 0.535414 11.8896 0.42261C11.7107 0.309807 11.5035 0.249923 11.2921 0.249878H1.87045Z' fill='%23FCFCFC'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    display: block;
    height: 20px;
    margin-left: auto;
    margin-right: 1.05rem;
    transition: transform 0.4s;
    width: 20px;
  }

  .menu__item--open > .menu__child-toggle .menu__child-toggle-icon {
    /*transform: rotate(180deg);
    transition: transform 0.4s;
    */
  }
}


