/* Preserve all owner-managed menu entries, including at narrow widths. */
html body .nf-site .nf-header-colormag .nf-brandbar,
html body .nf-site .nf-header-colormag .nf-navbar {
  height: auto !important;
  max-height: none !important;
}
html body .nf-site .nf-header-colormag .nf-navbar-inner,
html body .nf-site .nf-header-colormag .nf-primary-nav,
html body .nf-site .nf-header-colormag .nf-nav-list {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
html body .nf-site .nf-header-colormag .nf-nav-list {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  visibility: visible !important;
  opacity: 1 !important;
}
html body .nf-site .nf-header-colormag .nf-nav-list > li {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
html body .nf-site .nf-header-colormag .nf-nav-list > li > a {
  white-space: normal !important;
  overflow-wrap: anywhere;
  height: auto !important;
  min-height: 38px;
  max-height: none !important;
}
.nf-menu-toggle-review {
  display: none;
}
@media (min-width: 981px) and (max-width: 1200px) {
  html body .nf-site .nf-header-colormag .nf-brandbar-inner.nf-brandbar-modern {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) !important;
  }
  html body .nf-site .nf-header-colormag .nf-brandbar-modern .nf-header-modern-center {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 16px !important;
  }
}
.nf-brand .custom-logo-link,
.nf-footer-brand .custom-logo-link {
  display: inline-block;
  max-width: 100%;
}
.nf-brand .custom-logo,
.nf-footer-brand .custom-logo {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: contain;
}
@media (max-width: 980px) {
  html.nf-js body .nf-site .nf-header-colormag .nf-primary-nav:not(.nf-menu-expanded) {
    display: none !important;
  }
  html.nf-js .nf-menu-toggle-review {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--nf-ink);
    background: var(--nf-surface);
    border: 1px solid var(--nf-accent);
    border-radius: 8px;
    cursor: pointer;
  }
  .nf-header-colormag .nf-navbar-inner {
    flex-wrap: wrap;
  }
  html body .nf-site .nf-header-colormag .nf-primary-nav {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-shadow: none !important;
  }
  html body .nf-site .nf-header-colormag .nf-nav-list .sub-menu {
    position: static !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-inline-start: 12px;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
.nf-primary-nav .nf-menu-close,
.nf-nav-backdrop {
  display: none !important;
}

/* Desktop priority navigation: one row, with remaining links in a disclosure. */
.nf-menu-extra[hidden],
.nf-menu-extra-list[hidden] {
  display: none !important;
}
@media (min-width: 981px) {
  /* Reserve the final row before deferred JS runs; never paint wrapped items. */
  html body .nf-site .nf-header-colormag .nf-primary-nav {
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    min-width: 0;
    width: 100%;
  }
  html.nf-menu-pending body .nf-site .nf-header-colormag .nf-primary-nav .nf-nav-list,
  html.nf-menu-pending body .nf-site .nf-header-colormag .nf-menu-extra {
    visibility: hidden !important;
  }
  html body .nf-site .nf-header-colormag .nf-primary-nav .nf-nav-list {
    flex: 1 1 0 !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    width: auto !important;
  }
  /* Scrollable fallback if scripts are disabled or cannot finish loading. */
  html body .nf-site .nf-header-colormag .nf-primary-nav:not(.nf-priority-nav) .nf-nav-list {
    height: 40px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  html body .nf-site .nf-header-colormag .nf-primary-nav .nf-nav-list > li {
    flex: 0 0 auto !important;
    max-width: none !important;
  }
  html body .nf-site .nf-header-colormag .nf-primary-nav .nf-nav-list > li > a {
    white-space: nowrap !important;
    overflow-wrap: normal;
  }
  html body .nf-site .nf-header-colormag .nf-priority-nav:not(.nf-menu-measuring) .nf-nav-list > li {
    flex: 1 0 auto !important;
  }
  html body .nf-site .nf-header-colormag .nf-priority-nav .nf-nav-list > li > a {
    width: 100%;
    justify-content: center;
  }
  .nf-menu-extra {
    position: relative;
    flex: 0 0 auto;
    margin-inline-start: auto;
  }
  .nf-menu-extra-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ead58c;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff8d6, #f6df8b);
    color: #735018;
    box-shadow: 0 2px 6px rgba(159, 115, 25, 0.14);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }
  .nf-menu-extra-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    height: 26px;
    color: inherit;
  }
  .nf-menu-extra-icon .nf-icon {
    width: 21px;
    height: 21px;
  }
  .nf-menu-extra-toggle:hover,
  .nf-menu-extra-toggle[aria-expanded="true"] {
    border-color: #c59a39;
    box-shadow: 0 2px 8px rgba(159, 115, 25, 0.22);
  }
  .nf-menu-extra-toggle:focus-visible {
    outline: 2px solid #a77821;
    outline-offset: 2px;
  }
  html.nf-dark-mode .nf-menu-extra-toggle {
    border-color: #d1aa50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  @media (prefers-reduced-motion: reduce) {
    .nf-menu-extra-toggle {
      transition: none;
    }
  }
  html body .nf-site .nf-header-colormag .nf-menu-extra-list {
    position: absolute;
    z-index: 100;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    display: block;
    width: min(380px, calc(100vw - 32px));
    max-height: min(65vh, 560px);
    overflow: auto;
    margin: 0;
    padding: 8px;
    list-style: none;
    text-align: start;
    color: var(--nf-ink);
    background: var(--nf-surface);
    border: 1px solid var(--nf-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  }
  html body .nf-site .nf-header-colormag .nf-menu-extra-list li {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
  }
  html body .nf-site .nf-header-colormag .nf-menu-extra-list a {
    display: block;
    padding: 10px 12px;
    color: inherit;
    border-radius: 6px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-decoration: none;
  }
  .nf-menu-extra-list a:hover,
  .nf-menu-extra-list a:focus-visible {
    background: var(--nf-page);
    outline: 2px solid var(--nf-accent);
    outline-offset: -2px;
  }
  html body .nf-site .nf-header-colormag .nf-menu-extra-list .sub-menu {
    position: static;
    display: block;
    width: auto;
    min-width: 0;
    margin: 0;
    margin-inline-start: 12px;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
  }
}

/* Owner-managed menu class: keep the existing hover treatment on this link. */
html body .nf-site .nf-header-colormag .nf-primary-nav .nf-nav-list > .nf-menu-home-highlight > a,
html body .nf-site .nf-header-colormag .nf-primary-nav .nf-menu-extra-list > .nf-menu-home-highlight > a {
  color: #d946ef !important;
  background: #fdf4ff !important;
  box-shadow: 0 4px 10px rgba(217, 70, 239, 0.14) !important;
  font-weight: 400 !important;
  -webkit-text-stroke: 0.35px currentColor !important;
  text-shadow: 0 0 0 currentColor !important;
}
html body .nf-site .nf-header-colormag .nf-primary-nav .nf-nav-list > .nf-menu-home-highlight > a::before {
  color: #d946ef !important;
  background: currentColor !important;
}
html.nf-dark-mode body .nf-site .nf-header-colormag .nf-primary-nav .nf-nav-list > .nf-menu-home-highlight > a,
html.nf-dark-mode body .nf-site .nf-header-colormag .nf-primary-nav .nf-menu-extra-list > .nf-menu-home-highlight > a {
  color: #efabfa !important;
  background: var(--nf-dark-surface-3) !important;
}

/* Keep menu geometry identical at rest, on hover/focus, and when current. */
html body .nf-site #site-navigation .nf-nav-list > li > a,
html body .nf-site #site-navigation .nf-menu-extra-list > li > a {
  font-weight: 400 !important;
  transform: none !important;
  will-change: auto !important;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease !important;
}
@media (min-width: 981px) {
  html body .nf-site #site-navigation .nf-nav-list > li > a {
    gap: 5px !important;
  }
  html body .nf-site #site-navigation .nf-nav-list > li > a::before {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    transform: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body .nf-site #site-navigation .nf-nav-list > li > a,
  html body .nf-site #site-navigation .nf-menu-extra-list > li > a {
    transition: none !important;
  }
}
