/* ============================================
   首页 V3 新框架版样式
   对应 app/index.php
   ============================================ */

/* ========== 主容器 ========== */
.home-v3 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========== Hero 区 ========== */
.home-hero {
    background: #f8f6f3;
    border: 1px solid #e8e4dc;
    border-radius: 16px;
    padding: 56px 48px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.home-hero-inner {
    position: relative;
    max-width: 560px;
    z-index: 1;
}
.home-hero-deco {
    position: absolute;
    border-radius: 50%;
    background: #8b7355;
    opacity: 0.09;
    pointer-events: none;
}
.home-hero-deco-1 {
    width: 240px; height: 240px;
    top: -90px; right: -80px;
}
.home-hero-deco-2 {
    width: 150px; height: 150px;
    bottom: -60px; left: 60px;
    opacity: 0.06;
}
.home-hero-brand {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
    letter-spacing: 2px;
}
.home-hero-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.45;
}
.home-hero-sub {
    font-size: 13px;
    color: #666;
    margin-bottom: 28px;
    line-height: 1.7;
}

/* 搜索框 */
.home-search {
    position: relative;
    margin-bottom: 18px;
    max-width: 460px;
}
.home-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #bbb;
    pointer-events: none;
}
.home-search-input {
    width: 100%;
    padding: 11px 70px 11px 38px;
    font-size: 13px;
    border: 1px solid #d6cec2;
    border-radius: 22px;
    background: #fff;
    color: #333;
    outline: none;
    box-sizing: border-box;
}
.home-search-input:focus {
    border-color: #8b7355;
    box-shadow: 0 0 0 3px rgba(139,115,85,0.08);
}
.home-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 7px 18px;
    background: #913500;
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.home-search-btn:hover { background: #7a2c00; }

/* 热门搜索 */
.home-hot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.home-hot-label {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}
.home-hot-tag {
    font-size: 11px;
    padding: 3px 10px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    transition: border-color 0.15s;
}
.home-hot-tag:hover {
    border-color: #8b7355;
    color: #333;
}

/* ========== 数据统计 ========== */
.home-stats {
    margin-bottom: 20px;
}
.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.home-stat {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
}
.home-stat-num {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
}
.home-stat-label {
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}

/* ========== 通用板块 ========== */
.home-section {
    margin-bottom: 24px;
}
.home-section-last {
    margin-bottom: 0;
}

/* ========== 快速入口（6宫格）========== */
.home-cats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.home-cat {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px 14px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: box-shadow 0.2s;
}
.home-cat:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}
.home-cat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-cat-icon svg {
    width: 22px;
    height: 22px;
}
.home-cat-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: center;
}
.home-cat-desc {
    font-size: 11px;
    color: #999;
    text-align: center;
    line-height: 1.4;
}

/* ========== 两排布局（每排左右两列）========== */
.home-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.home-col {
    min-width: 0;
}
.home-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.home-col-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}
.home-col-more {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}
.home-col-more:hover { color: #666; }

/* ========== 4 列网格卡片 ========== */
.home-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.home-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.home-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.07);
}
.home-card-cover {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f2ed;
}
.home-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-card-cover-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f2ed;
}
.home-card-cover-ph::after {
    content: '🖼';
    font-size: 24px;
    opacity: 0.3;
}
.home-card-body {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.home-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.home-card-cat {
    font-size: 11px;
    padding: 1px 7px;
    background: #f5f2ed;
    color: #913500;
    border-radius: 10px;
    width: fit-content;
}
.home-card-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #aaa;
    margin-top: auto;
}

/* ========== 最新更新 + 知识图谱 双栏 ========== */
.home-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.home-latest {
    min-width: 0;
}
.home-latest-list {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    overflow: hidden;
}
.home-latest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0ece4;
    transition: background 0.12s;
}
.home-latest-item:last-child { border-bottom: none; }
.home-latest-item:hover { background: #fafaf6; }
.home-latest-type {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 500;
}
.home-latest-title {
    flex: 1;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-latest-time {
    font-size: 11px;
    color: #bbb;
    flex-shrink: 0;
}

/* 知识图谱预览 */
.home-kg-preview {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
}
.home-kg-desc {
    font-size: 12px;
    color: #888;
    margin: 0 0 14px;
    line-height: 1.5;
}
.home-kg-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 16px;
}
.home-kg-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: #f8f6f3;
    border: 1px solid #e8e4dc;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    transition: border-color 0.15s;
}
.home-kg-tag:hover { border-color: #8b7355; }
.home-kg-link {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}
.home-kg-link:hover { color: #666; }

/* ========== 响应式 ========== */
@media (max-width: 1100px) {
    .home-cats {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 960px) {
    .home-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-row {
        grid-template-columns: 1fr;
    }
    .home-dual {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .home-hero {
        padding: 36px 20px;
    }
    .home-hero-title {
        font-size: 20px;
    }
    .home-cats {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .home-cats {
        grid-template-columns: 1fr 1fr;
    }
    .home-grid-4 {
        grid-template-columns: 1fr;
    }
    .home-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
