/* =========================================================
   OPENDOOR — RESPONSIVE ADJUSTMENTS
   ========================================================= */

/* ---- Large desktop refinement ---- */
@media (min-width: 1400px) {
  .container { max-width: 1240px; }
}

/* ---- Laptop / small desktop ---- */
@media (max-width: 1199px) {
  .hero-title { font-size: clamp(2.3rem, 4.4vw, 3.4rem); }
  .stat-item { padding: 10px 8px; }
}

/* ---- Tablet ---- */
@media (max-width: 991px) {
  .main-nav { display: none; }

  .hero-visual { margin-top: 70px; }
  .hero-actions { justify-content: flex-start; }
  .hero-trust { flex-wrap: wrap; }

  .about-visual { height: 420px; margin-bottom: 40px; }
  .value-row { margin-top: 22px !important; padding-top: 22px !important; border-top: 1px solid var(--border) !important; }
  .value-row:first-of-type { border-top: none !important; }

  .process-line { display: none; }
  .process-step { margin-bottom: 34px; }

  .story-img-wrap { height: 380px; margin-bottom: 60px; }
  .story-stat-float { right: 10px; }

  .cta-section { padding: 70px 40px; }

  .contact-form-card { margin-top: 40px; }
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
  body { font-size: 0.96rem; }

  .hero { padding: 130px 0 60px; text-align: left; }
  .hero-visual { height: 340px; }
  .hero-img-main { width: 100%; height: 320px; }
  .hero-img-float { width: 62%; height: 150px; }
  .hero-stat-card { padding: 14px 18px; left: -8px; top: 20px; }
  .hero-stat-card .num { font-size: 1.05rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-brand,
  .hero-actions .btn-outline-brand { justify-content: center; }

  .impact-strip { padding: 46px 0; }

  .program-featured { min-height: 320px; }
  .program-featured-content { padding: 24px; }

  .story-quote { font-size: 1.35rem; }
  .story-stat-float { position: static; margin-top: 20px; display: inline-flex; gap: 14px; align-items: center; }

  .cta-section { padding: 54px 22px; border-radius: var(--radius-md); }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn-brand,
  .cta-actions .btn-white { justify-content: center; }

  .footer-bottom { flex-direction: column; text-align: center; }
  .site-footer { padding-top: 60px; text-align: left; }

  .contact-form-card { padding: 26px; }
}

/* ---- Small mobile ---- */
@media (max-width: 400px) {
  .navbar-brand-custom img { height: 38px; }
  .brand-wordmark { font-size: 1.05rem; }
  .hero-title { font-size: 2rem; }
  .section-heading { font-size: 1.7rem; }
  .btn-brand, .btn-outline-brand, .btn-white { padding: 13px 24px; font-size: 0.9rem; justify-content: center;}
}
@media (max-width: 767px) {

  .site-header {
    top: 0;
    height: 72px;
  }

  .navbar-brand-custom img {
    width: 190px;
  }

  .offcanvas-brand .navbar-brand-custom img {
    width: 200px;
  }

}
@media (max-width: 480px) {

  .site-header {
    height: 90px;
  }

  .navbar-brand-custom img {
    width: 175px;
  }

  .footer-brand-logo img {
    width: min(220px, 100%) !important;
  }

}

/* Keep the founder portrait balanced on phones instead of stretching it
   to the desktop image height. */
@media (max-width: 767px) {
  .founder-visual {
    height: 390px;
    margin-bottom: 32px;
  }

  .founder-visual .about-img-1 {
    left: 50%;
    width: min(100%, 310px);
    height: 390px;
    transform: translateX(-50%);
  }

  .founder-visual .about-img-1 img {
    object-position: center top;
  }
}
/* =========================
   TABLET
========================= */

@media (max-width: 991.98px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
    gap: 12px;
  }

  .gallery-card-wide {
    grid-column: span 2;
  }

  .gallery-card-tall {
    grid-row: span 2;
  }

  .gallery-card-featured {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 575.98px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
    gap: 12px;
  }

  .gallery-card-wide,
  .gallery-card-tall,
  .gallery-card-featured {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-card-button img {
    object-position: center;
  }
}

.programs-heading {
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .programs-heading {
    white-space: normal;
  }
}