/* 模块间距统一修复补丁 v2
 * 诊断发现：T6/T8的margin-top都是0px，CSS规则被覆盖
 * 解决方案：使用更高优先级的选择器（#id前缀）
 */

/* === 核心规则：使用#editor-resume提高优先级 === */
#editor-resume .resume-section,
#editor-resume .t3-sec,
#editor-resume .t4-sec,
#editor-resume .t5-sec,
#editor-resume .t6-sec,
#editor-resume .t7-sec,
#editor-resume .t8-sec {
  margin-top: var(--resume-section-gap, 20px) !important;
}

/* 分页后的内容 */
.paged-page-content .resume-section,
.paged-page-content .t3-sec,
.paged-page-content .t4-sec,
.paged-page-content .t5-sec,
.paged-page-content .t6-sec,
.paged-page-content .t7-sec,
.paged-page-content .t8-sec {
  margin-top: var(--resume-section-gap, 20px) !important;
}

/* === 第一个模块不需要上边距 === */
#editor-resume .resume-section:first-child,
#editor-resume .t3-sec:first-child,
#editor-resume .t4-sec:first-child,
#editor-resume .t5-sec:first-child,
#editor-resume .t6-sec:first-child,
#editor-resume .t7-sec:first-child,
#editor-resume .t8-sec:first-child {
  margin-top: 0 !important;
}

.paged-page-content > .resume-section:first-child,
.paged-page-content > .t3-sec:first-child,
.paged-page-content > .t4-sec:first-child,
.paged-page-content > .t5-sec:first-child,
.paged-page-content > .t6-sec:first-child,
.paged-page-content > .t7-sec:first-child,
.paged-page-content > .t8-sec:first-child {
  margin-top: 0 !important;
}

/* === T6特殊：timeline容器内 === */
.t6-timeline .t6-sec {
  margin-top: var(--resume-section-gap, 20px) !important;
}

.t6-timeline .t6-sec:first-child {
  margin-top: 0 !important;
}

/* === 隐藏的模块 === */
.section-hidden {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: none !important;
}

/* T6/T8 timeline容器内的隐藏section */
.t6-timeline .section-hidden,
.t8-timeline .section-hidden {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}
