/* ============================================================================
   R630 · math.science.cmu.ac.th — PHASE 2 TABLET LAYER (768px–1169px only)
   Purpose: kill the 1170px document width on tablet, nothing else.
   Root causes measured at 768×1024 (documentElement.scrollWidth = 1170):
     1. include/navbar.php: <div style="width:1170px; margin:auto;">  (secondary
        navy menu bar, .navbar-full_Disable > div) — inline width, so it needs
        !important; it cannot shrink and pushes the whole document to 1170.
     2. index.php spacer rows <div class="row col-md-12"></div> render 800px wide
        (index.css gives .row a fixed min width inside the Events/Calendar block),
        leaving a 9px horizontal overflow after fix #1.
   Both fixes are geometry-only (width/max-width). No colour, spacing, typography
   or layout-order change. The media query stops at 1169px so desktop (≥1170,
   incl. 1366/1920) keeps the exact legacy bar width, and it starts at 768px so
   the verified mobile layer (≤767) is untouched.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1169px) {

  /* 1 · the fixed 1170px menu bar follows the viewport instead (content is a
         flex row of menu items; they wrap naturally once the bar can shrink) */
  .navbar-full_Disable > div {
    width: auto !important;
    max-width: 100% !important;
  }

  /* 2 · spacer rows in the Events / Calendar / related-sites block */
  .row.col-md-12 {
    width: auto !important;
    max-width: 100% !important;
  }
}
