/* 首页文库风格：三栏推荐 + 深度好文文档卡片 */
.eyou_matter .ey_majoro .inward .ks-wenku-hero,
.eyou_matter .ey_majoro .inward .ks-deep-section {
  width: 100%;
  clear: both;
  box-sizing: border-box;
}

.ks-wenku-hero {
  display: flex;
  gap: 0;
  margin-top: 16px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  min-height: 320px;
}

.ks-wenku-hero .ks-wenku-col {
  box-sizing: border-box;
}

.ks-wenku-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 10px;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.ks-wenku-hd img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* 左：文库分类 */
.ks-wenku-cat {
  width: 22%;
  flex-shrink: 0;
  border-right: 1px solid #e8e8e8;
}

.ks-wenku-cat-box {
  padding: 8px 10px 14px;
}

.ks-cat-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-cat-grid li {
  width: 50%;
  box-sizing: border-box;
  padding: 6px 4px;
}

.ks-cat-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #444;
  line-height: 1.4;
  transition: color 0.2s;
}

.ks-cat-grid a:hover {
  color: #2b7cd3;
}

.ks-cat-grid a i {
  font-style: normal;
  color: #bbb;
  font-size: 14px;
  margin-left: 4px;
}

/* 中：精选推荐 */
.ks-wenku-featured {
  width: 38%;
  flex-shrink: 0;
  border-right: 1px solid #e8e8e8;
}

.ks-feature-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
}

.ks-feature-item:last-child {
  border-bottom: none;
}

.ks-feature-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ks-feature-hd h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  flex: 1;
}

.ks-feature-hd h3 a {
  color: #222;
}

.ks-feature-hd h3 a:hover {
  color: #2b7cd3;
}

.ks-date-pill {
  flex-shrink: 0;
  font-size: 12px;
  color: #999;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 2px 8px;
  line-height: 1.5;
}

.ks-feature-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ks-thumb {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 72px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #fafafa;
}

.ks-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ks-doc-badge {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  background: url(../images/doc-w.svg) center/cover no-repeat;
}

.ks-feature-txt {
  flex: 1;
  min-width: 0;
}

.ks-feature-txt p {
  margin: 0 0 10px;
  font-size: 12px;
  color: #888;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ks-read-btn {
  display: inline-block;
  padding: 5px 16px;
  font-size: 13px;
  color: #fff;
  background: #2b7cd3;
  border-radius: 3px;
  line-height: 1.5;
}

.ks-read-btn:hover {
  background: #1a6bc2;
  color: #fff;
}

/* 右：文章列表 */
.ks-wenku-list {
  width: 40%;
  flex: 1;
  padding: 8px 0 10px;
}

.ks-wenku-list ul {
  margin: 0;
  padding: 0 12px;
  list-style: none;
}

.ks-wenku-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 13px;
  line-height: 1.4;
}

.ks-wenku-list li:last-child {
  border-bottom: none;
}

.ks-doc-icon-sm {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background: url(../images/doc-w.svg) center/cover no-repeat;
}

.ks-wenku-list li a {
  flex: 1;
  min-width: 0;
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ks-wenku-list li a:hover {
  color: #2b7cd3;
}

.ks-wenku-list .ks-date {
  flex-shrink: 0;
  font-size: 12px;
  color: #aaa;
}

/* 深度好文：标题栏 + 双栏文章 + 热门榜 */
.ks-deep-section {
  margin-top: 20px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
}

.ks-deep-hd {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.ks-deep-title {
  margin: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.ks-deep-title img {
  width: 20px;
  height: 20px;
}

.ks-deep-tabs {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  min-width: 0;
}

.ks-deep-tabs a {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
}

.ks-deep-tabs a:hover {
  color: #2b7cd3;
}

.ks-deep-more {
  flex-shrink: 0;
  padding: 4px 14px;
  font-size: 13px;
  color: #fff;
  background: #2b7cd3;
  border-radius: 14px;
  line-height: 1.5;
}

.ks-deep-more:hover {
  background: #1a6bc2;
  color: #fff;
}

.ks-deep-bd {
  display: flex;
  align-items: stretch;
}

.ks-deep-col {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #eee;
}

.ks-deep-feature {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.ks-deep-thumb {
  position: relative;
  flex-shrink: 0;
  width: 88px;
  height: 110px;
  border: 1px solid #e8e8e8;
  background: #fafafa;
  overflow: hidden;
}

.ks-deep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ks-deep-feature-info {
  flex: 1;
  min-width: 0;
}

.ks-deep-feature-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  line-height: 1.45;
  margin-bottom: 6px;
}

.ks-deep-feature-title:hover {
  color: #2b7cd3;
}

.ks-deep-feature-info p {
  margin: 0 0 8px;
  font-size: 12px;
  color: #999;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ks-deep-feature-date {
  font-size: 12px;
  color: #bbb;
}

.ks-deep-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-deep-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 13px;
}

.ks-deep-list li:last-child {
  border-bottom: none;
}

.ks-deep-list li a {
  flex: 1;
  min-width: 0;
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ks-deep-list li a:hover {
  color: #2b7cd3;
}

.ks-deep-side {
  width: 28%;
  flex-shrink: 0;
  padding: 12px 14px;
  background: #fafafa;
}

.ks-hot-hd {
  margin: 0 0 12px;
  padding-left: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  border-left: 3px solid #2b7cd3;
  line-height: 1.3;
}

.ks-hot-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.4;
}

.ks-rank {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.ks-rank em {
  display: inline-block;
  width: 18px;
  height: 18px;
  font-style: normal;
  font-size: 11px;
  line-height: 18px;
  color: #fff;
  border-radius: 50%;
  background: #ccc;
}

.ks-rank-1 .ks-rank em { background: #ff6f06; }
.ks-rank-2 .ks-rank em { background: #2b7cd3; }
.ks-rank-3 .ks-rank em { background: #52c41a; }

.ks-hot-title {
  flex: 1;
  min-width: 0;
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ks-hot-title:hover {
  color: #2b7cd3;
}

.ks-hot-date {
  flex-shrink: 0;
  font-size: 12px;
  color: #aaa;
}

/* 电子书区块：覆盖 home.css 默认隐藏，保证 Tab 内容可见 */
.eyou_matter .ey_impor2 .ey_hznr > .eyou_lbabbr {
  display: none !important;
}

.eyou_matter .ey_impor2 .ey_hznr > .eyou_lbabbr.is-active {
  display: block !important;
}

.eyou_matter .ey_impor2 .ey_hznr .ey_movie ul {
  font-size: 0;
  line-height: 0;
}

.eyou_matter .ey_impor2 .ey_hznr .ey_movie ul li {
  font-size: 14px;
  line-height: 1.5;
  vertical-align: top;
}

@media (max-width: 992px) {
  .ks-wenku-hero {
    flex-direction: column;
  }
  .ks-wenku-cat,
  .ks-wenku-featured,
  .ks-wenku-list {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
  }
  .ks-deep-hd {
    flex-wrap: wrap;
  }
  .ks-deep-bd {
    flex-direction: column;
  }
  .ks-deep-col {
    border-right: none;
    border-bottom: 1px solid #eee;
  }
  .ks-deep-side {
    width: 100%;
  }
}

/* 左侧首页/文库图标紧挨排列，避免 space-between 分到两侧 */
.eyou_matter .ey_majoro .eyou_xs .eyou_zc {
  width: auto;
  min-width: 120px;
  justify-content: flex-start;
  gap: 20px;
  padding: 0 24px 0 8px;
}
