/* ==========================
   Navbar Mobile-First
========================= */

:root {
  --nav-bg: #000000;
  --nav-text: #ffffff;
  --nav-accent: #22d8ff;
  --nav-accent-text: #000000;
  --nav-radius: 12px;
  --nav-transition: 0.3s ease;

  --nav-link-gap: 12px;          /* gap between regular nav links */
  --nav-container-gap: 24px;     /* general gap inside nav-container */
  --search-bell-gap: 20px;       /* adjustable gap specifically between search & bell */
}

/* ---------- Navbar container ---------- */
#navbar-root nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  border-radius: var(--nav-radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--nav-container-gap);
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* ---------- Nav links ---------- */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--nav-link-gap); /* default gap between all links */
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--nav-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background var(--nav-transition), color var(--nav-transition);
}

.nav-links li a:hover,
.nav-links li a.active {
  background: var(--nav-accent);
  color: var(--nav-accent-text);
}

/* ---------- Icon sizing ---------- */
.nav-links li a img.nav-icon,
#notif-bell img.nav-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Slightly bigger logo */
.nav-links li a img[src*="mainlogo"] {
  width: 50px;
  height: auto;
}

/* ---------- Specific gap between search and bell ---------- */
/* Select the search <li> which is second last, then add margin-right */
.nav-links li:nth-last-child(2) {
  margin-right: var(--search-bell-gap);
}

/* ---------- Notification bell ---------- */
#notif-bell-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#notif-bell {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
}

#notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: red;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  padding: 2px 5px;
  display: none; /* default hidden */
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
}

/* Highlight bell if unread */
.bell-unread img {
  filter: drop-shadow(0 0 2px red);
}

/* ---------- Hamburger menu ---------- */
.nav-toggle {
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-text);
  transition: color 0.3s;
}

.nav-toggle.active {
  color: var(--nav-accent-text);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-container {
    gap: 20px; /* slightly smaller gap on mobile */
  }

  .nav-links li a img.nav-icon,
  #notif-bell img.nav-icon {
    width: 28px;
    height: 28px;
  }

  .nav-links li a img[src*="mainlogo"] {
    width: 40px;
  }

  /* Reduce search-bell gap on mobile */
  .nav-links li:nth-last-child(2) {
    margin-right: calc(var(--search-bell-gap) / 1.5);
  }

  #notif-badge {
    top: -3px;
    right: -3px;
    font-size: 8px;
    min-width: 12px;
    height: 12px;
  }
}
