@media screen and (max-width: 1023px) and (min-width: 770px) {
  #the-main-header .desktop-mega-menu {
    display: none !important;
  }
}

@media screen and (max-width: 769px) {
  #the-main-header .desktop-mega-menu {
    display: none !important;
  }
}

/* Mobile Menu Styles */
body.mobile-mega-active {
  overflow: hidden;
}

.mobile-mega-menu {
  font-family: "Open Sans", Sans-serif;
}

.mobile-mega-menu .menu-container {
  width: auto !important;
}

.mobile-mega-menu .toggle-menu,
.mobile-mega-menu .toggle-menu:hover {
  background: transparent;
  border: none;
}

.mobile-mega-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-mega-menu .menu-wrapper {
  display: none;
  position: fixed;
  z-index: 3;
  left: 0;
  top: 76px;
  /*need to calculate this in js */
  bottom: 0px;
  width: 100%;
  background: #fff;
}

.mobile-mega-menu .menu-wrapper.is-visible {
  display: block;
}

.mobile-mega-menu .list-wrapper {
  background: #fff;
  height: 100%;
}

.mobile-mega-menu ul.level-1 {
  padding: 24px 12px;
}

.mobile-mega-menu ul.level-1 > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 12px;
  border-bottom: 1px solid #e6e9f0;
  color: #042238;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
}

.mobile-mega-menu ul.level-1 > li > a > svg {
  fill: #042238;
}

.mobile-mega-menu .list-wrapper:nth-child(2),
.mobile-mega-menu .list-wrapper:nth-child(3) {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform: translateX(100%);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.5s;
}

.mobile-mega-menu .sub-menu-wrapper {
  height: 100%;
  overflow: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mobile-mega-menu .sub-menu-wrapper::-webkit-scrollbar {
  display: none;
}

.mobile-mega-menu .sub-menu-wrapper .panel-content {
  padding: 54px 0;
  text-align: left;
}

.mobile-mega-menu .sub-menu-wrapper .panel-footer {
  background: #e7f8fd;
  text-align: center;
  position: fixed;
  bottom: 0px;
  width: 100%;
  padding: 12px 0;
}

.mobile-mega-menu .sub-menu-wrapper .panel-footer:before {
  content: "";
  display: block;
  height: 24px;
  background: rgb(255, 255, 255);
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  position: absolute;
  width: 100%;
  top: -24px;
}

.mobile-mega-menu .sub-menu-wrapper .panel-footer li {
  display: inline-block;
  border-right: 1px solid black;
  padding: 0 12px;
}

.mobile-mega-menu .sub-menu-wrapper .panel-footer li a {
  color: #000;
  font-size: 12px;
  text-decoration: none;
  font-weight: 500;
}

.mobile-mega-menu .sub-menu-wrapper .panel-footer li:last-child {
  border: none;
}

.mobile-mega-menu .list-wrapper:nth-child(2).is-visible,
.mobile-mega-menu .list-wrapper:nth-child(3).is-visible {
  transform: none;
}

.mobile-mega-menu .list-wrapper:nth-child(1) > ul > li > .sub-menu,
.mobile-mega-menu .list-wrapper:nth-child(2) .level-3 {
  display: none;
}

.mobile-mega-menu .menu-wrapper a {
  display: inline-block;
  position: relative;
  padding: 5px 0;
}

.mobile-mega-menu .panel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 12px 0;
  position: absolute;
  top: 0px;
  width: 100%;
  box-sizing: border-box;
  background: white;
  z-index: 1;
}

.mobile-mega-menu .panel-controls:after {
  content: "";
  display: block;
  height: 24px;
  background: rgb(255, 255, 255);
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  position: absolute;
  width: 100%;
  bottom: -24px;
}

.mobile-mega-menu .panel-controls span {
  color: #000;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
}

.mobile-mega-menu .panel-controls button {
  border: none;
  background: none;
}

.mobile-mega-menu .back-one-level {
  display: flex;
  align-items: center;
}

.mobile-mega-menu .back-one-level svg {
  fill: var(--white);
}

.mobile-mega-menu .menu-section {
  padding: 0 24px 12px;
}

.mobile-mega-menu .menu-section .menu-items {
  padding: 0 12px;
}

.mobile-mega-menu .menu-section .menu-items a {
  padding: 6px 12px;
}

.mobile-mega-menu .menu-section .menu-section-heading {
  padding: 0;
}

.mobile-mega-menu .menu-section .menu-items .menu-text {
  font-weight: 500;
}

/* /wp-admin > Mega Menu styles */
.acf-flexible-content .menu-section .menu-items a {
  width: 100% !important;
  text-decoration: none;
}

.acf-flexible-content .menu-section .menu-items .menu-text {
  font-size: 16px !important;
  font-weight: 700 !important;
}

.acf-flexible-content .menu-section .menu-items .menu-subtext {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #516a80;
}

.acf-flexible-content .menu-section .menu-section-heading {
  color: #516a80;
  font-family: "Open Sans";
  font-size: 16px !important;
  font-style: normal;
  font-weight: 700;
  line-height: 24px; /* 150% */
  letter-spacing: 0.04px;
  text-transform: uppercase;
}
