/* =========================================================
   首页卡片区响应式修复层 (home-fix)
   说明：源码中 .rowas / .t-container 两个卡片区没有本地 CSS 控制，
   线上样式虽然能在大屏保持三列，但宽度收缩/内容高度不一时即错位。
   本文件只负责：响应式 Grid 网格 + 卡片等高 + 图片等比裁剪 + footer 对齐。
   不添加边框/阴影/圆角/颜色等视觉样式，避免与线上原有样式冲突。
   放在 index.php 原有样式之后加载。
   ========================================================= */

/* ---------- 体育赛事运营案例 (.top-product .rowas) ---------- */
.top-product .rowas {
    width: 100%;
}

.top-product .rowas > ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 强制覆盖线上可能存在的 float / 固定宽度，避免换行错位 */
.top-product .rowas > ul > li {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.top-product .rowas > ul > li > a {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

/* 图片：宽度自适应 + 等比裁剪 */
.top-product .rowas li img {
    width: 100% !important;
    height: 240px;
    object-fit: cover;
    display: block;
}

.top-product .rowas li h3 {
    margin: 14px 14px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-product .rowas li p {
    font-size: 13px;
    color: inherit;
    margin: 0 14px 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    flex: 1;
}

/* ---------- 体育产业推广案例 (.blog-area .t-container) ---------- */
.blog-area .t-container {
    max-width: 1190px;
    margin: 0 auto;
    padding: 0 15px;
}

.blog-area .t-container .bd > ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-area .t-container .bd > ul > li.t-item {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-area .t-container .bd > ul > li.t-item > a {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.blog-area .t-item > div {
    overflow: hidden;
}

.blog-area .t-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-area .t-item h3 {
    margin: 14px 0 6px;
}

.blog-area .t-item p.text-muted {
    font-size: 13px;
    margin: 0 12px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    flex: 1;
}

/* footer 推到底并右对齐 */
.blog-area .t-foot {
    list-style: none;
    padding: 0 14px;
    margin: 10px 0 16px;
    font-size: 12px;
    text-align: right;
}

/* ---------- 响应式断点 ---------- */
/* 笔记本 / 小平板：两列 */
@media (max-width: 992px) {
    .top-product .rowas > ul,
    .blog-area .t-container .bd > ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机：单列 */
@media (max-width: 560px) {
    .top-product .rowas > ul,
    .blog-area .t-container .bd > ul {
        grid-template-columns: 1fr;
    }
    .top-product .rowas li img {
        height: 200px !important;
    }
}
