/* ------------------------------------------------------------
   Hero Layout Media Edge Corrections
   Version: 1.5.59-wo56
   Scope: before/after arrow + bottom/right-edge image behavior.
   Purpose: override legacy image caps/cropping after all prior hero CSS.
------------------------------------------------------------- */

/* Make the Before/After relationship visible. Desktop gets a right arrow;
   stacked tablet/mobile gets the same affordance pointing downward. */
.vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after{
  position: relative !important;
  gap: clamp(1.75rem, 3vw, 2.5rem) !important;
}

.vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after::before{
  content: "→" !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  border-radius: 999px !important;
  background: var(--vh-btn-primary-bg, #a3b312) !important;
  color: var(--vh-btn-primary-text, #ffffff) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 .75rem 2rem rgba(0,0,0,.28) !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  z-index: 7 !important;
  pointer-events: none !important;
}

/* Image reset for layouts where the full image must remain visible.
   Older global rules force 16:10 + object-fit:cover; this explicitly opts
   bottom-image patterns back into natural image rendering. */
.vh-layout-hero.vh-hero-layout-editorial_center_bottom_image .vh-hero-media--bottom-edge,
.vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch,
.vh-layout-hero.vh-hero-layout-center_image_three .vh-hero-media--center-column,
.vh-layout-hero.vh-hero-layout-asymmetric_magazine .vh-hero-media--offset{
  overflow: hidden !important;
}

.vh-layout-hero.vh-hero-layout-editorial_center_bottom_image .vh-hero-media--bottom-edge > img,
.vh-layout-hero.vh-hero-layout-editorial_center_bottom_image .vh-hero-media--bottom-edge img,
.vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch > img,
.vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch img,
.vh-layout-hero.vh-hero-layout-center_image_three .vh-hero-media--center-column > img,
.vh-layout-hero.vh-hero-layout-center_image_three .vh-hero-media--center-column img,
.vh-layout-hero.vh-hero-layout-asymmetric_magazine .vh-hero-media--offset > img,
.vh-layout-hero.vh-hero-layout-asymmetric_magazine .vh-hero-media--offset img{
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

/* Centered Text — Bottom Image: the media is the bottom anchor. */
.vh-layout-hero.vh-hero-layout-editorial_center_bottom_image{
  overflow: hidden !important;
  padding-bottom: 0 !important;
}

.vh-layout-hero.vh-hero-layout-editorial_center_bottom_image > .container{
  display: flex !important;
  flex-direction: column !important;
  min-height: inherit !important;
  padding-bottom: 0 !important;
}

.vh-layout-hero.vh-hero-layout-editorial_center_bottom_image .vh-hero-copy--bottom-image{
  margin-top: 0 !important;
  margin-bottom: clamp(1rem, 2.4vw, 1.75rem) !important;
}

.vh-layout-hero.vh-hero-layout-editorial_center_bottom_image .vh-hero-wide-media--bottom-edge{
  display: block !important;
  width: min(100%, 1200px) !important;
  max-width: min(100%, 1200px) !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  align-self: center !important;
  transform: translateY(1px) !important;
}

/* Bottom-Aligned Image Hero: do not cap the media at 22–34rem. Use the
   column/viewport width, then pin it to the section bottom. */
.vh-layout-hero.vh-hero-layout-bottom_image{
  overflow: hidden !important;
  padding-bottom: 0 !important;
}

.vh-layout-hero.vh-hero-layout-bottom_image > .container{
  padding-bottom: 0 !important;
}

.vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-bottom-image-wrap{
  align-items: stretch !important;
  margin-bottom: 0 !important;
}

.vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch{
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: auto !important;
  margin-bottom: 0 !important;
  align-self: flex-end !important;
  transform: translateY(1px) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Right Edge Image Hero: right side stays square and flush. */
.vh-layout-hero.vh-hero-layout-right_edge_image{
  overflow: hidden !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}

.vh-layout-hero.vh-hero-layout-right_edge_image > .container{
  padding-bottom: 0 !important;
}

.vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-wrap{
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}

.vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-media-col{
  padding-right: 0 !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
}

.vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-media--right-edge{
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  transform: translateY(1px) !important;
}

.vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-media--right-edge > img,
.vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-media--right-edge img{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: clamp(24rem, 58vh, 44rem) !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

@media (min-width: 992px){
  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-bottom-image-wrap,
  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-wrap{
    min-height: clamp(32rem, 70vh, 50rem) !important;
  }

  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch > img,
  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch img{
    max-height: clamp(30rem, 70vh, 50rem) !important;
  }
}

@media (min-width: 600px) and (max-width: 991.98px){
  .vh-layout-hero{
    --vh-hero-copy-media-gap: 1.5rem;
    --vh-hero-lead-gap: 1rem;
    --vh-hero-action-gap: .7rem;
  }

  .vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after{
    display: flex !important;
    flex-direction: column !important;
    gap: .85rem !important;
    align-items: stretch !important;
  }

  .vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after::before{
    content: "↓" !important;
    position: static !important;
    transform: none !important;
    order: 2 !important;
    margin: -.2rem auto !important;
  }

  .vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after-card:first-child{ order: 1 !important; }
  .vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after-card:last-child{ order: 3 !important; }

  .vh-layout-hero.vh-hero-layout-editorial_center_bottom_image .vh-hero-wide-media--bottom-edge{
    width: min(100%, 48rem) !important;
    max-width: min(100%, 48rem) !important;
  }

  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch,
  .vh-layout-hero.vh-hero-layout-center_image_three .vh-hero-media--center-column,
  .vh-layout-hero.vh-hero-layout-asymmetric_magazine .vh-hero-media--offset{
    width: min(100%, 44rem) !important;
    max-width: none !important;
  }

  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch > img,
  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch img{
    max-height: clamp(22rem, 50vh, 36rem) !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image > .container{
    padding-right: 0 !important;
    max-width: none !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-copy{
    padding-right: var(--vh-hero-shell-pad-x, 1.5rem) !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-media--right-edge > img,
  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-media--right-edge img{
    min-height: clamp(22rem, 44vh, 34rem) !important;
  }
}

@media (max-width: 599.98px){
  .vh-layout-hero{
    --vh-hero-title-gap: .5rem;
    --vh-hero-lead-gap: .75rem;
    --vh-hero-action-gap: .55rem;
    --vh-hero-copy-media-gap: .95rem;
    --vh-hero-block-gap: .9rem;
  }

  .vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after{
    display: flex !important;
    flex-direction: column !important;
    gap: .75rem !important;
    align-items: stretch !important;
  }

  .vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after::before{
    content: "↓" !important;
    position: static !important;
    transform: none !important;
    order: 2 !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    margin: -.15rem auto !important;
    font-size: 1.2rem !important;
  }

  .vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after-card:first-child{ order: 1 !important; }
  .vh-layout-hero.vh-hero-layout-problem_solution .vh-hero-before-after-card:last-child{ order: 3 !important; }

  .vh-layout-hero.vh-hero-layout-editorial_center_bottom_image .vh-hero-copy--bottom-image,
  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-copy,
  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-copy,
  .vh-layout-hero.vh-hero-layout-center_image_three .vh-hero-copy{
    margin-bottom: .85rem !important;
  }

  .vh-layout-hero.vh-hero-layout-editorial_center_bottom_image .vh-hero-wide-media--bottom-edge{
    width: 100% !important;
    max-width: 100% !important;
  }

  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch,
  .vh-layout-hero.vh-hero-layout-center_image_three .vh-hero-media--center-column,
  .vh-layout-hero.vh-hero-layout-asymmetric_magazine .vh-hero-media--offset{
    width: 100% !important;
    max-width: none !important;
  }

  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch > img,
  .vh-layout-hero.vh-hero-layout-bottom_image .vh-hero-media--bottom-touch img{
    max-height: clamp(17rem, 42vh, 26rem) !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image > .container{
    padding-left: var(--vh-hero-shell-pad-x, 1rem) !important;
    padding-right: 0 !important;
    max-width: none !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-copy{
    padding-right: var(--vh-hero-shell-pad-x, 1rem) !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-media--right-edge > img,
  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-media--right-edge img{
    min-height: clamp(16rem, 38vh, 24rem) !important;
  }
}
