/* Navigation Styles */

/* Basic Navigation Bar */
#main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f8f9fa; /* Light background */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Logo Styling */
.nav-logo img {
  height: 40px; /* Adjust as needed */
}

/* Desktop Menu */
.desktop-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.desktop-menu li {
  margin-left: 20px;
}

.desktop-menu a {
  text-decoration: none;
  color: #333; /* Dark text */
  font-weight: 500;
  transition: color 0.3s ease;
}

.desktop-menu a:hover {
  color: #007bff; /* Highlight color on hover */
}

/* Mobile Menu Toggle */
#mobile-menu-toggle {
  position: relative;
  z-index: 1001;
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#mobile-menu-toggle:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#mobile-menu-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 92, 138, 0.3);
}

/* Enhanced Hamburger Bars */
.bar {
  display: block;
  width: 28px;
  height: 3px;
  margin: 6px auto;
  background: linear-gradient(135deg, #343a40, #495057);
  border-radius: 3px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Enhanced Active State Animations */
#mobile-menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px) scale(1.2);
  background: linear-gradient(135deg, #2e5c8a, #4a6fdc);
  width: 32px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(46, 92, 138, 0.3);
}

#mobile-menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
  transform: scale(0) rotate(360deg);
}

#mobile-menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px) scale(1.2);
  background: linear-gradient(135deg, #2e5c8a, #4a6fdc);
  width: 32px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(46, 92, 138, 0.3);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%; /* Hidden off-screen */
  width: 80%;
  height: 100%;
  background-color: #fff;
  z-index: 1000;
  padding-top: 60px;
  transition: left 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
  left: 0; /* Slide in when active */
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu li {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.mobile-menu a {
  text-decoration: none;
  color: #333;
  font-size: 1.2em;
  display: block;
}

/* Enhanced Overlay with Beautiful Gradient */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(46, 92, 138, 0.3));
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Blur effect for main content when menu is open */
body.menu-open .main-content,
body.menu-open .main-header > *:not(#main-nav) {
  filter: blur(3px);
  transition: filter 0.3s ease;
}

/* Enhanced Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.nav-links li {
  margin-right: 2.5rem;
  position: relative;
}

.nav-links li:last-child {
  margin-right: 0;
}

.nav-links a {
  color: #343a40;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  position: relative;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 8px;
  overflow: hidden;
}

.nav-links a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, rgba(46, 92, 138, 0.1), rgba(74, 111, 220, 0.1));
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(135deg, #2e5c8a, #4a6fdc);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: #2e5c8a;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 92, 138, 0.2);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: 100%;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 80%;
}

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
  #mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    width: 85%;
    max-width: 350px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 0 0 0.5rem 0;
    width: 100%;
    opacity: 0;
    transform: translateX(-40px) translateY(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }

  .nav-links a {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    width: 100%;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: linear-gradient(135deg, rgba(46, 92, 138, 0.1), rgba(74, 111, 220, 0.1));
    border-color: rgba(46, 92, 138, 0.3);
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(46, 92, 138, 0.2);
  }

  .nav-links a::before {
    display: none;
  }

  .nav-links a::after {
    display: none;
  }

  /* Enhanced body blur when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  body.menu-open .main-content,
  body.menu-open .main-header > *:not(#main-nav) {
    filter: blur(4px);
    transition: filter 0.4s ease;
  }
}

/* Enhanced stagger animation delays */
.nav-links.active li:nth-child(1) {
  transition-delay: 0.1s;
}
.nav-links.active li:nth-child(2) {
  transition-delay: 0.18s;
}
.nav-links.active li:nth-child(3) {
  transition-delay: 0.26s;
}
.nav-links.active li:nth-child(4) {
  transition-delay: 0.34s;
}
.nav-links.active li:nth-child(5) {
  transition-delay: 0.42s;
}
.nav-links.active li:nth-child(6) {
  transition-delay: 0.5s;
}
.nav-links.active li:nth-child(7) {
  transition-delay: 0.58s;
}
.nav-links.active li:nth-child(8) {
  transition-delay: 0.66s;
}
.nav-links.active li:nth-child(9) {
  transition-delay: 0.74s;
}

/* Enhanced ripple effect animation */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced focus styles */
.nav-links a:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 92, 138, 0.3);
  background: linear-gradient(135deg, rgba(46, 92, 138, 0.1), rgba(74, 111, 220, 0.1));
}

/* Enhanced loading state */
.nav-links.loading li {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(1);
}
