:root {
  --nav-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.96) 100%);
  --nav-border: rgba(16, 33, 61, 0.08);
  --nav-text: #101423;
  --nav-muted: #5d667a;
  --nav-accent: #0078ff;
  --nav-accent-strong: #005fd4;
  --nav-accent-2: #16c7b8;
  --nav-accent-3: #3bbdf6;
  --nav-surface: rgba(59, 189, 246, 0.08);
  --nav-surface-strong: linear-gradient(135deg, rgba(59, 189, 246, 0.12), rgba(22, 199, 184, 0.1));
  --nav-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  --nav-shadow-strong: 0 22px 52px rgba(15, 23, 42, 0.16);
  --nav-radius: 18px;
  --nav-radius-sm: 14px;
  --nav-height: 64px;
  --nav-max-width: 1520px;
  --logo-width: 136px;
  --logo-height: 53px;
}

body.nav-open {
  overflow: hidden;
  overscroll-behavior: contain;
}

header.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1200;
  background:
    linear-gradient(90deg, rgba(59, 189, 246, 0.28), rgba(0, 120, 255, 0.2), rgba(22, 199, 184, 0.24)) top / 100% 2px no-repeat,
    var(--nav-bg);
  border-bottom: 1px solid rgba(16, 20, 35, 0.06);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  overflow: visible;
}

.nav-container {
  width: 100%;
}

.nav-sub-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 48px);
  width: min(100%, var(--nav-max-width));
  min-height: var(--nav-height);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 34px);
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 0 var(--logo-width);
  min-width: 0;
}

.logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--logo-width);
  height: var(--logo-height);
  line-height: 0;
  text-decoration: none;
  transform: translateY(1px);
}

header.site-header .nav-sub-container .logo img,
header.site-header .nav-sub-container .logo .company-logo {
  display: block;
  width: var(--logo-width);
  height: auto;
  max-height: var(--logo-height);
  max-width: var(--logo-width);
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
  animation: none;
  transform: none;
  transition: transform 0.25s ease, filter 0.25s ease;
}

header.site-header .nav-sub-container .logo img:hover {
  transform: translateY(-1px) scale(1.015);
  filter: saturate(1.03);
  box-shadow: none;
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav-links > li {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-links > li > a,
.dropbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--nav-text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.nav-links > li > a::after,
.dropbtn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nav-accent), var(--nav-accent-3));
  opacity: 0;
  transform: translateX(-50%);
  transition: width 0.25s ease, opacity 0.25s ease;
}

.nav-links > li > a:hover,
.nav-links > li > a:focus-visible,
.dropbtn:hover,
.dropbtn:focus-visible {
  color: var(--nav-accent-strong);
  background: linear-gradient(135deg, rgba(59, 189, 246, 0.1), rgba(22, 199, 184, 0.08));
  border-color: rgba(0, 120, 255, 0.14);
  box-shadow: 0 10px 22px rgba(0, 120, 255, 0.08);
  transform: translateY(-1px);
}

.nav-links > li > a:hover::after,
.nav-links > li > a:focus-visible::after,
.nav-links > li > a.is-active::after,
.nav-links > li > a[aria-current="page"]::after,
.dropbtn:hover::after,
.dropbtn:focus-visible::after,
.dropbtn.is-active::after {
  width: calc(100% - 24px);
  opacity: 1;
}

.nav-links > li > a.is-active,
.nav-links > li > a[aria-current="page"],
.dropbtn.is-active {
  color: var(--nav-accent-strong);
  background: var(--nav-surface-strong);
  border-color: rgba(0, 120, 255, 0.22);
  box-shadow: 0 8px 20px rgba(0, 120, 255, 0.1);
}

.nav-links > li > a:focus-visible,
.dropbtn:focus-visible,
.hamburger:focus-visible {
  outline: 2px solid rgba(59, 189, 246, 0.35);
  outline-offset: 3px;
}

.dropdown {
  position: relative;
}

.dropbtn {
  background: transparent;
}

.dropbtn .caret {
  display: inline-block;
  font-size: 0.8em;
  line-height: 1;
  transition: transform 0.25s ease;
}

.dropdown.open > .dropbtn .caret {
  transform: rotate(180deg);
}

.dropdown-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 300px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--nav-border);
  border-radius: var(--nav-radius);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: var(--nav-shadow-strong);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  z-index: 1300;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--nav-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible,
.dropdown-menu a.is-active,
.dropdown-menu a[aria-current="page"] {
  color: var(--nav-accent-strong);
  background: linear-gradient(135deg, rgba(59, 189, 246, 0.08), rgba(22, 199, 184, 0.06));
  transform: translateX(3px);
}

@media (hover: hover) and (min-width: 901px) {
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu,
  .dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
  }
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(59, 189, 246, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 189, 246, 0.08), rgba(22, 199, 184, 0.06));
  color: var(--nav-text);
  cursor: pointer;
  flex: 0 0 auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.hamburger:hover,
.hamburger:focus-visible {
  background: linear-gradient(135deg, rgba(59, 189, 246, 0.14), rgba(22, 199, 184, 0.1));
  border-color: rgba(59, 189, 246, 0.3);
  color: var(--nav-accent-strong);
  box-shadow: 0 10px 24px rgba(59, 189, 246, 0.14);
  transform: translateY(-1px);
}

.hamburger-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 48, 0.42);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  z-index: 1190;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

body.nav-open .nav-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0s;
}

@media (max-width: 900px) {
  :root {
    --nav-height: 58px;
    --logo-width: 118px;
    --logo-height: 46px;
  }

  .nav-sub-container {
    padding: 0 16px;
  }

  .hamburger {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--nav-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--nav-shadow-strong);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.985);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 1225;
    max-height: calc(100vh - 76px);
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nav-links.active,
  body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
  }

  .nav-links > li {
    width: 100%;
  }

  .nav-links > li > a,
  .dropbtn {
    width: 100%;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(59, 189, 246, 0.05);
    border: 1px solid rgba(59, 189, 246, 0.08);
  }

  .nav-links > li > a:hover,
  .nav-links > li > a:focus-visible,
  .dropbtn:hover,
  .dropbtn:focus-visible {
    transform: none;
    background: rgba(59, 189, 246, 0.08);
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease, margin 0.25s ease, visibility 0s linear 0.25s;
    max-height: 0;
    overflow: hidden;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .dropdown.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 520px;
    margin-top: 6px;
    padding: 6px 0 0;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease, margin 0.25s ease, visibility 0s;
  }

  .dropdown-menu a {
    padding: 12px 16px 12px 30px;
    background: rgba(59, 189, 246, 0.04);
    border-radius: 12px;
    font-size: 14px;
  }

  .dropdown-menu a:hover,
  .dropdown-menu a:focus-visible,
  .dropdown-menu a.is-active,
  .dropdown-menu a[aria-current="page"] {
    transform: none;
  }

  .dropdown-menu li + li {
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-height: 56px;
    --logo-width: 108px;
    --logo-height: 42px;
  }

  .nav-sub-container {
    padding: 0 12px;
  }

  .nav-links {
    left: 10px;
    right: 10px;
    width: auto;
  }

  .nav-links > li > a,
  .dropbtn {
    padding: 10px 12px;
  }

  .dropdown-menu a {
    padding-left: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  header.site-header .nav-sub-container .logo img,
  .nav-links > li > a,
  .dropbtn,
  .dropdown-menu,
  .hamburger,
  .nav-backdrop,
  .dropbtn .caret {
    animation: none !important;
    transition: none !important;
  }
}
