/* JJ&S navigation release: jjs-hotbar-20261019-r5. */
/* Shared navigation integration only. Existing page/tablet styles stay intact. */
html {
  scroll-padding-top: calc(var(--jj-navigation-height, 140px) + 16px);
}

.jj-header-system {
  --jj-service-bar-height: 44px;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 100%;
  background: #fff;
}

.jj-header-system > .header {
  position: relative;
  top: auto;
  z-index: auto;
}

.jj-service-hotbar {
  position: relative;
  width: 100%;
  min-width: 0;
  height: var(--jj-service-bar-height);
  background: var(--dark, #161616);
  color: #fff;
  box-shadow: inset 0 -1px rgba(167, 122, 0, .4);
}

.jj-service-hotbar__viewport {
  width: 100%;
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-padding-inline: 12px;
  -webkit-overflow-scrolling: touch;
}

.jj-service-hotbar__viewport::-webkit-scrollbar { display: none; }

.jj-service-hotbar__links {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 0 24px;
  list-style: none;
}

.jj-service-hotbar__links > li {
  display: flex;
  flex: 1 0 auto;
  margin: 0;
  padding: 0;
}

.jj-service-hotbar__links > li + li {
  border-left: 1px solid rgba(167, 122, 0, .3);
}

.jj-service-hotbar__links a {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  min-height: var(--jj-service-bar-height);
  padding: 0 clamp(12px, 1.4vw, 22px);
  border-bottom: 2px solid transparent;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  overflow-wrap: normal;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.jj-service-hotbar__links a[aria-current="page"] {
  color: var(--gold, #a77a00);
  border-bottom-color: var(--gold, #a77a00);
}

.jj-service-hotbar__links a:hover {
  background: #24221c;
  color: #fff;
  border-bottom-color: var(--gold, #a77a00);
}

.jj-service-hotbar__viewport:focus-visible,
.jj-service-hotbar__links a:focus-visible {
  outline: 2px solid #d4a62a;
  outline-offset: -4px;
}

.jj-mobile-services,
.jj-mobile-more__heading { display: none; }

@media (max-width: 743px) {
  html { scroll-padding-top: calc(var(--jj-navigation-height, 142px) + 16px); }
  .jj-header-system { --jj-service-bar-height: 52px; }

  /* Keep the approved service hotbar visible on phones as a horizontal, touch-scrollable row. */
  .jj-header-system > .jj-service-hotbar { display: block; }
  .jj-service-hotbar__viewport { max-width: 100%; }
  .jj-service-hotbar__links {
    min-width: max-content;
    padding-inline: 8px;
  }
  .jj-service-hotbar__links > li { flex: 0 0 auto; }
  .jj-service-hotbar__links a {
    flex: 0 0 auto;
    height: 44px;
    min-height: 44px;
    padding-inline: 14px;
    font-size: 10px;
    letter-spacing: .055em;
  }

  /* Edge fades/chevrons show that the service row continues in either direction. */
  .jj-service-hotbar::before,
  .jj-service-hotbar::after {
    position: absolute;
    top: 0;
    bottom: 8px;
    z-index: 3;
    display: flex;
    align-items: center;
    width: 30px;
    color: #d4a62a;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
  }
  .jj-service-hotbar::before {
    left: 0;
    content: "‹";
    justify-content: flex-start;
    padding-left: 5px;
    background: linear-gradient(90deg, #161616 24%, rgba(22, 22, 22, 0));
  }
  .jj-service-hotbar::after {
    right: 0;
    content: "›";
    justify-content: flex-end;
    padding-right: 5px;
    background: linear-gradient(270deg, #161616 24%, rgba(22, 22, 22, 0));
  }
  .jj-service-hotbar.jj-can-scroll-left::before,
  .jj-service-hotbar.jj-can-scroll-right::after { opacity: 1; }

  /* The existing primary header remains sticky on phones, with direct service links also retained inside the burger. */
  .jj-header-system > .header { flex-wrap: nowrap; }
  .jj-header-system .header .logo { min-width: 0; }
  .jj-header-system .header .logo img { width: clamp(160px, 52vw, 220px); }
  .jj-header-system .header .menu-toggle { flex: 0 0 48px; }

  /* All primary and service links share one vertically scrollable panel. */
  .jj-header-system .header .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    width: 100%;
    margin: 0;
    padding: 8px 16px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 14px;
    line-height: 1.35;
    letter-spacing: .045em;
    background: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
  }
  /* While the burger is open, suppress hotbar edge cues so nothing can bleed through the white menu panel. */
  body.menu-open .jj-service-hotbar::before,
  body.menu-open .jj-service-hotbar::after {
    opacity: 0 !important;
  }

  .jj-header-system .header .nav.open {
    max-height: var(--jj-menu-available-height, calc(100vh - var(--jj-navigation-height, 90px) - 16px));
    max-height: var(--jj-menu-available-height, calc(100dvh - var(--jj-navigation-height, 90px) - 16px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  .jj-header-system .header .nav a {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    white-space: normal;
    overflow-wrap: break-word;
  }
  .jj-header-system .header .nav > a::after { bottom: 4px; left: 12px; max-width: calc(100% - 24px); }

  /* Group 1: HOME stands on its own before the service section. */
  .jj-header-system .header .nav > a:first-child {
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(167, 122, 0, .28);
    font-weight: 900;
  }

  /* Group 2: SERVICES is an obvious section label, not a link. */
  .jj-header-system .jj-mobile-services {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    margin: 0 0 6px;
    padding: 0 0 8px;
  }
  .jj-mobile-services__heading {
    display: block;
    margin: 0 0 4px;
    padding: 10px 12px;
    border-left: 4px solid var(--gold, #a77a00);
    background: rgba(167, 122, 0, .09);
    color: #805e00;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .jj-mobile-services__links { margin: 0; padding: 0; list-style: none; }
  .jj-mobile-services__links > li { margin: 0; padding: 0; }
  .jj-header-system .header .nav .jj-mobile-services__links a {
    padding-left: 18px;
    border-left: 3px solid transparent;
  }
  .jj-header-system .header .nav .jj-mobile-services__links a::after { display: none; }
  .jj-header-system .header .nav .jj-mobile-services__links a[aria-current="page"] {
    border-left-color: var(--gold, #a77a00);
    background: rgba(167, 122, 0, .08);
    color: var(--text, #111);
  }
  .jj-header-system .header .nav .jj-mobile-services__links a:hover {
    background: rgba(167, 122, 0, .1);
  }

  /* Group 3: a clear visual break before the remaining site navigation. */
  .jj-mobile-more__heading {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    margin: 2px 0 2px;
    padding: 12px 12px 6px;
    border-top: 1px solid rgba(167, 122, 0, .28);
    color: #805e00;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .jj-header-system .header .nav a:focus-visible { outline-offset: -3px; }
}

@media (prefers-reduced-motion: reduce) {
  .jj-service-hotbar__links a { transition: none; }
}
