/* ============================================================
   download.css - 下载列表页样式
   前缀标识: zs
============================================================ */

/* ============================================================
   下载Banner（与新闻列表页保持一致）
============================================================ */
.zs-download-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.zs-download-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.zs-download-banner-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* 文案左对齐：左边距与页面内容区（max-width 1400px + 30px 内边距）对齐 */
  padding: 0 30px 0 max(30px, calc(50% - 670px));
  text-align: left;
}

.zs-download-banner-title {
  font-size: 48px;
  font-weight: 400;
  color: #ffffff;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  letter-spacing: 3px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   下载列表区
============================================================ */
.zs-download-list {
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 30px 60px;
}

/* 表头与列表行共用的列布局 */
.zs-download-head,
.zs-download-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 110px 120px 160px;
  align-items: center;
  column-gap: 20px;
}

.zs-download-head {
  padding: 14px 24px;
  background: #635796;
  border-radius: 6px 6px 0 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.zs-download-head-action {
  text-align: center;
}

.zs-download-items {
  border: 1px solid #ececec;
  border-top: none;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

/* ============================================================
   列表行
============================================================ */
.zs-download-item {
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid #ececec;
  transition: background 0.3s ease;
}

.zs-download-item:first-child {
  border-top: none;
}

.zs-download-item:nth-child(even) {
  background: #fafafa;
}

.zs-download-item:hover {
  background: #f3f1f9;
}

.zs-download-empty {
  padding: 40px 24px;
  text-align: center;
  color: #888;
  font-size: 14px;
}

/* 文件名列 */
.zs-download-name {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.zs-download-name-text {
  min-width: 0;
}

.zs-download-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e1440;
  line-height: 1.4;
  word-break: break-word;
}

.zs-download-desc {
  margin-top: 4px;
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 文件类型图标 */
.zs-download-file-icon {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 52px;
  color: #635796;
}

.zs-download-file-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.zs-download-file-icon em {
  position: absolute;
  left: 50%;
  bottom: 9px;
  transform: translateX(-50%);
  padding: 1px 4px;
  border-radius: 2px;
  background: #635796;
  color: #ffffff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* 按文件类型区分颜色 */
.zs-file-pdf { color: #d93025; }
.zs-file-pdf em { background: #d93025; }
.zs-file-doc, .zs-file-docx { color: #2b579a; }
.zs-file-doc em, .zs-file-docx em { background: #2b579a; }
.zs-file-xls, .zs-file-xlsx { color: #217346; }
.zs-file-xls em, .zs-file-xlsx em { background: #217346; }
.zs-file-ppt, .zs-file-pptx { color: #d24726; }
.zs-file-ppt em, .zs-file-pptx em { background: #d24726; }
.zs-file-rar, .zs-file-zip, .zs-file-7z { color: #8a5a00; }
.zs-file-rar em, .zs-file-zip em, .zs-file-7z em { background: #8a5a00; }
.zs-file-mp3, .zs-file-mp4 { color: #0b7fab; }
.zs-file-mp3 em, .zs-file-mp4 em { background: #0b7fab; }

/* 类型/大小/日期列 */
.zs-download-type,
.zs-download-size,
.zs-download-date {
  font-size: 14px;
  color: #555;
}

/* 移动端字段标签，PC端隐藏 */
.zs-download-label {
  display: none;
}

/* ============================================================
   下载按钮
============================================================ */
.zs-download-action {
  text-align: center;
}

.zs-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 140px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid #635796;
  border-radius: 4px;
  background: #635796;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.zs-download-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.zs-download-btn:hover,
.zs-download-btn:focus-visible {
  background: #ffffff;
  color: #635796;
}

.zs-download-btn:hover svg {
  transform: translateY(2px);
}

.zs-download-btn:focus-visible {
  outline: 2px solid #635796;
  outline-offset: 2px;
}

.zs-download-btn.is-disabled {
  background: #e5e5e5;
  border-color: #e5e5e5;
  color: #999;
  cursor: not-allowed;
}

/* ============================================================
   分页（适配系统分页输出结构 ul.pagination）
============================================================ */
.zs-download-pager {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.zs-download-pager .pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.zs-download-pager a,
.zs-download-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #666;
  transition: all 0.3s ease;
}

.zs-download-pager a:hover {
  border-color: #5B4A9E;
  color: #5B4A9E;
}

.zs-download-pager .pagination li.active span {
  background: #5B4A9E;
  border-color: #5B4A9E;
  color: #ffffff;
}

.zs-download-pager .pagination li.disabled span {
  color: #ccc;
}

/* ============================================================
   响应式
============================================================ */
@media screen and (max-width: 1024px) {
  .zs-download-banner-title {
    font-size: 36px;
  }

  .zs-download-head,
  .zs-download-item {
    grid-template-columns: minmax(0, 1fr) 80px 90px 100px 150px;
    column-gap: 14px;
  }

  .zs-download-btn {
    min-width: 0;
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .zs-download-banner-title {
    font-size: 28px;
  }

  .zs-download-list {
    padding: 30px 16px 40px;
  }

  /* 移动端隐藏表头，改为卡片式 */
  .zs-download-head {
    display: none;
  }

  .zs-download-items {
    border: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .zs-download-item,
  .zs-download-item:nth-child(even) {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    row-gap: 12px;
    column-gap: 18px;
    padding: 18px 16px;
    border: 1px solid #ececec;
    border-radius: 6px;
    background: #ffffff;
  }

  .zs-download-item:first-child {
    border-top: 1px solid #ececec;
  }

  .zs-download-name,
  .zs-download-action {
    grid-column: 1 / -1;
  }

  .zs-download-type,
  .zs-download-size,
  .zs-download-date {
    font-size: 13px;
  }

  .zs-download-label {
    display: inline;
    color: #999;
  }

  .zs-download-title {
    font-size: 15px;
  }
}

@media screen and (max-width: 480px) {
  .zs-download-banner-title {
    font-size: 22px;
  }

  .zs-download-item,
  .zs-download-item:nth-child(even) {
    grid-template-columns: 1fr 1fr;
  }

  .zs-download-date {
    grid-column: 1 / -1;
  }
}

/* zs-download-banner 文案左对齐（小屏左边距） */
@media screen and (max-width: 768px) {
  .zs-download-banner-overlay {
    padding: 0 16px;
  }
}
