.navbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(229, 231, 235, 0.5);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo {
  display: flex;
  align-items: center;
  margin-right: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  list-style: none;
}

/* Nav item with dropdown */
.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.nav-link:hover,
.nav-item:hover .nav-link { background: #f3f4f6; color: #111; }
.nav-link--active { background: #f3f4f6; color: #111; }
.nav-chevron { opacity: 0.45; transition: transform 0.2s ease; }
.nav-item:hover .nav-chevron { transform: rotate(180deg); opacity: 0.7; }

/* Dropdown panel */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Animation */
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-dropdown-item {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.nav-dropdown-item:hover { background: #f3f4f6; color: #111; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s;
}
.nav-hamburger:hover { background: #f3f4f6; }
.nav-hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: #374151;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 20px;
  border-top: 1px solid #f3f4f6;
  background: #fff;
  /* Slide animation */
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
}
.nav-mobile.open {
  max-height: 500px;
  opacity: 1;
}
.nav-mob-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  transition: background 0.12s, color 0.12s;
}
.nav-mob-link:hover,
.nav-mob-details summary:hover { background: #f3f4f6; color: #111; }
.nav-mob-details { list-style: none; }
.nav-mob-details summary { list-style: none; }
.nav-mob-details summary::-webkit-details-marker { display: none; }
.nav-mob-sub {
  display: flex;
  flex-direction: column;
  padding: 4px 0 4px 12px;
}
.nav-mob-sub a {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.nav-mob-sub a:hover { background: #f3f4f6; color: #111; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .create-btn { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: flex; }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Search bar */
.nav-search {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 100px;
  padding: 0 6px 0 16px;
  gap: 4px;
  width: 240px;
  transition: background 0.15s, box-shadow 0.15s;
  border: 1.5px solid transparent;
}
.nav-search:focus-within {
  background: #fff;
  border-color: #d1d5db;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}
.nav-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #374151;
  outline: none;
  height: 36px;
  min-width: 0;
}
.nav-search-input::placeholder { color: #9ca3af; }
.nav-search-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: grid; place-items: center;
  color: #9ca3af;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.nav-search-btn:hover { color: #374151; background: #e5e7eb; }

@media (max-width: 900px) {
  .nav-search { width: 180px; }
}
@media (max-width: 768px) {
  .nav-search { display: none; }
}
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: grid; place-items: center;
  color: #4b5563;
  transition: background 0.15s;
}
.icon-btn:hover { background: #f3f4f6; color: #111; }

.notif-btn { position: relative; }
.notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  border: 2px solid #fff;
}

.create-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  transition: background 0.15s;
}
.create-btn:hover { background: #f3f4f6; }

.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  padding: 0;
  background: none;
  border: none;
}
.avatar-btn img { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; }

/* ── Nav weather mini pill ── */
.nav-weather {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 100px;
  padding: 4px 12px 4px 4px;
  cursor: default;
  flex-shrink: 0;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.nav-weather:hover { background: #f3f4f6; border-color: #d1d5db; }
.nav-weather-icon { width: 28px; height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sun-rays-spin {
  transform-origin: 14px 14px;
  animation: navSunSpin 10s linear infinite;
}
@keyframes navSunSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.nav-weather-info { display: flex; flex-direction: column; line-height: 1.25; }
.nav-weather-temp { font-size: 13px; font-weight: 700; color: #111827; }
.nav-weather-cond { font-size: 10px; color: #9ca3af; white-space: nowrap; }
@media (max-width: 900px) { .nav-weather-cond { display: none; } }
@media (max-width: 600px) { .nav-weather { padding: 4px 8px 4px 4px; } }
