/* ============================================================
   免费模板列表页专用样式（templist.html）
   独立于 case 样式，封面按 379:665 竖图比例展示，桌面一行四列
   ============================================================ */

/* 分类导航 */
.free-tpl .case-group,
.case-group {
    font-size: 18px;
    margin: 0 auto 24px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 28px;
    max-width: 1200px
}

.case-group-item {
    color: #595757;
    cursor: pointer;
    line-height: 50px;
    white-space: nowrap
}

.case-group-item:hover {
    color: #007aff
}

.case-group-item.active {
    border-bottom: 2px solid #007aff;
    color: #007aff;
    font-weight: 600
}

/* 列表容器：桌面一行四列 */
.case-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px
}

/* 卡片 */
.case-list .activity-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(220, 220, 220, .5);
    position: relative;
    transition: all .35s ease-in-out;
    cursor: pointer;
    display: flex;
    flex-direction: column
}

.case-list .activity-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 22px rgba(0, 122, 255, .18)
}

/* 封面：锁定 379:665 竖图比例，长图完整显示不被压扁 */
.case-list .activity-item .cover-container {
    position: relative;
    width: 100%;
    aspect-ratio: 379 / 665;
    background: #f2f4f7;
    border-radius: 10px 10px 0 0;
    overflow: hidden
}

.case-list .activity-item .cover-container img.cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

/* 悬停遮罩（二维码 / 创建按钮） */
.case-list .activity-item .cover-container .mask {
    display: none;
    position: absolute;
    inset: 0;
    height: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, .35)
}

.case-list .activity-item:hover .cover-container .mask {
    display: block
}

/* 二维码卡片 */
.qrcode-container {
    width: 119px;
    height: 122px;
    margin: 70% auto 0;
    background: #fff;
    text-align: center;
    padding: 10px 0;
    border-radius: 6px;
    display: flex;
    flex-direction: column
}

.qrcode-container .hint-text {
    font-size: 12px
}

.cover-container .mask .qrcode canvas {
    margin: auto !important
}

/* 搜索框按钮 */
.input span {
    cursor: pointer
}

/* 标题 */
.actitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 700;
    color: #000 !important;
    margin: 14px auto;
    padding: 0 10px;
    text-align: center;
    cursor: pointer
}

.actitle a:hover {
    color: #5f89f7
}

/* 空数据 */
.list-empty {
    text-align: center;
    padding: 60px 0;
    color: #999
}

.list-empty img {
    width: 120px;
    margin-bottom: 12px
}

/* 平板：三列 */
@media (min-width: 700px) and (max-width: 999px) {
    .case-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px
    }
}

/* 手机：两列 */
@media (max-width: 699px) {
    .case-group {
        gap: 0 14px;
        margin-bottom: 14px
    }

    .case-group .case-group-item {
        font-size: 13px;
        line-height: 38px
    }

    .case-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 0 10px
    }

    .case-list .activity-item:hover {
        transform: none
    }

    .actitle {
        margin: 10px auto
    }
}
