/* 页面基础：固定使用 1920px 设计画布，再随视口整体等比例缩放。 */
:root {
  --primary: #165c91;
  --text: #333333;
  --muted: #999999;
  --line: #dddddd;
  --card: #f7f7f7;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  background: #ffffff;
}

body {
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* 外层舞台跟随部门职责内容自然撑开，避免固定高度裁切内容。 */
.page-stage {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* 内层画布保留 Figma 像素坐标，页面高度由实际内容决定。 */
.page-canvas {
  width: 1920px;
  height: auto;
  zoom: calc(100vw / 1920px);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* 公共内容宽度固定为 1680px，对应设计稿左右各 120px 留白。 */
.page-content,
.organization-shell {
  width: 1680px;
  margin-right: auto;
  margin-left: auto;
}

/* 顶部导航：尺寸和坐标与职能简介页保持一致。 */
.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  width: 1920px;
  height: 120px;
  padding: 0 60px;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 150px;
  align-items: center;
  background: #ffffff;
}

.brand {
  display: flex;
  width: 804px;
  align-items: center;
}

.brand-school {
  width: 222px;
  height: 60px;
  object-fit: contain;
}

.brand-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 60px;
  margin: 0 29px;
  background: #d6d6d6;
}

.brand-department {
  width: 522px;
  height: 60px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  flex: 0 0 auto;
  height: 100%;
  align-items: center;
  gap: 40px;
  font-size: 18px;
}

.nav-item {
  position: relative;
  display: grid;
  height: 100%;
  align-items: center;
}

.nav-link {
  position: relative;
  z-index: 0;
  display: grid;
  height: 100%;
  align-items: center;
  white-space: nowrap;
}

/* 主导航悬停装饰沿用现有 Figma 切图。 */
.nav-link::before,
.nav-link::after {
  position: absolute;
  left: 50%;
  z-index: -1;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .18s ease;
}

.nav-link::before {
  top: 0;
  width: 126px;
  height: 42px;
  background-image: url("../img/figma/nav-decoration-top.png");
}

.nav-link::after {
  bottom: 0;
  width: 80px;
  height: 42px;
  background-image: url("../img/figma/nav-decoration.png");
}

.nav-item:hover .nav-link::before,
.nav-item:hover .nav-link::after,
.nav-item:focus-within .nav-link::before,
.nav-item:focus-within .nav-link::after {
  opacity: 1;
}

/* 桌面二级导航使用首页相同的 iOS 风格浮层。 */
.sub-nav { position: absolute; z-index: 2; top: 100%; left: 50%; visibility: hidden; min-width: 170px; padding: 8px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 8px; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); opacity: 0; transform: translate(-50%, -8px); transition: opacity .18s ease, transform .18s ease, visibility .18s; backdrop-filter: blur(16px); }
.sub-nav a { display: block; padding: 9px 14px; border-radius: 6px; color: var(--text); font-size: 16px; line-height: 24px; text-align: center; white-space: nowrap; }
.sub-nav a:hover, .sub-nav a:focus-visible { color: var(--primary); background: #f1f6fa; }
.nav-item:hover .sub-nav, .nav-item:focus-within .sub-nav { visibility: visible; opacity: 1; transform: translate(-50%, 0); }

/* 桌面端隐藏移动导航，手机端显示规则在文件末尾统一覆盖。 */
.mobile-navigation {
  display: none;
}

/* 机构设置横幅：从页面 y=120 开始，高度固定为 550px。 */
.organization-hero {
  position: relative;
  width: 1920px;
  height: 550px;
}

.organization-banner {
  width: 1920px;
  height: 550px;
  object-fit: cover;
}

.organization-shell {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 左侧栏目标题位于页面 x=120、y=370，尺寸为 280×380。 */
.organization-title {
  position: absolute;
  top: 250px;
  left: 0;
  z-index: 2;
  width: 280px;
  height: 380px;
  color: #ffffff;
  text-align: center;
  pointer-events: auto;
}

.organization-panel {
  position: absolute;
  inset: 0;
  width: 280px;
  height: 380px;
}

.organization-icon {
  position: relative;
  width: 48px;
  height: 42px;
  margin: 95px auto 0;
  object-fit: contain;
}

.organization-title h1 {
  position: relative;
  margin: 14px 0 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 34px;
}

/* 桌面端正文容器距二级栏目底部 60px，栏目向横幅下方延伸 20px。 */
.page-content {
  margin-top: 80px;
}

.breadcrumb {
  position: relative;
  height: 78px;
}

.breadcrumb::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 2px;
  background: var(--primary);
  content: "";
}

.breadcrumb p {
  position: absolute;
  bottom: 18px;
  left: 0;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.breadcrumb p span {
  color: var(--muted);
}

.breadcrumb img {
  position: absolute;
  right: 10px;
  bottom: 0;
  z-index: 1;
  width: 210px;
  height: 78px;
  object-fit: contain;
}

/* 七个部门按 Excel 顺序纵向排列，部门之间保留 Figma 的 60px 间距。 */
.department-list {
  display: grid;
  padding-bottom: 80px;
  row-gap: 60px;
}

/* 每个部门由职责面板和人员列表组成，内部间距统一为 40px。 */
.department-section,
.staff-list {
  display: grid;
  row-gap: 40px;
}

/* 部门职责面板使用自适应高度，长职责换行后不会覆盖后续人员。 */
.department-duty {
  min-height: 380px;
  overflow: hidden;
  border-radius: 40px 0 100px 0;
  background: var(--card);
}

/* 标题栏复现 Figma 从主色到白色的横向过渡。 */
.department-title {
  display: flex;
  height: 80px;
  margin: 0;
  padding: 0 40px;
  align-items: center;
  border-radius: 40px 0 0;
  color: #ffffff;
  background: linear-gradient(90deg, #066b9f 0%, #2f82ad 26%, #91b9ce 54%, #e4edf2 77%, #f7f7f7 100%);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
}

/* 部门职责平均分成两列，分隔线位于设计稿中线位置。 */
.duty-columns {
  display: grid;
  min-height: 300px;
  padding: 40px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  font-size: 16px;
  line-height: 36px;
}

.duty-column {
  min-width: 0;
  padding-right: 40px;
}

.duty-column + .duty-column {
  padding-right: 0;
  padding-left: 40px;
  border-left: 1px solid var(--line);
}

.duty-column p,
.staff-duty-content p {
  margin: 0;
  overflow-wrap: anywhere;
}

/* 人员行严格对应 Figma 的头像、信息和岗位职责三栏位置。 */
.staff-item {
  display: grid;
  min-height: 360px;
  grid-template-columns: 280px 480px minmax(0, 1fr);
  column-gap: 40px;
  align-items: start;
}

.staff-avatar {
  width: 260px;
  height: 340px;
  object-fit: cover;
}

.staff-summary {
  min-width: 0;
  padding-top: 40px;
}

.staff-name {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 36px;
}

/* 联系方式从 Figma 的 y=180px 位置开始，新增邮箱后自动排列在电话下方。 */
.staff-contact-list {
  display: grid;
  width: 400px;
  margin-top: 104px;
  row-gap: 20px;
}

.staff-contact-item {
  display: flex;
  height: 60px;
  margin: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 60px;
  font-size: 18px;
  line-height: 36px;
}

/* 岗位职责左侧分隔线和文字起点与 Figma 保持一致，内容过长时自然增高。 */
.staff-duty-area {
  display: grid;
  min-width: 0;
  min-height: 360px;
  padding: 40px 0 40px 40px;
  grid-template-columns: 80px minmax(0, 1fr);
  column-gap: 24px;
  border-left: 1px solid var(--line);
  font-size: 16px;
}

.staff-duty-title {
  margin: 0;
  color: #000000;
  font-size: 16px;
  font-weight: 400;
  line-height: 30px;
  white-space: nowrap;
}

.staff-duty-content {
  min-width: 0;
  padding-right: 4px;
  color: var(--text);
  line-height: 30px;
}

/* 手机端公共布局：使用设备判断结果，取消桌面画布缩放并启用一级汉堡菜单。 */
.is-mobile .page-stage {
  height: auto;
  overflow: visible;
}

.is-mobile .page-canvas {
  width: 100%;
  height: auto;
  zoom: 1;
}

.is-mobile .site-header {
  width: 100%;
  height: 72px;
  padding: 0 16px;
  grid-template-columns: minmax(0, 1fr) 44px;
  column-gap: 10px;
}

.is-mobile .brand {
  width: 100%;
  min-width: 0;
}

.is-mobile .brand-school {
  width: 96px;
  height: 36px;
}

.is-mobile .brand-divider {
  height: 34px;
  margin: 0 10px;
}

.is-mobile .brand-department {
  width: min(190px, calc(100% - 117px));
  height: 36px;
}

/* 手机端仅隐藏桌面主导航，机构栏目菜单由公共样式统一处理。 */
.is-mobile .main-nav {
  display: none;
}

/* 手机端原生折叠菜单仅保留一级导航，样式与首页汉堡菜单保持一致。 */
.is-mobile .mobile-navigation {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
}

.is-mobile .mobile-navigation summary {
  display: block;
  width: 44px;
  height: 44px;
  padding: 10px;
  list-style: none;
  cursor: pointer;
}

.is-mobile .mobile-navigation summary::-webkit-details-marker {
  display: none;
}

.is-mobile .mobile-navigation summary span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary);
  transition: transform .2s ease, opacity .2s ease;
}

.is-mobile .mobile-navigation[open] summary span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.is-mobile .mobile-navigation[open] summary span:nth-child(2) {
  opacity: 0;
}

.is-mobile .mobile-navigation[open] summary span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.is-mobile .mobile-navigation nav {
  position: absolute;
  top: 52px;
  right: 0;
  display: grid;
  width: calc(100vw - 24px);
  max-height: calc(100vh - 88px);
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  backdrop-filter: blur(16px);
}

.is-mobile .mobile-navigation nav a {
  display: flex;
  min-height: 48px;
  padding: 0 14px;
  align-items: center;
  border-radius: 6px;
  font-size: 16px;
}

/* 手机端正文与二级栏目之间统一保留 60px。 */
.is-mobile .page-content {
  width: calc(100% - 32px);
  margin-top: 60px;
}

.is-mobile .breadcrumb {
  display: flex;
  min-height: 58px;
  height: auto;
  align-items: center;
}

.is-mobile .breadcrumb p {
  position: static;
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  white-space: normal;
}

.is-mobile .breadcrumb img {
  display: none;
}

/* 手机端将所有桌面栏位改为纵向布局，保证长职责在窄屏完整显示。 */
.is-mobile .department-list {
  padding-bottom: 40px;
  row-gap: 32px;
}

.is-mobile .department-section,
.is-mobile .staff-list {
  row-gap: 16px;
}

.is-mobile .department-duty {
  min-height: 0;
  border-radius: 8px;
}

.is-mobile .department-title {
  min-height: 52px;
  height: auto;
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
  background: var(--primary);
  font-size: 17px;
  line-height: 28px;
}

.is-mobile .duty-columns {
  display: block;
  min-height: 0;
  padding: 18px 16px 20px;
  font-size: 14px;
  line-height: 1.8;
}

.is-mobile .duty-column,
.is-mobile .duty-column + .duty-column {
  padding: 0;
  border-left: 0;
}

.is-mobile .duty-column + .duty-column {
  margin-top: 8px;
}

.is-mobile .duty-column p {
  margin-bottom: 8px;
}

/* 手机端人员信息依次显示头像、姓名电话和岗位职责。 */
.is-mobile .staff-item {
  display: block;
  min-height: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.is-mobile .staff-avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 9;
  border-radius: 8px;
  object-fit: cover;
}

.is-mobile .staff-summary {
  padding-top: 20px;
}

.is-mobile .staff-name {
  font-size: 20px;
  line-height: 30px;
}

.is-mobile .staff-contact-list {
  width: 100%;
  margin-top: 16px;
  row-gap: 10px;
}

.is-mobile .staff-contact-item {
  height: 48px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 24px;
}

.is-mobile .staff-duty-area {
  display: block;
  min-height: 0;
  margin-top: 20px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  border-left: 0;
  font-size: 14px;
}

.is-mobile .staff-duty-title {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 26px;
}

.is-mobile .staff-duty-content {
  padding-right: 0;
  line-height: 1.8;
}

.is-mobile .staff-duty-content p {
  margin-bottom: 8px;
}
