/* =========================================
   聚创首页专属样式
   ========================================= */

   .index-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 12%, rgba(166, 205, 173, .16), transparent 25%),
        #f5f8f4;
    color: #17372a;
}

.index-page *,
.index-page *::before,
.index-page *::after {
    box-sizing: border-box;
}

/* 强制首页使用较宽的内容区域 */
.index-page .wrap,
.index-page .main,
.index-page .container {
    width: min(1180px, calc(100% - 56px)) !important;
    max-width: none !important;
    margin-left: auto;
    margin-right: auto;
}

/* 顶部导航不要被首页内容宽度影响 */
.index-page > .wrap:first-of-type {
    width: min(1320px, calc(100% - 56px)) !important;
    min-height: 72px;
}

/* 首页 Hero */
.index-page .hero {
    width: min(1180px, calc(100% - 56px)) !important;
    min-height: 390px;
    margin: 18px auto 0;
    padding: 58px 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 56px;
    overflow: hidden;
    border-radius: 25px;
    background:
        radial-gradient(circle at 84% 22%, rgba(126, 193, 142, .28), transparent 28%),
        linear-gradient(125deg, #c7a623, #dbb520 55%, #b39007);

    box-shadow: 0 18px 38px rgba(25, 77, 47, .14);
    color: #fff;
}

.index-page .hero > div:first-child {
    max-width: 650px;
}

.index-page .hero h1 {
    max-width: 860px;
    margin: 12px 0 18px;
    color: #fff;
    font: 50px/1.17 Georgia, "STSong", serif;
    letter-spacing: -.045em;
}

.index-page .hero p {
    max-width: 700px;
    margin: 0;
    color: #d7eadb;
    font-size: 16px;
    line-height: 1.85;
}

.index-page .hero .ey {
    color: #b9d9c0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
}

.index-page .hero .btn {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin-top: 24px;
    padding: 0 17px;
    border-radius: 10px;
    background: #fff;
    color: #17603b !important;
}

.index-page .hero .btn + .btn {
    margin-left: 8px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff !important;
}

/* Hero 右侧统计，如果首页模板存在 .stats */
.index-page .hero .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 10px;
    flex: 0 0 300px;
}

.index-page .hero .stat {
    padding: 18px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 15px;
    background: rgba(255, 255, 255, .10);
    text-align: center;
}

.index-page .hero .stat b {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 25px;
}

/* 首页各内容区 */
.index-page .section,
.index-page .projects-section,
.index-page .works-section {
    width: min(1180px, calc(100% - 56px)) !important;
    max-width: none !important;
    margin: 50px auto 0;
}

.index-page .section > .ey,
.index-page .projects-section > .ey,
.index-page .works-section > .ey {
    color: #207046;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
}

.index-page .section > h2,
.index-page .projects-section > h2,
.index-page .works-section > h2 {
    margin: 9px 0 22px;
    color: #17372a;
    font: 31px/1.25 Georgia, "STSong", serif;
    letter-spacing: -.025em;
}

/* 项目和工作列表统一使用多列 */
.index-page .grid,
.index-page .project-grid,
.index-page .work-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    margin-top: 0;
}

