/* ========================================
   Navbar (Balanced Spacing, Clean Active State)
   ======================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0;
  transition: box-shadow 0.2s ease;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 4.5rem;
}

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: #0f172a;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-logo svg {
  border-radius: 6px;
}

/* Search Bar (Wider & Subtle Border) */
.navbar-search {
  position: relative;
  flex: 1 1 20rem;
  min-width: 15rem;
  max-width: 23rem;
}

.navbar-search input {
  width: 100%;
  height: 2.5rem;
  padding: 0 1rem 0 2.625rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #1e293b;
  background-color: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-sans);
}

.navbar-search input:hover {
  border-color: #cbd5e1;
  background-color: #ffffff;
}

.navbar-search input:focus {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.navbar-search input::placeholder {
  color: #94a3b8;
}

.search-icon {
  position: absolute;
  left: 0.9375rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

/* Nav Links (No Boxy Background — Clean Underline & Green Text) */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.navbar-links a {
  position: relative;
  padding: 0.5rem 0.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #4b5563;
  background-color: transparent;
  border-radius: 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 9999px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.navbar-links a:hover {
  color: var(--primary);
  background-color: transparent;
}

.navbar-links a.active {
  color: var(--primary);
  font-weight: 700;
  background-color: transparent;
}

.navbar-links a.active::after {
  transform: scaleX(1);
}

/* CTA Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.navbar-cta,
.navbar-cta-daftar {
  flex-shrink: 0;
  height: 2.375rem;
  padding: 0 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
}

.navbar-cta-daftar {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background-color: transparent;
}

.navbar-cta-daftar:hover {
  background-color: var(--green-50);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}

/* Mobile toggle */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Mobile Menu */
.navbar-mobile {
  display: none;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.navbar-mobile.is-open {
  display: block;
}

.navbar-mobile ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.navbar-mobile ul a {
  display: block;
  padding: 0.625rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #4b5563;
  background-color: transparent;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.navbar-mobile ul a:hover,
.navbar-mobile ul a.active {
  color: var(--primary);
  font-weight: 700;
  background-color: transparent;
  border-left-color: var(--primary);
}

.navbar-mobile-actions {
  display: flex;
  gap: 0.625rem;
  margin-top: 0.5rem;
}

.navbar-mobile-actions .btn {
  flex: 1;
  height: 2.5rem;
  justify-content: center;
  text-align: center;
}

.navbar-search-mobile {
  margin-bottom: 0.75rem;
  max-width: 100%;
  min-width: 0;
}

/* Responsive */
@media (max-width: 960px) {
  .navbar-search {
    display: none;
  }

  .navbar-links {
    display: none;
  }

  .navbar-actions,
  .navbar-cta {
    display: none;
  }

  .navbar-toggle {
    display: flex;
    margin-left: auto;
  }
}
