/* Maal Home hero: naturally flowing images on phones and tablets (V49).
   The mobile hero grows exactly as far as its visible image and optional copy.
   Desktop settings, branding, slide settings and navigation are preserved. */
@media screen and (max-width: 960px) {
  #mh-home-hero {
    height: auto !important;
    min-height: 0 !important;
  }
  #mh-home-hero .mh-hero-shell,
  #mh-home-hero .mh-slides {
    position: relative;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  #mh-home-hero .mh-slide,
  #mh-home-hero[data-height="compact"] .mh-slide,
  #mh-home-hero[data-height="balanced"] .mh-slide,
  #mh-home-hero[data-height="tall"] .mh-slide {
    position: relative;
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible;
  }
  /* The visual takes its height from the image, never from a screen-height rule. */
  #mh-home-hero .mh-visual,
  #mh-home-hero[data-gradient="off"] .mh-visual {
    position: relative !important;
    inset: auto !important;
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
  }
  #mh-home-hero .mh-photo-inner {
    position: relative !important;
    inset: auto !important;
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0;
    max-height: none !important;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }
  #mh-home-hero img.mh-photo,
  #mh-home-hero svg.mh-photo {
    display: block;
    position: relative;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* No extra coloured band when section text/buttons are switched off by admin. */
  #mh-home-hero .mh-slide-layout {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
    min-height: 0;
  }
  #mh-home-hero .mh-slide-layout:has(.mh-copy > *) {
    padding: clamp(14px, 2.5vw, 26px) var(--mh-sig-edge) 10px !important;
  }
  #mh-home-hero .mh-copy {
    width: 100%;
    max-width: 748px;
    margin-inline: auto;
    padding: 0 !important;
  }
  /* Controls can overlay the edge of the slide, never create an empty footer. */
  #mh-home-hero .mh-bottom {
    position: absolute !important;
    inset: auto 0 0 !important;
    width: 100%;
    box-sizing: border-box;
    padding: 0 var(--mh-sig-edge) 8px !important;
    margin: 0 !important;
    min-height: 0 !important;
  }
  #mh-home-hero .mh-photo-inner.is-empty {
    min-height: clamp(140px, 54vw, 310px);
  }
}
@media screen and (max-width: 600px) {
  #mh-home-hero .mh-slide-layout:has(.mh-copy > *) {
    padding: 12px var(--mh-sig-edge) 8px !important;
  }
  #mh-home-hero .mh-overline { margin-bottom: 12px; }
  #mh-home-hero .mh-title { margin-bottom: 12px; }
  #mh-home-hero .mh-description { margin-bottom: 17px; }
  #mh-home-hero .mh-promises { margin-top: 17px; padding-top: 14px; }
}
