.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 70px;
  flex-wrap: nowrap;
}

.nav-item {
  height: 100%;
  position: relative;
}

.nav-item > a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  font-size: 13px;
  color: #d8dff7;
  white-space: nowrap;
}

.nav-item-language {
  margin-left: 8px;
}

.nav-item-language .language-switcher {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-item-has-children > a::after {
  content: '';
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid;
}

.nav-item-corporate > a::after {
  border-top-color: #52d7ff;
}

.nav-item-products > a::after {
  border-top-color: #7780ff;
}

.nav-item-solutions > a::after {
  border-top-color: #9e72ff;
}

.nav-item > a > span::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 2px;
  background: linear-gradient(90deg, #50d7ff 0%, #6a7dff 45%, #8a69ff 80%, #b37dff 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav-item:hover > a > span::after,
.nav-item:focus-within > a > span::after {
  transform: scaleX(1);
}

.mega-menu {
  position: fixed;
  left: 0;
  right: 0;
  top: 70px;
  padding: 10px 0 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s ease;
  background:
    linear-gradient(180deg, rgba(5, 11, 25, 0.98), rgba(5, 12, 26, 0.96)),
    radial-gradient(circle at top center, rgba(122, 92, 255, 0.18), transparent 34%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.mega-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu,
.nav-item.open .mega-menu,
.mega-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-menu-inner {
  width: min(1170px, calc(100% - 40px));
  margin: 0 auto;
}

.corporate-grid,
.products-grid,
.solutions-grid {
  display: grid;
  gap: 10px;
}

.corporate-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.products-grid,
.solutions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.corporate-link-card,
.product-link-card,
.solution-link-card {
  position: relative;
  min-height: 0;
  padding: 14px 16px;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(12, 18, 34, 0.98), rgba(7, 12, 24, 0.98));
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mega-menu-footer {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mega-menu-footer-inner {
  width: min(1170px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.mega-menu-footer-inner a {
  font-size: 12px;
  color: #a7b0cf;
}

.mega-menu-footer-inner a span {
  position: relative;
}

.mega-menu-footer-inner a span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: rgba(159, 126, 255, 0.7);
  transition: width 0.24s ease;
}

.mega-menu-footer-inner a:hover span::after {
  width: 100%;
}

.corporate-link-card::before,
.product-link-card::before,
.solution-link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
}

.corporate-link-card:hover::before,
.product-link-card:hover::before,
.solution-link-card:hover::before {
  transform: translateX(120%);
}

.corporate-link-card img,
.solution-link-card img {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(49%) sepia(15%) saturate(1103%) hue-rotate(221deg) brightness(85%) contrast(88%);
  opacity: 0.96;
}

.product-link-card img {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.corporate-link-card span,
.product-copy strong,
.solution-link-card strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.corporate-link-card small,
.product-copy small,
.solution-link-card small {
  display: block;
  margin-top: 6px;
  line-height: 1.6;
  color: var(--muted);
}

.product-copy strong {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 600;
  color: #bbb;
}

.product-copy small {
  font-size: 12px;
  color: #848484;
}
