#ed-headerLogoTopNav {
  position: relative;
  border-top: 1px solid #999;
  font-size: 14px;
}

#ed-headerTopNavContainer {
  display: block;
  position: relative;
}

.menu-toggle-cross {
  display: none;
  width: 18px;
  height: 18px;
  margin-bottom: 24px;
  background-color: #fff;
  mask-image: url(/54/staticpage/00/07/29/site/cross.svg);
  mask-repeat: no-repeat;
  mask-size: contain;
  cursor: pointer;
}

.nav > li > a {
  color: #000;
  font-weight: 600;
  transition: none;
}
.nav > li > a:hover {
  text-decoration: none;
  background-color: transparent;
}

.nav-list-drpdwn > .sub-nav-list-drpdwn__see_all {
  display: none;
}

/* mega-menu - mobile */
.menu-open {
  overflow-y: hidden;

  #ed-headerLogoTopNav {
    position: fixed;
    inset: 0;
    background-color: black;
    border-top: none;
    z-index: 9999;
  }

  #ed-headerTopNavContainer {
    height: 100%;
    overflow-y: auto;
    padding: 24px 16px 0;
  }

  .menu-toggle-cross {
    display: inline-block;
  }

  .nav-list-drpdwn__drpbtn-link {
    position: relative;
    display: block;
    padding: 14px 0;
    font-family: "Open Sans", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
  }

  .nav-list-drpdwn__drpbtn-link:not(.dropdown-toggle) {
    padding-left: 36px;
  }

  .nav-list-drpdwn__drpbtn-link.dropdown-toggle::before {
    content: "";
    display: inline-block;
    vertical-align: text-bottom;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background-color: #fff;
    mask-image: url(/54/staticpage/00/07/29/site/chevron-down.svg);
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;
  }

  .open > .nav-list-drpdwn__drpbtn-link.dropdown-toggle::before {
    transform: rotate(180deg);
  }

  .sub-nav-list-drpdwn {
    position: relative;
    float: none;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #000;
    list-style-type: none;
    margin: 0;
    padding: 0;
    min-width: 100%;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  .open > .dropdown-menu {
    display: grid;
  }

  .sub-nav-list-drpdwn__related_topics {
    display: none;
    color: white;
    padding: 10px 16px 24px 16px;
    font-size: 18px;
    font-weight: 600;
  }

  .sub-nav-list-drpdwn__item {
    flex: 0 1 calc(50% - 12px);
    font-family: "Open Sans", sans-serif;
    border-bottom: none;
    font-size: 16px;
    text-decoration: none;
  }

  .sub-nav-list-drpdwn__see_all {
    position: relative;
    z-index: 1000;
    margin-top: 24px;
    margin-bottom: 14px;
    padding: 0;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-align: center;
  }

  .sub-nav-list-drpdwn__see_all::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 9px;
    margin-left: 5px;
    background-color: #fff;
    mask-image: url(/54/staticpage/00/07/29/site/chevron-down.svg);
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;
    transform: rotate(-90deg);
  }

  .open > .sub-nav-list-drpdwn__see_all {
    display: block;
    background-color: transparent;
    border: none;
  }

  .open > .sub-nav-list-drpdwn__see_all:hover {
    background-color: transparent;
    border: none;
  }

  .sub-nav-list-drpdwn__item:last-child {
    border-bottom: none;
  }

  .sub-nav-list-drpdwn__item-divider {
    background-color: #000;
    display: block;
    width: 90%;
    height: 1px;
    border-radius: 3px;
    margin: 10px auto;
  }

  .sub-nav-list-drpdwn.dropdown-menu a {
    display: block;
    float: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    text-align: left;
    white-space: normal;
    color: #fff;
  }

  .sub-nav-list-drpdwn.dropdown-menu a:focus,
  .sub-nav-list-drpdwn.dropdown-menu a:hover {
    color: #fff;
    background-color: transparent;
    text-decoration: none;
  }

  .sub-nav-list-drpdwn a:hover:after {
    position: absolute;
    display: inline-block;
    right: 0;
    padding-right: 16px;
    text-decoration: underline;
  }

  .sub-nav-list-drpdwn a:hover {
    text-decoration: underline;
  }

  .ed-navItem.nav-list-drpdwn {
    border-top: 1px solid #fff;
  }

  .ed-navItem.nav-list-drpdwn:last-child {
    border-bottom: 1px solid #fff;
  }

  .nav-items-wrap .mega-menu-title-topic {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
  }

  .mega-menu_right-section_item_content {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }

  .mega-menu_right-section_item_content a {
    font-family: "Open Sans", sans-serif;
    flex: 0 0 calc(50% - 8px);
    box-sizing: border-box;
    text-align: start;
    color: #fff;
  }

  .mega-menu_right-section {
    display: grid;
    column-gap: 24px;
    row-gap: 32px;
    margin-top: 32px;
  }

  .mega-menu_right-section_item_title {
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
  }

  .nav-main-container .join-and-sub-wrapper {
    padding: 32px 16px;
    background-color: #fff;
    border-radius: 4px;
  }

  .gain-access-section {
    font-family: "Open Sans", sans-serif;
  }

  .nav-main-container .join-and-sub {
    /* same height as sub button */
    margin-top: 32px;
    margin-bottom: 56px;
    padding-bottom: 16px;
    .join-and-sub-wrapper {
      padding: 32px 16px;
      background-color: #fff;
      border-radius: 4px;
    }
    .subscribe-section-title,
    .gain-access-section {
      display: none;
    }
    .follow-us-section {
      margin-top: 0px;
      padding-top: 0px;
      border-top: none;
    }
    .subscribe-section-button {
      position: fixed;
      bottom: 0;
      inset-inline: 0;
      z-index: 1;
      a {
        height: auto;
        padding-inline: 2rem;
        padding-block: 1rem;
        font-size: 1rem;
        line-height: 1.5;
        width: 100%;
      }
      .Button_variant_primaryFilled {
        border-radius: 0;
        background-color: #4d9ccf;
      }

      .Button_variant_primaryFilled:hover {
        background-color: #80b9dd;
        color: #000;
      }
    }
  }

  .header-subscribe-buttonMobile {
    position: fixed;
    bottom: 0px;
    left: 0px;
    margin-bottom: 0px;
    width: 100%;
  }
}

