/*
 * @kanway-css-index
 * 文件: css/service/download-hub.css
 * 引用: service-download.html
 * 依赖: header.css, page-banner.css
 */

.dlh-page {
  padding: 0 0 72px;
  clear: both;
}

.dlh-intro {
  margin: 36px 0 28px;
  max-width: 720px;
}

.dlh-intro__lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: #495057;
}

/* 工具栏 */
.dlh-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px 20px;
  background: #f4f7fb;
  border: 1px solid #dce4ee;
  border-radius: 12px;
}

.dlh-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 8px;
}

.dlh-search:focus-within {
  border-color: #1d5198;
  box-shadow: 0 0 0 3px rgba(29, 81, 152, 0.12);
}

.dlh-search .bx {
  font-size: 20px;
  color: #868e96;
  flex-shrink: 0;
}

.dlh-search input {
  flex: 1;
  border: 0;
  padding: 12px 0;
  font-size: 15px;
  outline: none;
  background: transparent;
}

.dlh-count {
  font-size: 14px;
  color: #6c757d;
  white-space: nowrap;
}

.dlh-count strong {
  color: #1d5198;
  font-weight: 700;
}

/* 分类筛选 */
.dlh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.dlh-filter {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dlh-filter:hover {
  border-color: #1d5198;
  color: #1d5198;
}

.dlh-filter.is-active {
  background: #1d5198;
  border-color: #1d5198;
  color: #fff;
}

/* 精选 */
.dlh-featured {
  margin-bottom: 40px;
}

.dlh-featured__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.dlh-featured__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dlh-featured-card {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  background: linear-gradient(135deg, #1d5198 0%, #2a6bb5 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dlh-featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29, 81, 152, 0.35);
  color: #fff;
}

.dlh-featured-card .bx {
  font-size: 32px;
  opacity: 0.9;
  margin-bottom: 12px;
}

.dlh-featured-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.dlh-featured-card p {
  margin: 0;
  font-size: 13px;
  opacity: 0.88;
  line-height: 1.5;
}

.dlh-featured-card__action {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
}

/* 分类区块 */
.dlh-section {
  margin-bottom: 40px;
}

.dlh-section[hidden] {
  display: none !important;
}

.dlh-section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
}

.dlh-section__head .bx {
  font-size: 26px;
  color: #1d5198;
}

.dlh-section__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.dlh-section__head p {
  margin: 0 0 0 auto;
  font-size: 14px;
  color: #868e96;
  max-width: 420px;
  text-align: right;
}

/* 资源卡片 */
.dlh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dlh-card {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 18px 16px;
  background: #fff;
  border: 1px solid #e1e5ea;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dlh-card:hover {
  border-color: #b8cce8;
  box-shadow: 0 4px 16px rgba(29, 81, 152, 0.08);
}

.dlh-card.is-hidden {
  display: none;
}

.dlh-card__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.dlh-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 22px;
}

.dlh-card__icon--pdf {
  background: #fde8e8;
  color: #c92a2a;
}

.dlh-card__icon--zip {
  background: #fff3e0;
  color: #e67700;
}

.dlh-card__icon--video {
  background: #e7f5ff;
  color: #1971c2;
}

.dlh-card__icon--image {
  background: #ebfbee;
  color: #2f9e44;
}

.dlh-card__icon--link {
  background: #e8f0fa;
  color: #1d5198;
}

.dlh-card__icon--app {
  background: #f3f0ff;
  color: #5f3dc4;
}

.dlh-card__body {
  flex: 1;
  min-width: 0;
}

.dlh-card__body h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

.dlh-card__meta {
  margin: 0;
  font-size: 12px;
  color: #868e96;
}

.dlh-card__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed #e9ecef;
}

.dlh-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1d5198;
  background: #e8f0fa;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.dlh-card__btn:hover {
  background: #1d5198;
  color: #fff;
}

/* 空状态 */
.dlh-empty {
  text-align: center;
  padding: 48px 24px;
  background: #f8f9fb;
  border: 1px dashed #ced4da;
  border-radius: 12px;
}

.dlh-empty .bx {
  font-size: 48px;
  color: #adb5bd;
}

.dlh-empty p {
  margin: 12px 0 0;
  font-size: 15px;
  color: #6c757d;
}

.dlh-empty[hidden] {
  display: none;
}

/* 底部提示 */
.dlh-footnote {
  margin-top: 8px;
  padding: 20px 22px;
  font-size: 14px;
  line-height: 1.7;
  color: #6c757d;
  background: #fff8f0;
  border: 1px solid #f0dcc4;
  border-radius: 10px;
}

.dlh-footnote a {
  font-weight: 600;
  color: #1d5198;
}

/* 序列码弹窗 */
.dlh-serial-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dlh-serial-modal[hidden] {
  display: none !important;
}

.dlh-serial-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.dlh-serial-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 28px 26px 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.dlh-serial-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f3f5;
  color: #495057;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dlh-serial-modal__close:hover {
  background: #e9ecef;
  color: #1d5198;
}

.dlh-serial-modal__close .bx {
  font-size: 22px;
}

.dlh-serial-modal__title {
  margin: 0 0 10px;
  padding-right: 36px;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.dlh-serial-modal__hint {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.7;
  color: #6c757d;
}

#dlh-serial-resource {
  margin-bottom: 14px;
}

.dlh-serial-modal__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.dlh-serial-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-size: 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dlh-serial-modal__input:focus {
  border-color: #1d5198;
  box-shadow: 0 0 0 3px rgba(29, 81, 152, 0.15);
}

.dlh-serial-modal__error {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #c92a2a;
}

.dlh-serial-modal__error[hidden] {
  display: none;
}

.dlh-serial-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.dlh-serial-modal__btn {
  flex: 1;
  min-width: 120px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.dlh-serial-modal__btn--primary {
  background: #1d5198;
  color: #fff;
}

.dlh-serial-modal__btn--primary:hover {
  background: #153a6b;
}

.dlh-serial-modal__btn--ghost {
  background: #f1f3f5;
  color: #495057;
}

.dlh-serial-modal__btn--ghost:hover {
  background: #e9ecef;
}

.dlh-serial-modal__contact {
  margin: 16px 0 0;
  font-size: 13px;
  color: #868e96;
  text-align: center;
}

.dlh-serial-modal__contact a {
  font-weight: 600;
  color: #1d5198;
}

body.dlh-modal-open {
  overflow: hidden;
}

@media (max-width: 991px) {
  .dlh-featured__grid,
  .dlh-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dlh-section__head {
    flex-wrap: wrap;
  }

  .dlh-section__head p {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .dlh-featured__grid,
  .dlh-grid {
    grid-template-columns: 1fr;
  }

  .dlh-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
