/* Modern Navigation Styles */
:root {
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-height: 80px;
  --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --menu-timing: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-text: #2d3748;
  --nav-text-hover: #4a5568;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --mobile-menu-bg: rgba(255, 255, 255, 0.98);
}

.modern-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--nav-shadow);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-wrapper {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styles */
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 1rem;
}

.nav-logo {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* Menu Toggle Button */
.menu-toggle {
  display: none;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--nav-text);
  border-radius: 4px;
  margin: 6px 0;
  transition: var(--menu-timing);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

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

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Nav Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1002;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mobile-menu-bg);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    z-index: 1001;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  .nav-item {
    margin: 1rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
  }

  .nav-links.active .nav-item {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger the animation of nav items */
  .nav-links.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active .nav-item:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active .nav-item:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active .nav-item:nth-child(4) { transition-delay: 0.4s; }
  .nav-links.active .nav-item:nth-child(5) { transition-delay: 0.5s; }

  .nav-link {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    width: 100%;
    text-align: center;
  }
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  list-style: none;
}

.nav-link {
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0.5rem 1rem;
  display: block;
}

.nav-link:hover,
.nav-link.active {
  color: var(--nav-text-hover);
}

.nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.nav-brand:hover .nav-logo img {
  transform: scale(1.1);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--nav-text);
  line-height: 1.2;
}

.brand-slogan {
  font-size: 0.875rem;
  color: var(--nav-text-hover);
  opacity: 0.8;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  width: 32px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 100;
}

.menu-toggle span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--nav-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 50%;
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(100%);
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 50%;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: var(--nav-bg);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transition: all var(--menu-timing);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

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

  .nav-item {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
  }

  .nav-links.active .nav-item {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-links.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active .nav-item:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active .nav-item:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active .nav-item:nth-child(4) { transition-delay: 0.4s; }
  .nav-links.active .nav-item:nth-child(5) { transition-delay: 0.5s; }

  .nav-link {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    display: block;
  }
}

/* Scroll Behavior */
.nav-hidden {
  transform: translateY(-100%);
}

/* Entrance Animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-item {
  animation: fadeInDown 0.5s ease forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }