/* Accessible navigation layer. Loaded after legacy theme styles. */
/* Match the established live header and prevent flex/layout state changes from resizing the brand. */
.classy-nav-container .classy-navbar .nav-brand {
  flex: 0 0 270px;
  width: 270px;
  max-width: 270px;
  line-height: 0;
}

.classy-nav-container .classy-navbar .nav-brand img {
  display: block;
  width: 270px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 361 / 73;
  object-fit: contain;
}

@media (max-width: 767px) {
  .classy-nav-container .classy-navbar .nav-brand {
    flex-basis: 220px;
    width: 220px;
    max-width: min(220px, 62vw);
  }

  .classy-nav-container .classy-navbar .nav-brand img {
    width: 100%;
  }
}

.classy-navbar-toggler,
.classycloseIcon,
.nav-services-toggle {
  cursor: pointer;
}

.classy-navbar-toggler:focus-visible,
.classycloseIcon:focus-visible,
.nav-services-toggle:focus-visible,
.classynav a:focus-visible {
  outline: 3px solid var(--focus-ring, #1583e9);
  outline-offset: 3px;
}

.nav-services-row {
  display: inline-flex;
  align-items: center;
}

.nav-services-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  margin-left: 2px;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
}

.nav-services-toggle > span[aria-hidden="true"] {
  font-size: 1.25em;
  line-height: 1;
  transition: transform 180ms ease;
}

.nav-services-toggle[aria-expanded="true"] > span[aria-hidden="true"] {
  transform: rotate(45deg);
}

.services-subnav[hidden] {
  display: none !important;
}

@media (min-width: 992px) {
  .classy-menu[aria-hidden="false"] .services-subnav {
    display: block;
  }

  .classynav > ul > li:has(.services-subnav) {
    position: relative;
  }

  .services-subnav {
    left: 0;
    min-width: 320px;
    top: 100%;
  }
}

@media (max-width: 991px) {
  .classy-navbar-toggler {
    align-items: center;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    padding: 7px;
    width: 44px;
  }

  .classy-menu {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .classy-menu[aria-hidden="true"] {
    display: none !important;
  }

  .classy-menu.menu-on[aria-hidden="false"] {
    display: block;
  }

  .classycloseIcon {
    align-items: center;
    background: transparent;
    border: 0;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    padding: 9px;
    width: 44px;
  }

  .classynav ul li a,
  .classynav .get-a-quote a {
    align-items: center;
    display: flex;
    font-size: 1.0625rem;
    line-height: 1.35;
    min-height: 48px;
    padding-bottom: 10px;
    padding-top: 10px;
  }

  .classynav > ul > li > .nav-services-row {
    display: flex;
    justify-content: space-between;
  }

  .nav-services-row > a {
    flex: 1 1 auto;
  }

  .services-subnav {
    margin: 0;
    padding-left: 1rem;
    position: static;
  }

  .services-subnav li a {
    font-size: 1rem;
    min-height: 48px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-services-toggle > span[aria-hidden="true"] {
    transition: none;
  }
}

/* Keep the homepage hero at its final height before Owl initializes. */
.welcome-slides:not(.owl-loaded) > .single-welcome-slide {
  display: none;
}

.welcome-slides:not(.owl-loaded) > .single-welcome-slide:first-child {
  display: block;
}

/* QA repair: allow long service labels to wrap without overlap. */
@media (min-width: 992px) {
  .services-subnav {
    box-sizing: border-box;
    height: auto !important;
    min-width: 400px;
    padding: 10px 0;
    width: min(420px, calc(100vw - 2rem)) !important;
  }

  .services-subnav > li,
  .services-subnav > li > a {
    height: auto !important;
    min-height: 48px;
  }

  .services-subnav > li > a {
    align-items: center;
    display: flex !important;
    line-height: 1.35 !important;
    padding: 10px 24px !important;
    white-space: normal;
  }
}

/* QA repair: legacy mobile nav hides nested lists despite hidden removal. */
@media (max-width: 991px) {
  .classynav .services-subnav:not([hidden]) {
    display: block !important;
    height: auto !important;
    width: 100% !important;
  }

  .services-subnav > li,
  .services-subnav > li > a {
    height: auto !important;
    min-height: 48px;
  }

  .services-subnav > li > a {
    line-height: 1.35 !important;
    padding: 10px 15px !important;
  }
}