/* horizontal menu (hide everywhere) */
body:not(.menu-open) #ed-headerLogoTopNav {
  display: none;
}

@media (min-width: 744px) {
  /* mega-menu - tablet:sm */
  .menu-open {
    #ed-headerTopNavContainer {
      padding-top: 48px;
      padding-bottom: 80px;
    }
    .nav-items-wrap > p.mega-menu-title-topic {
      display: block;
      font-size: 22px;
      font-weight: 600;
    }

    .nav-main-container__nav-item {
      display: flex;
      flex-wrap: wrap;
    }

    .nav-items-wrap {
      order: 1;
      flex-flow: row;
      justify-content: space-evenly;
      width: calc(2 / 3 * 100%);
      display: block;
    }

    .ed-navItem.nav-list-drpdwn {
      border-color: rgba(255, 255, 255, 0.5);
    }

    .ed-navItem.nav-list-drpdwn:last-child {
      border-bottom: none;
    }

    .nav-list-drpdwn__drpbtn-link.dropdown-toggle::before {
      display: none;
    }

    .nav-list-drpdwn__drpbtn-link:not(.dropdown-toggle) {
      padding-left: 0;
    }

    .sub-nav-list-drpdwn {
      display: grid;
      row-gap: 8px;
      padding-bottom: 16px;
    }

    .sub-nav-list-drpdwn__see_all,
    .open > .sub-nav-list-drpdwn__see_all {
      display: none;
    }

    .mega-menu_right-section {
      order: 3;
      width: calc(2 / 3 * 100%);
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      row-gap: 40px;
      margin-top: 40px;
    }

    .mega-menu_right-section_item_content {
      flex-direction: column;
      row-gap: 8px;
      margin-top: 16px;
    }

    .mega-menu_right-section_item_content a {
      flex: 0 0 auto;
    }

    .nav-main-container .join-and-sub {
      order: 2;
      width: calc(1 / 3 * 100%);
      margin: 0;
      padding-left: 24px;
      padding-bottom: 0;
      .subscribe-section-title,
      .gain-access-section {
        display: block;
      }
      .subscribe-section-button {
        position: static;
        margin-bottom: 16px;
        .Button_variant_primaryFilled {
          padding: 8px 16px;
          font-size: 14px;
          line-height: inherit;
        }
      }
      .follow-us-section {
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid #e9e9e9;
      }
    }
  }
}

