/* ===== Enhanced Navbar Styles 2.0 ===== */
:root {
  --navbar-height: 74px;
  --primary-gradient: linear-gradient(135deg, #ff00ff, #9d4edd);
  --secondary-gradient: linear-gradient(45deg, rgba(255, 0, 255, 0.7), rgba(157, 78, 221, 0.7));
  --navbar-bg: rgba(22, 14, 32, 0.92);
  --btn-bg: rgba(157, 78, 221, 0.08);
  --btn-border: rgba(157, 78, 221, 0.15);
  --btn-hover-bg: rgba(157, 78, 221, 0.18);
  --btn-hover-border: rgba(157, 78, 221, 0.35);
  --active-btn-bg: rgba(157, 78, 221, 0.22);
  --active-btn-border: rgba(255, 0, 255, 0.4);
  --glow-color: rgba(255, 0, 255, 0.5);
}

/* Base navbar with frosted glass effect */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(157, 78, 221, 0.08);
  transition: all 0.3s ease;
}

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

/* Enhanced logo styling with subtle glow */
.logo {
  position: relative;
  z-index: 1001;
}

.logo h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  position: relative;
  filter: drop-shadow(0 0 8px rgba(157, 78, 221, 0.2));
}

.logo h2::after {
  content: 'CCM';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  -webkit-text-fill-color: transparent;
  filter: blur(8px);
  opacity: 0.6;
  z-index: -1;
}

/* Nav links container */
.nav-links-container {
  display: flex;
  align-items: center;
}

/* Modern nav buttons - Desktop */
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.1rem;
}

.nav-links li {
  margin: 0;
  padding: 0;
  position: relative;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.65rem 1.3rem;
  border-radius: 12px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
}

/* Animated hover effect */
.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.05), 
    transparent
  );
  transition: transform 0.5s ease;
}

.nav-links a:hover::before {
  transform: translateX(200%);
}

.nav-links a:hover {
  background: var(--btn-hover-bg);
  border-color: var(--btn-hover-border);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(157, 78, 221, 0.15);
}

/* Active state with glow */
.nav-links a.active {
  background: var(--active-btn-bg);
  border: 1px solid var(--active-btn-border);
  box-shadow: 0 0 12px var(--glow-color);
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 3px;
  opacity: 0.7;
}

/* Enhanced hamburger button */
.hamburger {
  display: none;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 12px;
  width: 46px;
  height: 46px;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: var(--btn-hover-bg);
  border-color: var(--btn-hover-border);
  box-shadow: 0 0 15px rgba(157, 78, 221, 0.2);
  transform: translateY(-2px);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin: 5px auto;
  transition: transform 0.4s ease, opacity 0.3s ease;
  border-radius: 4px;
}

.hamburger.active {
  background: var(--active-btn-bg);
  border-color: var(--active-btn-border);
  box-shadow: 0 0 15px var(--glow-color);
}

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

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

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

/* ===== Enhanced Mobile Styles ===== */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1.5rem;
  }
  
  .hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(22, 14, 32, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    gap: 1.5rem;
    padding: 5rem 0;
  }
  
  .nav-links.active {
    left: 0;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  }
  
  /* Animated mobile menu items */
  .nav-links li {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 80%;
    max-width: 280px;
    text-align: center;
  }
  
  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Staggered animation */
  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
  
  /* Enhanced mobile buttons */
  .nav-links a {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.15rem;
    border-radius: 15px;
    background: rgba(157, 78, 221, 0.1);
    border: 1px solid rgba(157, 78, 221, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
  }
  
  .nav-links a::before {
    background: linear-gradient(90deg, 
      transparent, 
      rgba(255, 255, 255, 0.1), 
      transparent
    );
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    transform: translateY(-4px);
    background: rgba(157, 78, 221, 0.2);
    box-shadow: 0 10px 25px rgba(157, 78, 221, 0.3);
  }
  
  /* Mobile decoration */
  .nav-links::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    z-index: -1;
  }
  
  .nav-links::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 10%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    z-index: -1;
  }
}

/* ===== Large Screens Enhancement ===== */
@media (min-width: 992px) {
  .navbar-container {
    padding: 0 2.5rem;
  }
  
  .nav-links {
    gap: 1.3rem;
  }
  
  .nav-links a {
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
  }
}

@media (min-width: 1200px) {
  .navbar-container {
    max-width: 1140px;
  }
  
  /* Add subtle floating animation to logo on larger screens */
  .logo h2 {
    animation: float 5s ease-in-out infinite;
  }
  
  @keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
  }
}

@media (min-width: 1400px) {
  .navbar-container {
    max-width: 1320px;
  }
  
  .nav-links {
    gap: 1.75rem;
  }
  
  .nav-links a {
    padding: 0.75rem 1.5rem;
  }
}

/* Fix main content padding */
main {
  padding-top: var(--navbar-height);
  margin-top: 0;
}

/* ===== Enhanced Menu overlay effects ===== */
body.menu-open {
  overflow: hidden;
}

/* Improved accessibility with visual focus indicators */
.hamburger:focus,
.nav-links a:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.5);
}

/* Custom scrollbar for menu on overflow */
.nav-links {
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 78, 221, 0.5) rgba(22, 14, 32, 0.2);
}

.nav-links::-webkit-scrollbar {
  width: 5px;
}

.nav-links::-webkit-scrollbar-track {
  background: rgba(22, 14, 32, 0.2);
  border-radius: 5px;
}

.nav-links::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff00ff, #9d4edd);
  border-radius: 5px;
}

/* Navbar scroll behavior */
.navbar.scrolled {
  height: 66px;
  background: rgba(22, 14, 32, 0.98);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

/* Nice little scroll top indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary-gradient);
  z-index: 1002;
  width: 0%;
  transition: width 0.1s ease;
}