/* responsive-fixes.css
 * Lightweight non-design responsive, accessibility, and performance helpers.
 * Added as part of the cleanup pass. Does NOT change visual design — only fixes
 * common mobile/tablet bugs (overflow, tap targets, image scaling, layout shift).
 */

/* Prevent horizontal scroll on small screens (common cause: oversized images
 * or absolutely-positioned decorative elements). */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure all media scales down within its container.
 * Width/height attributes on <img> still help reserve space (CLS). */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Improve text readability on small screens (font-size unchanged). */
@media (max-width: 480px) {
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* WCAG-recommended minimum tap target size on touch devices for nav/buttons.
 * Uses :where() so specificity stays 0 and existing styles win for sizing. */
@media (hover: none) and (pointer: coarse) {
  :where(a.btn, button, .nav-link, .navbar-toggler, input[type="submit"]) {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Avoid form inputs zooming in on iOS (16px+ prevents zoom on focus). */
@media (max-width: 480px) {
  input,
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}

/* Make sure long words/URLs don't blow out narrow containers. */
p,
li,
td,
th,
.card,
.card-body {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Smooth focus outline for keyboard accessibility (visible only on keyboard). */
:focus-visible {
  outline: 2px solid #0078d4;
  outline-offset: 2px;
}
