/* BGP landing-page responsive correction — 2026-08-30 */

/* Keep the homepage hero present and structurally complete on every viewport. */
.compact-hero {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.compact-hero-image {
  display: block !important;
}

/* Featured initiative cards use controlled image heights on small screens.
   Never allow the source photograph to determine the card height. */
.home-card-grid {
  min-width: 0;
}

.home-initiative-card {
  min-width: 0;
}

.home-initiative-card > img {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 760px) {
  .compact-hero {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }

  .compact-hero-copy {
    min-height: 0 !important;
    padding-top: 3.25rem !important;
    padding-bottom: 2.5rem !important;
  }

  .compact-hero-image {
    min-height: 280px !important;
    height: 280px !important;
    max-height: 280px !important;
  }

  .compact-hero-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  .home-initiatives {
    padding-top: 3.25rem !important;
    padding-bottom: 3.5rem !important;
  }

  .home-card-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    margin-top: 2rem !important;
  }

  .home-initiative-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 230px auto !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .home-initiative-card > img,
  .popoy-card-visual {
    width: 100% !important;
    height: 230px !important;
    min-height: 230px !important;
    max-height: 230px !important;
  }

  .home-initiative-card > div:not(.popoy-card-visual) {
    min-height: 0 !important;
    padding: 1.35rem !important;
  }

  .popoy-card-visual img {
    width: 145px !important;
    height: 175px !important;
  }
}

@media (max-width: 560px) {
  .compact-hero-copy {
    padding-top: 2.75rem !important;
    padding-bottom: 2.25rem !important;
  }

  .compact-hero-image {
    min-height: 250px !important;
    height: 250px !important;
    max-height: 250px !important;
  }

  .home-initiative-card {
    grid-template-rows: 220px auto !important;
  }

  .home-initiative-card > img,
  .popoy-card-visual {
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
  }
}
