.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2c6e49;
  padding: 10px 30px;
  color: white;
  font-family: "Times New Roman", Times, serif;
  line-height: 1;
  /* cải thiện hiển thị */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
  font-size: 20px;
  font-weight: bold;
}

.branding-icon {
  width: 40px;
  height: 40px;
}

.branding-text {
  font-weight: bold;
  font-size: 18px;
}

.navbar .menu {
  display: flex;
  gap: 30px;
}

.navbar .menu a {
  font-size: 18px;
  font-weight: bold;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.navbar .menu a:hover {
  color: #a8e063;
}
.login-icon {
  width: 20px;
  height: 20px;
}
/*  thực hiện để cải thiện responsive design cho website */

/* Hamburger menu icon */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile styles */
@media (max-width: 768px) {
  .navbar {
    padding: 10px 15px;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    text-align: left;
    justify-content: space-between;
  }

  .menu-toggle {
    display: flex;
    order: 1;
    margin-right: auto;
  }

  .navbar .menu {
    display: none;
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    background-color: #2c6e49;
    flex-direction: column;
    padding: 60px 20px 20px;
    gap: 15px;
    z-index: 1000;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }

  .navbar .menu.active {
    display: flex;
    left: 0;
  }

  .navbar .menu a {
    font-size: 16px;
    padding: 10px 0;
    display: block;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar .menu a:last-child {
    border-bottom: none;
  }

  /* Animation for menu toggle */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Overlay when menu is open */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .menu-overlay.active {
    display: block;
  }

  .branding-text {
    font-size: 16px;
  }

  .branding-icon {
    width: 30px;
    height: 30px;
  }

  .branding-container {
    flex-shrink: 0;
    order: 2;
    margin-left: auto;
    margin-right: auto;
  }

  /* .tagline {
    display: none;
  } */

  .login-link {
    order: 3;
    margin-left: auto;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar .menu {
    gap: 20px;
  }

  .navbar .menu a {
    font-size: 16px;
  }
}

/* Desktop styles */
@media (min-width: 1025px) {
  .navbar {
    justify-content: flex-start;
    gap: 60px;
  }

  .navbar {
    justify-content: flex-start; /* Align items to the start */
    align-items: center; /* Ensure vertical alignment */
    padding: 10px 30px; /* Match default padding */
  }

  .navbar .menu {
    margin: 0 auto; /* Center the menu and push login to the right */
    gap: 30px;
  }

  .navbar .menu a {
    font-size: 18px;
  }

  .branding-container {
    flex-shrink: 0;
  }
  .login-icon {
    width: 20px;
    height: 20px;
  }
}
