/* H4H Step 4I.5 Fix 4 — direct square homepage covers + compact section rhythm. */

/* Apply directly to every feature-card and latest-news media frame on the homepage.
   No heading-text discovery and no JavaScript sizing are required. */
.h4h-public-home .h4h-card-image,
.h4h-public-home .h4h-event-image {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
}

.h4h-public-home .h4h-card-image > img,
.h4h-public-home .h4h-event-image > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Preserve the approved compact spacing without runtime class discovery. */
.h4h-public-home main > section:not(.h4h-hero) {
    padding-top: 44px !important;
    padding-bottom: 44px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.h4h-public-home main > section:not(.h4h-hero) > :first-child { margin-top: 0 !important; }
.h4h-public-home main > section:not(.h4h-hero) > :last-child { margin-bottom: 0 !important; }

@media (max-width: 768px) {
    .h4h-public-home main > section:not(.h4h-hero) {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }
}
