/* A disclosure beside the real Leadership link; no Bootstrap dropdown dependency. */
.leadership-nav {
  position: relative;
}

.leadership-nav-heading {
  display: flex;
  align-items: center;
}

.leadership-submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  min-height: 44px;
  margin-left: 4px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
}

.leadership-submenu-toggle:hover,
.leadership-submenu-toggle[aria-expanded="true"] {
  background: var(--mint, #E4EFE7);
}

.leadership-submenu-toggle:focus-visible,
.leadership-submenu a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.leadership-submenu-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.leadership-submenu-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.leadership-submenu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  min-width: 210px;
  max-width: calc(100vw - 40px);
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 5px;
  background: var(--ivory);
  box-shadow: 0 8px 24px rgba(40, 54, 56, 0.12);
}

.leadership-submenu[hidden] {
  display: none !important;
}

.leadership-submenu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 3px;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.leadership-submenu a:hover,
.leadership-submenu a:focus-visible,
.leadership-submenu a[aria-current="page"] {
  background: var(--mint, #E4EFE7);
  color: var(--teal);
}

.leadership-submenu a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
}

@media (max-width: 991.98px) {
  .leadership-nav-heading {
    justify-content: space-between;
  }

  .navbar-expand-lg .navbar-nav .leadership-nav-heading > .nav-link {
    flex: 1;
    margin-left: 0;
  }

  .leadership-submenu-toggle {
    flex-basis: 44px;
    width: 44px;
  }

  .leadership-submenu {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 2px 0 8px 16px;
    padding: 2px 0 2px 12px;
    border: 0;
    border-left: 2px solid var(--gold);
    border-radius: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leadership-submenu-toggle svg {
    transition: none;
  }
}
