/* Compact case-study links in both variants of the existing mega menus. */
#mfn-header-template .ulm-mega-featured > h3,
#mfn-header-template .ulm-mega-featured > p {
  display:none!important;
}
#mfn-header-template .ulm-menu-project-list {
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  width:100%!important;
  margin:0 0 16px!important;
  padding:0!important;
  list-style:none!important;
}
#mfn-header-template .ulm-menu-project-list li {
  display:block!important;
  margin:0!important;
  padding:0!important;
  list-style:none!important;
}
#mfn-header-template .ulm-menu-project {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  width:100%!important;
  padding:6px!important;
  border:1px solid transparent!important;
  border-radius:9px!important;
  color:#07012d!important;
  background:transparent!important;
  text-decoration:none!important;
  transition:background-color .2s ease,border-color .2s ease!important;
}
#mfn-header-template .ulm-menu-project:hover {
  background:#edf4ff!important;
  border-color:rgba(0,104,255,.2)!important;
}
#mfn-header-template .ulm-menu-project:focus-visible {
  outline:2px solid #0068ff!important;
  outline-offset:2px!important;
}
#mfn-header-template .ulm-menu-project img {
  display:block!important;
  flex:0 0 56px!important;
  width:56px!important;
  height:42px!important;
  max-width:none!important;
  object-fit:cover!important;
  border-radius:6px!important;
}
#mfn-header-template .ulm-menu-project-text {
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-width:0!important;
  gap:3px!important;
  color:inherit!important;
}
#mfn-header-template .ulm-menu-project-text strong {
  color:inherit!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.25!important;
}
#mfn-header-template .ulm-menu-project-text > span {
  color:#626978!important;
  font-size:11px!important;
  line-height:1.3!important;
}
#mfn-header-template .ulm-menu-project-arrow {
  display:block!important;
  flex:0 0 15px!important;
  width:15px!important;
  height:15px!important;
  color:#7b8190!important;
}
#mfn-header-template .ulm-menu-project:hover .ulm-menu-project-arrow {
  color:#0068ff!important;
}
#mfn-header-template .ulm-mega-card-arrow svg {
  transform:rotate(45deg)!important;
}
#mfn-header-template .ulm-mega-card:hover .ulm-mega-card-arrow {
  transform:translateX(2px)!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-menu-project {
  color:#f3f4f8!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-menu-project:hover {
  background:#292c39!important;
  border-color:rgba(118,173,255,.3)!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-menu-project-arrow {
  color:#a7aaba!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-menu-project:hover .ulm-menu-project-arrow {
  color:#76adff!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-menu-project-text > span {
  color:#c0c2cf!important;
}
#mfn-header-template .ulm-mobile-featured-projects {
  margin:14px 0 0!important;
  padding:14px 0 0!important;
  border-top:1px solid rgba(7,1,45,.12)!important;
}
#mfn-header-template .ulm-mobile-featured-projects .ulm-mobile-featured-title {
  display:block;
  margin:0 0 8px!important;
  color:#07012d!important;
  font-size:16px!important;
  font-weight:500!important;
  line-height:1.35!important;
}
#mfn-header-template .ulm-mobile-featured-projects .ulm-mega-featured-link {
  margin:0!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-mobile-featured-projects {
  border-color:rgba(255,255,255,.14)!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-mobile-featured-projects .ulm-mobile-featured-title {
  color:#f3f4f8!important;
}
@media (max-width:767px) {
  #mfn-header-template .mfn-header-tmpl-menu-sidebar .ulm-mobile-featured-projects {
    display:none!important;
  }
}
@media (prefers-reduced-motion:reduce) {
  #mfn-header-template .ulm-menu-project { transition:none!important; }
}

