/* Base navigation */
nav {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 0.4rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(108, 99, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled state */
nav.scrolled {
  padding: 0.6rem 6%;
  background: rgba(10, 14, 39, 0.95);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  animation: logoFloat 3s ease-in-out infinite;
  transition: transform 0.4s ease-in-out;
  z-index: 1001;
}

.header-logo {
  height: 70px;
  width: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  background: rgba(0, 0, 0, 0.527);
  border-radius: 12px;
}

.logo:hover .header-logo {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 6px 15px rgba(99, 102, 241, 0.4));
}

/* Floating animation */
@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
  }
}

/* Navigation links */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  font-weight: 400;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  display: block;
}

.nav-links a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover::before {
  width: 100%;
}

.nav-links a:hover {
  color: var(--primary);
}

/* CTA button */
.nav-cta-wrapper {
  margin: 0;
}

.nav-cta {
  padding: 0.5rem 1.5rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.nav-cta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.nav-cta:hover::before {
  width: 300px;
  height: 300px;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(108, 99, 255, 0.5);
}

/* Hamburger menu (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hamburger active state */
.hamburger.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Overlay for mobile menu */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* Responsive media queries */
@media (max-width: 1024px) {
  .nav-links {
    gap: 2rem;
  }

  nav {
    padding: 1.5rem 3%;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 5%;
  }

  .header-logo {
    height: 50px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 280px;
    max-width: 80vw;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 6rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(108, 99, 255, 0.1);
    padding: 0;
  }

  .nav-links li:last-child {
    border-bottom: none;
    margin-top: auto;
  }

  .nav-links a {
    padding: 1.2rem 0;
    width: 100%;
    font-size: 1.1rem;
  }

  .nav-links a::before {
    display: none;
  }

  .nav-cta-wrapper {
    margin-top: auto;
    padding-top: 2rem;
  }

  .nav-cta {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .nav-links {
    width: 260px;
  }

  .header-logo {
    height: 45px;
  }
}
