@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --nav-blue: #0b6cff;
}

body {
  font-family: 'Poppins', sans-serif;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  padding: 20px 30px;
  background: transparent;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  position: fixed;
  top: 20px;
  left: 30px;
  z-index: 10001;
  display: flex;
  align-items: center;
  transition: all 0.4s ease;
  transform-origin: top left;
}

.logo img {
  height: 40px;
  transition: all 0.4s ease;
}

.logo.scrolled {
  top: 20px;
  left: 30px;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.132);
  backdrop-filter: blur(0.5px);
  border: 1.5px solid rgba(11,108,255,0.12);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  transform: scale(1.08);
}

.logo.scrolled img {
  height: 50px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 10001;
  transition: all 0.4s ease;
}

.nav-right.scrolled {
  top: 20px;
}

.lang-switch {
  display: flex;
  padding: 5px;
  border-radius: 20px;
}

.lang-switch span {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
}

.lang-switch .active {
  background: #fff;
  font-weight: bold;
}

.menu-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 10002;
  transition: all 0.4s ease;
  border: 2px solid transparent;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #333;
  transition: 0.3s;
}

.nav-right.scrolled .menu-toggle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--nav-blue);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.nav-right.scrolled .menu-toggle span {
  width: 24px;
  height: 2.5px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
}

nav {
  position: fixed;
  top: 20px;
  right: 90px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 52px;
  padding: 0 22px;
  border-radius: 5px;
  border: 1.5px solid rgba(11,108,255,0.45);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
  isolation: isolate;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    height 0.35s ease,
    padding 0.35s ease,
    gap 0.35s ease,
    border-radius 0.35s ease,
    box-shadow 0.35s ease,
    top 0.35s ease;
}

nav.scrolled {
  top: 20px;
  height: 62px;
  padding: 0 34px;
  gap: 22px;
  border-radius: 7px;
  border: 2px solid var(--nav-blue);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.14);
}

nav.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

nav:not(.active) {
  opacity: 0;
  transform: translateX(40px);
}

nav a {
  position: relative;
  overflow: hidden;
  z-index: 2;
  font-size: 14px;
  text-decoration: none;
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 12px;
  border-radius: 4px;
  transition:
    color 0.25s ease,
    transform 0.3s ease,
    background 0.25s ease,
    box-shadow 0.3s ease;
}

nav a::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: rgba(11,108,255,0.08);
  border-radius: 4px;
  transform: scale(0.7);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(.2,.8,.2,1),
    opacity 0.35s ease,
    background 0.35s ease;
  z-index: -1;
}

nav.scrolled a {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.2px;
}

nav a:hover::before {
  opacity: 1;
  transform: scale(1);
}

nav a:hover {
  background: rgba(11,108,255,0.08);
  color: var(--nav-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(11,108,255,0.08);
}

nav a.active {
  background: var(--nav-blue);
  color: #fff;
  transform: scale(1.03);
  padding: 0 18px;
  border-radius: 4px;
  box-shadow: 0 5px 14px rgba(11,108,255,0.25);
  animation: navBounce 0.45s cubic-bezier(.2,.8,.2,1);
}

nav a.active::before {
  opacity: 1;
  transform: scale(1);
  background: var(--nav-blue);
}

@keyframes navBounce {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.05); }
  100% { transform: scale(1.03); }
}

.dropdown-menu {
  margin-top: 12px;
}

nav.scrolled .dropdown-menu {
  margin-top: 12px;
}

.nav-right.active .lang-switch {
  transform: translateX(-200px);
}

@media (max-width: 768px) {

  .logo.logo-hide {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
  }

  nav {
    top: 80px;
    right: 20px;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    width: 160px;
    padding: 15px;
    border-radius: 5px;
    opacity: 0;
    transform: translateY(-10px);
  }

  nav.scrolled {
    top: 80px;
    height: auto;
    width: 170px;
    padding: 18px;
    transform: translateY(0) scale(1.03);
  }

  nav.active {
    opacity: 1;
    transform: translateY(0);
  }

  nav:not(.active) {
    opacity: 0;
    transform: translateY(-10px);
  }

  nav.scrolled.active {
    top: 95px;
  }

  nav a {
    width: 100%;
    justify-content: flex-start;
  }

  .dropdown-menu {
    margin-top: 14px;
  }

  .nav-right.active .lang-switch {
    transform: translateX(-120px);
  }

  .nav-right.scrolled {
    top: 20px;
  }
}

@media (min-width: 1024px) {
  .logo {
    left: 100px;
  }

  .nav-right {
    right: 100px;
  }

  nav {
    right: 180px;
    padding: 0 30px;
    gap: 20px;
  }

  nav.scrolled {
    right: 180px;
  }

  nav a {
    font-size: 16px;
  }

  .nav-right.active .lang-switch {
    transform: translateX(-260px);
  }
}

.doc-item a {
  text-decoration: none;
  color: inherit;
}

.doc-item a:hover,
.doc-item a:focus,
.doc-item a:active {
  text-decoration: none;
  color: inherit;
}