.nav {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 2rem));
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  transform: translateX(-50%);
  border-radius: 14px;
  background: #fff;
  color: #14122b;
}

.sv-hero > #navbar-container + .sv-hg {
  padding-top: clamp(6rem, 9vw, 7rem) !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo i {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: conic-gradient(from 200deg, #4a1fe0, #b6ff3c, #4a1fe0);
}

.links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.95rem;
}

.links a {
  color: inherit;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  cursor: pointer;
  list-style: none;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  width: 6px;
  height: 6px;
  transform: translateY(-2px) rotate(45deg);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transition: transform 0.2s ease;
}

.nav-dropdown[open] summary::after {
  transform: translateY(1px) rotate(225deg);
}

.nav-dropdown summary:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.industry-menu {
  position: absolute;
  top: calc(100% + 1.5rem);
  left: 50%;
  z-index: 51;
  min-width: 180px;
  padding: 0.4rem;
  transform: translateX(-50%);
  border: 1px solid rgba(20, 18, 43, 0.1);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 18, 43, 0.16);
}

.industry-menu::before,
.service-menu::before {
  position: absolute;
  top: -1.5rem;
  right: 0;
  left: 0;
  height: 1.5rem;
  content: "";
}

.industry-menu a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
}

.industry-menu a:hover {
  background: #f2f0fb;
  text-decoration: none;
}

.service-dropdown {
  position: static;
}

.service-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  z-index: 51;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1080px, calc(100vw - 2rem));
  padding: 1rem;
  transform: translateX(-50%);
  border: 1px solid rgba(20, 18, 43, 0.1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(20, 18, 43, 0.2);
  color: #14122b;
}

.service-group {
  min-width: 0;
  padding: 0.8rem 1rem;
}

.service-group + .service-group {
  border-left: 1px solid rgba(20, 18, 43, 0.1);
}

.service-group h3 {
  margin: 0 0 0.5rem;
  color: #14122b;
  font-size: 1rem;
  line-height: 1.3;
}

.service-group p {
  min-height: 3.2em;
  margin: 0 0 0.9rem;
  color: #68667a;
  font-size: 0.82rem;
  line-height: 1.5;
}

.service-items {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.service-items a {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: #3d3b51;
  font-size: 0.8rem;
  line-height: 1.4;
  text-decoration: none;
}

.service-items a span {
  flex: none;
  color: #6554c0;
}

.service-items a:hover {
  color: #0b1a66;
  text-decoration: none;
}

.service-explore {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(20, 18, 43, 0.1);
  color: #0b1a66;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.service-explore span {
  flex: none;
  transition: transform 0.2s ease;
}

.service-explore:hover span {
  transform: translateX(3px);
}

.nav-cta {
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  background: #14122b;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-toggle {
  display: none;
}

@media (max-width: 1000px) {
  .service-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-group:nth-child(3) {
    border-top: 1px solid rgba(20, 18, 43, 0.1);
    border-left: 0;
  }

  .service-group:nth-child(4) {
    border-top: 1px solid rgba(20, 18, 43, 0.1);
  }
}

@media (max-width: 760px) {
  .sv-hero > #navbar-container + .sv-hg {
    padding-top: 5rem !important;
  }

  .nav {
    top: 0.5rem;
    flex-wrap: wrap;
    width: calc(100% - 1rem);
    gap: 0.4rem;
    padding: 0.45rem 0.55rem;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .logo {
    gap: 0.4rem;
    font-size: 1.05rem;
  }

  .nav-toggle {
    display: grid;
    flex: none;
    place-content: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(20, 18, 43, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #14122b;
    cursor: pointer;
    order: 3;
  }

  .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav.mobile-open .nav-toggle span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .nav.mobile-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav.mobile-open .nav-toggle span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .links {
    display: none;
    flex: 0 0 100%;
    flex-direction: column;
    gap: 0;
    order: 4;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(20, 18, 43, 0.1);
  }

  .nav.mobile-open .links {
    display: flex;
  }

  .links > a:not(.service-explore),
  .links > .nav-dropdown {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(20, 18, 43, 0.08);
  }

  .nav-dropdown summary {
    justify-content: space-between;
    min-height: 24px;
  }

  .industry-menu,
  .service-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    max-height: 48vh;
    margin-top: 0.55rem;
    padding: 0.45rem;
    overflow: auto;
    transform: none;
    border: 1px solid rgba(20, 18, 43, 0.1);
    border-radius: 8px;
    box-shadow: none;
  }

  .nav-dropdown[open] > .industry-menu {
    display: block;
  }

  .nav-dropdown[open] > .service-menu {
    display: grid;
    grid-template-columns: 1fr;
  }

  .service-group,
  .service-group:nth-child(n) {
    padding: 0.8rem 0.5rem;
    border-top: 0;
    border-left: 0;
  }

  .service-group + .service-group {
    border-top: 1px solid rgba(20, 18, 43, 0.1);
  }

  .service-group p {
    min-height: 0;
  }

  .nav-cta {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    order: 2;
    min-height: 40px;
    margin: 0;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .nav-toggle:focus-visible {
    outline: 3px solid var(--lime);
    outline-offset: 2px;
  }
}