/**
 * download-hub.css — 下载中心（培训资料 / 白皮书 / 模板 / 行业报告）
 * 版本：20261027
 * 约定：移动端不使用 nowrap 撑宽；列表为文档流，不使用 max-height 内部滚动。
 */

.dl-page {
  background: #ffffff;
}

/* ---------- 筛选条 ---------- */
.dl-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.dl-filter__search {
  position: relative;
  flex: 1 1 280px;
  min-width: 0;
}

.dl-filter__search input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dl-filter__search input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.dl-filter__search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
}

.dl-filter__years {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dl-filter__years button {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dl-filter__years button:hover {
  border-color: #10b981;
  color: #047857;
}

.dl-filter__years button.is-active {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  font-weight: 600;
}

.dl-filter__count {
  font-size: 12.5px;
  color: #6b7a8c;
}

/* ---------- 下载卡片 ---------- */
.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  text-decoration: none;
  transition: all 0.24s ease;
}

.dl-card:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.dl-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.dl-card__type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #dc2626;
}

.dl-card__type--xlsx {
  background: #0f9e6e;
}

.dl-card__type--web {
  background: #2563eb;
}

.dl-card__type--pptx {
  background: #d97706;
}

.dl-card__title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.55;
  color: #0f172a;
  margin: 0;
}

.dl-card__desc {
  font-size: 0.86rem;
  line-height: 1.75;
  color: #52627a;
  margin: 0;
}

.dl-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.dl-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dl-card__actions a,
.dl-card__actions span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
  color: #047857;
  text-decoration: none;
  background: #ffffff;
}

.dl-card__actions a:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}

.dl-card__actions .is-primary {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.dl-card__actions .is-primary:hover {
  background: #0ea371;
}

.dl-card__actions .is-muted {
  color: #94a3b8;
  background: #f8fafc;
}

/* ---------- 报告库 ---------- */
.dl-year {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  margin-bottom: 10px;
  overflow: hidden;
}

.dl-year > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  list-style: none;
  background: #f8fafc;
}

.dl-year > summary::-webkit-details-marker {
  display: none;
}

.dl-year > summary::after {
  content: "\f107";
  font-family: "FontAwesome";
  margin-left: auto;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.dl-year[open] > summary::after {
  transform: rotate(180deg);
}

.dl-year__badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font-size: 11.5px;
  font-weight: 600;
}

.dl-year__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 4px 0;
}

.dl-report {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: #33475b;
  font-size: 0.86rem;
  line-height: 1.65;
  min-width: 0;
}

.dl-report:hover {
  background: #fbfdff;
  color: #047857;
  text-decoration: none;
}

.dl-report i {
  margin-top: 3px;
  color: #ef4444;
  font-size: 12px;
  flex: 0 0 auto;
}

.dl-report span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dl-report em {
  font-style: normal;
  color: #94a3b8;
  font-size: 11.5px;
  margin-left: 6px;
  white-space: nowrap;
}

.dl-empty {
  padding: 26px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
}

.dl-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .dl-year__list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .dl-card {
    padding: 16px;
  }
  .dl-report {
    padding: 9px 13px;
  }
  .dl-year > summary {
    padding: 12px 14px;
  }
}
