/* The default Quarto/Bootstrap navbar only collapses to a hamburger menu
   below 992px. With six fairly long nav labels, widths between ~992px and
   ~1350px (many common laptop screens) are too narrow to fit everything on
   one line but wide enough that Bootstrap still tries to render it inline —
   this squeezes the "PneumoTRACE" brand until it truncates and forces some
   nav labels to wrap onto a second line while others don't, producing a
   jagged, uneven-looking header. Extending the collapse range up to 1350px
   keeps the header clean (full title + a hamburger menu) across that zone,
   matching the already-clean look above 1350px. */
@media (min-width: 992px) and (max-width: 1350px) {
  .navbar-expand-lg {
    flex-wrap: wrap !important;
  }
  .navbar-expand-lg .navbar-toggler {
    display: block !important;
  }
  .navbar-expand-lg .navbar-collapse {
    display: none !important;
    flex-basis: 100%;
  }
  .navbar-expand-lg .navbar-collapse.show {
    display: flex !important;
  }
  .navbar-expand-lg .navbar-nav {
    flex-direction: column !important;
  }
  .navbar-expand-lg .navbar-nav-scroll {
    overflow-y: auto !important;
    max-height: var(--bs-scroll-height, 75vh);
  }
  /* Match the sub-992px placement of the search icon (next to the brand,
     not after the opened menu) instead of the desktop order. */
  .navbar-expand-lg #quarto-search {
    order: 4 !important;
  }
  .navbar-expand-lg .quarto-navbar-tools {
    order: 3 !important;
  }
}
