/* Wing Construction / Rumah image-fit layer v1.3
 * Stronger than the prior aspect-ratio-only layer:
 * - content image widgets have a real bounded height
 * - construction photos use object-fit: cover
 * - hero/section backgrounds are forced to centered cover at all breakpoints
 * - branding, badges, avatars and icons are not targeted
 */

.elementor-widget-image.wing-auto-fit-image .elementor-widget-container {
    width: 100%;
    overflow: hidden !important;
    line-height: 0;
}

.elementor-widget-image.wing-auto-fit-image img,
.elementor-widget-image img[src*="roofing-services-"],
.elementor-widget-image img[src*="waterproofing-"],
.elementor-widget-image img[src*="masonry-and-brickwork-"],
.elementor-widget-image img[src*="parapet-wall-installation-"],
.elementor-widget-image img[src*="eifs-and-stucco-"],
.elementor-widget-image img[src*="suspended-scaffolding-"],
.elementor-widget-image img[src*="facade-restoration-and-local-law-11-"],
.elementor-widget-image img[src*="general-construction-"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 320px !important;
    min-height: 0 !important;
    max-height: 320px !important;
    object-fit: cover !important;
    object-position: center center !important;
}

.elementor-widget-image.wing-auto-fit-wide img {
    height: 360px !important;
    max-height: 360px !important;
}

.elementor-widget-image.wing-auto-fit-feature img {
    height: 420px !important;
    max-height: 420px !important;
}

.elementor-element.wing-auto-bg,
.elementor-element.wing-auto-hero-bg {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
}

/* Elementor's generated selectors may apply the background to ::before-like
 * motion wrappers; keep those aligned too. */
.elementor-element.wing-auto-bg:not(.elementor-motion-effects-element-type-background),
.elementor-element.wing-auto-bg > .elementor-motion-effects-container > .elementor-motion-effects-layer,
.elementor-element.wing-auto-hero-bg:not(.elementor-motion-effects-element-type-background),
.elementor-element.wing-auto-hero-bg > .elementor-motion-effects-container > .elementor-motion-effects-layer {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
}

@media (max-width: 1024px) {
    .elementor-widget-image.wing-auto-fit-image img,
    .elementor-widget-image img[src*="roofing-services-"],
    .elementor-widget-image img[src*="waterproofing-"],
    .elementor-widget-image img[src*="masonry-and-brickwork-"],
    .elementor-widget-image img[src*="parapet-wall-installation-"],
    .elementor-widget-image img[src*="eifs-and-stucco-"],
    .elementor-widget-image img[src*="suspended-scaffolding-"],
    .elementor-widget-image img[src*="facade-restoration-and-local-law-11-"],
    .elementor-widget-image img[src*="general-construction-"] {
        height: 300px !important;
        max-height: 300px !important;
    }

    .elementor-widget-image.wing-auto-fit-feature img {
        height: 360px !important;
        max-height: 360px !important;
    }
}

@media (max-width: 767px) {
    .elementor-widget-image.wing-auto-fit-image img,
    .elementor-widget-image img[src*="roofing-services-"],
    .elementor-widget-image img[src*="waterproofing-"],
    .elementor-widget-image img[src*="masonry-and-brickwork-"],
    .elementor-widget-image img[src*="parapet-wall-installation-"],
    .elementor-widget-image img[src*="eifs-and-stucco-"],
    .elementor-widget-image img[src*="suspended-scaffolding-"],
    .elementor-widget-image img[src*="facade-restoration-and-local-law-11-"],
    .elementor-widget-image img[src*="general-construction-"],
    .elementor-widget-image.wing-auto-fit-wide img,
    .elementor-widget-image.wing-auto-fit-feature img,
    .elementor-widget-image.wing-auto-fit-standard img {
        height: 240px !important;
        max-height: 240px !important;
    }

    .elementor-element.wing-auto-bg,
    .elementor-element.wing-auto-hero-bg {
        background-position: center center !important;
    }
}
