/**
 * Hero photographic masters — responsive fit by breakpoint.
 * Targets .hp-hero__visual--photo only (SVG/illustration slides unchanged).
 *
 * Desktop (≥1024): preserve current fill (cover).
 * Tablet (768–1023): contain, full subject visible.
 * Mobile (≤767): contain + center bottom — no family crop.
 */

/* —— Mobile —— */
@media (max-width: 767px) {
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo {
    overflow: visible !important;
    background: transparent !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo > picture,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo > picture {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 4 / 3 !important;
  }

  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo .hp-hero__img,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo .hp-hero__img--photo,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo picture img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo picture img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: contain !important;
    object-position: center bottom !important;
    margin: 0 !important;
    /* Cancel gulf-consult edge fade — it crops photo masters */
    -webkit-mask-image: none !important;
    mask-image: none !important;
    filter: none !important;
  }
}

@media (min-width: 390px) and (max-width: 767px) {
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo > picture,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo picture img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo > picture,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo picture img {
    aspect-ratio: 5 / 4 !important;
  }
}

@media (min-width: 430px) and (max-width: 767px) {
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo > picture,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo picture img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo > picture,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo picture img {
    aspect-ratio: 6 / 5 !important;
  }
}

/* —— Tablet: full subject visible, controlled height —— */
@media (min-width: 768px) and (max-width: 1023px) {
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 260px !important;
    max-height: min(380px, 42vh) !important;
    height: auto !important;
    aspect-ratio: 5 / 4 !important;
    overflow: hidden !important;
    align-self: center !important;
  }

  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo > picture,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo > picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
  }

  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo .hp-hero__img,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo .hp-hero__img--photo,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo picture img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo picture img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
}

/* —— Desktop: preserve current professional fill —— */
@media (min-width: 1024px) {
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo {
    display: grid !important;
    place-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 380px !important;
    max-height: min(520px, 56vh) !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    align-self: stretch !important;
  }

  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo > picture,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo > picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
  }

  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo .hp-hero__img,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo .hp-hero__img--photo,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo picture img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo img,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo picture img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center right !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
}

@media (min-width: 1366px) {
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo {
    min-height: 420px !important;
    max-height: min(560px, 58vh) !important;
  }
}

@media (min-width: 1600px) {
  body.page-home.public-home-v2 .pub-hero .hp-hero__visual.hp-hero__visual--photo,
  .public-home-v2 .hp-hero.pub-hero .hp-hero__visual.hp-hero__visual--photo {
    min-height: 440px !important;
    max-height: min(580px, 56vh) !important;
  }
}
