/*
 * Mobile menu breakpoint: 1082px.
 *
 * Ours, not the theme's. The theme switches to the hamburger at 768px, which
 * leaves the desktop menu cramped on the way down: the logo is 204px and the
 * menu 804px, so the two need 1038px including the container's 30px of
 * padding. Below roughly that the row has no breathing room. 1082px gives it
 * about 44px of slack and switches before anything collides.
 *
 * Three theme rules have to move together, or the header ends up with both
 * menus or neither:
 *
 *   @media (min-width: 768px) .menu-link { display: none }          (hamburger)
 *   @media (max-width: 767px) #site-navigation .main-menu { none }  (desktop menu)
 *   @media (min-width: 768px) .d-md-none { display: none }          (the .mm panel
 *                                                                    and overlay)
 */

/* --- below the breakpoint: hamburger and off-canvas panel ------------- */
@media (max-width: 1081px) {
  #site-navigation .main-menu {
    display: none;
  }

  .menu-link {
    display: flex;
  }

  /* Undo `.d-md-none` on the off-canvas panel and its backdrop, which the
     theme would otherwise hide from 768px up. */
  .mm.d-md-none,
  .mm-overlay.d-md-none {
    display: block;
  }

  /* The theme only tightens the logo padding under 768; it belongs with the
     hamburger, not with a fixed pixel width. */
  .site-header .site-branding {
    padding: 18px 5px;
    width: auto;
  }
}

/* --- at and above the breakpoint: the full menu ----------------------- */
@media (min-width: 1082px) {
  #site-navigation .main-menu {
    display: block;
  }

  .menu-link {
    display: none;
  }

  .mm.d-md-none,
  .mm-overlay.d-md-none {
    display: none;
  }
}
