.navbar {
  display: flex;
  position: sticky;
  top: 0;
  left: 0;
  align-items: center;
  justify-content: space-between;
  height: 110px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0 30px;
  z-index: 85;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 2em;
}

.navbar-right {
  display: flex;
  align-items: center;
}

.search-bar {
  position: relative;
  display: inline-block;
  margin-right: 20px;
}

.search-bar input {
  width: 400px;
  height: 50px;
  padding: 0 44px 0 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  font-size: 14px;
}

.search-bar .search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  width: 30px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-button {
  width: 120px;
  height: 50px;
  font-size: 16px;
  color: #fff;
  background-color: #be263b;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.profile {
  position: relative;
  display: none;
  /* Default hidden, shown when logged in */
}

.profile img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  cursor: pointer;
}

.overlay {
  position: absolute;
  top: 75px;
  right: -15px;
  width: 290px;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  display: none;
  z-index: 100;
}

.overlay.active {
  display: block;
}

.overlay .profile-info {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.overlay .profile-info img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  margin-right: 10px;
}

.overlay .profile-info .details {
  font-size: 14px;
  cursor: pointer;
}

.overlay .profile-info .details .name {
  font-weight: bold;
}

.overlay .menu {
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

.overlay .menu li {
  padding: 10px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.overlay .menu li:hover {
  background-color: #f0f0f0;
}

.overlay .menu li img {
  margin-right: 12px;
  width: 24px;
}

#profile-email {
  word-break: break-word;
}

/* Media Query for Smaller Screens */
@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }

  .search-bar input {
    width: 250px;
    padding: 0 36px 0 8px;
  }

  /* .navbar .logo img {
    width: 60px;
    height: 24px;
  } */

  .login-button {
    padding: 6px 10px;
    font-size: 16px;
  }

  .overlay .profile-info {
    padding: 10px;
  }
}

@media (max-width: 500px) {
  .navbar {
    padding: 0 10px;
    height: 90px;
  }

  .logo img {
    width: 30px;
  }

  .search-bar input {
    width: 180px;
    padding: 0 32px 0 8px;
    height: 45px;
  }

  /* .search-bar input {
    width: 10px;
  } */
  .login-button {
    width: 90px;
    height: 45px;
  }

  #sidebar-brand {
    display: none;
  }

  .profile img {
    width: 45px;
    height: 45px;
  }

  .login-button {
    padding: 6px 10px;
    font-size: 16px;
  }

  .overlay .profile-info {
    padding: 8px;
  }

  .overlay .profile-info img {
    width: 45px;
    height: 45px;
  }

  .overlay .menu li {
    padding: 8px 10px;
  }
}
