/* HDL Home Hero
 * Server-rendered content and slide images. JavaScript only changes which
 * slide is visible; H1, CTAs and trust figures remain readable without JS.
 */
.hdl-home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 84vh;
  min-height: var(--hdl-home-hero-min-height-desktop, 84svh);
  background: var(--primary-dark, #2f352f);
}

.hdl-home-hero__slides,
.hdl-home-hero__slide,
.hdl-home-hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hdl-home-hero__slides { z-index: 0; }

.hdl-home-hero__slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility .5s ease;
}

.hdl-home-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hdl-home-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.hdl-home-hero__overlay {
  z-index: 1;
  background: var(--primary-ultra-dark-trans-40, rgba(20, 22, 20, .40));
  pointer-events: none;
}

.hdl-home-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 84vh;
  min-height: var(--hdl-home-hero-min-height-desktop, 84svh);
  padding-block: var(--section-padding-block, clamp(5rem, 8vw, 9rem));
  padding-inline: var(--section-padding-x, clamp(1.5rem, 5vw, 5rem));
}

/* Follow the same site-wide content shell used by native Bricks containers.
 * ACSS owns the content width and section gutter; this module only supplies
 * a safe fallback for environments where those tokens are unavailable.
 */
.hdl-home-hero__inner {
  width: 100%;
  max-width: var(--content-width, 1280px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  transform: none;
}

/* Bricks global-class typography bridge.
 * The Service Hero eyebrow is a native Bricks Basic Text element using the
 * hdl-eyebrow global class. PHP-rendered sub-elements do not reliably receive
 * Bricks' element-scoped global-class CSS, so mirror that approved role here.
 */
.hdl-home-hero .hdl-eyebrow {
  font-family: var(--text-font-family, Jost, sans-serif);
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
}

.hdl-home-hero__eyebrow {
  margin: 0;
  color: var(--tertiary-ultra-light, var(--white, #fff));
}

/* Match the native Bricks Heading element's structural display while leaving
 * H1 typography to the site-wide HDL Typography Theme Style. */
.hdl-home-hero__heading {
  display: block;
  margin: 0;
  color: var(--tertiary-ultra-light, var(--white, #fff));
  text-align: left;
}

/* The supporting sentence now uses the same Bricks text-element structure as
 * the Service Hero. Width remains owned by ACSS width--l. */
.hdl-home-hero__lead {
  margin: .25rem 0 0;
  color: var(--tertiary-ultra-light, var(--white, #fff));
}

.hdl-home-hero__lead > p {
  margin: 0;
}

.hdl-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 1.25rem;
}

.hdl-home-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}

.hdl-home-hero__cta-icon { flex: 0 0 auto; }

.hdl-home-hero__trust {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid rgba(255,255,255,.65);
  color: var(--tertiary-ultra-light, var(--white, #fff));
}

.hdl-home-hero__stat {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.hdl-home-hero__stat-value {
  position: relative;
  display: inline-block;
  color: inherit;
  font-family: var(--heading-font-family, Raleway, sans-serif);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* The final value remains in the server-rendered text node. During the
 * visual count-up only its colour is made transparent; a CSS pseudo-element
 * shows the changing number. The DOM text remains 15+/200+ throughout.
 */
.hdl-home-hero__stat-value.is-counting { color: transparent; }

.hdl-home-hero__stat-value.is-counting::after {
  content: attr(data-count-display);
  position: absolute;
  inset: 0 auto auto 0;
  color: var(--tertiary-ultra-light, var(--white, #fff));
  font: inherit;
  line-height: inherit;
  white-space: nowrap;
  pointer-events: none;
}

.hdl-home-hero__stat-label {
  max-width: 8ch;
  color: inherit;
  font-family: var(--text-font-family, Jost, sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
}

.hdl-home-hero__stat-divider {
  width: 1px;
  height: 42px;
  background: rgba(255,255,255,.7);
}

.hdl-home-hero > .hdl-home-hero__pagination {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: var(--space-m, 2rem);
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 2rem);
  gap: 10px;
  transform: translateX(-50%);
}

.hdl-home-hero__dot {
  flex: 0 0 10px;
  width: 10px;
  min-width: 10px;
  max-width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: rgba(255,255,255,.4);
  cursor: pointer;
}

.hdl-home-hero__dot.is-active { background: var(--tertiary-ultra-light, var(--white, #fff)); }
.hdl-home-hero__dot:focus-visible { outline: 2px solid var(--tertiary-ultra-light, var(--white, #fff)); outline-offset: 4px; }

.hdl-home-hero__builder-notice {
  position: relative;
  z-index: 4;
  margin: 2rem;
  padding: 1rem;
  background: #fff;
  color: #222;
}


@media (max-width: 991px) {
  .hdl-home-hero .hdl-eyebrow { font-size: 12px; }
}

@media (max-width: 767px) {
  .hdl-home-hero {
    height: auto;
    min-height: 650px;
  }

  .hdl-home-hero__content {
    height: auto;
    min-height: 650px;
  }

  .hdl-home-hero__content {
    justify-content: flex-start;
    align-items: stretch;
    padding-top: clamp(7rem, 20vw, 9rem);
    padding-bottom: 6rem;
  }

  .hdl-home-hero__inner { transform: none; }


  .hdl-home-hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hdl-home-hero__actions .hdl-home-hero__cta {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .hdl-home-hero__trust {
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .hdl-home-hero__stat { gap: .5rem; }
  .hdl-home-hero__stat-value { font-size: 2rem; }
  .hdl-home-hero__stat-label { font-size: 12px; }
  .hdl-home-hero__stat-divider { height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .hdl-home-hero__slide { transition: none; }
}
