/* Mentoring header — mirrors the main site's legacy-nav exactly */

.legacy-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: linear-gradient(90deg,rgba(6,7,20,.94) 0%,rgba(9,9,28,.94) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  /* own compositing layer so blurred header does not repaint with content scrolling beneath */
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

.legacy-nav-inner {
  max-width: 1280px;
  height: 57px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legacy-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f5f5f7;
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.legacy-logo span {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #bf5af2);
  box-shadow: 0 0 12px #0071e3;
}

.legacy-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.legacy-links a {
  white-space: nowrap;
  position: relative;
  color: #f5f5f7;
  text-decoration: none;
  font-size: 13px;
  opacity: .85;
}

.legacy-links a:hover {
  opacity: 1;
}

.legacy-links a::before {
  content: '';
  position: absolute;
  inset: -13px -6px;
}

.legacy-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: #0071e3;
  transform: translateX(-50%);
  transition: width .25s ease;
}

.legacy-links a:hover::after {
  width: 100%;
}

.legacy-links a[aria-current="page"] {
  opacity: 1;
}

.legacy-links a[aria-current="page"]::after {
  width: 100%;
}

.new-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 99px;
  background: #2d6fd2;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.language-switcher {
  position: relative;
  z-index: 102;
  margin-left: 18px;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 255, 255, .07);
  color: #f5f5f7;
  font: 600 11px var(--sans);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.lang-current:hover,
.language-switcher.open .lang-current {
  border-color: rgba(110, 173, 255, .76);
  background: rgba(35, 108, 210, .24);
}

.lang-current:focus-visible {
  box-shadow: 0 0 0 3px rgba(75, 145, 255, .35);
}

.lang-flag {
  font-size: 15px;
  line-height: 1;
}

.lang-chevron {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform .2s;
}

.language-switcher.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: fixed;
  top: 56px;
  right: 12px;
  z-index: 200;
  min-width: 184px;
  max-height: min(420px, calc(100vh - 80px));
  display: grid;
  gap: 2px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  background: rgba(21, 24, 31, .98);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(20px);
}

.language-switcher.open .lang-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #d7dbe4;
  text-align: left;
  font: 500 13px var(--sans);
  cursor: pointer;
  transition: background .16s, color .16s;
}

.lang-option:hover {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.lang-option.active {
  background: rgba(0, 113, 227, .24);
  color: #fff;
}

.legacy-menu {
  display: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.legacy-menu i {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  border-radius: 2px;
  background: #f5f5f7;
}

.legacy-mobile {
  display: none;
  position: fixed;
  z-index: 99;
  top: 57px;
  inset-inline: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  background: rgba(0, 0, 0, .93);
}

.legacy-mobile a {
  color: #f5f5f7;
  font-size: 22px;
  font-weight: 500;
  text-decoration: none;
}

.legacy-nav :focus-visible,
.legacy-mobile :focus-visible {
  outline: 3px solid #73a9ff;
  outline-offset: 2px;
}

@keyframes legacyPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.2); }
}

@media (max-width: 1279px) {
  .legacy-links {
    display: none;
  }
  .legacy-menu {
    display: block;
  }
  .legacy-mobile.open {
    display: flex;
  }
}

@media (max-width: 980px) {
  .legacy-links { gap: 18px; }
}

@media (max-width: 600px) {
  .legacy-nav-inner { padding: 0 18px; }
  .language-switcher { margin-left: auto; margin-right: 8px; }
  .lang-current { padding: 6px 9px; }
  .lang-code { display: none; }
}