/* Site header — gradient bar, hover dropdowns (desktop) and accordion menu (≤900px) */
.enp-header {
  --enp-accent: #1a90ff;
  --enp-primary: #1890ff;
  --enp-panel: #fff;
  --enp-panel-ink: #1c2541;
  --enp-panel-muted: #7a8299;
  --enp-panel-hover: #eaf3ff;
  --enp-panel-accent: #0958d9;
  --enp-line: #e3e6f3;
  --enp-fs: 0.95rem;
  --enp-pad: 16px;
  --enp-gap: 12px;

  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #263256 0%, #1f3a6e 50%, #1b4a86 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.enp-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(24, 144, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.enp-header *,
.enp-header *::before,
.enp-header *::after {
  box-sizing: border-box;
}

.enp-header__row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px 16px;
}

/* Brand */
.enp-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  text-decoration: none;
}

.enp-brand__logo {
  display: block;
  width: 190px;
  height: 44px;
}

.enp-brand__tag {
  max-width: 230px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.72);
}

/* Primary navigation */
.enp-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px var(--enp-gap);
  min-width: 0;
}

.enp-nav__item {
  position: relative;
}

.enp-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px var(--enp-pad);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: var(--enp-fs);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.enp-nav__link::after {
  content: '';
  position: absolute;
  left: var(--enp-pad);
  right: var(--enp-pad);
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--enp-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.enp-nav__link:hover,
.enp-nav__link:focus-visible,
.enp-nav__item.open > .enp-nav__link {
  color: var(--enp-accent);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.enp-nav__link:hover::after,
.enp-nav__link.active::after {
  transform: scaleX(1);
}

.enp-nav__link.active {
  color: var(--enp-accent);
}

.enp-caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  opacity: 0.6;
  transform: rotate(45deg);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.enp-nav__item:hover .enp-caret,
.enp-nav__item.open .enp-caret {
  margin-top: 3px;
  opacity: 0.95;
  transform: rotate(225deg);
}

/* Dropdown panel */
.enp-nav__panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 70;
  min-width: 250px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--enp-line);
  border-top: 3px solid var(--enp-primary);
  border-radius: 12px;
  background: var(--enp-panel);
  box-shadow: 0 18px 44px rgba(30, 42, 82, 0.18);
  transform: translateX(-50%);
}

/* invisible bridge so the panel stays open while the pointer crosses the gap */
.enp-nav__panel::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.enp-nav__panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-left: 3px solid transparent;
  border-radius: 10px;
  color: var(--enp-panel-ink);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.enp-nav__icon {
  display: inline-flex;
  width: 20px;
  font-size: 1.1em;
  opacity: 0.85;
}

.enp-nav__panel a:hover,
.enp-nav__panel a:focus-visible {
  border-left-color: var(--enp-accent);
  background: var(--enp-panel-hover);
  color: var(--enp-panel-accent);
  outline: none;
}

/* Button-rendered panel entries (e.g. Learning Hub) match the plain <a> links exactly. */
.enp-nav__panel-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--enp-panel-ink);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.enp-nav__panel-btn:hover,
.enp-nav__panel-btn:focus-visible {
  border-left-color: var(--enp-accent);
  background: var(--enp-panel-hover);
  color: var(--enp-panel-accent);
  outline: none;
}

.enp-nav__panel-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.enp-nav__item.open > .enp-nav__panel {
  display: block;
}

/* "More": multi-column panel with a heading per group */
.enp-nav__item--more {
  position: static;
}

/* Sized to its content, not a fixed 4-column width — the number of sections
   (Sponsorship, Social, …) varies as items move in/out of "More", so a hardcoded
   repeat(4, 1fr) grid left huge empty space whenever there were fewer than 4 sections. */
.enp-nav__panel--mega {
  top: 100%;
  left: auto;
  right: 0;
  min-width: 0;
  width: max-content;
  max-width: calc(100vw - 32px);
  margin-top: 0;
  transform: none;
  padding: 30px 28px 28px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 24px 56px rgba(30, 42, 82, 0.22);
}

