/**
 * Internal section navigation
 *
 * Reusable horizontal navigation for Program type, Course and Program pages.
 * The scroll area is contained by the component so a long list does not make
 * the complete document wider than the viewport.
 */
body:not(.home):not(.front-page) .sup-nav {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

body:not(.home):not(.front-page) .sup-nav__list,
body:not(.home):not(.front-page) .sup-nav-mini__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: clamp(16px, 2vw, 28px);
  width: max-content;
  min-width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
}

body:not(.home):not(.front-page) .sup-nav__list > li,
body:not(.home):not(.front-page) .sup-nav-mini__list > li {
  flex: 0 0 auto;
  min-width: 0;
  border-bottom-color: transparent;
}

body:not(.home):not(.front-page) .sup-nav__list > li > a,
body:not(.home):not(.front-page) .sup-nav-mini__list > li > a {
  display: block;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

/* Shared secondary-navigation spacing. Program types and Course Subject areas
 * keep distinct component classes, but consume the same rail geometry instead
 * of borrowing each other's complete visual contract. */
body:not(.home):not(.front-page) .jci-secondary-nav-bar {
  --jci-secondary-nav-list-gap: 30px;
  --jci-secondary-nav-list-padding-block: 15px;
  --jci-secondary-nav-list-padding-inline: 25px;
  --jci-secondary-nav-sticky-gap: 30px;
}

/* Program type navigation appearance shared by Program type archives and
 * Long Program section navigation. */
body:not(.home):not(.front-page) .jci-horizontal-menu.jci-program-type-nav.sup-nav {
  min-height: 0;
  padding: 0;
}

body:not(.home):not(.front-page) .jci-horizontal-menu.jci-program-type-nav.sup-nav .jci-horizontal-menu__list.sup-nav__list {
  display: flex;
  justify-content: space-between;
  gap: var(--jci-secondary-nav-list-gap, 30px);
  list-style: none;
  margin: 0;
  padding: var(--jci-secondary-nav-list-padding-block, 15px) var(--jci-secondary-nav-list-padding-inline, 25px);
}

@media (min-width: 769px) {
  body:not(.home):not(.front-page) .jci-horizontal-menu.jci-program-type-nav.sup-nav .jci-horizontal-menu__list.sup-nav__list {
    border-top: solid thin #0D0D0D;
    border-bottom: solid thin #0D0D0D;
  }

  /* Archive Program-type menus use the shared overflow arrows. Put the
   * dividers on the nav component itself so the arrows belong to the same
   * visual rail instead of sitting outside lines owned by the inner list.
   * Long-Program section navigation keeps its existing list dividers. */
  body:not(.home):not(.front-page) .jci-program-type-menu-bar--archive .jci-horizontal-menu.jci-program-type-nav.sup-nav {
    border-top: solid thin #0D0D0D;
    border-bottom: solid thin #0D0D0D;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--archive .jci-horizontal-menu.jci-program-type-nav.sup-nav .jci-horizontal-menu__list.sup-nav__list {
    border-top: 0;
    border-bottom: 0;
  }
}

body:not(.home):not(.front-page) .jci-horizontal-menu.jci-program-type-nav.sup-nav .jci-horizontal-menu__link {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}


@media (min-width: 769px) {
  /* Shared secondary navigation placement used by Long Programs and Program
   * types. Keeping the positioning here makes both menus follow the same normal
   * flow and sticky threshold without duplicating page-specific declarations.
   */
  body:not(.home):not(.front-page) > .site-wrapper main .jci-program-type-menu-bar.jci-secondary-nav-bar {
    position: sticky;
    top: calc(
      var(
        --jci-header-visual-offset,
        var(--jci-header-offset, 120px)
      ) + var(--jci-secondary-nav-sticky-gap, 30px)
    );
    margin-top: var(--jci-secondary-nav-sticky-gap, 30px);
    border-top: 0;
    border-bottom: 0;
    z-index: 30;
  }

  /* Keep the 30px gap above the sticky menu opaque, matching the Long Program
   * navigation and preventing page content from showing through below header.
   */
  body:not(.home):not(.front-page) > .site-wrapper main .jci-program-type-menu-bar.jci-secondary-nav-bar::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: var(--jci-secondary-nav-sticky-gap, 30px);
    background: inherit;
    pointer-events: none;
  }

  /* Program type archives and Courses keep 60px of breathing space in normal
   * flow. The sticky state engages once that gap has reduced to 30px, so the
   * navigation remains visually separated from the header without staying too low.
   */
  body:not(.home):not(.front-page) > .site-wrapper main .jci-program-type-menu-bar.jci-secondary-nav-bar.jci-program-type-menu-bar--archive {
    top: calc(
      var(
        --jci-header-visual-offset,
        var(--jci-header-offset, 120px)
      ) + var(--jci-secondary-nav-sticky-gap, 30px)
    );
    margin-top: 60px;
  }

  body:not(.home):not(.front-page) > .site-wrapper main .jci-program-type-menu-bar.jci-secondary-nav-bar.jci-program-type-menu-bar--archive::before {
    height: var(--jci-secondary-nav-sticky-gap, 30px);
  }

}

