/* Custom styles for the menu, replacing Tailwind classes */

/* Base styles for the navigation bar */
.navbar {
  background-color: #20a9a9;
  /* padding: 1rem 1.5rem; */
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  position: sticky;
  top: 0;
  z-index: 1000; /* Increased z-index to ensure it stays on top of all content */
}

.navbar-container {
  display: flex;
  /* Changed to flex-start to align content to the left */
  justify-content: flex-start;
  align-items: normal;
  max-width: 1280px;
  /* Removed margin: 0 auto; to align the container to the left */
  /* Added padding for spacing from the edge of the screen */
  padding: 0 1.5rem;
  /* Added gap for spacing between the logo and menu items */
  gap: 2rem;
}

/* Desktop navigation links and dropdowns */
.nav-links {
  display: none; /* Hidden by default on mobile */
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition-property: background-color, border-color, color;
  transition-duration: 300ms;
  font-family: "Inter", sans-serif;
  text-decoration: none;
  display: block;
  /* Added border for user control */
  border: 1px solid transparent;
  background-color: #20a9a9;
  font-size: 1rem;
}

.nav-link:hover {
  background-color: green;
  color: white;
  /* Example of border change on hover */
  border-color: green;
}

/* Dropdown menu for desktop */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  background-color: #ffffff;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  padding: 0.25rem 0;
  z-index: 100;
}

/* Show the dropdown content on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 0.5rem 1rem;
  color: #4a5568;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color 300ms, color 300ms;
  font-family: "Inter", sans-serif;
  background-color: #ffffff;
  font-size: 1rem;
}

.dropdown-content a:hover {
  background-color: #e2e8f0;
  color: #4a5568;
}

.dropdown-icon {
  margin-left: 0.5rem;
  transition: transform 300ms;
  color: white;
}

/* Rotate icon on hover */
.dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* Mobile-specific styles */
.mobile-menu-button {
  display: block;
}

.menu-toggle-button {
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.icon-menu {
  width: 2rem;
  height: 2rem;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  /* Align items to the left */
  align-items: flex-start;
  /* background-color: #1e40af; */
  margin-top: 0.25rem;
  border-radius: 0.375rem;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

.mobile-menu-open {
  display: flex;
  max-height: 500px;
}

.mobile-link {
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 0.375rem;
  transition-property: background-color, border-color, color;
  transition-duration: 300ms;
  font-family: "Inter", sans-serif;
  text-decoration: none;
  display: block;
  text-align: left;
  width: 100%;
  border: 1px solid transparent;
  background-color: #20a9a9;
  font-size: 1rem;
}

.mobile-link:hover {
  background-color: green;
  color: white;
  border-color: green;
}

/* Mobile dropdowns */
.dropdown-mobile {
  position: relative;
  width: 100%;
}

.dropdown-content-mobile {
  display: none;
  background-color: #ffffff;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
}

.dropdown-mobile.open .dropdown-content-mobile {
  display: block;
}

.dropdown-content-mobile a {
  display: block;
  padding: 0.25rem 1.5rem;
  color: #4a5568;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color 300ms, color 300ms;
  background-color: white;
  font-size: 1rem;
}

.dropdown-content-mobile a:hover {
  background-color: #e2e8f0;
  color: #4a5568;
}

.dropdown-mobile .dropbtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0.25rem 1rem;
  color: white;
  border-radius: 0.375rem;
  background-color: #20a9a9;
  font-size: 1rem;
}

.dropdown-mobile .dropbtn:hover {
  background-color: green;
  color: white;
  border-color: green;
}

.dropdown-mobile .dropdown-icon {
  transition: transform 300ms;
}

.dropdown-mobile.open .dropdown-icon {
  transform: rotate(180deg);
}

/* Media queries for responsiveness */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .mobile-menu-button {
    display: none;
  }
  .mobile-menu {
    display: none;
  }
}