/* bridge across the gap between the trigger and the panel so hover is not lost */
.enp-nav__panel--mega::before {
  top: -44px;
  height: 44px;
}

.enp-nav__item.open > .enp-nav__panel--mega {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.enp-nav__section {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 240px;
  gap: 4px;
}

.enp-nav__section + .enp-nav__section {
  padding-left: 28px;
  border-left: 1px solid var(--enp-line);
  margin-left: 28px;
}

.enp-nav__panel--mega .enp-nav__section a {
  padding: 11px 16px;
  font-size: 0.92rem;
}

.enp-nav__heading {
  margin-bottom: 8px;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--enp-line);
  color: var(--enp-panel-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 1101px) and (hover: hover) {
  .enp-nav__item:hover > .enp-nav__panel,
  .enp-nav__item:focus-within > .enp-nav__panel {
    display: block;
  }

  .enp-nav__item:hover > .enp-nav__panel--mega,
  .enp-nav__item:focus-within > .enp-nav__panel--mega {
    display: flex;
    align-items: flex-start;
    gap: 0;
  }
}

/* Actions */
.enp-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
}

.enp-actions__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.enp-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.enp-btn:hover {
  transform: translateY(-2px);
}

.enp-btn--outline {
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
}

.enp-btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.enp-btn--primary {
  border-color: var(--enp-primary);
  background: var(--enp-primary);
  color: #fff;
}

.enp-btn--primary:hover {
  border-color: #40a9ff;
  background: #40a9ff;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

/* Logged-in user block (dark text on the light header) */
.navbar-user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 220px;
  cursor: pointer;
}

.navbar-user-avatar {
  background: #40b4ff;
}

.navbar-user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.enp-header .user-name {
  max-width: 160px;
  overflow: hidden;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar-profile-completion {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  max-width: 160px;
}

.navbar-profile-completion-bar {
  width: 100%;
  margin: 0;
  line-height: 1;
}

.navbar-profile-completion-bar .ant-progress-inner {
  vertical-align: top;
}

.navbar-profile-completion-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

/* Notification bell */
.notification-bell-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}

/* Notification bell (the shared NotificationDropdown styles are white-on-dark) */
.enp-header .notification-bell {
  border: none !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 18px !important;
  transition: all 0.2s ease !important;
}

.enp-header .notification-bell:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--enp-accent) !important;
}

