.navbar {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 20px;
   width: 100%;
   background-color: transparent;
   backdrop-filter: blur(6.5px);
   /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
   transition: all 0.3s ease;
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   -webkit-backface-visibility: hidden;
   backface-visibility: hidden;
   z-index: 1000;
   transform: translateZ(0);
   -webkit-transform: translateZ(0);
}

.navbar.scrolled {
   background-color: transparent;
   backdrop-filter: blur(6.5px);
   /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
   padding: 15px 20px;
}

.logo {
   font-size: 24px;
   font-weight: bold;
   z-index: 9999;
}

.logo-image {
   width: 100px;
   cursor: pointer;
   transition: transform 0.3s ease;
   filter: none;
}

.logo-image:hover {
   transform: scale(1.05);
}

.nav-links {
   list-style: none;
   display: flex;
   gap: 10px;
}

.nav-links li {
   display: inline-block;
   border-radius: 20px;
   padding: 10px 15px;
   margin: 0 5px;
   background-color: rgba(31, 43, 84, 0.1);
   backdrop-filter: blur(5px);
   transition: background-color 0.3s ease;
   position: relative;
   overflow: hidden;
}

.nav-links li a {
   font-family: var(--font-regular);
   font-weight: var(--font-weight-medium);
   color: white;
   text-decoration: none;
}

.navbar.scrolled .nav-links li {
   background-color: lightblue;
}

.nav-links li:hover {
   background-color: rgba(31, 43, 84, 0.2);
}

.navbar.scrolled .nav-links li:hover {
   background-color: #add8e6;
}

.hamburger {
   display: none;
   flex-direction: column;
   cursor: pointer;
   z-index: 10000;
}

.hamburger.active .line {
   background-color: var(--white);
}

.hamburger .line {
   width: 25px;
   height: 3px;
   background-color: var(--primary-color);
   margin: 4px 0px;
   transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active .line:nth-child(1) {
   transform: none;
}

.hamburger.active .line:nth-child(2) {
   opacity: 1;
}

.hamburger.active .line:nth-child(3) {
   transform: none;
}

@media (max-width: 768px) {
   .hamburger {
      display: flex;
   }

   .nav-links {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      width: 100%;
      height: 100vh;
      flex-direction: column;
      background-color: rgba(0, 0, 0, 0.95);
      justify-content: center;
      align-items: center;
      gap: 20px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
      z-index: 1500;
      backdrop-filter: blur(5px);
   }

   .nav-links.active {
      opacity: 1;
      pointer-events: all;
   }

   .nav-links li {
      width: 80%;
      max-width: 300px;
      text-align: center;
      margin: 5px 0;
      background-color: rgba(255, 255, 255, 0.15);
   }

   .nav-links li a {
      display: block;
      padding: 15px 20px;
      font-size: 1.1rem;
      color: var(--white);
   }

   .hamburger.active .line {
      background-color: var(--white);
   }

   .nav-links li:hover {
      background-color: rgba(255, 255, 255, 0.25);
   }

   .logo {
      position: relative;
      z-index: 2000;
   }
}

/* Add this new class for light background pages */
.navbar.light-bg {
   background-color: var(--primary-color);
}

.navbar.light-bg .nav-links li {
   background-color: rgba(255, 255, 255, 0.2);
}

.navbar.light-bg .nav-links li a {
   color: var(--white);
}

.navbar.light-bg .hamburger .line {
   background-color: var(--white);
}

/* Update the scrolled state for light background */
.navbar.light-bg.scrolled {
   background-color: var(--primary-color);
}

.navbar.light-bg.scrolled .nav-links li {
   background-color: rgba(255, 255, 255, 0.2);
}

.navbar.light-bg.scrolled .nav-links li a {
   color: var(--white);
}

/* Add styles for white logo */
.navbar.light-bg .logo-image {
   filter: brightness(0) invert(1);
}

/* Add this class for when mobile menu is open */
body.menu-open {
   overflow: hidden;
   position: fixed;
   width: 100%;
}