/* The desktop side columns mirror the project list; the centre keeps its size. */
@media (min-width:1321px) {
  #mfn-header-template .mfn-header-menu > li.ulm-mega-menu-item > .ulm-mega-panel {
    width:var(--ulm-mega-panel-width, 1320px)!important;
  }
  #mfn-header-template .ulm-mega-shell {
    grid-template-columns:minmax(0,1fr) 740px minmax(0,1fr)!important;
  }
  #mfn-header-template .ulm-mega-sidebar {
    padding:22px 18px!important;
    background:#fbfcff!important;
  }
  #mfn-header-template .ulm-mega-categories {
    grid-auto-rows:minmax(56px,auto)!important;
    gap:6px!important;
    margin:0 0 16px!important;
  }
  #mfn-header-template .ulm-mega-category {
    height:auto!important;
    min-height:56px!important;
    gap:6px!important;
    padding:6px!important;
    border:1px solid transparent!important;
    border-radius:9px!important;
    color:#07012d!important;
    font-size:13px!important;
    font-weight:600!important;
    line-height:1.25!important;
  }
  #mfn-header-template .ulm-mega-category:hover,
  #mfn-header-template .ulm-mega-category[aria-selected=true] {
    background:#edf4ff!important;
    border-color:rgba(0,104,255,.2)!important;
    color:#0068ff!important;
  }
  #mfn-header-template .ulm-mega-category img.ulm-mega-category-icon {
    display:block!important;
    flex:0 0 40px!important;
    width:40px!important;
    height:42px!important;
    max-width:none!important;
    object-fit:contain!important;
    border-radius:6px!important;
  }
  #mfn-header-template .ulm-mega-category-label {
    flex:1 1 auto!important;
    overflow-wrap:normal!important;
  }
  #mfn-header-template .ulm-mega-category-arrow {
    display:block!important;
    flex:0 0 16px!important;
    width:16px!important;
    height:16px!important;
    color:#0068ff!important;
  }
  #mfn-header-template .ulm-mega-main {
    padding-top:22px!important;
  }
  #mfn-header-template .ulm-mega-main .ulm-mega-current-category {
    margin-bottom:14px!important;
  }
  #mfn-header-template .ulm-mega-grid {
    min-height:0!important;
  }
  #mfn-header-template .ulm-mega-sidebar > .ulm-mega-ceo-link {
    align-self:flex-start!important;
    margin-top:auto!important;
  }
  html[data-ulm-theme="dark"] #mfn-header-template .ulm-mega-sidebar {
    background:#101119!important;
  }
  html[data-ulm-theme="dark"] #mfn-header-template .ulm-mega-category {
    color:#f3f4f8!important;
  }
  html[data-ulm-theme="dark"] #mfn-header-template .ulm-mega-category:hover,
  html[data-ulm-theme="dark"] #mfn-header-template .ulm-mega-category[aria-selected=true] {
    background:#292c39!important;
    border-color:rgba(118,173,255,.3)!important;
    color:#76adff!important;
  }
  html[data-ulm-theme="dark"] #mfn-header-template .ulm-mega-category-arrow {
    color:#76adff!important;
  }
}
@media (min-width:1321px) and (max-width:1500px) {
  #mfn-header-template .ulm-mega-sidebar,
  #mfn-header-template .ulm-mega-featured {
    padding-left:6px!important;
    padding-right:6px!important;
  }
  #mfn-header-template .ulm-mega-category {
    gap:3px!important;
    padding:3px!important;
    font-size:11.5px!important;
  }
  #mfn-header-template .ulm-mega-category img.ulm-mega-category-icon {
    flex-basis:24px!important;
    width:24px!important;
  }
  #mfn-header-template .ulm-mega-category-arrow {
    flex-basis:12px!important;
    width:12px!important;
    height:12px!important;
  }
  #mfn-header-template .ulm-mega-featured .ulm-menu-project {
    gap:5px!important;
    padding:4px!important;
  }
  #mfn-header-template .ulm-mega-featured .ulm-menu-project img {
    flex-basis:46px!important;
    width:46px!important;
  }
  #mfn-header-template .ulm-mega-featured .ulm-menu-project-arrow {
    flex-basis:13px!important;
    width:13px!important;
    height:13px!important;
  }
}

/* Main navigation: products open a compact dropdown; CEO uses the existing drawer. */
#mfn-header-template .mfn-header-menu > li.menu-item-home { display:none!important; }
#mfn-header-template .ulm-products-menu { position:relative!important; }
#mfn-header-template .ulm-products-menu > .sub-menu {
  display:none!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:8px!important;
  list-style:none!important;
  background:#fff!important;
  border:1px solid rgba(7,1,45,.1)!important;
  border-radius:16px!important;
  box-shadow:0 16px 40px rgba(7,1,45,.12)!important;
}
#mfn-header-template .ulm-products-menu.ulm-products-open > .sub-menu { display:block!important; }
#mfn-header-template .ulm-products-menu > .sub-menu > li {
  display:block!important;
  width:100%!important;
  margin:0!important;
}
#mfn-header-template .ulm-products-menu > .sub-menu > li > a {
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-height:46px!important;
  padding:10px 12px!important;
  color:#07012d!important;
  background:transparent!important;
  border-radius:10px!important;
  font-size:14px!important;
  font-weight:500!important;
  line-height:1.3!important;
  text-decoration:none!important;
}
#mfn-header-template .ulm-products-menu > .sub-menu > li > a:is(:hover,:focus-visible) {
  color:#0068ff!important;
  background:#edf4ff!important;
}
#mfn-header-template .ulm-products-menu > .sub-menu > li > a > .menu-item-helper,
#mfn-header-template .ulm-products-menu > .sub-menu > li > a > .menu-sub {
  display:none!important;
}
#mfn-header-template .ulm-products-menu > .sub-menu > li > a .label-wrapper {
  display:flex!important;
  flex:1 1 auto!important;
  align-items:center!important;
  min-width:0!important;
  justify-content:flex-start!important;
  text-align:left!important;
}
#mfn-header-template .ulm-products-menu > .sub-menu > li > a .menu-label {
  color:inherit!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:36px!important;
  border-radius:999px!important;
  background:#edeef3!important;
  white-space:nowrap!important;
  text-align:left!important;
}
#mfn-header-template .ulm-products-menu .ulm-product-logo {
  display:block!important;
  width:auto!important;
  height:32px!important;
  max-width:130px!important;
  object-fit:contain!important;
}
#mfn-header-template .ulm-products-menu .ulm-product-logo--traffic {
  height:auto!important;
  width:120px!important;
  filter:brightness(0) saturate(100%)!important;
}
#mfn-header-template .ulm-products-menu .ulm-product-logo--noort {
  transform:scale(1.6)!important;
}
#mfn-header-template .ulm-product-external-arrow {
  display:block!important;
  flex:0 0 16px!important;
  width:16px!important;
  height:16px!important;
  color:#0068ff!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-products-menu > .sub-menu {
  background:#1d1f2b!important;
  border-color:#363b4c!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-products-menu > .sub-menu > li > a { color:#f3f4f8!important; }
