/* 资料库列表 + 详情（与原 assets.html 风格一致，配合 home.css 顶栏/页脚） */

.library-page-header {
  background: linear-gradient(135deg, #0f4c81 0%, #1a6ba0 100%);
  color: #fff;
  padding: 50px 0 40px;
  margin-bottom: 40px;
}
.library-page-header h1 {
  font-size: 32px;
  margin-bottom: 12px;
}
.library-page-header p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 700px;
}
.library-page-header .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 20px;
  font-size: 14px;
}
.library-page-header .stats span {
  opacity: 0.8;
}

.library-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 15px;
}
.library-category-nav .category-link {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  background-color: #f0f2f5;
  color: #666;
}
.library-category-nav .category-link.active {
  background-color: #2c7a4a;
  color: #fff;
}
.library-category-nav .category-link:hover:not(.active) {
  background-color: #e0e4e8;
  color: #2c7a4a;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 50px;
}
.resource-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
a.resource-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.resource-card:hover .resource-title {
  color: #ff7f24;
}
.resource-cover {
  height: 140px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6d9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #2c7a4a;
}
.resource-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.resource-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  align-self: flex-start;
  font-weight: 500;
  background: #e8f5e9;
  color: #2c7a4a;
}
.resource-title {
  font-size: 18px;
  font-weight: 600;
  color: #0f4c81;
  margin-bottom: 10px;
  line-height: 1.4;
}
.resource-stars-row {
  font-size: 13px;
  letter-spacing: 1px;
  color: #c9a227;
  margin-bottom: 8px;
}
.resource-summary {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.resource-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 12px;
}
.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.resource-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f0f2f5;
  border-radius: 4px;
  font-size: 11px;
  color: #666;
}
.resource-card-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background-color: #ff7f24;
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

.library-two-columns {
  display: flex;
  gap: 30px;
}
.library-main {
  flex: 3;
  min-width: 0;
}
.library-sidebar {
  flex: 1;
  min-width: 240px;
}
.sidebar-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.sidebar-card h3 {
  font-size: 16px;
  color: #0f4c81;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1bf18;
}
.hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hot-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e8eef5;
}
.hot-list li:last-child {
  border-bottom: none;
}
.hot-list a {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}
.hot-list a:hover {
  color: #ff7f24;
}
.hot-meta {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}
.recommend-tag {
  display: inline-block;
  background: #f0f2f5;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.library-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 60px;
}
.library-pagination a.page-item,
.library-pagination span.page-item {
  padding: 8px 14px;
  background: #fff;
  border-radius: 6px;
  color: #333;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  font-size: 14px;
}
.library-pagination a.page-item:hover,
.library-pagination a.page-item.active {
  background-color: #2c7a4a;
  color: #fff;
  border-color: #2c7a4a;
}
.library-pagination span.page-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 详情页 */
.library-detail-wrap {
  max-width: 880px;
  margin: 0 auto 60px;
  padding: 0 20px;
}
.library-breadcrumb {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}
.library-breadcrumb a {
  color: #0f4c81;
}
.library-breadcrumb a:hover {
  color: #ff7f24;
}
.library-detail-hero {
  background: #fff;
  border-radius: 12px;
  padding: 28px 28px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}
.library-detail-hero h1 {
  font-size: 26px;
  color: #0f4c81;
  margin-bottom: 12px;
  line-height: 1.35;
}
.library-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}
.library-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.library-detail-tags .resource-tag {
  font-size: 12px;
}
.library-detail-actions {
  margin-top: 18px;
}
.library-detail-actions .btn-download {
  display: inline-block;
  padding: 12px 28px;
  background: #ff7f24;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.library-detail-actions .btn-download:hover {
  background: #e67018;
  transform: translateY(-1px);
}
.library-detail-actions .btn-download[disabled],
.library-detail-actions .btn-download.is-disabled {
  background: #ccc;
  pointer-events: none;
}

.library-detail-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}
.library-detail-section h2 {
  font-size: 18px;
  color: #0f4c81;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1bf18;
}
.library-detail-section .section-body {
  color: #555;
  font-size: 15px;
  line-height: 1.75;
}
.library-detail-section .section-body p {
  margin-bottom: 12px;
}
.library-detail-section .section-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 992px) {
  .library-two-columns {
    flex-direction: column;
  }
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
}
