/* Darkerox - Navigation Header Stylesheet */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #0b65c6;
  background: linear-gradient(135deg, #0b60d2 0%, #0066cc 50%, #0d6efd 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: background-color var(--transition-fast);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.25rem;
}

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: translateY(-1px);
}

.brand-logo .brand-text {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
}

.brand-logo .accent-text {
  color: #60a5fa;
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Header Search Bar */
.header-search {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.6rem 2.8rem 0.6rem 1rem;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.search-input:focus {
  background-color: rgba(0, 0, 0, 0.4);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.search-btn {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.search-btn:hover {
  color: #ffffff;
}

/* Mobile Actions Group */
.header-mobile-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.mobile-search-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.mobile-search-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.mobile-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Header Admin badge button */
.admin-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.admin-link-btn:hover {
  background-color: #ffffff;
  color: #0b65c6;
}

/* Responsive Navbar */
@media (max-width: 900px) {
  .header-search {
    max-width: 240px;
  }
}

@media (max-width: 768px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #0954b8 0%, #0b65c6 100%);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  }

  .navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    gap: 0.5rem;
    position: relative;
  }

  .brand-logo {
    order: 1;
    font-size: 1.4rem;
    font-weight: 900;
    flex-shrink: 0;
  }

  nav {
    order: 2;
  }

  .header-mobile-actions {
    display: flex;
    order: 3;
    align-items: center;
    gap: 0.4rem;
  }

  .mobile-search-btn,
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  }

  .mobile-search-btn:hover,
  .mobile-toggle:hover,
  .mobile-search-btn.open,
  .mobile-toggle.open {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
  }

  .mobile-search-btn:active,
  .mobile-toggle:active {
    transform: scale(0.94);
  }

  .header-search {
    display: none;
    order: 4;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background-color: #084aa6;
    border-bottom: 2px solid #0050b3;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 1050;
  }

  .header-search.open {
    display: block;
    animation: searchSlide 0.2s ease-out forwards;
  }

  @keyframes searchSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .search-input {
    background-color: rgba(0, 0, 0, 0.35);
    padding: 0.55rem 2.4rem 0.55rem 0.85rem;
    font-size: 0.9rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #0b1329;
    border-bottom: 3px solid #0d6efd;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.85);
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 1rem;
    gap: 0.4rem;
    display: none;
    z-index: 1100;
    animation: mobileMenuSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes mobileMenuSlide {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu .nav-link {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.15s ease, color 0.15s ease, border-left 0.15s ease, padding-left 0.15s ease;
  }

  .nav-menu .nav-link:hover, .nav-menu .nav-link.active {
    background-color: rgba(13, 110, 253, 0.25);
    color: #ffffff;
    border-left: 4px solid #0d6efd;
    padding-left: 1.15rem;
  }
}
