/* ============================================================
   navbar.css — aCloudShalla Navigation Bar
   ============================================================ */


/* ── 1. NAVBAR BASE ───────────────────────────────────────── */
.custom-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--nav-height);

  /* Glassmorphism dark background */
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  display: flex;
  align-items: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Gradient accent line at bottom of navbar */
.custom-navbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #4f8ef7, #a78bfa, #f97316);
  opacity: 0.85;
}

/* Darker bg when page is scrolled (toggled via JS) */
.custom-navbar.scrolled {
  background: rgba(10, 14, 26, 0.98);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
}


/* ── 2. LOGO ──────────────────────────────────────────────── */
.navbar-brand {
  display: flex;
  align-items: center;
  padding: 0;
  margin-right: 32px;
}

/* Logo image */
.nav-logo {
  height: 50px;
  width: auto;
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nav-logo:hover {
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 4px 12px rgba(79, 142, 247, 0.5));
}


/* ── 3. NAV LINKS ─────────────────────────────────────────── */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Center the nav links */
.navbar-nav.nav-center {
  margin: 0 auto;
}

/* Individual link */
.nav-link {
  color: var(--clr-text-muted, #8a94b0) !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  padding: 8px 14px !important;
  border-radius: var(--radius-sm, 8px);
  position: relative;
  transition: color 0.25s ease, background 0.25s ease !important;
  letter-spacing: 0.01em;
}

/* Hover state — SAME visual treatment as the active state,
   so every link behaves identically on hover, regardless of
   which one is currently "active". Only font-weight differs,
   so the active page is still subtly distinguishable. */
.nav-link:hover {
  color: var(--clr-accent, #4f8ef7) !important;
  background: rgba(79, 142, 247, 0.10);
}

/* Active page link — same color/background as hover, plus bold */
.nav-link.active {
  color: var(--clr-accent, #4f8ef7) !important;
  background: rgba(79, 142, 247, 0.10);
  font-weight: 600 !important;
}

/* Animated underline on hover */
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: 5px;
  width: 0;
  height: 2px;
  background: var(--clr-accent, #4f8ef7);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 28px);
}


/* ── 4. THEME TOGGLE BUTTON ───────────────────────────────── */
#themeToggle {
  background: rgba(255, 255, 255, 0.05);
  color: var(--clr-text-muted, #8a94b0);
  border: 1px solid var(--clr-border, rgba(255,255,255,0.07));
  padding: 6px 14px;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s ease;
  margin-left: 8px;
}

#themeToggle:hover {
  background: var(--glow-blue, rgba(79,142,247,0.15));
  color: var(--clr-accent, #4f8ef7);
  border-color: var(--clr-border-blue, rgba(79,142,247,0.3));
}


/* ── 5. HAMBURGER (mobile toggle button) ─────────────────── */
.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 8px);
}

/* Invert icon to be white on dark bg */
.navbar-toggler-icon {
  filter: invert(1);
}


/* ── 6. MOBILE MENU ───────────────────────────────────────── */

/* Smooth slide animation */
.mobile-slide {
  transition: transform 0.35s ease, opacity 0.3s ease;
}

@media (max-width: 992px) {
  /* Collapsed state */
  .mobile-slide.collapse:not(.show) {
    transform: translateY(-12px);
    opacity: 0;
  }

  /* Expanded state */
  .mobile-slide.collapse.show,
  .mobile-slide.collapsing {
    transform: translateY(0);
    opacity: 1;
  }

  /* Mobile dropdown panel */
  .navbar-collapse {
    background: rgba(10, 14, 26, 0.98);
    padding: 12px 8px 20px;
    border-top: 1px solid var(--clr-border, rgba(255,255,255,0.07));
    margin-top: 6px;
  }

  /* Stack links vertically */
  .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
  }

  .nav-link {
    width: 100%;
    font-size: 0.95rem !important;
  }

  /* Underline starts from left edge on mobile */
  .nav-link::after {
    left: 14px;
  }

  /* Slightly smaller logo on mobile */
  .nav-logo {
    height: 42px;
  }
}
