/* RHVA V100 - one gallery card logic copied from working subpages to homepage */

/* Grid consistency */
.rhv-home-v100-grid,
.rhv-uniform-grid {
    align-items: start !important;
}

/* Use same card shell for homepage and subpages */
.rhv-home-v100-card,
.rhv-uniform-card.rhv-popup-card {
    overflow: hidden !important;
}

/* This is the important part:
   The preview wrapper is NOT a fixed-height crop box. */
.rhv-home-v100-card .rhv-card-image,
.rhv-home-v100-card .rhv-home-v100-media,
.rhv-uniform-card .rhv-card-image,
.rhv-uniform-card .rhv-home-v100-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: -28px -28px 22px !important;
    overflow: hidden !important;
    display: block !important;
    background: transparent !important;
}

/* Image fills full width and keeps natural height.
   This avoids BOTH cropping and side gutters. */
.rhv-home-v100-card .rhv-card-image img,
.rhv-home-v100-card .rhv-home-v100-media img,
.rhv-uniform-card .rhv-card-image img,
.rhv-uniform-card .rhv-home-v100-media img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    background: transparent !important;
}

/* Stop old hover zoom/crop from returning */
.rhv-home-v100-card:hover .rhv-card-image img,
.rhv-uniform-card:hover .rhv-card-image img {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Remove old homepage service-card image rules from the new home cards */
.rhv-home-v100-card.service-card,
.rhv-home-v100-card.rhv-image-card {
    padding: 28px !important;
}
.rhv-home-v100-card.service-card > img,
.rhv-home-v100-card.rhv-image-card > img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Protect hero/header/logo images */
header img,
.site-header img,
.logo img,
.brand img,
.hero img,
.home-hero img,
.rhv-hero img,
.rhva-hero img,
.hero-slider img,
.rhv-hero-slider img,
.rhva-hero-slider img {
    height: auto;
}