/* ══════════════════════════════════════════════════════════
   NAVEGACIÓN DOS NIVELES — Macro Procesos UPV
   ══════════════════════════════════════════════════════════ */

/* ── L1: Capítulos ── */
#nav-l1 {
  position: fixed;
  top: calc(var(--topbar-h) + var(--header-h));
  left: 0; right: 0;
  height: var(--nav1-h);
  background: var(--white);
  border-bottom: 1px solid var(--grey-light);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 180;
  scrollbar-width: none;
  gap: 0;
}

#nav-l1::-webkit-scrollbar { display: none; }

.l1-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--grey-dark);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all var(--ease);
  user-select: none;
  flex-shrink: 0;
  position: relative;
}

.l1-item:hover {
  color: var(--l1-color, var(--red-dark));
  background: var(--l1-light, #fdecea);
}

.l1-item.active {
  color: var(--l1-color, var(--red-dark));
  border-bottom-color: var(--l1-color, var(--red-dark));
  font-weight: 600;
  background: var(--l1-light, #fdecea);
}

.l1-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--l1-color, var(--grey-medium));
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background var(--ease);
}

.l1-item:not(.active) .l1-num {
  background: var(--grey-medium);
}

/* ── L2: Sub-procesos ── */
#nav-l2 {
  position: fixed;
  top: calc(var(--topbar-h) + var(--header-h) + var(--nav1-h));
  left: 0; right: 0;
  height: var(--nav2-h);
  background: var(--ch-light, #f7f8f8);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  z-index: 170;
  overflow: hidden;
  transition: background-color var(--ease);
}

.l2-row {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
}

.l2-row::-webkit-scrollbar { display: none; }

.l2-row.active {
  opacity: 1;
  pointer-events: all;
}

.l2-item {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--grey-upv);
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: all var(--ease);
  user-select: none;
  flex-shrink: 0;
}

.l2-item:hover {
  background: rgba(0,0,0,0.05);
  color: var(--l2-color, var(--red-dark));
}

.l2-item.active {
  background: var(--l2-color, var(--red-dark));
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
