/* ==========================================================================
   Responsive refinements — loaded last on every page.
   ========================================================================== */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }

/* Grid/flex children must be allowed to shrink so long text never overflows */
.page-hero-grid > *, .split > *, .form-grid > *, .footer-top > *,
.cta-cards > *, .newsletter > *, .info-list li, .info-list li > * { min-width: 0; }
h1, h2, h3, p, a, li, dd, dt { overflow-wrap: break-word; }
.info-list a, a[href^="mailto:"] { overflow-wrap: anywhere; }
@media (max-width: 420px) { a[href^="mailto:"] { white-space: normal !important; } }

/* Comfortable tap targets */
@media (hover: none) {
  .nav-links a, .nav-dropdown-toggle, .nav-dropdown-menu a { min-height: 44px; display: flex; align-items: center; }
}

/* Tablets */
@media (max-width: 1024px) {
  .container { padding-inline: clamp(1rem, 4vw, 2rem); }
}

/* Phones: justified text creates big gaps on narrow screens */
@media (max-width: 640px) {
  p, li, .lead, .step p, .faq .answer p, .page-hero-grid p,
  .timeline-item .card p, .cta-band .lead {
    text-align: left !important;
    text-align-last: auto !important;
    text-justify: auto !important;
    hyphens: auto;
  }
  [style*="text-align: center"] p, .text-center p, .section-head p { text-align: center !important; }
  h1 { font-size: clamp(1.85rem, 8vw, 2.4rem) !important; line-height: 1.12; }
  h2 { font-size: clamp(1.5rem, 6.5vw, 2rem); line-height: 1.18; }
  .btn { white-space: normal; text-align: center; }
  .nav-cta .btn, .hero .btn, .cta-band .btn { width: 100%; justify-content: center; }
  .brand span { font-size: .95rem; }
}

/* Very small phones */
@media (max-width: 360px) {
  .brand span { font-size: .85rem; }
  .container { padding-inline: .9rem; }
}

/* Large desktops: keep line lengths readable */
@media (min-width: 1600px) {
  .container { max-width: 1440px; }
}