/* 如果原模板使用 .two，不让首页继续使用过窄的两列比例 */
.index-page .two {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.index-page .card,
.index-page .project-card,
.index-page .work-card {
    min-height: 235px;
    margin: 0 !important;
    padding: 23px;
    border: 1px solid #dce8dc;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(31, 71, 43, .055);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.index-page .card:hover,
.index-page .project-card:hover,
.index-page .work-card:hover {
    border-color: #bdd7c1;
    box-shadow: 0 15px 32px rgba(31, 71, 43, .11);
    transform: translateY(-3px);
}

.index-page .card h3,
.index-page .project-card h3,
.index-page .work-card h3 {
    margin: 12px 0 9px;
    color: #17372a;
    font: 22px/1.3 Georgia, "STSong", serif;
}

.index-page .card p,
.index-page .project-card p,
.index-page .work-card p {
    min-height: 50px;
    margin: 0;
    color: #68796d;
    line-height: 1.7;
}

.index-page .card a,
.index-page .project-card a,
.index-page .work-card a {
    display: inline-block;
    margin-top: 17px;
    color: #207046;
    font-weight: 800;
    text-decoration: none;
}

.index-page .card a:hover,
.index-page .project-card a:hover,
.index-page .work-card a:hover {
    color: #123b28;
}

.index-page .pill {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid #d8e9da;
    border-radius: 999px;
    background: #f1f8f1;
    color: #207046;
    font-size: 11px;
    font-weight: 700;
}

.index-page .empty {
    grid-column: 1 / -1;
    padding: 40px 20px;
    border: 1px dashed #cbdcca;
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    color: #718075;
    text-align: center;
}

@media (max-width: 980px) {
    .index-page .hero {
        min-height: 350px;
        padding: 45px 43px;
    }

    .index-page .hero h1 {
        font-size: 42px;
    }

    .index-page .hero .stats {
        flex-basis: 245px;
        grid-template-columns: 1fr;
    }

    .index-page .grid,
    .index-page .project-grid,
    .index-page .work-grid,
    .index-page .two {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 680px) {
    .index-page .wrap,
    .index-page .main,
    .index-page .container,
    .index-page .hero,
    .index-page .section,
    .index-page .projects-section,
    .index-page .works-section {
        width: calc(100% - 28px) !important;
    }

    .index-page .hero {
        min-height: 0;
        margin-top: 10px;
        padding: 37px 25px;
        display: block;
    }

    .index-page .hero h1 {
        font-size: 36px;
    }

    .index-page .hero p {
        font-size: 14px;
    }

    .index-page .hero .stats {
        margin-top: 25px;
        grid-template-columns: repeat(3, 1fr);
    }

    .index-page .grid,
    .index-page .project-grid,
    .index-page .work-grid,
    .index-page .two {
        grid-template-columns: 1fr !important;
    }

    /* 【2026-09-17新增】手机端在线人数模块适配 */
    .index-page .online-user-list {
        gap: 10px 14px;  /* 缩小间距 */
    }
    .index-page .online-user-chip {
        width: 56px;  /* 头像缩小 */
        height: 56px;
    }
    .index-page .online-user-chip img {
        width: 40px;
        height: 40px;
    }
    .index-page .online-user-name {
        font-size: 11px;  /* 名字字号缩小 */
    }
}

/* ============================================================
   2026-09-17 新增需求2：首页在线人数模块样式
   位置：在"正在推进的项目"和"找到适合你的工作"两个section之间
   数据源：Kpi::index() 查 fa_user.last_activity 字段
   显示：最多20个头像+昵称，超出显示"+N人在线"
   ============================================================ */

/* 在线人数区块容器 */
.index-page .online-section {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #f0f7f1, #ffffff);
    border: 1px solid #cfe0cf;
    border-radius: 16px;
}

/* 标题右侧的在线总数徽章 */
.index-page .online-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #cfe0cf;
    border-radius: 999px;
    color: #2d6a3f;
    font-size: 14px;
    font-weight: 700;
}

/* 在线绿点（脉冲动画效果，呼吸感） */
.index-page .online-dot {
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(46, 204, 113, .7);
    animation: online-pulse 1.8s infinite;
}

@keyframes online-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, .7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* 头像列表容器：横向排列，自动换行 */
.index-page .online-user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 18px;
    margin-top: 16px;
    align-items: center;
}

/* 单个用户卡片：圆形头像 + 名字 */
.index-page .online-user-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 72px;
    cursor: pointer;
    transition: transform .2s;
}

.index-page .online-user-chip:hover {
    transform: translateY(-3px);
}

.index-page .online-user-chip img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
    background: #eee;  /* 图片加载前显示浅灰底 */
}

.index-page .online-user-name {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #315340;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* 剩余人数标签（当在线>20时） */
.index-page .online-user-rest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 52px;
    padding: 0 14px;
    background: #207046;
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

/* 空状态提示 */
.index-page .online-empty {
    padding: 30px 10px;
    text-align: center;
    color: #748477;
    font-size: 14px;
    font-style: italic;
}