html[data-ulm-theme="dark"] #mfn-header-template .ulm-products-menu > .sub-menu > li > a:is(:hover,:focus-visible) {
  color:#76adff!important;
  background:#292c39!important;
}
html[data-ulm-theme="dark"] #mfn-header-template .ulm-product-external-arrow { color:#76adff!important; }
@media (min-width:1321px) {
  #mfn-header-template .mfn-header-menu > li.ulm-products-menu > .mfn-menu-link .menu-sub i {
    display:inline-block!important;
    transform-origin:center center!important;
    transition:transform .18s ease!important;
  }
  #mfn-header-template .mfn-header-menu > li.ulm-products-menu > .mfn-menu-link[aria-expanded="true"] .menu-sub i {
    transform:rotate(180deg)!important;
  }
  #mfn-header-template .mfn-header-menu > li > .mfn-menu-link {
    white-space:nowrap!important;
    font-weight:500!important;
  }
  #mfn-header-template .ulm-products-menu > .sub-menu {
    position:absolute!important;
    top:100%!important;
    left:0!important;
    width:220px!important;
    z-index:1000!important;
  }
  #mfn-header-template .ulm-ceo-menu-item > a.mfn-menu-link {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:42px!important;
    padding:0 20px!important;
    border:1px solid #0068ff!important;
    border-radius:999px!important;
    background:#0068ff!important;
    color:#fff!important;
    transition:background-color .2s ease,color .2s ease!important;
  }
  #mfn-header-template .ulm-ceo-menu-item > a.mfn-menu-link:is(:hover,:focus-visible) {
    background:#fff!important;
    color:#0068ff!important;
  }
  #mfn-header-template .ulm-ceo-menu-item > a .menu-label { color:inherit!important; }
}
@media (min-width:1321px) and (prefers-reduced-motion:reduce) {
  #mfn-header-template .mfn-header-menu > li.ulm-products-menu > .mfn-menu-link .menu-sub i {
    transition:none!important;
  }
}
@media (max-width:1320px) {
  #mfn-header-template .mfn-header-tmpl-menu-sidebar .ulm-products-menu > .sub-menu {
    position:static!important;
    width:100%!important;
    margin-top:0!important;
    box-shadow:none!important;
  }
  #mfn-header-template .mfn-header-tmpl-menu-sidebar .ulm-ceo-menu-item > a.mfn-menu-link {
    width:auto!important;
    min-height:48px!important;
    padding:10px 20px!important;
    border:1px solid #0068ff!important;
    border-radius:999px!important;
    background:#0068ff!important;
    color:#fff!important;
  }
  #mfn-header-template .mfn-header-tmpl-menu-sidebar .ulm-ceo-menu-item .menu-label { color:inherit!important; }
}

/* Keep a hovered option distinct from the selected category. */
@media (min-width:1321px) and (hover:hover) {
  html body #mfn-header-template .ulm-mega-category[aria-selected="false"]:hover {
    background:#fff!important;
    border-color:#0068ff!important;
    color:#07012d!important;
  }
  html[data-ulm-theme="dark"] body #mfn-header-template .ulm-mega-category[aria-selected="false"]:hover {
    background:#181c28!important;
    border-color:#76adff!important;
    color:#f3f4f8!important;
  }
}
