/* ============================================
   THE VISITOR'S GUIDE - Nav Active States
   ============================================ */

/* Base hover effects for all nav links */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Underline animation for regular nav links */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand-gradient);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Active state for regular nav links */
.nav-link.active {
  color: var(--brand-red);
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
  height: 3px;
  animation: activeGlow 2s ease-in-out infinite;
}

@keyframes activeGlow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 2px 12px rgba(255, 107, 107, 0.5);
  }
}

/* Special active state for Kickstarter */
.nav-kickstarter.active {
  background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100% !important;
  color: var(--brand-red);
  animation: kickstarterActive 3s ease-in-out infinite;
}

@keyframes kickstarterActive {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(255, 107, 107, 0.4));
  }
  25% {
    filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
  }
  75% {
    filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.4));
  }
}

.nav-kickstarter.active::before {
  border-color: var(--brand-gold);
  width: 100%;
  height: 100%;
}

.nav-kickstarter.active::after {
  animation: livePulse 1s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    transform: scale(1);
    background: linear-gradient(135deg, var(--brand-red), var(--brand-gold));
  }
  50% {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--brand-gold), var(--brand-red));
  }
}

/* Pre-order button active state */
.nav-preorder.active {
  background: var(--brand-gradient);
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
}

/* Mobile menu active states */
@media (max-width: 768px) {
  .nav-menu li.active {
    position: relative;
  }
  
  .nav-menu li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--brand-gradient);
    border-radius: 0 2px 2px 0;
    animation: mobileActiveBar 2s ease-in-out infinite;
  }
  
  @keyframes mobileActiveBar {
    0%, 100% {
      height: 60%;
      opacity: 1;
    }
    50% {
      height: 80%;
      opacity: 0.8;
    }
  }
  
  .nav-link.active {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.1) 0%, transparent 100%);
    padding-left: 1.5rem;
  }
  
  .nav-kickstarter.active {
    background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100% !important;
    box-shadow: inset 0 0 20px rgba(255, 107, 107, 0.1);
  }
}

/* Scroll indicator for active section */
.nav-container.scrolled .nav-link.active {
  position: relative;
}

.nav-container.scrolled .nav-link.active::before {
  content: '•';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-red);
  font-size: 1.2rem;
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translateY(-50%) scale(1.3);
  }
}

/* Dark mode adjustments */
[data-theme="dark"] .nav-link.active {
  color: var(--brand-gold);
}

[data-theme="dark"] .nav-link.active::after {
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-red));
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

[data-theme="dark"] .nav-kickstarter.active {
  color: var(--brand-gold);
  animation: kickstarterActiveDark 3s ease-in-out infinite;
}

@keyframes kickstarterActiveDark {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255, 107, 107, 0.5));
  }
}

/* Hover ripple effect */
.nav-link {
  position: relative;
  overflow: hidden;
}

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

.nav-link:hover::before {
  width: 100px;
  height: 100px;
}

/* Special gradient text effect on hover */
.nav-link:hover {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Floating animation for active items */
.nav-menu li.active .nav-link,
.nav-menu li.active .nav-kickstarter {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}