/* ============================================================
   ANTHELUS — Navigation (Top + Mobile Bottom)
   Icons + Labels, Always Visible, Clean
   ============================================================ */

/* ── Top Navbar ─────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  transition: background var(--t-slow), border-color var(--t-slow), box-shadow var(--t);
}

#navbar.scrolled {
  box-shadow: var(--sh-sm);
}

/* On hero pages (dark bg), auto adapt */
#navbar.on-hero {
  background: rgba(255,255,255,.0);
  border-color: rgba(255,255,255,.0);
}
#navbar.on-hero.scrolled {
  background: rgba(255,255,255,.96);
  border-color: var(--border);
}
[data-theme="dark"] #navbar.on-hero.scrolled {
  background: rgba(33,33,33,.96);
  border-color: var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
}

/* ── Logo ────────────────────────────────────────────────── */
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.025em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-logo .dot { color: var(--blue); }

/* ── Desktop Links ──────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 12px;
  border-radius: var(--r);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: all var(--t);
  cursor: pointer;
  border: none;
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link .nav-icon {
  font-size: 1.1rem;
  transition: transform var(--t);
}

.nav-link:hover {
  color: var(--blue);
  background: var(--blue-light);
}
.nav-link:hover .nav-icon { transform: translateY(-1px); }

.nav-link.active {
  color: var(--blue);
  background: var(--blue-light);
}

/* Fronttext special color */
.nav-link.fronttext-link.active,
.nav-link.fronttext-link:hover {
  color: var(--ft-accent);
  background: var(--ft-bg);
}
[data-theme="dark"] .nav-link.fronttext-link .nav-label { color: var(--ft-accent); }

/* Freepko special color */
.nav-link.freepko-link.active,
.nav-link.freepko-link:hover {
  color: var(--fk-orange);
  background: var(--fk-bg);
}
[data-theme="dark"] .nav-link.freepko-link.active,
[data-theme="dark"] .nav-link.freepko-link:hover {
  background: rgba(234,88,12,.15);
}

/* ── Right Side Actions ─────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Dashboard icon link */
.nav-action-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 10px;
  border-radius: var(--r);
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  transition: all var(--t);
  text-decoration: none;
}
.nav-action-link .nav-icon { font-size: 1.1rem; }
.nav-action-link:hover { color: var(--blue); background: var(--blue-light); }
.nav-action-link.active { color: var(--blue); background: var(--blue-light); }

/* ── Dropdown ────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 8px;
  box-shadow: var(--sh-lg);
  z-index: 100;
  animation: dropdown-in .15s ease;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r);
  font-size: .875rem;
  color: var(--text-2);
  transition: all var(--t);
  text-decoration: none;
}
.dropdown-item:hover {
  background: var(--bg-2);
  color: var(--text);
}
.dropdown-item i { font-size: 1rem; color: var(--blue); width: 20px; }

/* ── Mobile Hamburger ───────────────────────────────────── */
.nav-hamburger {
  display: none;
  width: 40px; height: 40px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  transition: all var(--t);
}
.nav-hamburger:hover { background: var(--blue-light); color: var(--blue); }

/* ── Mobile Drawer ──────────────────────────────────────── */
.nav-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(280px, 82vw);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform .3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1199;
  backdrop-filter: blur(2px);
}
.nav-drawer-overlay.open { display: block; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-links {
  padding: 12px;
  flex: 1;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--t);
  text-decoration: none;
  margin-bottom: 2px;
}
.drawer-link i { font-size: 1.1rem; color: var(--text-muted); width: 22px; }
.drawer-link:hover { background: var(--bg-2); color: var(--text); }
.drawer-link.active { background: var(--blue-light); color: var(--blue); }
.drawer-link.active i { color: var(--blue); }
.drawer-link.ft-link.active { background: var(--ft-bg); color: var(--ft-accent); }
.drawer-link.ft-link.active i { color: var(--ft-accent); }
.drawer-link.fk-link.active { background: var(--fk-bg); color: var(--fk-orange); }
.drawer-link.fk-link.active i { color: var(--fk-orange); }

.drawer-section-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-light);
  padding: 10px 14px 4px;
}

/* ── Bottom Nav (Mobile) ────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 998;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 60px;
}

.bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  transition: all var(--t);
  text-decoration: none;
  min-width: 50px;
}
.bottom-link i { font-size: 1.2rem; }
.bottom-link.active { color: var(--blue); }
.bottom-link.active i { color: var(--blue); }
.bottom-link.ft-active { color: var(--ft-accent); }
.bottom-link.ft-active i { color: var(--ft-accent); }
.bottom-link.fk-active { color: var(--fk-orange); }
.bottom-link.fk-active i { color: var(--fk-orange); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 991px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 767px) {
  .bottom-nav { display: block; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  #navbar { height: 56px; }
  :root { --nav-h: 56px; }

  /* Hide some nav-actions on mobile — shown in bottom nav instead */
  .nav-action-link { display: none; }
}

@media (max-width: 575px) {
  #navbar { padding: 0 14px; }
  .nav-logo { font-size: 1.15rem; }
}
