/* ===== 知识科普页样式 ===== */

.page-hero {
  padding: 40px 0 30px;
  color: #fff;
}

.knowledge-hero {
  background: linear-gradient(135deg, #2c7a4b 0%, #1a5c35 100%);
}

.page-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-hero p {
  font-size: 15px;
  opacity: 0.88;
  margin-bottom: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: 0.8;
}

.breadcrumb a { color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb i { font-size: 10px; }
.breadcrumb span { color: #fff; }

.knowledge-main {
  padding: 36px 20px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}

/* 分类导航 */
.category-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  background: #fff;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.cat-btn:hover {
  border-color: #2c7a4b;
  color: #2c7a4b;
}

.cat-btn.active {
  background: #2c7a4b;
  border-color: #2c7a4b;
  color: #fff;
}

/* 精选文章 */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.featured-img {
  position: relative;
}

.featured-img img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

.featured-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.featured-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 12px;
  line-height: 1.4;
}

.featured-content p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* 文章分类标签 */
.article-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-cat.vaccine  { background: #fff3e8; color: var(--primary); }
.article-cat.deworm   { background: #e8f4f8; color: #2980b9; }
.article-cat.food     { background: #fff8e8; color: #e67e22; }
.article-cat.health   { background: #fee8e8; color: #e74c3c; }
.article-cat.training { background: #f5e8ff; color: #8e44ad; }
.article-cat.new      { background: #edf7ee; color: #2c7a4b; }

/* 文章元信息 */
.article-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 文章列表网格 */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.article-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.article-img {
  height: 160px;
  overflow: hidden;
}

.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-img img {
  transform: scale(1.05);
}

.article-body {
  padding: 16px;
}

.article-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-body p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 侧边栏 */
.knowledge-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.sidebar-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card h4 i {
  color: #2c7a4b;
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search-box > i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  flex: 1;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.search-box input:focus {
  border-color: #2c7a4b;
}

/* 分类列表 */
.sidebar-cats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-cats li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.sidebar-cats li:hover {
  background: #f0f8f0;
}

.sidebar-cats a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  transition: color var(--transition);
}

.sidebar-cats a:hover {
  color: #2c7a4b;
}

.sidebar-cats a i {
  color: #2c7a4b;
  width: 16px;
}

.sidebar-cats li span {
  font-size: 12px;
  color: var(--text-muted);
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 20px;
}

/* 热门文章 */
.hot-articles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hot-articles li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.hot-rank {
  width: 20px;
  height: 20px;
  background: #eee;
  color: var(--text-muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.hot-articles li:nth-child(1) .hot-rank { background: #e74c3c; color: #fff; }
.hot-articles li:nth-child(2) .hot-rank { background: #e67e22; color: #fff; }
.hot-articles li:nth-child(3) .hot-rank { background: #f39c12; color: #fff; }

.hot-articles a {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  transition: color var(--transition);
}

.hot-articles a:hover {
  color: #2c7a4b;
}

/* 疫苗时间表 */
.vaccine-schedule {
  background: #f0f8f0;
  border-color: rgba(44,122,75,0.2);
}

.schedule-table {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(44,122,75,0.2);
  margin-bottom: 10px;
}

.schedule-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  background: #2c7a4b;
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}

.schedule-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid rgba(44,122,75,0.1);
  background: #fff;
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-row:nth-child(even) {
  background: #f7fbf8;
}

.schedule-note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  color: var(--text-light);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: #2c7a4b;
  color: #2c7a4b;
}

.pagination span.active {
  background: #2c7a4b;
  border-color: #2c7a4b;
  color: #fff;
}

/* 响应式 */
@media (max-width: 992px) {
  .knowledge-layout {
    grid-template-columns: 1fr;
  }
  .knowledge-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .featured-article {
    grid-template-columns: 1fr;
  }
  .featured-img img {
    min-height: 200px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .knowledge-sidebar {
    grid-template-columns: 1fr;
  }
}
