/* Chiplytics Header & Navigation Styles */

/* Hamburger menu styles */
.hamburger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.4em;
  background: rgba(255,255,255,0.1);
  border: 1px solid #ccebd6;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  width: 32px;
  height: 32px;
  justify-content: center;
  align-items: center;
}

.hamburger-menu:hover {
  background: rgba(255,255,255,0.2);
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background-color: #ccebd6;
  margin: 1.5px 0;
  transition: 0.3s;
}

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

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

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

/* Main navigation menu bar */
.main-nav-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.5em;
  background: rgba(27, 62, 32, 0.8);
  border-radius: 4px;
  margin-bottom: 0.2em;
}

.main-nav-bar a {
  color: #ccebd6;
  text-decoration: none;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  transition: all 0.3s ease;
  font-size: 0.55em;
  font-weight: 500;
}

.main-nav-bar a:hover {
  background: rgba(89, 193, 115, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

.main-nav-bar a.active {
  background: rgba(89, 193, 115, 0.4);
  color: #ffffff;
  font-weight: 600;
}

/* Mobile hamburger container */
.mobile-nav-container {
  position: relative;
}

/* Mobile hamburger dropdown */
.mobile-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  width: 280px;
  margin-top: 2px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.mobile-nav-dropdown.show {
  display: block;
}

.mobile-nav-dropdown a {
  display: block;
  padding: 0.5em 0.8em;
  color: #1b3e20;
  text-decoration: none;
  font-size: 0.55em;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s ease;
  text-align: left;
  font-weight: normal;
}

.mobile-nav-dropdown a:hover {
  background-color: #f5f5f5;
}

.mobile-nav-dropdown a:last-child {
  border-bottom: none;
  border-radius: 0 0 6px 6px;
}

/* Mobile auth elements */
#mobile-login-btn:hover, #mobile-logout-btn:hover {
  background-color: #f5f5f5;
}

/* Account menu hover effects */
#account-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

/* Account dropdown */
.account-dropdown {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  width: 280px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.account-dropdown.active {
  max-height: 400px;
}

#dropdown-logout-btn:hover {
  background: rgba(27,62,32,0.1);
  color: #1b3e20;
}

/* Hide hamburger menu on larger screens */
@media (min-width: 900px) {
  .hamburger-menu,
  .mobile-nav-container {
    display: none;
  }
}

@media (max-width: 899px) {
  .hamburger-menu {
    display: flex;
  }

  .main-nav-bar a {
    display: none;
  }

  #auth-container {
    display: none;
  }
}
