/* ===== 首页专属样式 ===== */

/* Hero 区域 */
.home-hero {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 50%, #f5f0ff 100%);
  border-radius: 14px;
  padding: 36px 32px;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(64,158,255,0.06);
}

.home-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(64,158,255,0.04);
}

.home-hero h2 {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin: 0 0 10px 0;
  position: relative;
}

.home-hero p {
  font-size: 15px;
  color: #666;
  margin: 0 0 20px 0;
  line-height: 1.6;
  position: relative;
}

.home-hero .hero-search {
  display: inline-flex;
  max-width: 500px;
  width: 100%;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  position: relative;
}

.home-hero .hero-search input {
  flex: 1;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  color: #333;
  outline: none;
  background: transparent;
}

.home-hero .hero-search input::placeholder {
  color: #bbb;
}

.home-hero .hero-search button {
  border: none;
  background: linear-gradient(135deg, #409eff, #337ecc);
  color: #fff;
  padding: 12px 28px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.home-hero .hero-search button:hover {
  background: linear-gradient(135deg, #337ecc, #2d6bb5);
}

/* 分区标题 */
.home-section {
  margin-bottom: 24px;
}

.home-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.home-section .section-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid #409eff;
}

.home-section .section-header .more-link {
  font-size: 13px;
  color: #999;
  text-decoration: none;
}

.home-section .section-header .more-link:hover {
  color: #409eff;
}

/* 分类卡片网格 */
.cate-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cate-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  border: 1px solid #f0f0f0;
  transition: all 0.25s;
}

.cate-card:hover {
  border-color: #409eff;
  box-shadow: 0 4px 16px rgba(64,158,255,0.1);
  transform: translateY(-2px);
}

.cate-card .cate-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 10px;
}

.cate-card .cate-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.cate-card .cate-count {
  font-size: 12px;
  color: #bbb;
}

/* 精选内容列表 */
.featured-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.featured-item {
  display: flex;
  align-items: flex-start;
  padding: 16px 20px;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.2s;
}

.featured-item:last-child {
  border-bottom: none;
}

.featured-item:hover {
  background: #fafcff;
}

.featured-item .featured-img {
  width: 120px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: 16px;
  background: #f5f5f5;
}

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

.featured-item .featured-info {
  flex: 1;
  min-width: 0;
}

.featured-item .featured-title {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin: 0 0 6px 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-item:hover .featured-title {
  color: #409eff;
}

.featured-item .featured-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  margin: 0 0 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-item .featured-meta {
  font-size: 12px;
  color: #bbb;
}

.featured-item .featured-meta span {
  margin-right: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
  .home-hero {
    padding: 28px 20px;
  }

  .home-hero h2 {
    font-size: 20px;
  }

  .home-hero p {
    font-size: 14px;
  }

  .home-hero .hero-search {
    max-width: 100%;
  }

  .cate-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .featured-item {
    padding: 12px 14px;
  }

  .featured-item .featured-img {
    width: 100px;
    height: 68px;
    margin-right: 12px;
  }

  .featured-item .featured-title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .home-hero {
    padding: 22px 14px;
  }

  .home-hero h2 {
    font-size: 18px;
  }

  .home-hero .hero-search input {
    padding: 10px 14px;
    font-size: 13px;
  }

  .home-hero .hero-search button {
    padding: 10px 18px;
    font-size: 13px;
  }

  .cate-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .cate-card {
    padding: 14px 10px;
  }

  .cate-card .cate-icon {
    font-size: 26px;
  }

  .featured-item {
    padding: 10px 12px;
  }

  .featured-item .featured-img {
    width: 80px;
    height: 56px;
    margin-right: 10px;
  }

  .featured-item .featured-title {
    font-size: 13px;
  }

  .featured-item .featured-desc {
    display: none;
  }
}