/* =========================================================
   AULA 01 — ROTEIRO MESTRE PRO
   Navegação lateral premium da aula
   ========================================================= */

body:has(#topo) .nav {
  position: sticky;
  top: 18px;
  align-self: start;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  border-radius: 22px !important;
  padding: 18px 14px !important;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96)) !important;
  box-shadow:
    0 18px 44px rgba(0, 10, 30, 0.24),
    inset 0 0 0 1px rgba(255,255,255,0.025);
}

body:has(#topo) .nav strong,
body:has(#topo) .nav h3,
body:has(#topo) .nav-title {
  display: block;
  margin: 0 0 14px;
  padding: 0 10px;
  color: #f7c948 !important;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

body:has(#topo) .nav a {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin: 4px 0;
  padding: 9px 11px 9px 14px !important;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #cbd5e1 !important;
  text-decoration: none !important;
  font-size: 0.92rem;
  line-height: 1.25;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

body:has(#topo) .nav a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  box-shadow: 0 0 0 rgba(56, 189, 248, 0);
  flex: 0 0 auto;
}

body:has(#topo) .nav a:hover {
  color: #e0f2fe !important;
  border-color: rgba(56, 189, 248, 0.24);
  background: rgba(56, 189, 248, 0.08);
  transform: translateX(2px);
}

body:has(#topo) .nav a:hover::before {
  background: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.38);
}

body:has(#topo) .nav a.is-active,
body:has(#topo) .nav a.active,
body:has(#topo) .nav a[aria-current="true"] {
  color: #e0f2fe !important;
  border-color: rgba(56, 189, 248, 0.48);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(37, 99, 235, 0.10));
  box-shadow:
    0 10px 24px rgba(0, 140, 255, 0.12),
    inset 3px 0 0 rgba(56, 189, 248, 0.85);
}

body:has(#topo) .nav a.is-active::before,
body:has(#topo) .nav a.active::before,
body:has(#topo) .nav a[aria-current="true"]::before {
  background: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
}

/* Linha de progresso visual discreta */
body:has(#topo) .nav::after {
  content: "Aula 01 · HTML5 Mestre";
  display: block;
  margin-top: 14px;
  padding: 11px 10px 0;
  border-top: 1px solid rgba(56, 189, 248, 0.14);
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Mobile/tablet: vira navegação horizontal quando aparecer */
@media (max-width: 1180px) {
  body:has(#topo) .nav {
    position: relative;
    top: auto;
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    padding: 12px !important;
    border-radius: 18px !important;
  }

  body:has(#topo) .nav strong,
  body:has(#topo) .nav h3,
  body:has(#topo) .nav-title,
  body:has(#topo) .nav::after {
    display: none;
  }

  body:has(#topo) .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 38px;
  }
}
