/* HORIZON HAWK 1.5.2 — whitespace audit, homepage image resilience and balanced process grids */

/* Keep the stable 1.5.1 product/data behaviour. This release only tightens visual density and image resilience. */

/* Homepage sections identified at runtime by refinement-152.js. */
.hh-home .hh-home-applications-152,
.hh-home .hh-home-oem-152,
.hh-home .hh-home-about-152{
  min-height:0!important;
  padding-top:62px!important;
  padding-bottom:62px!important;
}

/* Broken image placeholders must never reserve a giant empty canvas. */
.hh-home img.hh-local-image-152{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  height:auto!important;
  opacity:1!important;
}
.hh-home figure:has(>img.hh-local-image-152),
.hh-home figure:has(img.hh-local-image-152){
  margin-top:0!important;
  margin-bottom:0!important;
  min-height:0!important;
  height:auto!important;
}

/* Application cards: four stable local visuals, two balanced desktop columns, no broken-alt blocks. */
.hh-home .hh-home-applications-152 img.hh-home-application-image-152{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
}
.hh-home .hh-home-applications-152 .wp-block-columns{align-items:stretch!important}
.hh-home .hh-home-applications-152 [class*="grid"]{align-items:stretch}

/* OEM homepage split: image starts with the copy instead of being vertically centred far below the heading. */
.hh-home .hh-home-oem-152 .wp-block-columns,
.hh-home .hh-home-oem-152 .hh-split,
.hh-home .hh-home-oem-152 [class*="columns"]{
  align-items:start!important;
}
.hh-home .hh-home-oem-152 figure,
.hh-home .hh-home-oem-152 [class*="media"]{
  margin-top:0!important;
  margin-bottom:0!important;
  align-self:start!important;
  min-height:0!important;
}
.hh-home .hh-home-oem-152 img.hh-home-oem-image-152{
  aspect-ratio:16/9!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:24px;
}

/* Homepage About: use real bundled images and remove the huge empty area that remained when uploads failed. */
.hh-home .hh-home-about-152 .wp-block-columns,
.hh-home .hh-home-about-152 .hh-split,
.hh-home .hh-home-about-152 [class*="columns"]{
  align-items:center!important;
}
.hh-home .hh-home-about-152 figure{min-height:0!important;height:auto!important}
.hh-home .hh-home-about-img-primary-152{
  aspect-ratio:16/9!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:24px;
}
.hh-home .hh-home-about-img-secondary-152{
  aspect-ratio:4/3!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:20px;
}

/* OEM/ODM page: six steps must be a complete 3×2 desktop grid, never 5+1. */
.hh-page-oem-odm .hh-step-grid-dark{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
  align-items:stretch;
}
.hh-page-oem-odm .hh-step-grid-dark article{
  height:auto!important;
  min-height:0!important;
  padding:22px!important;
}
.hh-page-oem-odm .hh-step-grid-dark article>span{margin-bottom:14px}
.hh-page-oem-odm .hh-step-grid-dark h3{min-height:0;margin-bottom:8px}

/* Same rule for any six-card dark step grid elsewhere. */
.hh-step-grid-dark:has(>article:nth-child(6):last-child){
  grid-template-columns:repeat(3,minmax(0,1fr));
}

/* Two-card resource or support rows should use the row instead of leaving a phantom third column. */
.hh-resource-grid:has(> :nth-child(2):last-child),
.hh-category-link-grid:has(> :nth-child(2):last-child){
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  max-width:1040px;
  margin-inline:auto;
}

/* Application inquiry: use the full content width so the tall shared B2B form
   does not leave a stranded blank column below the short application summary. */
.hh-app-inquiry-compact .hh-contact-band-grid{
  grid-template-columns:minmax(0,1fr)!important;
  gap:18px!important;
}
.hh-app-inquiry-compact .hh-inline-form{
  width:100%;
}

/* Site rhythm: remove dead vertical space, not intentional breathing room. */
@media(min-width:1051px){
  .hh-section{padding-top:70px;padding-bottom:70px}
  .hh-section-head{margin-bottom:26px}
  .hh-page-oem-odm .hh-section{padding-top:64px;padding-bottom:64px}
  .hh-page-oem-odm .hh-section-head{margin-bottom:24px}
}

@media(max-width:1050px) and (min-width:621px){
  .hh-home .hh-home-applications-152,
  .hh-home .hh-home-oem-152,
  .hh-home .hh-home-about-152{padding-top:52px!important;padding-bottom:52px!important}
  .hh-page-oem-odm .hh-step-grid-dark,
  .hh-step-grid-dark:has(>article:nth-child(6):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .hh-page-oem-odm .hh-step-grid-dark article{padding:20px!important}
}

@media(max-width:620px){
  .hh-home .hh-home-applications-152,
  .hh-home .hh-home-oem-152,
  .hh-home .hh-home-about-152{padding-top:38px!important;padding-bottom:38px!important}
  .hh-home .hh-home-oem-152 img.hh-home-oem-image-152{aspect-ratio:4/3!important}
  .hh-home .hh-home-about-img-primary-152{aspect-ratio:4/3!important}
  .hh-home .hh-home-about-img-secondary-152{aspect-ratio:4/3!important}
  .hh-page-oem-odm .hh-step-grid-dark,
  .hh-step-grid-dark:has(>article:nth-child(6):last-child){grid-template-columns:1fr!important;gap:10px!important}
  .hh-page-oem-odm .hh-step-grid-dark article{padding:17px!important}
  .hh-resource-grid:has(> :nth-child(2):last-child),
  .hh-category-link-grid:has(> :nth-child(2):last-child){grid-template-columns:1fr!important;max-width:none}
}
