/* ---------------------------------------------------------------------------
   Home hero (#hero / #banner-owl-carousel)

   Kept out of main.css so the 50k template stylesheet stays untouched. Loaded
   after main.css and the Owl stylesheets, and every selector is #hero-scoped,
   so these rules override the site-wide .owl-nav / .owl-stage styles without
   changing the store, franchise or event carousels.
   --------------------------------------------------------------------------- */

#hero {
  --hero-navy: #1c214f;
  --hero-blue: #2da7df;
  --hero-gold: #f5b32b;

  position: relative;
  background-color: var(--hero-navy);
  overflow: hidden;
}

/* main.css sets a blanket `.owl-stage { height: 100px }`, which clipped the
   banner to a 100px sliver once the carousel initialised. The hero sizes itself
   from the artwork instead. */
#hero .owl-stage,
#hero .owl-stage-outer {
  height: auto;
}

/* The banners are 1920x750 with the headline, logo and phone number composed
   into the frame, so they are never cropped — the box always matches the
   artwork's ratio at every width. Declaring it here (as well as via the img's
   width/height attributes) reserves the space before the image decodes, so the
   page below never jumps. */
#hero .hero-slide,
#hero .hero-slide .card-head {
  background-color: var(--hero-navy);
}

#hero .hero-slide-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 750;
  object-fit: cover;
  object-position: center;
}

/* Owl cross-fades the outgoing slide (animateOut: "fadeOut"), which briefly
   composites two banners on top of each other — this keeps that step from
   flickering in WebKit. */
#hero .owl-item {
  backface-visibility: hidden;
}

/* --- Previous / next -------------------------------------------------------

   main.css styles .owl-nav globally as 4rem black circles pinned to top:40%,
   then drags them to top:-60px/-100px on narrow screens — which parked the
   hero's arrows above the banner entirely. These #hero rules outrank all of
   that on specificity, so they hold inside every one of those media queries. */

#hero .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  width: auto;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 5;
}

#hero .owl-nav button.owl-prev,
#hero .owl-nav button.owl-next {
  position: static;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 1.25rem;
  padding: 0 !important;
  border: none;
  border-radius: 50%;
  background-color: rgba(28, 33, 79, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.75rem !important;
  line-height: 1;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

#hero .owl-nav button.owl-prev span,
#hero .owl-nav button.owl-next span {
  display: block;
  margin-top: -0.25rem; /* optically centres the chevron glyph */
  font-size: inherit !important;
}

/* Controls stay out of the way until the visitor reaches for them. */
#hero:hover .owl-nav button.owl-prev,
#hero:hover .owl-nav button.owl-next,
#hero .owl-nav button:focus-visible {
  opacity: 1;
  transform: scale(1);
}

#hero .owl-nav button.owl-prev:hover,
#hero .owl-nav button.owl-next:hover {
  background-color: var(--hero-blue);
  transform: scale(1.06);
}

#hero .owl-nav button:focus-visible {
  outline: 3px solid var(--hero-gold);
  outline-offset: 3px;
}

/* --- Slide indicators ------------------------------------------------------

   owl.theme.default.css is not loaded anywhere on the site, so .owl-dot has no
   styling of its own — all of it lives here. */

#hero .owl-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 5;
}

#hero .owl-dots button.owl-dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0 !important;
  border: none;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: width 0.3s ease, background-color 0.3s ease;
}

#hero .owl-dots button.owl-dot:hover {
  background-color: #fff;
}

#hero .owl-dots button.owl-dot.active {
  width: 1.75rem;
  background-color: var(--hero-gold);
}

#hero .owl-dots button.owl-dot:focus-visible {
  outline: 2px solid var(--hero-gold);
  outline-offset: 3px;
}

/* --- Trim ------------------------------------------------------------------ */

/* Picks up the blue divider strips used between the sections further down the
   page, so the hero ends on the same brand note the rest of the page uses. */
#hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--hero-blue) 0%,
    var(--hero-gold) 50%,
    var(--hero-blue) 100%
  );
  z-index: 6;
}

@media (max-width: 991.98px) {
  #hero .owl-dots {
    bottom: 0.5rem;
  }

  #hero .owl-dots button.owl-dot {
    width: 0.4375rem;
    height: 0.4375rem;
  }

  #hero .owl-dots button.owl-dot.active {
    width: 1.25rem;
  }
}

/* Touch devices have no hover state to reveal the arrows with, and Owl already
   turns nav off below 1000px — this makes sure nothing shows up half-faded. */
@media (hover: none) {
  #hero .owl-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hero .owl-nav button.owl-prev,
  #hero .owl-nav button.owl-next {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #hero .owl-nav button.owl-prev:hover,
  #hero .owl-nav button.owl-next:hover {
    transform: none;
  }

  #hero .owl-dots button.owl-dot {
    transition: none;
  }
}
