/* ========================================================================
   CONSISTENT NAVIGATION COMPONENT - BoardBuddy AI (3 Main Pages Only)
   ======================================================================== */

/* Navigation Base Styles */
.glass-nav {
  background: rgba(18, 18, 18, 0.90);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1030;
  animation: navSlideDown 0.8s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes navSlideDown {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.glass-nav:hover {
  background: rgba(18, 18, 18, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

/* Consistent Container Padding */
.glass-nav .container-fluid {
  padding: 16px 24px;
}

/* Brand Styles - Consistent Across All Pages */
.brand-text {
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.brand-text:hover {
  color: #00d4ff;
  transform: translateY(-1px);
  text-decoration: none;
}

.brand-icon {
  position: relative;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.brand-icon:hover {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.brand-icon i {
  font-size: 26px;
  color: white;
  z-index: 2;
  position: relative;
}

.ai-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: aiPulse 2.5s ease-in-out infinite;
}

@keyframes aiPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.2;
  }
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #00d4ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.8px;
  font-family: 'Inter', sans-serif;
}

/* Navigation Actions - Consistent Layout */
.nav-actions {
  animation: navItemsSlideIn 1s ease-out 0.3s both;
  display: flex;
  align-items: center;
  gap: 16px;
}

@keyframes navItemsSlideIn {
  0% {
    transform: translateX(60px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Main Navigation Buttons (Only 3 Pages) */
.btn-nav-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.btn-nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.btn-nav-item:active {
  transform: translateY(0);
}

/* Active Page State */
.btn-nav-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 60%;
  height: 3px;
  background: linear-gradient(135deg, #00d4ff 0%, #667eea 100%);
  border-radius: 3px;
  transform: translateX(-50%);
  animation: activeIndicator 0.6s ease-out;
}

@keyframes activeIndicator {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 60%;
    opacity: 1;
  }
}

/* Action Button (New Paper) - Distinct from Navigation */
.btn-nav-action {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  cursor: pointer;
  margin-left: 8px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-nav-action:hover {
  background: linear-gradient(135deg, #7c8fea 0%, #8659ba 100%);
  color: white;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.btn-nav-action:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-action-text {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.8s ease;
}

.btn-nav-action:hover .btn-action-shine {
  left: 100%;
}

/* Responsive Design */
@media (max-width: 992px) {
  .glass-nav .container-fluid {
    padding: 14px 20px;
  }
  
  .nav-actions {
    gap: 12px;
  }
  
  .btn-nav-item, .btn-nav-action {
    padding: 12px 18px;
    font-size: 0.9rem;
  }
  
  .brand-name {
    font-size: 1.3rem;
  }
  
  .brand-icon {
    width: 45px;
    height: 45px;
  }
  
  .brand-icon i {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .nav-actions {
    gap: 8px;
  }
  
  .btn-nav-item span,
  .btn-nav-action .btn-action-text span:not(.bi) {
    display: none;
  }
  
  .btn-nav-item, .btn-nav-action {
    padding: 10px 14px;
  }
  
  .btn-nav-item i {
    margin: 0;
  }
  
  .brand-name {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .glass-nav .container-fluid {
    padding: 12px 16px;
  }
  
  .nav-actions {
    gap: 6px;
  }
  
  .btn-nav-item, .btn-nav-action {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .brand-name {
    display: none;
  }
  
  .brand-icon {
    width: 40px;
    height: 40px;
  }
  
  .brand-icon i {
    font-size: 18px;
  }
}

/* Navigation Item Hover Effects */
.btn-nav-item::before,
.btn-nav-action::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.btn-nav-item:hover::before,
.btn-nav-action:hover::before {
  width: 120px;
  height: 120px;
}

/* Smooth page transitions */
.page-transition {
  animation: pageTransition 0.5s ease-out;
}

@keyframes pageTransition {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Scroll behavior for navigation - DISABLED to fix disconnected animation */
/*
.nav-hidden {
  opacity: 0.85;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
*/

/* Page Transition Effects */
.page-transition {
  opacity: 0.95;
  transition: opacity 0.15s ease-out;
}

/* Form Focus Enhancement for New Paper Action */
.form-focus-highlight {
  box-shadow: 
    0 0 0 3px rgba(0, 123, 255, 0.25),
    0 8px 32px rgba(0, 123, 255, 0.15) !important;
  border-color: #007bff !important;
  transform: translateY(-2px) !important;
  transition: all 0.3s ease !important;
}

/* Loading State for Navigation */
.navigation-loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}

.navigation-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}