/* ============================================================
   客户案例卡片
   列表首图铺满卡片，详情推荐将 logo 放在图片上方。
   两处复用图片比例、文字和三列网格。
   ============================================================ */
#customes-news{
    /* 为站点右侧固定咨询栏留出空间，避免遮住第三列。 */
    width: calc(100% - 200px);
    max-width: 1200px;
    padding-bottom: 64px;
}
.case-list{
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
/* 三列：(100% - 两个 24px 间距) / 3 */
.case-list > li{
    width: calc((100% - 48px) / 3);
    list-style: none;
}

.case-card{
    display: block;
    height: 100%;
    padding: 0 0 24px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(23,43,77,.07);
    color: inherit;
    text-decoration: none;
    transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
}
.case-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(23,43,77,.14);
    color: inherit;
    text-decoration: none;
}

/* 首图固定 16:9：各篇原始尺寸从 592×370 到 1121×640 不等，
   不按比例裁切会让卡片高矮参差。 */
.case-card .case-pic{
    display: block;
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #f2f4f8;
    line-height: 0;
}
.case-card .case-pic img{
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .5s ease;
}
.case-card:hover .case-pic img{
    transform: scale(1.04);
}

/* 客户 logo 比例差别很大（182×79 到 333×144），固定高度 + contain 保证不变形。
   注意要显式 display:block，行内元素上的 height 不生效，会把卡片撑歪。 */
.case-card .case-logo{
    display: block;
    height: 34px;
    margin: 20px 24px 0;
    line-height: 0;
}
.case-card .case-logo img{
    display: block;
    height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    object-position: left center;
}

.case-card .case-title{
    display: block;
    margin: 12px 24px 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 28px;
    color: #1f2b3d;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.case-card .case-desc{
    display: block;
    margin: 8px 24px 0;
    font-size: 14px;
    line-height: 24px;
    color: #6b7280;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* ============================================================
   详情页底部：相关案例
   ============================================================ */
.related-case{
    width: 100%;
    margin: 64px auto 0;
    padding: 56px 0 64px;
    background: #f7f9fc;
    box-sizing: border-box;
}
.related-case-title{
    margin: 0 0 40px;
    font-size: 34px;
    font-weight: bold;
    line-height: 1.3;
    color: #1f2b3d;
    text-align: center;
}
.related-case .case-list{
    width: calc(100% - 200px);
    max-width: 1200px;
    margin: 0 auto;
}
/* 卡片纵向排列，收尾链接始终贴在卡片底部（标题有的一行有的两行） */
.related-case .case-card{
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: linear-gradient(145deg, #e9efff, #fff 58%);
}
.related-case .case-logo{
    order: -1;
    margin: 0 0 20px;
}
.related-case .case-pic{
    flex-shrink: 0;
    border-radius: 6px;
}
.related-case .case-title,
.related-case .case-desc{
    margin-left: 0;
    margin-right: 0;
}
.related-case .case-desc{
    margin-bottom: 20px;
}
/* 卡片下方统一收尾链接，与列表页区分开 */
.related-case .case-link{
    display: block;
    margin-top: auto;
    padding-top: 16px;
    /* 标题行数不同时也要留出同样的间距 */
    border-top: 1px solid #eef1f6;
    font-size: 15px;
    line-height: 22px;
    color: #6b7280;
    text-align: center;
}
.related-case .case-card:hover .case-link{
    color: #2d8bff;
}

/* 窄屏：三列改两列，避免卡片被压成细条 */
@media (max-width: 1240px){
    .case-list > li{
        width: calc((100% - 24px) / 2);
    }
}
@media (max-width: 820px){
    #customes-news,
    .related-case .case-list{
        width: calc(100% - 40px);
    }
    .case-list > li{
        width: 100%;
    }
}