/* Courses uses two consecutive navigation levels on desktop. Program types
 * remains sticky only while the Course hero is in view, then yields to Subject
 * areas through native sticky containment. The visual 30px header gap belongs
 * to the Subject-area sticky box itself, rather than to a pseudo-element above
 * it. That makes the gap part of the real sticky geometry, so the Program-type
 * menu starts leaving before Subject areas arrives and the two menus never
 * paint over each other. JavaScript only observes this CSS-native state.
 */
@media (min-width: 1025px) {
  body.jci-courses-page .jci-program-listing-hero__features--courses {
    margin-bottom: 0;
  }

  body:not(.home):not(.front-page) > .site-wrapper main .jci-courses-subject-menu-bar {
    --jci-courses-subject-transition-space: 40px;
    position: sticky;
    top: var(
      --jci-header-visual-offset,
      var(--jci-header-offset, 120px)
    );
    z-index: 30;
    width: 100%;
    max-width: none;
    margin-top: max(
      0px,
      calc(
        var(--jci-courses-subject-transition-space)
        - var(--jci-secondary-nav-sticky-gap, 30px)
      )
    );
    margin-bottom: 0;
    padding-top: var(--jci-secondary-nav-sticky-gap, 30px);
    box-sizing: border-box;
    background: #fff;
  }

  /* The results section owns the visual breathing room below Subject areas.
   * Keep that spacing on the destination itself so filtering can align the
   * section edge directly below the sticky bar without duplicating a pixel
   * offset in JavaScript. The stable Courses body class also covers WPML route
   * shapes served through the canonical Courses template. */
  body.jci-courses-page #courses-results[data-jci-courses-listing] {
    --jci-courses-results-gap: 40px;
    padding-top: var(--jci-courses-results-gap);
  }

  /* Subject areas is its own secondary-navigation variant. It shares the same
   * lateral rhythm as Program types without inheriting Program-type borders or
   * state rules. One element owns each divider, avoiding stacked lines. */
  body:not(.home):not(.front-page) > .site-wrapper main .jci-courses-subject-menu-bar .jci-courses-subject-nav {
    min-height: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #808080;
    background: #fff;
  }

  body:not(.home):not(.front-page) > .site-wrapper main .jci-courses-subject-menu-bar .jci-courses-subject-nav .jci-horizontal-menu__list.sup-nav__list {
    justify-content: space-between;
    gap: var(--jci-secondary-nav-list-gap, 30px);
    padding: var(--jci-secondary-nav-list-padding-block, 15px) var(--jci-secondary-nav-list-padding-inline, 25px);
    border-top: 0;
    border-bottom: 0;
  }

  body:not(.home):not(.front-page) > .site-wrapper main .jci-courses-subject-menu-bar .jci-courses-subject-nav .jci-horizontal-menu__link {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

}

/*
 * The legacy stylesheet highlighted the first item when no active class was
 * available. This later component owns the nav state without !important.
 */
body.page-template-template-program-type .sup-nav__list > li:not(.active),
body.page-template-template-program-type .sup-nav__list > li:first-child:not(.active) {
  border-bottom-color: transparent;
}

body.page-template-template-program-type .sup-nav__list > li:not(.active)::after,
body.page-template-template-program-type .sup-nav__list > li:first-child:not(.active)::after {
  display: none;
  content: none;
}

body.page-template-template-program-type .sup-nav__list > li:not(.active) > a,
body.page-template-template-program-type .sup-nav__list > li:first-child:not(.active) > a {
  border-bottom-color: transparent;
  text-decoration: none;
}

body.page-template-template-program-type .sup-nav__list > li.active,
body.page-template-template-program-type .sup-nav__list > li.active > a {
  border-bottom-color: transparent;
}

