/* Shared Divi header/footer corrections. Keep desktop styling untouched. */
@media only screen and (max-width: 980px) {
  /* Target only the default mobile navigation. Divi also renders a separate
     header toggle in some Customiser configurations; preserve its visibility. */
  #main-header #et_mobile_nav_menu .mobile_nav > .mobile_menu_bar {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0 0 12px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    vertical-align: top;
  }

  #main-header #et_mobile_nav_menu .mobile_nav > .mobile_menu_bar:before {
    position: static;
    color: #ffffff;
  }

  #main-header #et_mobile_nav_menu .mobile_nav > .mobile_menu_bar:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
  }

  #main-header #et_mobile_nav_menu .mobile_nav > .et_mobile_menu {
    box-sizing: border-box;
    max-height: calc(100vh - var(--reach-mobile-menu-top, 80px) - 12px);
    max-height: calc(100dvh - var(--reach-mobile-menu-top, 80px) - 12px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  /* Divi's shared copyright module has a -110px right margin on the live site. */
  .et-l--footer .et_pb_text_0_tb_footer {
    max-width: 100%;
    margin-right: 0 !important;
    overflow-wrap: break-word;
  }
}
