.header {
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 6vh;
}

.nav {
  border-radius: 50px;
  gap: 0rem;
}

/* Removed old line animation styles */

.nav a {
  text-decoration: none;
}

.nav a:visited {
  text-decoration: none;
}

.nav a:link {
  text-decoration: none;
}

/* Radial gradient fade containers */
.gradient-container {
  border-radius: 100px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 0;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
}

.nav-item-about .gradient-container {
  background: radial-gradient(ellipse at center, rgba(39, 174, 96, 0.25) 0%, rgba(39, 174, 96, 0) 50%);
}

.nav-item-solutions .gradient-container {
  background: radial-gradient(ellipse at center, rgba(255, 191, 0, 0.25) 0%, rgba(255, 191, 0, 0) 50%);
}

.nav-item-events .gradient-container {
  background: radial-gradient(ellipse at center, rgba(255, 0, 149, 0.25) 0%, rgba(255, 0, 149, 0) 50%);
}

.nav-item-syncai .gradient-container {
  background: radial-gradient(ellipse at center, rgba(39, 174, 96, 0.25) 0%, rgba(39, 174, 96, 0) 50%);
}

.nav-link {
  z-index: 1;
  position: relative;
  font-family: 'Mona Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  font-stretch: expanded;
}

.nav-item:hover .gradient-container {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.nav-item.active .gradient-container {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.nav-item-home .gradient-container {
  background: radial-gradient(ellipse at center, rgba(39, 174, 96, 0.25) 0%, rgba(39, 174, 96, 0) 50%);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header {
    top: 20px !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100% - 20px) !important;
    padding: 0 !important;
    align-items: flex-start !important;
  }

  .desktop-nav {
    display: none !important;
  }

  .mobile-nav {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 62px !important;
    /* Fixed height for morph animation */
    background-color: #0E0E0E !important;
    border-radius: 50px !important;
    padding: 15px 20px !important;
    box-sizing: border-box !important;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1), border-radius 1s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
  }

  .mobile-top-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 32px !important;
    /* Fixed height for top bar to stabilize morph */
  }

  .mobile-menu-button {
    cursor: pointer !important;
    display: flex !important;
    width: 24px !important;
    height: 24px !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
  }

  .mobile-icon-menu {
    position: absolute !important;
    width: 24px !important;
    height: auto !important;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 1 !important;
  }

  .mobile-icon-close {
    position: absolute !important;
    width: 20px !important;
    /* Resize to match menu icon */
    height: auto !important;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #mobile-menu-toggle:checked~.mobile-nav .mobile-icon-menu {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #mobile-menu-toggle:checked~.mobile-nav .mobile-icon-close {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .mobile-logo-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .mobile-logo {
    width: auto !important;
    height: 2rem !important;
  }

  .mobile-spacer {
    width: 24px !important;
    height: 24px !important;
  }

  .mobile-menu-links {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-top: 40px !important;
    gap: 32px !important;
    /* Increased gap */
    align-items: center !important;
    /* Top Center alignment */
    opacity: 0 !important;
    transition: opacity 0.5s ease !important;
    transition-delay: 0s !important;
    pointer-events: none !important;
  }

  #mobile-menu-toggle:checked~.mobile-nav {
    border-radius: 30px !important;
    height: calc(100vh - 40px) !important;
    /* Equal margin top/bottom */
  }

  #mobile-menu-toggle:checked~.mobile-nav .mobile-menu-links {
    opacity: 1 !important;
    pointer-events: auto !important;
    transition-delay: 0.5s !important;
    /* Fade in list after expansion */
  }

  .mobile-menu-links .nav-item {
    width: 100% !important;
    justify-content: center !important;
    /* Top Center alignment */
  }
}