/* 布局 */
.doc-layout {
  display: flex;
}

/* 左侧导航固定 */
.sidebar {
  width: 230px;
  background: #fff;
  border-right: 1px solid #ddd;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
}

/* 右侧内容 */
.content {
  flex: 1;
  margin-left: 260px;
  padding: 30px;
  background: #f8f8f2;
}

/* 页面标题卡片 */
.page-header {
  margin-bottom: 24px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}
.page-header h1 {
  margin: 0 0 8px 0;
  font-size: 26px;
  color: #222;
}
.page-header .sub {
  margin: 0;
  font-size: 14px;
  color: #666;
}

/* 卡片内容 */
.card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}
.card h2 {
  margin-top: 0;
  font-size: 20px;
  color: #222;
}

/* 导航标题 */
.sidebar h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

/* 一级标题 */
.nav-parent {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  margin: 8px 0;
  padding: 6px 4px;
  border-radius: 6px;
  transition: background 0.2s;
}
.nav-parent:hover {
  background: #f4f4f0;
}
.nav-parent::after {
  content: " ▶";
  font-size: 12px;
  color: #aaa;
  margin-left: 4px;
}
.nav-parent.open::after {
  content: " ▼";
  color: #7c5cff;
}
.nav-parent.active-parent {
  color: #7c5cff;
}

/* 二级标题 */
.nav-children {
  list-style: none;
  margin: 0 0 8px 0;
  padding-left: 14px;
  display: none;
}
.nav-children.show {
  display: block;
}
.nav-children a {
  font-size: 14px;
  color: #555 !important;   /* 统一颜色 */
  font-weight: normal;
  text-decoration: none;
  display: block;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
/* 二级标题默认展开 */
.nav-children {
  list-style: none;
  margin: 0 0 8px 0;
  padding-left: 14px;
  display: block; /* 默认展开 */
}
.nav-children a.active {
  background: #7c5cff;
  color: #fff;
  font-weight: 600;
}

/* 返回首页 */
.sidebar li:first-child a {
  color: #7c5cff;
  font-weight: 700;
}
.sidebar li:first-child a:hover {
  background: #f2f0ff;
}

/* 卡片基础样式 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}

/* 卡片标题 */
.card-title {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 0 0 16px 0;
  border-left: 4px solid #7c5cff;
  padding-left: 10px;
}

/* 卡片小标题 */
.card-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #444;
  margin: 18px 0 10px 0;
}

/* 普通介绍文本 */
.card-text {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* 列表文本 */
.card-list {
  list-style: disc;
  margin: 8px 0 16px 24px;
  color: #333;
}
.card-list li {
  margin-bottom: 6px;
  line-height: 1.6;
}

/* 大图 */
.card-image {
  width: 100%;
  border-radius: 10px;
  margin: 16px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

/* 分隔线 */
.card-sep {
  height: 1px;
  background: #eee;
  margin: 20px 0;
}

/* 页脚 */
.card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}
.btn-primary {
  padding: 8px 16px;
  background: linear-gradient(135deg, #7c5cff, #4fd1c5);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}
.btn-secondary {
  padding: 8px 16px;
  background: #f2f2f2;
  border: none;
  border-radius: 6px;
  color: #444;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: #e0e0e0;
}
