/*
Name: Aashis rawal
Student ID: 11211
University ID: 24071214
*/

*{
  box-sizing: border-box;
}

/* Navbar bar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 2000;

  display: flex;
  align-items: center;
  padding: 6px 30px;

  background: rgba(236, 232, 232, 0.8);
}

/* Logo area */
.nav-left {
  display: flex;
  align-items: center;
}

/* Logo image */
.nav-logo {
  width: 110px;
  height: auto;
}

/* Search center */
.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Search form */
.nav-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Search input */
.nav-search input {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #ccc;
  font-size: 13px;
  outline: none;
  width: 180px;
}

/* Input focus */
.nav-search input:focus {
  border-color: #2a5298;
}

/* Search button */
.nav-search button {
  padding: 6px 12px;
  border-radius: 16px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  background: #2a5298;
  color: white;
}

/* Button hover */
.nav-search button:hover {
  background: #1e3c72;
}

/* Right menu */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Page links */
.pages {
  text-decoration: none;
  font-size: 14px;
  color: black;
  font-weight: 600;
}

.pages:hover {
  color: #1e3c72;
}

/* Login button */
.login-link {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Login icon */
.login-img {
  width: 24px;
  height: 24px;
}

/* User menu */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* Avatar circle */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ff9800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

/* Dropdown menu */
.dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  min-width: 150px;
  border-radius: 8px;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);

  background: rgba(236, 232, 232, 0.95);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;

  transition: all 0.2s ease;
}

/* Dropdown open */
.dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown links */
.dropdown a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: black;
  font-weight: 600;
}

/* Link hover */
.dropdown a:hover {
  background: #f2f2f2;
}

/*
   MOBILE NAVBAR (HAMBURGER)
*/

/* Hide hamburger on desktop */
.nav-toggle{
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  margin-left: 10px;
}

/* Mobile layout */
@media (max-width: 600px){

  .nav{
    flex-wrap: nowrap;
    height: 60px;
    padding: 6px 14px;
  }

  .nav-toggle{
    display: block;
    margin-left: 10px;
  }

  .nav-center{
    flex: 1;
    width: auto;
    margin-top: 0;
  }

  .nav-search input{
    width: 140px;
    font-size: 16px;
  }

  .nav-right{
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    width: 100%;

    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;

    background: rgba(236, 232, 232, 0.95);
  }

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

  .pages{
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
  }

  .dropdown{
    position: static;
    width: 100%;
    margin-top: 10px;
  }
}

