/* 首页 (home/index.html) 专用样式
   按"每页独立 CSS"原则，仅包含本模板真正用到的规则。
   不含：breadcrumb / pagination / page-link / hot-article-* / category-* /
         article-summary-clamp / tag-link-sm / mb-* / ml-* / logo-icon /
         not-found-* / btn-* 等其它模板专用。 */

/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "Heiti SC", sans-serif; line-height: 1.6; color: #333; background: #f8f9fa; }
a { color: #165DFF; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.py-6 { padding: 24px 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* 头部样式 */
.header { background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.logo { display: flex; align-items: center; font-weight: bold; font-size: 1.2rem; color: #333; }
.nav { display: flex; gap: 20px; }
.nav a { color: #666; font-size: 0.9rem; }
.nav a.active { color: #165DFF; font-weight: 500; }
.menu-toggle { display: none; font-size: 1.2rem; background: none; border: none; cursor: pointer; }

/* 主内容区 */
.content-wrap { display: flex; gap: 24px; }
.main-content { flex: 1; max-width: 750px; }
.article-card { background: white; border-radius: 8px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 24px; }

/* 侧边栏 */
.sidebar { width: 300px; flex-shrink: 0; }
.sidebar-card { background: white; border-radius: 8px; padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 18px; }
.sidebar-title { font-size: 1rem; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 1px solid #eee; display: flex; align-items: center; }
.sidebar-title i { margin-right: 8px; color: #165DFF; }
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 10px; }
.toc-list a { color: #666; font-size: 0.9rem; }
.toc-list a:hover { color: #165DFF; }
.sidebar-search { padding: 16px !important; }
.search-header { display: flex; align-items: center; background: #f5f7fa; border-radius: 8px; padding: 2px; margin-bottom: 14px; }
.search-icon { padding: 10px 12px; color: #999; font-size: 1rem; }
.search-input-minimal { flex: 1; padding: 10px 12px 10px 0; border: none; background: transparent; font-size: 0.9rem; outline: none; }
.search-input-minimal::placeholder { color: #aaa; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tag { padding: 6px 14px; background: #f0f4f8; border-radius: 16px; font-size: 0.8rem; color: #555; text-decoration: none !important; transition: all 0.2s; white-space: nowrap; }
.hot-tag:hover { background: #165DFF; color: white; }

/* 文章网格（精选推荐） */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.article-item { background: white; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.04); transition: transform 0.2s; }
.article-item:hover { transform: translateY(-2px); }
.article-item img { width: 100%; height: 160px; object-fit: cover; }
.article-item-content { padding: 15px; }
.article-item-category { font-size: 0.75rem; color: #165DFF; margin-bottom: 6px; display: inline-block; }
.article-item-title { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; }
.article-item-meta { font-size: 0.75rem; color: #999; }

/* 首页横幅 */
.hero-banner { text-align: center; padding: 3rem 2rem; background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); color: #fff; border-radius: 12px; margin-bottom: 2rem; }
.hero-title { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-desc { font-size: 1.2rem; opacity: 0.9; max-width: 600px; margin: 0 auto 1.5rem; }

/* 最新资讯列表 */
.news-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.news-item { display: flex; gap: 1rem; padding: 1rem; border-radius: 8px; background: #f8f9fa; text-decoration: none; color: inherit; }
.news-item:hover { text-decoration: none; }
.news-thumb { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.news-body { flex: 1; }
.news-title { font-size: 1rem; margin: 0 0 0.5rem; color: #333; }
.news-desc { font-size: 0.85rem; color: #666; margin: 0; line-height: 1.5; }
.news-date { font-size: 0.75rem; color: #999; margin-top: 0.5rem; }

/* 文章摘要 */
.article-summary { font-size: 0.85rem; color: #666; margin: 0.5rem 0; line-height: 1.5; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.tag-link { background: #f0f7ff; padding: 6px 14px; border-radius: 16px; font-size: 0.85rem; color: #1a73e8; text-decoration: none; }
.tag-link:hover { background: #1a73e8; color: #fff; text-decoration: none; }

/* 统计网格 */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; text-align: center; }
.stats-item { padding: 1rem; background: #f8f9fa; border-radius: 8px; }
.stats-value { font-size: 1.5rem; font-weight: bold; color: #1a73e8; }
.stats-label { font-size: 0.8rem; color: #666; }

/* 页脚 */
.footer { background: linear-gradient(180deg,#1e293b 0%,#0f172a 100%); color: #94a3b8; padding: 36px 0 0; font-size: 0.85rem; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-bottom: 24px; }
.footer-col { flex: 1; min-width: 180px; }
.footer-col h3 { color: #e2e8f0; font-size: 1rem; margin-bottom: 14px; }
.footer-col p { line-height: 1.7; color: #94a3b8; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #94a3b8; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { text-align: center; padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.8rem; color: #64748b; }
.footer-bottom a { color: #94a3b8; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* 响应式 */
@media (max-width: 992px) {
    .content-wrap { flex-direction: column; }
    .sidebar { width: 100%; max-width: 100%; }
    .main-content { max-width: 100%; }
    .articles-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .menu-toggle { display: block; }
    .articles-grid { grid-template-columns: 1fr; }
}
