@charset "utf-8";

/* ============================================================
   style-schools.css —— Schools 页面专用（纵轴线左右交错列表）
   参考 https://www.nju.edu.cn/en/Institutions/Schools_Departments.htm
   的 .list17 / .list17_box 布局思路，用 px 重写以适配本项目
   （本项目 PC 端以 1520px 内容宽为基准，不用 rem）。

   结构约定（由 schools-list.js 生成）：
     #all_list
       └ .schools-axis                ← 承载中央纵轴线
           └ .schools-axis-item × N   ← 奇数项靠左、偶数项靠右

   与现有 CSS 完全隔离：一律使用 schools- 前缀，
   不改动 .news-item / .news-list 等既有类。
   ============================================================ */
.news-title{
  position: relative;
  z-index: 0;
  height: 170px;
  text-align: center;
  /* 文字渐变色：从左到右 #63065f → #333 */
  background-image: linear-gradient(to right, #63065f 50%, #333 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #63065f; /* 不支持 background-clip:text 时的回退色 */
}

/* 原背景图由伪元素承载，避免与文字渐变用的 background 冲突 */
.news-title::before{
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/schoolslogo.png") no-repeat center center;
  background-size: contain;
  z-index: -1;
  opacity: 0.5;
}
/* 列表容器：纵轴线的定位基准 */
.schools-axis {
  position: relative;
  width: 100%;
  padding: 20px 0 10px;
}

/* 中央纵轴线 */
.schools-axis::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #e2d9e2;
  transform: translateX(-50%);
  pointer-events: none;
}

/* 单条稿件：默认（奇数项）占左半幅、文字右对齐 */
.schools-axis-item {
  position: relative;
  width: 50%;
  box-sizing: border-box;
  /* 右侧留出 60px 呼吸区，避免文字贴到轴线上 */
  padding: 0 60px 0 0;
  margin-bottom: 46px;
  text-align: right;
}

/* 偶数项：让出左半幅，改到右侧、文字左对齐 */
.schools-axis-item:nth-child(2n) {
  margin-left: 50%;
  padding: 0 0 0 60px;
  text-align: left;
}

/* 轴上的圆点：奇数项压在右侧边缘（即轴线上） */
.schools-axis-item::before {
  content: "";
  position: absolute;
  top: 10px;
  right: -6px;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #762875;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 2;
}

/* 偶数项的圆点压到左侧边缘 */
.schools-axis-item:nth-child(2n)::before {
  right: auto;
  left: -6px;
}

/* 整条稿件的可点区域 */
.schools-axis-item .schools-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* 日期 */
.schools-date {
  font-family: Gilroy, Gilroy;
  font-weight: 400;
  font-size: 15px;
  line-height: 24px;
  color: #762875;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

/* 标题 */
.schools-title {
  font-family: Gilroy, Gilroy;
  font-weight: 500;
  font-size: 21px;
  line-height: 32px;
  color: #333333;
  margin: 0;
  transition: color 0.3s ease;
}

/* 纯文字条目的空状态 */
.schools-empty {
  padding: 60px 0;
  text-align: center;
  font-size: 18px;
  color: #999;
}

/* 交互：标题变紫、圆点填充 */
.schools-axis-item:hover .schools-title {
  color: #762875;
}

.schools-axis-item:hover::before {
  background: #762875;
  transform: scale(1.18);
}

/* 键盘可达性：聚焦时给出同样的视觉反馈 */
.schools-axis-item .schools-link:focus-visible .schools-title {
  color: #762875;
}

.schools-axis-item .schools-link:focus-visible::before {
  background: #762875;
}

/* 带缩略图的条目（该栏目当前无图，留作兼容） */
.schools-thumb {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-bottom: 14px;
  border-radius: 4px;
  object-fit: cover;
}

.schools-axis-item:nth-child(2n) .schools-thumb {
  margin-left: 0;
}

.schools-axis-item:nth-child(2n-1) .schools-thumb {
  margin-left: auto;
}
