/* ============================================================
   LawHub 全站统一外壳：页头 + 栅格宽度 + 左侧边栏（一级板块 / 二级菜单）
   —— lawhub.html、skillhub.html 等 LawHub 页面共用，保证宽度与边栏位置一致
   ============================================================ */

/* 紫青渐变流彩 */
@keyframes lh-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== 页面头（固定：LawHub · 法律人的开源社区） ===== */
.lh-hero {
  padding: 96px 40px 28px; text-align: center;
  display: flex; align-items: baseline; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.lh-hero h1 {
  font-size: 32px; font-weight: 800; margin: 0; letter-spacing: -.5px;
  background: linear-gradient(90deg, #6a5cff, #a78bfa, #22c8d6, #67e8f9, #6a5cff);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: lh-flow 4s linear infinite;
}
.lh-hero .lh-hero-note { font-size: 15px; font-weight: 400; color: #6a5cff; letter-spacing: .5px; }

/* ===== 统一栅格（所有 LawHub 页面同宽、同间距） ===== */
.lh-layout {
  display: flex; max-width: 1800px; margin: 0 auto;
  padding: 8px 24px 60px; gap: 20px; align-items: flex-start;
}

/* ===== 左侧边栏（全站同一位置：sticky 顶距 92px） ===== */
.lh-sidebar {
  flex-shrink: 0; width: 216px; background: rgba(255,255,255,.66);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 14px; padding: 12px; position: sticky; top: 92px;
  box-shadow: 0 22px 46px -26px rgba(106,92,255,.35), inset 0 1px 0 rgba(255,255,255,.7);
}
.lh-side-group + .lh-side-group { margin-top: 4px; }
.lh-sec-head {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px;
  font-size: 14px; font-weight: 700; color: #5b4cf0; cursor: pointer; user-select: none;
  transition: background .18s;
}
.lh-sec-head:hover { background: rgba(106,92,255,.06); }
.lh-sec-head.current { background: rgba(106,92,255,.1); }
.lh-sec-ico { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.lh-sec-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lh-sec-caret { font-size: 12px; color: #6a5cff; transition: transform .2s; flex-shrink: 0; }
.lh-side-group.collapsed .lh-sec-caret { transform: rotate(-90deg); }
.lh-side-group.collapsed .lh-sec-body { display: none; }
.lh-sec-body { padding: 2px 0 2px; }
.lh-sub-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px 8px 37px; border-radius: 9px; font-size: 13.5px; color: #475467;
  cursor: pointer; transition: background .18s, color .18s;
  max-width: 100%; overflow: hidden; white-space: nowrap;
}
.lh-sub-item > span:first-child { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lh-sub-item:hover { background: rgba(106,92,255,.06); }
.lh-sub-item.active {
  background: linear-gradient(135deg, #6a5cff, #22c8d6, #a78bfa, #22c8d6, #6a5cff);
  background-size: 220% 220%;
  animation: lh-flow 5s linear infinite;
  color: #fff; font-weight: 600;
}
.lh-sub-count { font-size: 12px; color: #94a3b8; flex-shrink: 0; }
.lh-sub-item.active .lh-sub-count { color: rgba(255,255,255,.9); }
.lh-side-loading { padding: 8px 10px 8px 37px; font-size: 13px; color: #98a2b3; }

@media (max-width: 980px) {
  .lh-layout { flex-direction: column; padding: 8px 14px 40px; }
  .lh-sidebar { width: 100%; position: static; }
  .lh-hero { padding: 84px 20px 20px; }
}
