/* Mobile and tablet fixes shared by every page. */

/* Brief us / Register with us: on narrow screens the photo moves below the form.
   The intro column dissolves (display: contents) so its heading, text and photo can be
   re-ordered around the form. */
@media (max-width: 999px) {
  .brief-wrap { flex-direction: column; gap: 0 !important; }
  .brief-intro { display: contents !important; }
  .brief-intro > * { order: 1; }
  .brief-wrap > [data-form] { order: 2; flex-basis: auto !important; }
  .brief-photo {
    order: 3;
    width: 100% !important;
    margin-top: 24px !important;
    aspect-ratio: 4 / 3 !important;
  }
}

/* Comfortable tap targets on touch screens (44px is Apple's minimum). */
@media (max-width: 860px) {
  .footer-col li + li { margin-top: 0; }
  .footer-col a { padding: 13px 0; }
  a[href^="tel:"],
  a[href^="mailto:"] { display: inline-block !important; padding: 13px 0 !important; }
}

/* Long content inside flex cards may shrink below its natural width instead of
   pushing the page wider than the screen (the rate calculator's table scrolls instead). */
.shrinkable { min-width: 0; }

/* Phones: a slightly smaller logo so it and the Menu button sit comfortably side by side. */
@media (max-width: 480px) {
  .site-logo img { height: 30px; }
}

/* Phones: client logos four to a row instead of two, so the grid isn't 14 rows long. */
@media (max-width: 600px) {
  .logo-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 10px !important; }
  .logo-grid > img { border-radius: 10px !important; }
}

/* Phones: fit the rate calculator's results table on screen instead of scrolling sideways. */
@media (max-width: 600px) {
  #rate-calculator table { min-width: 0 !important; font-size: 13px !important; }
  #rate-calculator thead tr { font-size: 11.5px !important; }
  #rate-calculator th, #rate-calculator td { padding-left: 3px !important; padding-right: 3px !important; }
  #rate-calculator th:first-child { padding-left: 0 !important; }
  #rate-calculator tr > :last-child { padding-right: 0 !important; }
}
