/* padding-bottom matches the underline thickness so the box-shadow lands flush at the navbar bottom. */
.navbar.sticky-top {
  background-color: #09538b !important;
  padding-bottom: 6px;
}

.navbar-brand img {
  max-height: 51px;
  transition: 0.2s;
}

.nav-link {
  color: white !important;
  line-height: 18px;
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none !important;
}

.nav-link > span {
  font-weight: bold;
  font-size: 20px;
}

.nav-link:after {
  display: none !important;
}

.nav-link:hover,
.nav-link:focus {
  text-decoration: none !important;
  font-weight: normal;
}

/* Bottom underline indicator. 6px must stay in sync with the ::after bridge and dropdown
   top offset in the desktop block below — changing one without the others creates a dead zone. */
.nav-item:hover {
  box-shadow: 0 6px 0 0 var(--nav-highlight);
}

a.dropdown-item {
  text-decoration: none !important;
  font-weight: normal;
}

a.dropdown-item:hover {
  font-weight: normal;
  background-color: #ededed;
}

a.dropdown-item:active,
a.dropdown-item.active {
  background-color: #09538b;
}

.nav-link:focus-visible {
  outline: 2px solid white;
  outline-offset: -2px;
}

button.btn.btn-outline-primary-search {
  width: auto;
  color: #d8e5e9;
  border-color: #3a7b90;
}

button.btn.btn-outline-primary-search:hover {
  color: #3a7b90;
  background-color: white;
}

.navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

.navbar-toggler {
  padding: 0.25rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
  text-decoration: none !important;
}

.navbar-toggler:focus-visible,
.search-toggle-btn:focus-visible {
  outline: 2px solid white;
  outline-offset: -2px;
}

.quick-links-item {
  padding: 0 3px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-size: 12px;
}

.quick-links-item a {
  color: white;
  font-weight: bold;
  font-family: "Karla-Regular",'Segoe UI', sans;
  padding: 0 3px 0;
}

.quick-links-item a:hover {
  color: #09538b;
  text-shadow: none;
}

.quick-links-item a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.quick-links {
  color: #fff;
  background-color: lightsteelblue;
  font-weight: bold;
  padding: 0 30px;
  display: block;
  border: 1px solid black;
}

.quick-links i {
  color: black;
}

#jSearchIcon, #jSearchIconClose {
  color: white;
  cursor: pointer;
  font-size: 17px;
  padding-left: 15px;
  padding-right: 15px;
}

.search-toggle-btn {
  background: none;
  border: none;
  color: inherit;
}

.dropdown-item:focus-visible {
  outline: 2px solid #09538b;
  outline-offset: -2px;
}

#jSearchInput {
  border: 1px solid #286999;
  flex-grow: 1;
  background: #103a59;
  padding: 21px;
  color: white;
}

#jSearchInput::placeholder {
  color: white;
  opacity: 1;
}

#jLogo {
  margin-top: 10px;
}

#MyAccountMenu {
  overflow: auto !important;
}

@media (max-width:990px) {
  li.nav-item.show {
    background: #0c3f66
  }

  a.nav-link {
    padding-left: 20px !important;
    font-size: 17px;
  }

  a.dropdown-item {
    position: relative;
    padding: .9rem 1.8rem;
    white-space: normal !important;
    cursor: pointer;
  }

  #jSearchIcon, #jSearchIconClose {
    display: none
  }
}

@media (min-width:991px) {
  a.nav-link {
    padding: 10px 6px 12px 6px;
  }

  a.dropdown-item {
    position: relative;
    padding: 10px 14px;
    cursor: pointer;
  }

  #jSearchForm {
    width: 60%;
  }

  ul.dropdown-menu {
    min-width: 300px !important;
    padding: 25px 10px 20px;
  }

  .dropdown-menu a {
    white-space: normal;
  }

  .dropdown-menu::before {
    display: none;
  }
}

@media (min-width: 992px) {
  #jNavLinks li.nav-item:nth-child(2) {
    min-width: 166px;
  }

  #jNavLinks li.nav-item:nth-child(6) {
    min-width: 104px;
  }

  /* Offset below the 6px underline — keep in sync with box-shadow and ::after bridge. */
  .navbar .nav-item .dropdown-menu {
    display: none;
    margin-top: 0;
    top: calc(100% + 6px);
  }

  .navbar .nav-item:hover .dropdown-menu {
    display: block;
  }

  .navbar-collapse {
    align-self: stretch;
  }

  .navbar-nav {
    height: 100%;
  }

  /* flex-start keeps the first line of single and multi-line items top-aligned.
     position: relative anchors the ::after deadzone bridge. */
  .navbar-nav .nav-item {
    display: flex;
    align-items: flex-start;
    position: relative;
  }

  /* Invisible bridge filling the gap between nav-item and dropdown — prevents dead zone. */
  .navbar-nav .nav-item::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 6px;
  }

}

@media (min-width: 1280px) {
  .quick-links {
    display: none;
  }
}
