/* 站点分组下拉导航（独立文件：供标准页与自有主题页共用） */
/* ---------- 分组下拉导航 ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > .nav-top { display: inline-flex; align-items: center; gap: 5px; }
.nav-item > .nav-top .caret {
  width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .55;
  transition: transform .16s ease;
}
.nav-item:hover > .nav-top .caret,
.nav-item:focus-within > .nav-top .caret,
.nav-item.open > .nav-top .caret { transform: rotate(180deg); }
.nav-item.active > .nav-top { color: var(--accent, #2563eb); font-weight: 600; }

.nav-drop {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translate(-50%, -4px);
  min-width: 234px; padding: 7px;
  background: #fff; border: 1px solid var(--border, var(--line, #e5e9ef)); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .05);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 60;
}
.nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-item:hover .nav-drop,
.nav-item:focus-within .nav-drop,
.nav-item.open .nav-drop {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-drop a {
  display: block; padding: 8px 11px; border-radius: 8px;
  font-size: 13.5px; line-height: 1.4; color: var(--text, var(--ink, #1f2937)); font-weight: 400;
  white-space: nowrap;
}
.nav-drop a small { display: block; margin-top: 2px; color: var(--muted, #6b7280); font-size: 11.5px; }
.nav-drop a:hover,
.nav-drop a.active { background: var(--accent-soft, #eff6ff); color: var(--accent, #2563eb); font-weight: 600; }

@media (max-width: 760px) {
  .nav-item > .nav-top .caret { display: none; }
  .nav-item { display: block; }
  .nav-drop {
    position: fixed; left: 12px; right: 12px; top: 64px;
    transform: none; min-width: 0; display: none;
    opacity: 1; visibility: visible; pointer-events: auto;
    max-height: 70vh; overflow: auto;
  }
  .nav-item:hover .nav-drop { display: none; }
  .nav-item.open .nav-drop,
  .nav-item.open:hover .nav-drop { display: block; }
  .nav-drop a { white-space: normal; }
}
