/* Mega menus */
#main-menu > .has-mega-menu {
  position: static !important;
}

#main-menu .mega-menu {
  margin-left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  color:#292d31;  
  border:0;
  margin-top:20px !important;
}

#main-menu > .has-mega-menu .scroll-up,
#main-menu > .has-mega-menu .scroll-down {
  margin-left: 0 !important;
}

/* clear any floats inside the mega menus */
#main-menu .mega-menu > li {
  overflow: auto;
}

#main-menu .mega-menu > li span {
  padding: 0 0.75rem;
  display:inline-block;
  margin-bottom:1.5rem;
}

.mega-sublink::after {
  content: "\00a0>>";
}

.mega-sublink {
  font-weight:600 !important;
}

.mega-sublink:not(:has(+ span)) {
  margin-bottom:0.75rem;
}

.mega-textblock p {
  font-size:1.25rem;
  line-height:130%;
}

.mega-linkinfo {
  font-size:1rem;
}

.mega-textblock{
  display:none;
}

/* reset mega menu list/link styles (which are inherited from the SmartMenus core/theme styles) */
#main-menu .mega-menu {
  padding: 0;
  border-width: 1px 0;
  box-shadow: none;
}
#main-menu .mega-menu ul {
  position: static;
  display: block;
  margin: 0;
  border: 0;
  padding: 0;
  width: auto;
  background: transparent;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  list-style: none;
}
#main-menu .mega-menu ul li {
  border: 0;
}

#main-menu .mega-menu .subitem-image {
  display: none;
}

.mega-textblock {
  color:#ebebe8;
  font-size:1.25rem;
}

.mega-textblock p:first-of-type {
  font-size:2rem;
  font-weight:bold;
}  


/* @media (max-width: 767px) { */
@media (max-width: 991px) {
  #main-menu .mega-flex > div {
    width: 100% !important;
  }
}


@media (min-width: 768px) {

  .mega-textblock{
    display:block;
  }

  #main-menu > li > ul::before,
  #main-menu > li > ul::after {
    display: none;
  }
  #main-menu .mega-flex {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -webkit-justify-content: start;
    -ms-flex-pack: center;
    justify-content: start;
    background-color: var(--gray4);
    padding-left: 2px;
    padding-right: 2px;
  }
  #main-menu .mega-flex > div {
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    -webkit-flex: 1 1 inherit;
    -ms-flex: 1 1 inherit;
    flex: 1 1 inherit;
    -webkit-align-self: auto;
    -ms-flex-item-align: auto;
    align-self: auto;
    border-right: solid 2px var(--gray4);
    border-left: solid 2px var(--gray4);
    border-bottom: solid 4px var(--gray4);
    background-color: var(--gray5);
  }
  #main-menu .mega-flex > div ul {
    padding-bottom: var(--gutter-half);
  }
  #main-menu .mega-flex > div ul a {
      padding: 0 var(--gutter-half);
      font-size: 0.875rem;
      -webkit-hyphens: none;
      -ms-hyphens: none;
      -moz-hyphens: none;
      hyphens: none;
  }
  /*
      Legacy Firefox implementation treats all flex containers
      as inline-block elements.
  */

  @-moz-document url-prefix() {
    #main-menu .mega-flex {
      width: 100%;
      -moz-box-sizing: border-box;
    }
  }



}
