/* Navigation Styles for Consistent Header Across All Pages */

/* Navigation container */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--nav-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  height: 70px;
  box-sizing: border-box;
}

/* Logo container */
.logo {
  position: relative;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 40px;
  width: auto;
  max-width: 200px;
}

/* Edition Tag Styles */
.edition-tag {
  position: absolute;
  top: 35px;
  left: 45px;
  background-color: var(--nav-bg);
  padding: 4px 10px;
  border-radius: 0 0 4px 4px;
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 101;
  white-space: nowrap;
  display: none;
  border-bottom: 2px solid transparent;
  background-clip: padding-box;
}

.edition-tag.visible {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

.edition-tag span {
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.edition-tag::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-gradient);
  border-radius: 0 0 4px 4px;
}

/* Navigation Menu Container */
.navmenu-container {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 15px;
}

/* Navigation Menu Items */
.navmenu-items {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.navmenu-item {
  position: relative;
  margin: 0 0.8rem;
}

.navmenu-link {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.navmenu-link:hover {
  color: var(--accent-mint);
}

.navmenu-link.active {
  color: var(--accent-mint);
  position: relative;
}

.navmenu-link.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-mint);
}

.navmenu-arrow {
  font-size: 0.7rem;
  margin-left: 0.4rem;
  transition: transform 0.3s ease;
}

.navmenu-dropdown:hover .navmenu-arrow {
  transform: translateY(3px);
}

/* Submenu Styles */
.navmenu-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 260px;
  list-style: none;
  background-color: var(--nav-submenu-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 4px;
  padding: 0.5rem 0;
  margin: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.navmenu-dropdown:hover .navmenu-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navmenu-submenu-item {
  position: relative;
}

.navmenu-submenu-link {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.75rem 1.25rem;
  display: block;
  transition: color 0.3s ease;
}

.navmenu-submenu-link:hover {
  color: var(--accent-mint);
}

/* Auth Buttons */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 70px;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--nav-text);
  transition: all 0.3s ease;
  padding: 0;
  margin: 0;
}

.theme-toggle:hover {
  transform: scale(1.1);
  color: var(--accent-mint);
}

.theme-toggle i {
  font-size: 18px;
}

/* User Icon */
.user-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-mint);
  transition: all 0.3s ease;
  position: relative;
}

.user-icon svg {
  width: 30px;
  height: 30px;
  fill: var(--accent-mint);
}

.user-icon:hover svg {
  fill: var(--accent-teal);
  transform: scale(1.1);
}

/* Mobile theme toggle inside navmenu */
.navmenu-mobile-theme-toggle {
  width: 100%;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
}

.navmenu-mobile-theme-toggle i {
  display: inline-block;
  width: 18px;
  text-align: center;
  margin-left: 0; /* Ensure it's aligned properly */
  position: absolute;
  left: 1.5rem;
}

.theme-toggle-text {
  margin-left: 12px;
  font-weight: normal;
  font-size: 0.9rem;
  white-space: nowrap; /* Prevent text wrapping */
}

/* Hamburger Menu */
.navmenu-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.navmenu-hamburger-line {
  width: 100%;
  height: 3px;
  background-color: var(--accent-mint);
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Desktop/Mobile Visibility Classes */
.mobile-only {
  display: none;
}

.desktop-only {
  display: flex;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Show hamburger on mobile */
  .navmenu-hamburger {
    display: flex;
    position: relative;
    right: 0;
    margin-left: auto; /* Push it to the right */
  }

  /* Make sure mobile theme toggle is correctly positioned and aligned */
  .navmenu-mobile-theme-toggle {
    width: 100%;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Left align the content */
  }

  .navmenu-mobile-theme-toggle i {
    display: inline-block;
    width: 18px;
    text-align: center;
    margin-left: 0; /* Ensure it's aligned properly */
    position: absolute;
    left: 1.5rem;
  }
  
  /* Adjust navigation layout */
  nav {
    padding: 0.75rem 3%;
  }
  
  .logo {
    max-width: 70%;
  }
  
  .logo img {
    max-width: 160px;
  }
  
  /* Switch visibility for mobile and desktop elements */
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none !important;
  }
  
  /* Hide menu items by default on mobile */
  .navmenu-items {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--nav-submenu-bg);
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    align-items: flex-start;
  }
  
  /* Show menu when active */
  .navmenu-container.active .navmenu-items {
    display: flex;
  }
  
  /* Adjust hamburger animation for active state */
  .navmenu-container.active .navmenu-hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .navmenu-container.active .navmenu-hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .navmenu-container.active .navmenu-hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Fix the X button (hamburger menu when active) */
  .navmenu-container.active .navmenu-hamburger {
    right: 7px; /* Position from right edge */
    /* top: -45px; Move up to align with header */
  }
  
  /* Full-width nav items on mobile */
  .navmenu-item {
    margin: 0;
    width: 100%;
  }
  
  .navmenu-link {
    padding: 0.75rem 1.5rem;
    width: 100%;
    justify-content: space-between;
  }

  /* Align all menu items consistently in mobile view */
  .navmenu-link, .navmenu-mobile-theme-toggle {
    padding-left: 1.5rem; /* Consistent left padding */
  }

  
  /* Show theme toggle as a menu item only in mobile */
  .theme-toggle-item {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    padding-top: 0.5rem;
  }
  
  /* Adjust mobile submenu display */
  .navmenu-dropdown:hover .navmenu-submenu {
    opacity: 0;
    visibility: hidden;
  }
  
  .navmenu-dropdown.active .navmenu-submenu {
    opacity: 1;
    visibility: visible;
    position: static;
    width: 100%;
    transform: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0;
    margin-top: 0;
    padding: 0;
  }
  
  .navmenu-dropdown.active .navmenu-arrow {
    transform: rotate(180deg);
  }
  
  .navmenu-submenu-link {
    padding-left: 3rem;
  }
  
  /* Proper menu container layout */
  .navmenu-container {
    order: 3;
    width: auto;
    margin-left: auto;
    margin-right: 15px;
  }
  
  .auth-buttons {
    gap: 0;
  }
}
