/**
 * 免费课程（独立模块）前台样式
 * 自包含：只依赖全局 style.css 的 .cf-tabs / .cf-tab，不引用 resource.css / crowdfunding.css
 * 因此页面容器类（.cf-page / .cf-head / .cf-title / .cf-subtitle / .cf-empty）在这里自带一份，
 * 并用 .page-free 作用域隔离，避免未来同页引入其它主题文件时互相覆盖。
 */

/* ===== 页面容器 ===== */
.page-free .cf-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.page-free .cf-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0 18px;
}

.page-free .cf-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
}

.page-free .cf-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.page-free .cf-empty {
    padding: 60px 20px;
    text-align: center;
    font-size: 15px;
    color: #94a3b8;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

/* ===== 卡片网格 ===== */
.fc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
}

/* ===== 卡片 ===== */
.fc-card {
    display: flex;
    flex-direction: column;
    padding: 22px 22px 18px;
    background: #fff;
    border: 1px solid #e8ecf3;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.fc-card:hover {
    transform: translateY(-3px);
    border-color: #c7d2fe;
    box-shadow: 0 12px 28px rgba(79, 70, 229, .12);
}

/* 卡片头部：课程名字 + 推荐指数（5 星） */
.fc-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #edf1f7;
}

.fc-card-name {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

.fc-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    color: #f59e0b;
    white-space: nowrap;
}

.fc-star-empty {
    color: #e2e8f0;
}

.fc-score {
    margin-left: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #4f46e5;
}

.fc-score em {
    margin-left: 1px;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    color: #94a3b8;
}

/* 内容块：上榜理由 / 风格亮点 / 介绍 */
.fc-block {
    margin-top: 14px;
}

.fc-block-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #4f46e5;
}

.fc-block-title i {
    font-size: 12px;
}

.fc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fc-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 5px;
    font-size: 13.5px;
    line-height: 1.65;
    color: #475569;
}

.fc-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c7d2fe;
}

/* 富文本介绍：限高，避免长文把卡片撑开 */
.fc-desc {
    max-height: 168px;
    overflow: hidden;
    font-size: 13.5px;
    line-height: 1.75;
    color: #475569;
}

.fc-desc p {
    margin: 0 0 8px;
}

.fc-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.fc-desc ul,
.fc-desc ol {
    margin: 0 0 8px;
    padding-left: 20px;
}

/* 底部：免费领取（跳在线客服） */
.fc-card-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
}

.fc-btn-claim {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(99, 102, 241, .28);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.fc-btn-claim:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, .36);
}

.fc-btn-claim:active {
    transform: translateY(0);
}

.fc-foot-hint {
    flex-shrink: 0;
    font-size: 12px;
    color: #94a3b8;
}

/* ===== 移动端 ===== */
@media (max-width: 640px) {
    .page-free .cf-page {
        padding: 0 14px 40px;
    }

    .page-free .cf-title {
        font-size: 21px;
    }

    .fc-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .fc-card {
        padding: 18px 16px 14px;
        border-radius: 14px;
    }

    .fc-card-name {
        font-size: 16px;
    }

    .fc-desc {
        max-height: none;
    }

    .fc-btn-claim {
        padding: 11px 14px;
        font-size: 13.5px;
    }

    .fc-foot-hint {
        display: none;
    }
}
