/* Base Styles */
.navbar {
  background-color: #ffffff;
  position: relative;
  z-index: 1000;
  font-family: "Firacode", monospace;
}

button {
  font-family: "Firacode", monospace;
}

.navbar-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 4rem;
}

/* Logo Styles */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #333;
}

.logo {
  height: 40px;
  width: auto;
}

.logo-container h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}


.nav-menu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin: 0 0.5rem;
  position: relative;
}

.nav-menu li>a>p{
  margin: 0;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #ff8c00;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Enhanced Dropdown Styles */
.dropdown {
  position: relative;
  padding-bottom: 10px;
}

.dropdown > button {
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown > button::after {
  content: "▼";
  font-size: 0.6rem;
  transition: transform 0.3s ease;
}

.dropdown:hover > button,
.dropdown:focus-within > button {
  color: #ff8c00;
}

.dropdown:hover > button::after,
.dropdown:focus-within > button::after {
  transform: rotate(180deg); /* Full rotate for clearer indication */
}

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform-origin: top;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  padding: 6px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  width: 220px;
  max-height: 0; /* Start collapsed for animation */
  overflow: hidden;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scaleY(1); /* Scale up from top */
  max-height: 500px; /* Large enough to accommodate content */
}

.dropdown-menu li {
  list-style: none;
  width: 100%;
}

.dropdown-menu li a {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  color: #ff8c00;
}

.dropdown-menu li a p:first-child {
  margin: 0;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-menu li a .dropdown-menu-description {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  max-height: 0;
  overflow: hidden;
  font-size: 0.85rem;
  color: #777;
}

.dropdown-menu li a:hover .dropdown-menu-description {
  opacity: 1;
  visibility: visible;
  max-height: 100px;
}

/* Navigation Actions */
.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.login {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.login:hover {
  color: #ff8c00;
}

.signup {
  background-color: #ff8c00;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.signup:hover {
  background-color: #cc7000;
}

/* Hamburger Menu Styles */
.hamburger {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #333;
  transition: transform 0.3s ease;
}

.hamburger.active {
  transform: rotate(90deg);
}

/* Mobile Responsive */
@media (max-width: 1000px) {
  .navbar-container {
    padding: 0 1rem;
    position: relative;
  }

  /* Show hamburger and hide desktop nav */
  .hamburger {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 90%;
    background-color: #ffffff;
    padding: 0 1rem 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu ul {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-menu li > a > p {
    top: 0;
    margin: 24px 0;
  }

  /* Adjust dropdown for mobile */
  .dropdown {
    position: relative;
  }

  .dropdown > button {
    width: 100%;
    text-align: left;
    padding: 1rem;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    transition: background-color 0.2s ease;
  }

  .dropdown > button:hover {
    background-color: #f8f8f8;
  }

  .dropdown > button::after {
    content: "▼";
    font-size: 0.6rem;
    transition: transform 0.3s ease;
  }

  .dropdown.active > button::after {
    transform: rotate(180deg);
  }

  .dropdown-menu {
    position: relative;
    width: 100%;
    padding: 0;
    background-color: #f8f8f8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .dropdown.active .dropdown-menu {
    max-height: 500px;
  }

  .dropdown-menu li a {
    padding: 0.75rem 2rem;
    color: #666;
    transition: background-color 0.2s ease;
  }

  .dropdown-menu li a:hover {
    background-color: #fff;
    color: #ff8c00;
  }

  /* Hide descriptions on mobile */
  .dropdown-menu li a .dropdown-menu-description {
    display: none;
  }

  /* Hide nav actions on mobile */
  .nav-actions {
    display: none;
  }
}