/* Mobile toggle (hidden on desktop) */
.enp-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.enp-toggle span {
  width: 22px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.enp-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.enp-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.enp-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Drop the tagline before the bar runs out of room */
@media (max-width: 1500px) {
  .enp-brand__tag {
    display: none;
  }
}

/* Keep the bar on one row as the screen narrows */
@media (max-width: 1399px) {
  .enp-header {
    --enp-fs: 0.92rem;
    --enp-pad: 11px;
    --enp-gap: 8px;
  }

  .enp-brand__logo {
    width: 150px;
    height: 36px;
  }

  .enp-header__row {
    gap: 8px;
  }
}

@media (max-width: 1239px) {
  .enp-header {
    --enp-fs: 0.88rem;
    --enp-pad: 8px;
    --enp-gap: 6px;
  }

  .enp-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .enp-header .user-name {
    max-width: 110px;
  }
}

/* Tablet / mobile: accordion menu */
@media (max-width: 1100px) {
  .enp-header__row {
    position: relative;
    flex-wrap: wrap;
    padding: 14px 16px;
  }

  .enp-brand {
    order: 1;
  }

  .enp-actions {
    order: 2;
    margin-left: auto;
  }

  .enp-toggle {
    display: flex;
    order: 3;
  }

  .enp-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    max-height: 70vh;
    padding: 10px 22px 16px;
    overflow-y: auto;
    border-top: 1px solid var(--enp-line);
    border-radius: 0 0 14px 14px;
    background: var(--enp-panel);
    box-shadow: 0 12px 24px rgba(30, 42, 82, 0.15);
  }

  .enp-nav.is-open {
    display: flex;
  }

  .enp-nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 14px 0;
    color: var(--enp-panel-ink);
    font-size: 1rem;
    border-bottom: 1px solid var(--enp-line);
    border-radius: 0;
  }

  .enp-nav__link:hover,
  .enp-nav__link:focus-visible,
  .enp-nav__link.active,
  .enp-nav__item.open > .enp-nav__link {
    background: transparent;
    box-shadow: none;
    color: var(--enp-panel-accent);
  }

  .enp-nav__link::after {
    display: none;
  }

  .enp-nav__panel {
    display: block;
    position: static;
    min-width: 0;
    max-height: 0;
    margin: 0;
    padding: 0 0 0 14px;
    overflow: hidden;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    transition: max-height 0.2s ease;
  }

  .enp-nav__panel::before {
    display: none;
  }

  .enp-nav__panel--mega,
  .enp-nav__item.open > .enp-nav__panel--mega {
    display: block;
  }

  .enp-nav__panel--mega {
    width: auto;
    padding: 0 0 0 14px;
    border-radius: 0;
    box-shadow: none;
  }

  .enp-nav__section + .enp-nav__section {
    padding-left: 0;
    margin-left: 0;
    border-left: 0;
  }

  .enp-nav__panel--mega .enp-nav__section a {
    padding: 8px 6px;
    font-size: 0.82rem;
  }

  .enp-nav__heading {
    margin-bottom: 0;
    padding: 10px 6px 4px;
    border-bottom: 0;
    font-size: 0.7rem;
  }

  .enp-nav__item.open > .enp-nav__panel.enp-nav__panel--mega {
    max-height: 700px;
  }

  .enp-nav__item.open > .enp-nav__panel {
    max-height: 400px;
    margin-bottom: 4px;
    padding-top: 2px;
    padding-bottom: 2px;
    border-left-color: var(--enp-line);
  }

  .enp-nav__panel a {
    padding: 8px 6px;
    border-left: 0;
    font-size: 0.82rem;
  }
}

@media (max-width: 520px) {
  .enp-header__row {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .enp-brand__logo {
    width: 118px;
    height: 30px;
  }

  .enp-header .user-name,
  .navbar-profile-completion {
    display: none;
  }

  .enp-actions__row {
    gap: 6px;
  }

  .enp-btn {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
}

/* Very small phones: keep logo, both buttons and the hamburger on one row */
@media (max-width: 420px) {
  .enp-header__row {
    gap: 6px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .enp-brand__logo {
    width: 96px;
    height: 24px;
  }

  .enp-actions__row {
    gap: 5px;
  }

  .enp-btn {
    padding: 6px 9px;
    font-size: 0.74rem;
  }

  .enp-toggle {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 340px) {
  .enp-brand__logo {
    width: 80px;
    height: 20px;
  }

  .enp-btn {
    padding: 6px 7px;
    font-size: 0.7rem;
  }
}

/* Home ribbon — moved here from HomePage.css so it loads on every "site" layout page via
   Navbar.css (always included), not just the home page which used to own this markup. */
.home-ribbon { background: #0f2d4a; color: #ffffff; overflow: hidden; border-bottom: 2px solid #ffd700; padding: 8px 0; }
.home-ribbon-track { display: inline-flex; gap: 48px; white-space: nowrap; animation: ribbon-scroll 86s linear infinite; will-change: transform; }
.home-ribbon-item { display: inline-flex; align-items: center; gap: 10px; padding-right: 24px; }
.home-ribbon-label { font-weight: 700; color: #ffd700; text-transform: uppercase; letter-spacing: 0.4px; }
.home-ribbon-message { font-weight: 500; letter-spacing: 0.2px; }
@keyframes ribbon-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

