nav {
  --brand-color: #1692FF;
  --nav-link-color: #334155;
  --nav-link-hover-color: var(--brand-color);
  --nav-link-active-color: var(--brand-color);
  --nav-link-title-color: var(--nav-link-color);
  --nav-panel-bg-color: #fff;
  --nav-panel-bg-secondary-color: #E5F3FF;
  --nav-panel-drop-shadow-color: rgba(149, 157, 165, 0.5);
  --nav-panel-hover-color: #D1EAFF;
  --nav-panel-text-color: #94A3B8;
  --nav-icon-fill-color: var(--brand-color);
}

.be-navigation-primary {
  display: inline-block;
  width: 100%;
}

.be-navigation-primary a {
  color: var(--nav-link-color); 
  font-size: 1rem;
  font-weight: 400;
}

.be-navigation-primary a:hover {
  color: var(--nav-link-hover-color)
}

.be-navigation-primary a.active-item {
  color: var(--nav-link-active-color); 
  font-weight: 600;
  position: relative;
}

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

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

.submenu-toggle {
  display: none;
}

.submenu.level-1 {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.submenu.level-1 > li {
  display: inline-block;
  margin-left: 1rem;  
}

.submenu.level-1 > :first-child { 
  margin-left: 0.25rem;
}

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


/* Benivo dropdown ... */
.be-nav-dropdown-container {
  --transition: .3s ease-in-out;
  position:absolute;
  top:100%; 
  left: 0; 
  right: 0; 
  width: 480px;
  opacity: 0;
  visibility: hidden;
  transition: visibility var(--transition), background-color var(--transition),
                background-image var(--transition),
                backdrop-filter var(--transition),
                opacity var(--transition)
}

/* dropdown triangle */
.be-nav-dropdown-container > div:before {
  content:"";
  display: inline-block;
  float: left;
  margin-top: -1.5rem;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent #fff transparent;
  z-index:9999;
  filter: drop-shadow(0px 3px 16px var(--nav-panel-drop-shadow-color)); 
}

.be-nav-dropdown-container > div {
  margin-top: 1rem;
  background:#fff; 
  padding: 1rem; 
  height: 100%; 
  filter: drop-shadow(0px 3px 16px var(--nav-panel-drop-shadow-color)); 
}


.be-nav-dropdown-container ul {
  display: flex;
  flex-direction: column; 
  list-style: none; 
  margin: 0;
  padding: 0;
}

.be-nav-dropdown-container ul > li {
  margin-bottom: 0.5rem;
  width: 100%;
}

.be-nav-dropdown-container ul > li > a {
  display: flex;
  padding: 0.875rem;
  align-items: flex-start;
}

.be-nav-dropdown-container ul > li > a > span.hs-icon {
  height: 1.25rem;
  width: 1.25rem;
  flex-shrink: 0;
  display: inline-block;
  fill: var(--nav-icon-fill-color);
  color: var(--nav-icon-fill-color);
  margin-right: 0.875rem;
}

.be-nav-dropdown-container ul > li:hover a {
  background: var(--nav-panel-hover-color);
}

.be-nav-dropdown-container .nav-dropdown-link_title {
  font-weight: 500;
  margin: 0;
  line-height: 1;
  font-size: 1rem;
  color: var(--nav-link-title-color);
}

.be-nav-dropdown-container .nav-dropdown-link_text {
  font-weight: normal;
  color: var(--nav-panel-text-color); 
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.25rem
}

.be-nav-dropdown-container--single-basic {
  width: 320px;
}

.be-nav-dropdown-container--double {
  width: 640px;
}

.be-nav-dropdown-container--double > div > div.be-nav-dropdown-container--double--cols {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;  
}

.be-nav-dropdown-container--double--cols .be-nav-dropdown-container--double--white-panel {
  padding-right: 1rem;
}


.be-nav-dropdown-container--double--cols .be-nav-dropdown-container--double--alt-panel {
  background: var( --nav-panel-bg-secondary-color); 
  margin: -1rem; 
  padding: 1rem;
  margin-left: 0;
}


.be-nav-dropdown-container_title {
  margin: 0;
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  color: var(--nav-link-title-color);
  
}

.be-nav-dropdown-container_description {
    font-weight: normal;
    color: var(--nav-panel-text-color);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.25rem;  
}

.be-nav-dropdown-container.be-nav-dropdown-container--single-basic .nav-dropdown-link_title {
  font-weight: normal;
}

li.has-submenu.menu-item:hover .be-nav-dropdown-container, li.has-submenu.menu-item .be-nav-dropdown-container:hover  {
  opacity: 1;
  visibility: visible;
}




{# Benivo top level menu links #}

.menu-link--benivo .menu-link_container {
  display: flex;
}

.menu-link--benivo .menu-link_title {}

.menu-link--benivo .menu-link_icon {
  height: 1rem;
  width: 1rem; 
  margin-left: 0.5rem;
}



/* 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 {
  visibility: hidden;
}

.be-navigation-primary .menu-link__trigger--mobile  { display: none; }


@media (max-width: 767px) {

  .be-navigation-primary {
    margin-left: 1rem;
    max-height: 75vh;
    overflow-y: scroll;
  }

  .be-navigation-primary .submenu.level-1 {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
  }


  .be-navigation-primary .submenu.level-1 > :first-child { 
    margin-left: 1rem;
  }  

  .be-navigation-primary .menu-link--benivo .menu-link_icon {
    display: none;
  }

  .be-navigation-primary .menu-link__trigger--mobile {
    flex-grow:999;
    display:inline-flex;
    cursor: pointer;
    justify-content: flex-end;
  }

  .be-navigation-primary .menu-link_icon--mobile {
      height: 1rem;
      width: 1rem; 
      margin-left: 0.5rem;
      display: block;
      cursor: pointer;
  }

  .be-navigation-primary .menu-link--benivo .menu-link_container {
    justify-content: space-between;
  }

  .be-navigation-primary .submenu a {
    /* width: 100%; */
  }


  .be-navigation-primary .submenu.level-1 > li {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }


  .be-navigation-primary .submenu.level-1 > li.has-submenu {
    width: 100%;
    padding-right: 2.875rem;
  }

  {# hide the carrot and the dropdown containers #}
  .be-nav-dropdown-container > div:before { display: none ;}
  .be-nav-dropdown-container { 
    display:none;
    opacity: 1;
    visibility: hidden; 
    position: relative;
    width: 100%;
  }

  .be-nav-dropdown-container > div {
    filter: none;
  }

  {# show the containers with a open class #}
  .be-navigation-primary .submenu.level-1 li.menu-item.has-submenu.open .be-nav-dropdown-container {
    display: block;
    visibility: visible;
  }

  {# flip the SVG icon when open #}

  .be-navigation-primary .submenu.level-1 li.menu-item.has-submenu.open .menu-link_icon--mobile {
    -moz-transform: scale(1, -1);
    -webkit-transform: scale(1, -1);
    -o-transform: scale(1, -1);
    -ms-transform: scale(1, -1);
    transform: scale(1, -1);
  }

  .be-nav-dropdown-container > div {
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .be-nav-dropdown-container--double > div > div.be-nav-dropdown-container--double--cols {
    display: block;
  }

  .be-nav-dropdown-container--double--cols .be-nav-dropdown-container--double--alt-panel {
    padding-left: 0;
    padding-right: 0;
    background: var(--nav-panel-bg-color)
  }

}