@media (min-width: 1024px) {
  /* mega-menu - desktop:lg */
  .menu-open {
    #ed-headerTopNavContainer {
      padding-inline: 32px;
    }

    .nav-items-wrap {
      width: calc(5 / 12 * 100%);
    }

    .mega-menu_right-section {
      order: 2;
      width: calc(7 / 24 * 100%);
      display: flex;
      flex-direction: column;
      row-gap: 0;
      margin-top: 0;
      padding-left: 24px;
    }

    .mega-menu_right-section_item_content {
      flex-direction: column;
      margin-bottom: 32px;
    }

    .nav-main-container .join-and-sub {
      order: 3;
      width: calc(7 / 24 * 100%);
      padding-left: 32px;
      .subscribe-section-button {
        .Button_variant_primaryFilled {
          width: fit-content;
        }
      }
    }
  }
}

@media (min-width: 1200px) {
  /* mega-menu - desktop */
  .menu-open {
    .nav-main-container {
      max-width: 1200px;
      margin-inline: auto;
    }

    .nav-items-wrap {
      width: 50%;
    }

    .mega-menu_right-section {
      width: 25%;
      padding-left: 32px;
    }

    .nav-main-container .join-and-sub {
      width: 25%;
    }
  }

  /* horizontal menu... */
  body:not(.menu-open) {
    /* ...show on desktop */
    #ed-headerLogoTopNav {
      display: block;
    }

    .nav-items-wrap > p.mega-menu-title-topic,
    .mega-menu_right-section,
    .nav-main-container .join-and-sub {
      display: none;
    }

    .nav-items-wrap {
      display: flex;
      justify-content: center;
    }

    .nav-items-wrap ul.nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
    }

    .nav-items-wrap ul.nav::before,
    .nav-items-wrap ul.nav::after {
      display: none;
    }

    .nav-list-drpdwn {
      height: 50px;
      padding: 15px 12px;
    }

    .nav-list-drpdwn__drpbtn-link {
      display: flex;
      align-items: center;
      column-gap: 12px;
      padding: 0;
      font-weight: 600;
      color: #333;
      cursor: pointer;
      white-space: nowrap;
    }

    .nav-list-drpdwn__drpbtn-link:hover,
    .nav-list-drpdwn__drpbtn-link:focus {
      background-color: transparent;
      border-bottom: 2px solid #0072bb;
      outline: none;
    }

    .nav-list-drpdwn__drpbtn-link.dropdown-toggle::after {
      content: "";
      display: inline-block;
      width: 12px;
      height: 12px;
      background-color: #333;
      mask-image: url(/54/staticpage/00/07/29/site/chevron-down.svg);
      mask-repeat: no-repeat;
      mask-size: contain;
      mask-position: center;
    }

    .nav-list-drpdwn {
      position: static;
    }

    .nav-list-drpdwn.open {
      background-color: #000;

      .nav-list-drpdwn__drpbtn-link.dropdown-toggle::after {
        background-color: #fff;
        transform: rotate(180deg);
      }

      .nav-list-drpdwn__drpbtn-link:hover {
        border-bottom: none;
      }

      .nav-list-drpdwn__drpbtn-link.dropdown-toggle {
        color: #fff;
      }
    }

    .sub-nav-list-drpdwn {
      left: 0;
      right: 0;
      margin: 0;
      padding: 32px 0;
      border: none;
      border-radius: 0;
      box-shadow: none;
      background-color: #000;
    }

    .sub-nav-list-drpdwn__related_topics {
      margin-bottom: 24px;
      padding-inline: 12px;
      font-size: 18px;
      font-weight: 600;
      line-height: 1.688rem;
      color: #fff;
    }

    .sub-nav-list-drpdwn__item {
      margin-bottom: 8px;
      padding-inline: 12px;
    }

    .sub-nav-list-drpdwn__item-link {
      display: inline;
      margin-bottom: 8px;
      padding: 0;
      font-family: "Open Sans", sans-serif;
      font-weight: 600;
      font-size: 16px;
      color: #fff;
    }

    .sub-nav-list-drpdwn__item-link:last-child {
      margin-bottom: 0;
    }

    .sub-nav-list-drpdwn__item-link:hover,
    .sub-nav-list-drpdwn__item-link:focus {
      color: #fff;
      background-color: transparent;
      text-decoration: underline;
      outline: none;
    }
  }
}
