/**
 * Responsive imagery for pasted RIAK HTML blocks (post-Elementor shell).
 * Overrides Smush lazy-load sizing and full-bleed layout without Elementor sections.
 */

html body.riak-native-shell:has(.riak-homepage) {
  overflow-x: clip;
}

body.riak-native-shell:has(.riak-homepage) .site-main,
body.riak-native-shell:has(.riak-homepage) .site-main.riak-full-width,
body.riak-native-shell:has(.riak-homepage) #content,
body.riak-native-shell:has(.riak-homepage) article.page,
body.riak-native-shell:has(.riak-homepage) article.hentry,
body.riak-native-shell:has(.riak-homepage) .entry-content,
body.riak-native-shell:has(.riak-homepage) .riak-homepage {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
  background: transparent !important;
  box-sizing: border-box;
}

body.riak-native-shell:has(.riak-homepage) .riak-homepage .riak-services,
body.riak-native-shell:has(.riak-homepage) .riak-homepage .riak-reviews {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

body.riak-native-shell .entry-content:has([class^="riak-"]) {
  overflow-x: clip;
}

/* Homepage hero — full width; height from viewport (never shrink width via aspect-ratio) */
body.riak-native-shell .riak-homepage-hero {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  left: auto;
  transform: none;
  overflow: hidden;
  background-color: #120e0b;
  height: min(56.25vw, 100dvh);
  min-height: 240px;
}

@media (max-width: 767px) {
  body.riak-native-shell .riak-homepage-hero {
    height: min(calc(100vw * 16 / 9), 100dvh);
    min-height: min(70dvh, 520px);
  }
}

body.riak-native-shell .riak-homepage-hero picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

body.riak-native-shell .riak-homepage-hero img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

/* Smush lazy-load plugin CSS often breaks aspect-ratio / cover layouts */
body.riak-native-shell .riak-homepage-hero img.lazyload,
body.riak-native-shell .riak-homepage-hero img.lazyloading,
body.riak-native-shell .riak-homepage-hero img.lazyloaded {
  width: 100% !important;
  height: 100% !important;
  min-height: 100%;
  max-width: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  opacity: 1 !important;
}

body.riak-native-shell .riak-service-card img,
body.riak-native-shell .riak-review__photo img,
body.riak-native-shell .riak-service-page__hero img,
body.riak-native-shell a.riak-service-page__hero-media img,
body.riak-native-shell .riak-service-page__media-photo,
body.riak-native-shell .riak-service-page__media-kit,
body.riak-native-shell .riak-service-page__partner-logo,
body.riak-native-shell .riak-about__banner img,
body.riak-native-shell .riak-article__figure img {
  max-width: 100%;
}

body.riak-native-shell .riak-service-card img.lazyload,
body.riak-native-shell .riak-service-card img.lazyloading,
body.riak-native-shell .riak-service-card img.lazyloaded {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  opacity: 1 !important;
}

body.riak-native-shell .riak-review__photo img.lazyload,
body.riak-native-shell .riak-review__photo img.lazyloading,
body.riak-native-shell .riak-review__photo img.lazyloaded {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  opacity: 1 !important;
}

body.riak-native-shell .riak-about__banner img.lazyload {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  opacity: 1 !important;
}
