/* ===== iMonitor 帮助文档 专属样式（叠加在 blog style.css 之上） ===== */

/* 文档页双栏布局 */
.docs-main {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 48px;
  align-items: flex-start;
}

/* 左侧目录 */
.docs-toc {
  width: 280px;
  flex: 0 0 280px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 12px;
  font-size: 14px;
}
.docs-toc .toc-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}
.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.docs-toc ul ul {
  margin-left: 14px;
}
.docs-toc li {
  margin: 2px 0;
}
.docs-toc a {
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  color: #374151;
  text-decoration: none;
  line-height: 1.5;
}
.docs-toc a:hover {
  background: #eef2ff;
  color: #0a4d9e;
}
.docs-toc a.active {
  background: #0a4d9e;
  color: #fff;
}
.docs-toc .cat > a {
  font-weight: 600;
  color: #1f2937;
}
.docs-toc summary {
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
  color: #1f2937;
  font-weight: 600;
}
.docs-toc summary:hover {
  background: #eef2ff;
}

/* 右侧内容 */
.doc-post {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 28px 36px 36px;
}
.doc-post .post-title {
  margin-bottom: 6px;
  font-size: 26px;
}
.doc-meta {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.doc-meta a { color: #0a4d9e; text-decoration: none; }

/* 帮助文档正文（保留原 hnd 样式类，这里补全局排版） */
.help-content {
  line-height: 1.9;
  color: #374151;
}
.help-content p { margin: 0 0 12px; }
.help-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  margin: 8px 0;
}
.help-content a { color: #0a4d9e; }
.help-content table {
  border-collapse: collapse;
  margin: 12px 0;
  max-width: 100%;
}
.help-content table td, .help-content table th {
  border: 1px solid #d1d5db;
  padding: 6px 10px;
}

/* ===== 主页搜索区 ===== */

/* 页脚 ribbon 与内容容器对齐（覆盖 style.css 中相对页脚全宽定位） */
#footer .container { position: relative; }
.footer-ribbon { left: 15px; }

.home-search {
  max-width: 640px;
  margin: 8px auto 36px;
  text-align: center;
}
.home-search .search-box {
  display: flex;
  gap: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 40px;
  padding: 5px;
  box-shadow: 0 4px 14px rgba(15, 60, 120, 0.06);
}
.home-search .search-box input {
  flex: 1;
  padding: 12px 18px;
  font-size: 15px;
  border: none;
  border-radius: 40px 0 0 40px;
  outline: none;
  background: transparent;
  color: #1f2937;
}
.home-search .search-box button {
  padding: 12px 28px;
  border: none;
  border-radius: 40px;
  background: #0a4d9e;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.home-search .search-box button:hover { background: #083d7d; }

/* 统计条 */
.docs-stats {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 40px;
  max-width: 900px;
  padding: 0 16px;
}
.docs-stats .stat {
  flex: 1;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(15, 60, 120, 0.08);
}
.docs-stats .stat b {
  display: block;
  font-size: 26px;
  color: #0a4d9e;
  font-weight: 700;
}
.docs-stats .stat span {
  font-size: 13px;
  color: #6b7280;
}

/* 首页区块 */
.docs-home-main {
  padding: 40px 16px 56px;
}
.home-section {
  max-width: 1100px;
  margin: 0 auto 40px;
}
.home-section h2 {
  font-size: 22px;
  color: #1f2937;
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 4px solid #0a4d9e;
}
.home-section h2 small {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 400;
  margin-left: 10px;
}

/* 分类卡片 */
.doc-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.doc-cat-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 22px;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.doc-cat-card:hover {
  box-shadow: 0 6px 20px rgba(15, 60, 120, 0.10);
  transform: translateY(-2px);
}
.doc-cat-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.doc-cat-card h3 { color: #1f2937; }
.doc-cat-card .cat-desc {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 12px;
}
.doc-cat-card .cat-count {
  display: inline-block;
  background: #eef2ff;
  color: #0a4d9e;
  font-size: 12px;
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 10px;
}
.doc-cat-card ul { list-style: none; margin: 0; padding: 0; }
.doc-cat-card li { margin: 5px 0; font-size: 14px; }
.doc-cat-card li a { color: #0a4d9e; text-decoration: none; }
.doc-cat-card li a:hover { text-decoration: underline; }

/* 热门文档 */
.hot-docs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.hot-docs a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  color: #1f2937;
  text-decoration: none;
  transition: all 0.2s;
}
.hot-docs a:hover {
  border-color: #0a4d9e;
  color: #0a4d9e;
  box-shadow: 0 4px 14px rgba(15, 60, 120, 0.08);
}
.hot-docs .hot-num {
  flex: 0 0 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  background: #eef2ff;
  color: #0a4d9e;
  font-weight: 700;
  border-radius: 6px;
  font-size: 14px;
}

/* 底部帮助卡 */
.help-cta {
  max-width: 1100px;
  margin: 0 auto;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.help-cta h3 { margin: 0 0 6px; font-size: 18px; color: #1f2937; }
.help-cta p { margin: 0; font-size: 14px; color: #6b7280; }
.help-cta .cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.help-cta .btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}
.help-cta .btn-primary { background: #0a4d9e; color: #fff; }
.help-cta .btn-ghost { background: #fff; color: #0a4d9e; border: 1px solid #0a4d9e; }

/* 搜索结果 */
.search-results {
  max-width: 640px;
  margin: 16px auto 0;
  text-align: left;
}
.search-results .sr-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.search-results .sr-item a { color: #0a4d9e; text-decoration: none; font-weight: 600; font-size: 16px; }
.search-results .sr-item p { margin: 6px 0 0; color: #6b7280; font-size: 13px; }
.search-results .sr-cat { font-size: 12px; color: #9ca3af; }

/* 移动端 */
@media (max-width: 900px) {
  .docs-main { flex-direction: column; }
  .docs-toc { width: 100%; flex: none; position: static; max-height: none; }
  .doc-post { padding: 20px; }
  .docs-stats { flex-wrap: wrap; }
  .docs-stats .stat { min-width: 150px; }
}

/* 版权行（关于栏下方，左对齐） */
#footer .about-copy { margin-top: 14px; font-size: 12px; color: #666; }
#footer .about-copy a { color: #888; }
#footer .about-copy a:hover { color: #fff; }
