/**
 * Apex header: primary nav centered between logo and actions (desktop).
 * Grid uses equal side tracks (1fr auto 1fr) so the menu stays visually centered.
 */
@media (min-width: 1200px) {
  .header-1 .header-main--nav-center {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
  }

  .header-1 .header-main--nav-center .header-left {
    justify-self: start;
    gap: 0;
  }

  .header-1 .header-main--nav-center .header-nav-center {
    justify-self: center;
    overflow: visible;
  }

  .header-1 .header-main--nav-center .mega-menu-wrapper {
    overflow: visible;
  }

  .header-1 .header-main--nav-center .header-right {
    justify-self: end;
  }
}

@media (max-width: 1199px) {
  .header-1 .header-main--nav-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-1 .header-main--nav-center .header-nav-center {
    display: none;
  }
}

/* What we do — mega menu (template: .has-homemenu + .homemenu-items, extended with 4th column) */
.header-main .main-menu ul li .submenu.has-whatwedo-menu {
  width: 1040px;
  max-width: min(1040px, calc(100vw - 48px));
  padding: 28px 28px 20px;
  left: 50%;
  inset-inline-start: auto;
  right: auto;
  margin-left: 0;
  transform: scaleY(0) translateX(-50%) translateZ(100px);
  transform-origin: top center;
}

.header-main .main-menu ul li:hover > .submenu.has-whatwedo-menu {
  transform: scaleY(1) translateX(-50%) translateZ(0px);
}

@media (max-width: 1399px) {
  .header-main .main-menu ul li .submenu.has-whatwedo-menu {
    width: 960px;
    max-width: min(960px, calc(100vw - 48px));
  }
}

.header-main .main-menu ul li .has-whatwedo-menu .homemenu-items {
  align-items: flex-start;
  gap: 22px;
}

.header-main .main-menu ul li .has-whatwedo-menu .homemenu-items > a.homemenu {
  flex: 1 1 0;
  min-width: 0;
  color: inherit;
}

.header-main .main-menu ul li .has-whatwedo-menu .homemenu-items > a.homemenu:hover .homemenu-title {
  color: var(--theme-2);
}

.header-main .main-menu ul li .has-whatwedo-menu a.homemenu .homemenu-title {
  margin-top: 15px;
  margin-bottom: 0;
}

.header-main .main-menu ul li .has-whatwedo-menu .whatwedo-menu__links {
  flex: 0 0 200px;
  max-width: 220px;
  padding-top: 4px;
}

.header-main .main-menu ul li .has-whatwedo-menu .whatwedo-menu__links-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

.header-main .main-menu ul li .has-whatwedo-menu .whatwedo-menu__links-inner a {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--header);
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
  border: none;
}

.header-main .main-menu ul li .has-whatwedo-menu .whatwedo-menu__links-inner a:hover {
  color: var(--theme);
  margin-left: 0;
}

.header-main .main-menu ul li .has-whatwedo-menu .whatwedo-menu__links-inner a::before {
  display: none;
}
