/* ==========================================================================
   iCARE - responsive rules (all media queries live here)
   Container steps: 640 / 768 / 992 / 1280 / 1536
   (992 matches Bootstrap's "lg" so col-lg-* and d-lg-* line up with the container)
   ========================================================================== */

/* ---------- < 576px (small phones) ---------- */
@media (max-width: 575.98px) {
  .section-pad { padding-top: 3rem; padding-bottom: 3rem; }
  .cta-inner { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .row.space-top-lg { margin-top: calc(4rem - var(--bs-gutter-y)); }

  /* long buttons must wrap instead of overflowing the screen */
  .contact-form-btn {
    width: 100%;
    height: auto;
    min-height: 3.5rem;
    padding: 0.75rem 1.25rem;
    white-space: normal;
    text-align: center;
  }
  .contact-info { padding: 1.5rem; }
  .contact-info-item a { word-break: break-word; }
  .contact-banner { height: 11rem; }
}

/* ---------- >= 640px ---------- */
@media (min-width: 640px) {
  .container { max-width: 640px; }
  .gallery-grid { column-count: 2; }
}

/* ---------- >= 768px ---------- */
@media (min-width: 768px) {
  .container { max-width: 768px; }

  .section-pad { padding-top: 6rem; padding-bottom: 6rem; }
  .section-heading { font-size: 2.25rem; line-height: 2.5rem; }

  .page-title { font-size: 3rem; line-height: 1.1; }
  .page-lead { font-size: 1.25rem; line-height: 1.75rem; }

  .gallery-grid { column-count: 3; }
  .join-card { padding: 2rem; }
}

/* ---------- >= 992px (Bootstrap "lg": desktop nav appears here) ---------- */
@media (min-width: 992px) {
  .container { max-width: 992px; }
  .hero-slide { aspect-ratio: auto; height: 90vh; }
  .main-nav { gap: 1.5rem; }
  .gallery-grid { column-count: 4; }
}

/* ---------- >= 1280px ---------- */
@media (min-width: 1280px) {
  .container { max-width: 1280px; }
  .main-nav { gap: 2rem; }
}

/* ---------- >= 1536px ---------- */
@media (min-width: 1536px) {
  .container { max-width: 1536px; }
}

/* ---------- Landscape phones: keep the hero from filling the whole screen ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-slide { max-height: 85vh; }
}

/* ---------- Touch devices: no hover, so always show gallery captions ---------- */
@media (hover: none) {
  .gallery-caption {
    opacity: 1;
    background: linear-gradient(to top, rgb(0 0 0 / .65), rgb(0 0 0 / 0) 55%);
  }
  .gallery-item:hover img { transform: none; }
}
