/* ------------------------------------------------------------
   Hero Right Edge + FAQ Polish Contract
   Version: 1.5.62-wo59
   Scope: final visual polish for right-edge hero vertical alignment and FAQ badges.
   Purpose: keep edge-media horizontal contact while centering the image vertically,
   and make FAQ category labels compact instead of distracting full-width bars.
------------------------------------------------------------- */

/* ============================================================
   1. Right Edge Image Hero
   Keep the image flush to the right edge, but stop stretching it to the bottom.
============================================================ */

@media (min-width: 992px){
  .vh-layout-hero.vh-hero-layout-right_edge_image{
    padding-right: 0 !important;
    overflow: hidden !important;
  }

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

  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-wrap{
    --bs-gutter-x: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: clamp(34rem, 70vh, 50rem) !important;
    margin: 0 !important;
    align-items: center !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-copy{
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    padding-left: max(1.5rem, calc((100vw - 1140px) / 2 + 3rem)) !important;
    padding-right: clamp(1.5rem, 4vw, 4.5rem) !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-media-col{
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    align-self: stretch !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !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: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 0 0 auto !important;
    transform: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !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: auto !important;
    min-height: 0 !important;
    max-height: clamp(28rem, 58vh, 42rem) !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: 1400px){
  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-copy{
    padding-left: max(1.5rem, calc((100vw - 1320px) / 2 + 3rem)) !important;
  }
}

@media (max-width: 991.98px){
  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-wrap{
    align-items: center !important;
  }

  .vh-layout-hero.vh-hero-layout-right_edge_image .vh-hero-right-edge-media-col{
    align-items: center !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{
    object-position: center center !important;
  }
}

/* ============================================================
   2. FAQ Category Label
   The category should read as a small tag, not a full-width input/bar.
============================================================ */

body.home #front-faq .accordion-button .badge,
body.single-vh_service #front-faq .accordion-button .badge,
body.single-vh_portfolio #front-faq .accordion-button .badge{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: min(16rem, 42vw) !important;
  min-width: 0 !important;
  padding: .32rem .55rem !important;
  border-radius: .45rem !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
}

body.single-vh_service #front-faq .accordion-button,
body.single-vh_portfolio #front-faq .accordion-button{
  grid-template-columns: minmax(0, 1fr) auto 1.25rem !important;
}

body.single-vh_service #front-faq .accordion-button .badge,
body.single-vh_portfolio #front-faq .accordion-button .badge{
  justify-self: end !important;
}

@media (max-width: 599.98px){
  body.home #front-faq .accordion-button .badge,
  body.single-vh_service #front-faq .accordion-button .badge,
  body.single-vh_portfolio #front-faq .accordion-button .badge{
    max-width: min(14rem, 72vw) !important;
    font-size: .7rem !important;
    padding: .3rem .5rem !important;
  }

  body.single-vh_service #front-faq .accordion-button,
  body.single-vh_portfolio #front-faq .accordion-button{
    grid-template-columns: minmax(0, 1fr) 1.25rem !important;
  }

  body.single-vh_service #front-faq .accordion-button .badge,
  body.single-vh_portfolio #front-faq .accordion-button .badge{
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
  }
}
