/* MathCrack targeted front-page header and RTL fixes, v2. Scoped to middle desktop widths. */
@media (min-width: 992px) and (max-width: 1439px) {
  body { padding-top: 132px !important; }
  .main-header .main-header__inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions" "menu menu";
    column-gap: 16px;
    row-gap: 9px;
    align-items: center;
    padding: 9px 0 12px;
  }
  .main-header .logo { grid-area: brand; justify-self: start; min-width: 0; }
  .main-header .header-right {
    grid-area: actions;
    justify-self: end;
    display: flex !important;
    flex-wrap: nowrap;
    gap: 9px;
    min-width: 0;
  }
  .main-header .main-menu-wrapper {
    grid-area: menu;
    display: block !important;
    position: static !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100%;
    min-width: 0;
  }
  .main-header .main-menu__list {
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px 28px;
    width: 100%;
    padding: 0 2px;
  }
  #home, #courses, #professor, #professor-summary, #stats, #contactMain,
  #digital-sat-explorer { scroll-margin-top: 146px; }
}
/* Keep international phone numbers in LTR order inside RTL pages. */
.phone-numbers-text[dir="ltr"] { direction: ltr !important; unicode-bidi: isolate; }
.phone-numbers-text[dir="ltr"] > div { direction: ltr; unicode-bidi: isolate; }
.main-footer bdi[dir="ltr"] { direction: ltr; unicode-bidi: isolate; }
