/* ==========================================
   HEADER VARS & STYLES
   ========================================== */
:root {
  --header-bg: #ffffff;
  --header-border: #e2e8f0;
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --sidebar-width: 260px;
}

.dashboard-header {
  position: fixed;
  top: 0;
  right: 0;
  width: calc(100% - var(--sidebar-width));
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  z-index: 900;
  transition: width 0.3s ease, left 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* --- Top Header Row --- */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  max-width: 500px;
}

/* Mobile Toggle Hamburger */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.menu-toggle:hover {
  background-color: #f1f5f9;
}

/* Search Box */
.search-box {
  width: 100%;
  max-width: 320px;
}

.search-box form {
  display: flex;
  align-items: center;
  background-color: #f8fafc;
  border: 1px solid var(--header-border);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box form:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background-color: #ffffff;
}

.search-box input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  padding: 0.4rem 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.search-box button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.search-box button:hover {
  color: var(--primary-color);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Social Links */
.social-icons {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.social-icons a {
  color: var(--text-muted);
  font-size: 1.05rem;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-icons a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Auth Buttons */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-login {
  color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.08);
}

.btn-login:hover {
  background-color: rgba(37, 99, 235, 0.16);
}

.btn-signup {
  color: #ffffff;
  background-color: var(--primary-color);
}

.btn-signup:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* --- Sub Navbar --- */
.navbar {
  background-color: #ffffff;
  padding: 0 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}

.navbar::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

.navbar ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar li a {
  display: inline-block;
  padding: 0.75rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.navbar li a:hover,
.navbar li a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

/* Laptop & Tablet (Under 992px) */
@media (max-width: 992px) {
  .dashboard-header {
    width: 100%;
    left: 0;
  }

  .menu-toggle {
    display: block; /* Show menu toggle button */
  }
}

/* Mobile Screens (Under 640px) */
@media (max-width: 640px) {
  .top-header {
    padding: 0.6rem 1rem;
  }

  .social-icons {
    display: none; /* Hide social icons on small screens to fit buttons */
  }

  .search-box {
    max-width: 180px;
  }

  .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }

  .navbar {
    padding: 0 1rem;
  }

  .navbar ul {
    gap: 1.25rem;
  }
}