/*
 * REAL.PRO Studios
 * Responsive <picture> compatibility layer
 * Scope: Home service carousel + standardized page heroes.
 */

/* Home service-card media wrapper */
html body.rp-page-index .rp-service-card__media > picture {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Keep the existing image geometry when wrapped by <picture>. */
html body.rp-page-index .rp-service-card__media > picture > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* Preserve existing premium hover motion through the new wrapper. */
html body.rp-page-index
.rp-service-slide.is-active
.rp-service-card:hover
.rp-service-card__media > picture > img {
  transform: scale(1.055);
}

/* Standardized service-page hero wrapper */
html body.rp-standardized-page:not(.rp-page-contact)
main#main > section.rp-page-hero
.rp-page-hero__media > picture {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* Keep hero image geometry identical to the previous direct <img>. */
html body.rp-standardized-page:not(.rp-page-contact)
main#main > section.rp-page-hero
.rp-page-hero__media > picture > img {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center !important;
}
