/* HEADER */
header {
  background-color: #ffffff;
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* NAVBAR LAYOUT */
.navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

/* LOGO AND TITLE */
.navbar-left {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.navbar-left img {
  height: 50px;
  object-fit: contain;
}

/* HORIZONTAL LINE (BELOW NAVBAR) */
.navbar::after {
  content: '';
  display: block;
  width: 100%;
  max-width: 1280px;
  height: 1px;
  background-color: #e0e0e0;
  margin: 0.75rem 0;
}

/* CENTER NAV LINKS */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  justify-content: center;
}

.navbar-links a {
  text-decoration: none;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.navbar-links a:hover {
  color: #4a4a4a;
}

/* LOGIN & REGISTER BUTTON WRAPPER */
#auth-sensitive-nav {
  display: flex;
  gap: 1rem;
  min-width: 160px;
  height: 40px;
  align-items: center;
  position: absolute;
  right: 0;
  top: 1rem;
}

/* LOGIN & REGISTER BUTTONS */
.login-btn,
.register-btn {
  background: #1a1a1a;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease;
}

.login-btn:hover,
.register-btn:hover {
  background: #333333;
}

/* HAMBURGER MENU */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1000;
  position: absolute;
  left: 0;
  top: 1rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #1a1a1a;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* DROPDOWN STYLES */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0; /* Ensure no gap */
  background-color: #ffffff;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
  border-radius: 6px;
  padding: 0.75rem 0;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  color: #1a1a1a;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #f7f7f7;
  color: #333333;
}

.dropdown-section-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  color: #1a1a1a;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f7f6f6;
  box-shadow: #1a1a1a 0px 1px 0px;
  margin: 0.5rem 0;
  user-select: none;
  cursor: default;
  font-size: 0.9rem;
}

/* DROPDOWN ARROW */
.arrow-down {
  display: inline-block;
  margin-left: 8px;
  width: 0;
  height: 0;
  vertical-align: middle;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #1a1a1a;
  transition: transform 0.3s ease;
}

.dropdown:hover .arrow-down {
  transform: rotate(180deg);
}

/* PROFILE MENU */
.auth-buttons,
.profile-menu {
  width: 160px;
  display: flex;
  justify-content: flex-end;
}

.profile-btn {
  background: #1a1a1a;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.profile-btn:hover {
  background: #333333;
}

.profile-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #ffffff;
  width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  padding: 0;
  z-index: 10;
}

.profile-menu.show .profile-dropdown {
  display: block;
}

.profile-dropdown a,
.profile-dropdown button {
  display: block;
  padding: 0.6rem 1.25rem;
  text-align: left;
  background: none;
  border: none;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background-color: #f7f7f7;
  color: #333333;
}

/* MOBILE STYLES */
@media (max-width: 768px) {
  .navbar {
    position: relative;
  }

  .navbar-left {
    margin-top: 3rem;
  }

  .hamburger {
    display: block;
  }

  .navbar-links {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: #ffffff;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 999;
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links a,
  .dropdown {
    width: 100%;
    text-align: center;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    background-color: #f7f7f7;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 0;
  }

  .dropdown:hover .dropdown-content {
    display: none;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }

  .arrow-down {
    float: right;
    margin-right: 1.5rem;
  }

  #auth-sensitive-nav {
    display: none;
    width: 100%;
    justify-content: center;
    padding: 1.5rem 0;
  }

  .navbar-links.active + #auth-sensitive-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .auth-buttons,
  .profile-menu {
    width: 100%;
    justify-content: center;
  }

  .auth-buttons a,
  .profile-btn {
    width: 85%;
    text-align: center;
  }

  .profile-dropdown {
    width: 100%;
    text-align: center;
  }
}

/* Ensure hidden class works */
.hidden {
  display: none;
}