/* Taxonomy archives keep the shared active state in brand blue. */
@media (min-width: 769px) {
  body:is(.jci-program-type-page, .jci-bachelors-page, .jci-vocational-training-page) .jci-program-type-menu-bar--program-type .jci-program-type-nav :is(
    .jci-horizontal-menu__item.active,
    .jci-horizontal-menu__item.is-active
  ) > .jci-horizontal-menu__link,
  body:is(.jci-program-type-page, .jci-bachelors-page, .jci-vocational-training-page) .jci-program-type-menu-bar--program-type .jci-program-type-nav .jci-horizontal-menu__link:is(
    .is-active,
    [aria-current]
  ) {
    border-bottom-color: transparent;
    color: var(--color-brand-blue, #487cff);
    font-weight: 700;
    text-decoration: none;
  }

  body:is(.jci-program-type-page, .jci-bachelors-page, .jci-vocational-training-page) .jci-program-type-menu-bar--program-type .jci-program-type-nav :is(
    .jci-horizontal-menu__item.active,
    .jci-horizontal-menu__item.is-active
  )::after {
    display: none;
    content: none;
  }
}

@media (max-width: 768px) {
  /* Listing Program types remain directly visible on mobile. Reuse the shared
   * horizontal-menu scroll viewport instead of collapsing these primary
   * discovery links into a disclosure. The active term is kept in view by the
   * component's existing initialization logic, while the native scroll area and
   * overflow arrows make adjacent program types immediately discoverable. */
  body:not(.home):not(.front-page) > .site-wrapper main .jci-program-type-menu-bar--horizontal-scroll {
    position: sticky;
    top: var(--jci-header-offset, 74px);
    z-index: 45;
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    background: linear-gradient(180deg, #f5f7fa 0%, #fafbfd 52%, #ffffff 100%);
    box-shadow:
      inset 0 1px rgba(4, 28, 64, 0.05),
      inset 0 -1px rgba(4, 28, 64, 0.08);
    overflow: visible;
  }

  /* Keep the sticky element itself as the only painted layer. A transformed
   * viewport-wide pseudo element can trigger compositor jitter in iOS/WebKit. */
  body:not(.home):not(.front-page) > .site-wrapper main .jci-program-type-menu-bar--horizontal-scroll::before {
    display: none;
    content: none;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll .jci-horizontal-menu.jci-program-type-nav.sup-nav {
    position: relative;
    z-index: 1;
    min-height: 58px;
    padding: 0;
    background: transparent;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll .jci-program-type-nav__viewport {
    scroll-padding-inline: 2px;
    scroll-snap-type: x proximity;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll .jci-horizontal-menu__list.jci-program-type-nav__list.sup-nav__list {
    justify-content: flex-start;
    gap: 26px;
    min-width: max-content;
    padding: 0 2px;
    border: 0;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll .jci-horizontal-menu__item {
    position: relative;
    scroll-snap-align: start;
    border: 0;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll .jci-horizontal-menu__link {
    min-height: 58px;
    padding: 0;
    border-bottom: 0;
    color: var(--color-brand-navy, #041c40);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll :is(
    .jci-horizontal-menu__item.is-active,
    .jci-horizontal-menu__item.active
  ) > .jci-horizontal-menu__link,
  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll .jci-horizontal-menu__link:is(.is-active, [aria-current]) {
    border-bottom: 0;
    color: var(--color-brand-blue, #487cff);
    font-weight: 600;
    text-decoration: none;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll :is(
    .jci-horizontal-menu__item.is-active,
    .jci-horizontal-menu__item.active
  )::after {
    display: none;
    content: none;
  }

  body:not(.home):not(.front-page) .jci-program-type-menu-bar--horizontal-scroll .jci-horizontal-menu__arrow {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
    border-color: rgba(4, 28, 64, 0.12);
    background: #fff;
  }


  /* Long-program listings use the shared measured pin controller instead of a
   * long-lived sticky layer. This avoids the iOS/WebKit repaint jitter while
   * preserving a 58px normal-flow placeholder and the same horizontal menu. */
  body:not(.home):not(.front-page) > .site-wrapper main .jci-program-type-menu-bar--program-type[data-jci-mobile-fixed-secondary-nav] {
    position: relative;
    top: auto;
    min-height: 58px;
  }

  body:not(.home):not(.front-page) > .site-wrapper main .jci-program-type-menu-bar--program-type[data-jci-mobile-fixed-secondary-nav].is-mobile-pinned .jci-horizontal-menu.jci-program-type-nav.sup-nav {
    position: fixed;
    top: var(--jci-header-visual-offset, var(--jci-header-offset, 74px));
    right: 0;
    left: 0;
    z-index: 1100;
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: var(--jci-container-gutter-mobile, 16px);
    border-bottom: 1px solid rgba(4, 28, 64, 0.08);
    background: linear-gradient(180deg, #f5f7fa 0%, #fafbfd 52%, #ffffff 100%);
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  /* Pages with a persistent secondary disclosure use the same viewport-layer
   * architecture as Long Program. Long Program and Course subject-area bars
   * opt into this shared primitive rather than owning separate sticky systems.
   * A normal-flow 56px bar remains the geometry placeholder; the existing
   * horizontal-menu component is fixed only after the shared JS pin controller
   * reaches the canonical in-flow sticky header. */
  /* Header positioning is owned by the site shell. Internal pages use the
   * canonical in-flow sticky header, so secondary navigation must not convert
   * it back to fixed or add a second layout offset. This keeps the first Program
   * heading fully below the header and avoids duplicate compensation on iOS. */

  body:not(.home):not(.front-page) > .site-wrapper main .jci-secondary-nav-bar--mobile-disclosure {
    --jci-secondary-nav-gutter: var(--jci-container-gutter-mobile, 16px);
    --jci-secondary-nav-anchor-height: 56px;
    position: relative;
    top: auto;
    z-index: 40;
    min-height: var(--jci-secondary-nav-anchor-height);
    margin-top: 0;
    border: 0;
    border-bottom: 1px solid rgba(4, 28, 64, 0.14);
    background: #fff;
    box-shadow: none;
  }

  body:not(.home):not(.front-page) > .site-wrapper main .jci-secondary-nav-bar--mobile-disclosure::before {
    display: none;
    content: none;
  }

  /* Some section indexes are useful only once the user leaves the hero. The
   * shared pin controller owns that transition: opt-in bars remain fail-open
   * until JS is ready, then take no space in normal flow and appear only when
   * the existing pin threshold is reached. */
  body:not(.home):not(.front-page) > .site-wrapper main [data-jci-mobile-fixed-secondary-nav][data-jci-mobile-reveal-on-pin][data-jci-mobile-pin-ready="true"] {
    min-height: 0;
    border-bottom: 0;
  }

  body:not(.home):not(.front-page) > .site-wrapper main [data-jci-mobile-fixed-secondary-nav][data-jci-mobile-reveal-on-pin][data-jci-mobile-pin-ready="true"]:not(.is-mobile-pinned) > .jci-horizontal-menu {
    display: none;
  }

  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu.sup-nav {
    width: 100% !important;
    max-width: none !important;
    min-height: var(--jci-secondary-nav-anchor-height, 56px);
    margin: 0 !important;
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }

  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-ready] .jci-horizontal-menu__disclosure {
    min-height: var(--jci-secondary-nav-anchor-height, 56px);
    padding-inline: var(--jci-secondary-nav-gutter);
    color: var(--color-brand-navy, #041c40);
    font-size: 14px;
    font-weight: 600;
  }

  body:not(.home):not(.front-page) > .site-wrapper main .jci-secondary-nav-bar--mobile-disclosure.is-mobile-pinned .jci-horizontal-menu.sup-nav {
    position: fixed;
    top: var(--jci-header-visual-offset, var(--jci-header-offset, 76px));
    right: 0;
    left: 0;
    z-index: 1100;
    border-bottom: 1px solid rgba(4, 28, 64, 0.14);
  }

  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-ready] > .jci-horizontal-menu__viewport {
    right: 0;
    left: 0;
    width: auto;
    min-width: 0;
    max-width: none;
    box-shadow: 0 10px 24px rgba(4, 28, 64, 0.1);
  }

  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-ready] .jci-horizontal-menu__list.sup-nav__list {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 0;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 var(--jci-secondary-nav-gutter);
    border: 0;
    background: #fff;
    white-space: normal;
  }

  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-ready] .jci-horizontal-menu__item {
    width: 100%;
    border-top: 1px solid rgba(4, 28, 64, 0.12);
    white-space: normal;
  }

  /* Active-label disclosures omit the current destination because the trigger
   * already communicates it. Static-label disclosures keep the active option in
   * the opened index so users can see their current location in context. */
  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-ready]:not([data-jci-horizontal-menu-disclosure-track-active="false"]) .jci-horizontal-menu__item.is-active,
  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-ready]:not([data-jci-horizontal-menu-disclosure-track-active="false"]) .jci-horizontal-menu__item.active {
    display: none;
  }

  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-disclosure-track-active="false"] .jci-horizontal-menu__item.is-active > .jci-horizontal-menu__link,
  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-disclosure-track-active="false"] .jci-horizontal-menu__item.active > .jci-horizontal-menu__link {
    color: var(--color-brand-blue, #487cff);
    font-weight: 700;
    text-decoration: none;
  }

  body:not(.home):not(.front-page) .jci-secondary-nav-bar--mobile-disclosure .jci-horizontal-menu[data-jci-horizontal-menu-ready] .jci-horizontal-menu__link {
    width: 100%;
    min-height: 48px;
    padding: 12px 0;
    white-space: normal;
    font-size: 14px;
    line-height: 1.3;
  }

  body.page-template-template-program-type .aaccordion .aaccordion-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: left;
  }

  body.page-template-template-program-type .aaccordion .aaccordion-header > .container-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.page-template-template-program-type .aaccordion .aaccordion-header > .container-inner > span {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    float: none;
    text-align: left;
    overflow-wrap: anywhere;
  }

  body.page-template-template-program-type .aaccordion .aaccordion-header > .container-inner > img {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

/* Keep swipe/trackpad navigation without showing a page-like scrollbar. */
body:not(.home):not(.front-page) .sup-nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body:not(.home):not(.front-page) .sup-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
