.navigation-primary {
  display: inline-block;
}

.navigation-primary a {
  color: #494A52;
  font-size: 16px;
  line-height: 40px;
}

.navigation-primary a.active-item {
  font-weight: bold;
  position: relative;
}

.navigation-primary .submenu.level-1 > li > a:hover {
  border-bottom: 3px solid #000000;
}

/*.submenu.level-2 .menu-item .menu-link:hover {
  color: #368727 !important;
  font-weight: 700;
  text-decoration: underline;
}*/
.submenu.level-2 .menu-item .menu-link:hover,
.submenu.level-3 .menu-item .menu-link:hover{
  color: #000000 !important;
  font-weight: 700;
  text-decoration: underline;
}

/*
.navigation-primary .submenu.level-1 > li > a.active-item:after {
  background-color: #368727;
  bottom: -26px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  width: 100%;
}
*/

.level-1 > .menu-item > .active-item {
  border-bottom: 3px solid #368727;
}
.level-2 .menu-item .active-item,
.level-3 .menu-item .active-item {
  color: #368727 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

.level-1 > .menu-item > .active-branch {
  border-bottom: 3px solid #368727;
}
.level-2 .menu-item .active-branch {
  color: #368727 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}


.navigation-primary .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.navigation-primary .submenu a,
.navigation-primary .submenu p {
  text-decoration: none;
}

.submenu-toggle {
  display: none;
}

.submenu.level-1 {
  display: inline-block;
  white-space: nowrap;
  font-weight: 400; 
} 

.submenu.level-1 > li {
  display: inline-block;
  padding: 15px 20px;
  margin-left: -2px;
  margin-right: -2px;
}

.submenu.level-1 > li.has-submenu{
  position: relative;
  padding-right: 40px;
}

.submenu > li.has-submenu{
  position: relative;
}

.submenu.level-1 > .has-submenu > .menu-arrow {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #4d4d4d;
  display: block;
  height: 0;
  margin-left: 0px;
  position: absolute;
  right: 20px;
  top: 32px;
  width: 0;
}

.submenu.level-2,
.submenu.level-3 {
  border: 1px solid #D9D8D5;
  background: #ffffff;
  box-shadow: 0px 4px 8px 0px rgba(20, 20, 20, 0.15);
  border-radius: 12px;
  font-weight: 500;
  left: -9999px;
  opacity: 0;
  position: absolute;
  text-transform: none;
  top: 49px;
  transform: none;
  min-width: 158px;
  font-size: 16px;
  padding-top: 0;
  padding-bottom: 0;
}
.submenu.level-2 {
  margin-left: -12px !important;
}
.submenu.level-3 {
  top: -5px !important;
  margin-left: 1px !important;*/
}

.submenu.level-2 > li:first-child > a,
.submenu.level-3 > li:first-child > a {
  position: relative;
  z-index: 2;
}

.submenu.level-2 > li:first-child:before,
.submenu.level-3 > li:first-child:before {
  background-color: #FFF;
  border: 1px solid #494A52;
  border-radius: 4px;
  box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.2);
  content: none;
  display: block;
  height: 30px;
  left: 125px;
  margin-left: 20px;
  overflow: hidden;
  position: absolute;
  top: -12px;
  transform: rotate(45deg);
  transition: background-color 0.3s;
  width: 30px;
  z-index: 1;
}.

.submenu.level-2 > li:first-child:hover:before,
.submenu.level-2 > li:first-child.focus:before,
.submenu.level-3 > li:first-child:hover:before,
.submenu.level-3 > li:first-child.focus:before {
  background-color: rgba(208, 210, 212, 1.0);
  transition: background-color 0.3s;
}

.submenu.level-2 > li,
.submenu.level-3 > li {
  border-bottom: 0;
  padding: 0;
}

.submenu.level-2 .menu-item .menu-link,
.submenu.level-3 .menu-item .menu-link {
  background-color: #ffffff;
  display: block;
  padding: 8px 20px;
  transition: background-color 0.3s;
  line-height: 30px;
  font-weight: 400;
  margin: 5px 5px;
}

.submenu.level-2 .menu-item:first-of-type,
.submenu.level-2 .menu-item:first-of-type .menu-link,
.submenu.level-3 .menu-item:first-of-type,
.submenu.level-3 .menu-item:first-of-type .menu-link {
  border-radius: 0 0 0 0;
}

.submenu.level-2 .menu-item:last-of-type,
.submenu.level-2 .menu-item:last-of-type .menu-link,
.submenu.level-3 .menu-item:last-of-type,
.submenu.level-3 .menu-item:last-of-type .menu-link {
  border-radius: 0 0 0 0;
}

.submenu.level-2 > li:last-child,
.submenu.level-2 > li:last-child .submenu {
  border-bottom: none;
}

.submenu.level-2 > li:last-child .submenu.level-3 {
  border-width: 1px;
  border-style: solid;
}

.submenu.level-2 .menu-item .menu-link:hover,
.submenu.level-2 .menu-item .menu-link:focus,
  background-color: #ffffff;
  color:red;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submenu.level-3 .menu-item .menu-link:hover,
.submenu.level-3 .menu-item .menu-link:focus {
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submenu.level-1 > li.has-submenu:hover .submenu.level-2,
.submenu.level-1 > li.has-submenu.focus .submenu.level-2 {
  left: 0;
  opacity: 1;
}

.submenu.level-2 > li.has-submenu:hover .submenu.level-3,
.submenu.level-2 > li.has-submenu.focus .submenu.level-3 {
  left: 100%;
  opacity: 1;
  top: 0;
}

/* Hide navigation dropdown in the inline editor */
.hs-inline-edit .submenu.level-1 > li.has-submenu:hover .submenu.level-2,
.hs-inline-edit > li.has-submenu.focus .submenu.level-2,
.hs-inline-edit .submenu.level-1 > li.has-submenu:hover .submenu.level-3,
.hs-inline-edit > li.has-submenu.focus .submenu.level-3 {
  visibility: hidden;
}

/* Custom */
.header__container .header-row-2-space {
  padding-top: 23px; 
}

.header-no-menu {
  display: none; 
}

@media (max-width: 1139px) {
  .navigation-primary a {
    font-size: 14px;
  }

  .navigation-primary {
    display: block;
  }
/*
  .navigation-primary .submenu.level-1 > li > a.active-item:after {
    content: none;
  }

  .navigation-primary .submenu.level-1 > li > a.active-item:after {
    display: none;
  }
*/
  .submenu > li > a {
    display: block;
    width: 100%;
  }

  .submenu > .has-submenu {
    position: relative;
  }

  .submenu > .has-submenu > a {
    width: calc(100% - 60px);
  }

  .submenu {
    display: none;
  }

  .submenu.level-1 {
    width: 100%;
  }

  .submenu.level-1 > li,
  .header-button {
    border-top: 1px dotted #CED4DB;
    display: block;
    padding: 0;
    width: 100%;
  }

  .submenu.level-1 > li > a {
    font-weight: 500;
    padding: 7px 20px;
  }

  .submenu.level-1 > .has-submenu > .menu-arrow,
  .submenu > .has-submenu > .menu-arrow,
  .submenu .menu-arrow {
    background-position: center right 30px;
    background-repeat: no-repeat;
    background-size: 20px;
    border: none;
    cursor: pointer;
    height: 55px;
    padding: 15px 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 60px;
  }

  .submenu.level-1 > .has-submenu > .menu-arrow-bg,
  .submenu > .has-submenu > .menu-arrow-bg,
  .submenu .menu-arrow-bg {
    background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxOXB4IiBoZWlnaHQ9IjE5cHgiIHZpZXdCb3g9IjAgMCAxOSAxOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5QbHVzPC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxnIGlkPSJQbHVzIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDAuMDAwMDAwKSIgc3Ryb2tlPSIjOTc5ODlGIiBzdHJva2Utd2lkdGg9IjIuNCI+ICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLTIiPiAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIxLjIiIHk9IjkuNiIgd2lkdGg9IjE2LjgiIGhlaWdodD0iMSIgcng9IjAuNSI+PC9yZWN0PiAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLUNvcHktNSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOS42MDAwMDAsIDkuNjAwMDAwKSByb3RhdGUoOTAuMDAwMDAwKSB0cmFuc2xhdGUoLTkuNjAwMDAwLCAtOS42MDAwMDApICIgeD0iMS4yIiB5PSI5LjYiIHdpZHRoPSIxNi44IiBoZWlnaHQ9IjEiIHJ4PSIwLjUiPjwvcmVjdD4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=);
    background-repeat: no-repeat;
    display: block;
    height: 20px;
    margin-left: auto;
    margin-right: 20px;
    transition: transform 0.4s;
    width: 20px;
  }

  .submenu.level-2 > li:first-child:before,
  .submenu.level-3 > li:first-child:before {
    content: none;
    transition: none;
  }

  .submenu.level-2 > li:first-child:hover:before,
  .submenu.level-2 > li:first-child.focus:before,
  .submenu.level-3 > li:first-child:hover:before,
  .submenu.level-3 > li:first-child.focus:before {
    transition: none;
  }

  input[type="checkbox"]:checked ~ .submenu {
    display: block;
  }

  input[type="checkbox"]:checked ~ .menu-arrow .menu-arrow-bg {
    transform: rotate(45deg);
    transition: transform 0.4s;
  }

  .submenu.level-2,
  .submenu.level-3 {
    border: none;
    box-shadow: none;
    opacity: 1;
    position: static;
    transform: unset;
    visibility: visible;
    width: 100%;
    z-index: 2;
  }

  .submenu.level-2 .menu-item,
  .submenu.level-3 .menu-item {
    background-color: #FFF;
    border-bottom: none;
    /* border-top: 2px solid #EBEFF3; */
    padding: 0;
    border-radius: 0 !important;
  }

  .submenu.level-2 .menu-item .menu-link,
  .submenu.level-3 .menu-item .menu-link {
    padding: 7px 20px;
    transition: none;
    text-indent: 10px;
    margin: 5px 5px;
  }

  .submenu.level-2 .menu-item .menu-link:hover,
  .submenu.level-2 .menu-item .menu-link:focus,
  .submenu.level-3 .menu-item .menu-link:hover,
  .submenu.level-3 .menu-item .menu-link:focus {
    transition: none;
  }

  .submenu.level-2 .menu-item .menu-link:hover,
  .submenu.level-3 .menu-item .menu-link:hover {
    background-color: inherit;
  }

  .submenu.level-3 {
    background-color: inherit;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .submenu.level-3 > li {
    background-color: inherit;
    padding: 0;
  }

  .submenu.level-3 .menu-item .menu-link {
    padding: 7px 20px;
    transition: none;
    text-indent: 20px;
  }

  .submenu.level-4 .menu-item .menu-link {
    padding: 7px 20px;
    transition: none;
    text-indent: 30px; 
  }

  .submenu.level-3 .menu-item .menu-link {
    padding-left: 20px;
  }

  .submenu.level-4 .menu-item .menu-link {
    padding-left: 30px;
  }

}
