/* HANBIT CMS v0.8.8: prevent hero CTA / carousel navigation overlap.
   Scoped to public hero markup. Do NOT change unrelated page builder tiles. */

/* The old page-builder rule `.cms-hero-block > div { width:100% }`
   inadvertently stretched `.cms-hero-controls` into a full-width bar. */
.cms-hero-carousel-root > .cms-hero-controls,
.cms-builder-grid.cms-builder-v2 > .cms-builder-cell .cms-hero-block.cms-hero-carousel-root > .cms-hero-controls {
  position:absolute;
  inset:auto auto 12px 50%;
  transform:translateX(-50%);
  z-index:9;
  display:flex;
  flex-flow:row nowrap;
  align-items:center;
  justify-content:center;
  gap:9px;
  box-sizing:border-box;
  width:max-content !important;
  min-width:0;
  max-width:calc(100% - 24px);
  height:auto;
  margin:0;
  padding:5px 12px;
  border-radius:999px;
  background:rgba(9,23,44,.78);
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.cms-hero-carousel-root > .cms-hero-controls button {
  flex:0 0 auto;
  min-width:28px;
  min-height:28px;
}
.cms-hero-carousel-root > .cms-hero-controls .cms-hero-dot {
  min-width:10px;
  min-height:10px;
}
/* Default home (without custom page-builder layout): leave a dedicated bottom
   control strip. Natural block height grows if the text needs additional room. */
.hero.cms-hero-carousel-root .hero-inner {
  box-sizing:border-box;
  height:auto;
  min-height:var(--cms-hero-height,380px);
  padding-top:clamp(24px,3vw,42px);
  padding-bottom:82px;
}
.hero.cms-hero-carousel-root .cms-hero-main-copy {
  position:relative;
  z-index:3;
  min-width:0;
}
/* Page-builder hero: the old 100% fixed height clips buttons when the chosen
   hero height is shorter than its title+description+CTA content. */
.cms-builder-grid.cms-builder-v2 > .cms-builder-cell .cms-hero-block.cms-hero-carousel-root {
  box-sizing:border-box;
  height:auto !important;
  min-height:var(--cms-hero-layout-height,280px) !important;
  max-height:none !important;
  padding:clamp(22px,3vw,45px) clamp(20px,3vw,45px) 82px !important;
  overflow:hidden;
}
.cms-builder-grid.cms-builder-v2 > .cms-builder-cell .cms-hero-block.cms-hero-carousel-root > .cms-hero-content {
  position:relative;
  z-index:3;
  min-width:0;
  width:auto;
  max-width:100%;
  align-self:stretch;
}
.cms-hero-carousel-root .cms-hero-main-button {
  position:relative;
  z-index:5;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  min-height:44px;
  max-width:100%;
}
/* Search overlay inside the hero also stays ABOVE the dedicated controls area. */
.cms-builder-grid.cms-builder-v2 > .cms-builder-cell .cms-hero-block.cms-hero-search-overlay.cms-hero-carousel-root > .cms-hero-search-float {
  position:relative;
  z-index:6;
  min-width:0;
}
@media (max-width:760px) {
  .hero.cms-hero-carousel-root .hero-inner {padding-top:26px;padding-bottom:78px;}
  .cms-builder-grid.cms-builder-v2 > .cms-builder-cell .cms-hero-block.cms-hero-carousel-root {
    padding:26px 20px 80px !important;
  }
  .cms-hero-carousel-root > .cms-hero-controls {bottom:10px;}
}
