﻿/* ===================================================================
   K654 案例列表 - 4列均分布局
   老大诉求：1排4列、3:4比例、页面排整齐
   策略：用 grid + repeat(4, 1fr)，容器多宽每列就多宽（最小1200px）
   所有规则加 html body 前缀 + !important 双保险
   =================================================================== */

/* --- 容器：grid 4列 --- */
html body .case_list ul {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 40px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
}

/* --- 每个 li：占满1fr + 3:4 比例 --- */
html body .case_list ul li {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    border: 1px solid #eee !important;
    float: none !important;
    display: block !important;
    
    overflow: visible !important;
    position: relative !important;
}

/* --- 干掉原版 nth-child(3n) 强制换行 --- */
html body .case_list ul li:nth-child(3n) {
    margin-right: 0 !important;
    margin-left: 0 !important;
    clear: none !important;
}

/* --- 图片容器：3:4 比例 --- */
html body .case_list ul li .scroll_pic {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 133.33% !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #f5f5f5 !important;
}

/* --- 图片：铺满容器 --- */
html body .case_list ul li .scroll_pic img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* --- 文字区域 --- */
html body .case_list ul li .text h3 {
    line-height: 48px !important;
    border-bottom: none !important;
    color: #555 !important;
    padding: 0 5px !important;
    font-size: 16px !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    margin: 0 !important;
    text-align: center !important;
}
html body .case_list ul li .text h3 a {
    color: #555 !important;
}

/* --- 阴影装饰 --- */
html body .case_list ul li::before {
    background: url(../images/shadow-right.png) bottom center no-repeat;
    content: '';
    display: block;
    width: 100px;
    height: 15px;
    position: absolute;
    bottom: -9px;
    right: -6px;
    z-index: 1;
}
html body .case_list ul li::after {
    background: url(../images/shadow-left.png) bottom left no-repeat;
    content: '';
    display: block;
    width: 100px;
    height: 15px;
    position: absolute;
    bottom: -11px;
    left: -3px;
    z-index: 1;
}
html body .case_list ul li:hover {
    box-shadow: 2px 2px 7px rgba(70,70,70,.2);
}

/* --- 图片 a 撑满 .scroll_pic（让遮罩区也可点跳转，等同"遮罩层加链接"） --- */
html body .case_list ul li .scroll_pic > a:first-of-type {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    z-index: 0 !important;  /* 低于 ::after(z-index 1) 保留遮罩视觉，鼠标点击仍命中 a 跳详情 */
    display: block !important;
}

/* --- hover 遮罩 + 按钮 --- */
html body .case_list ul li .scroll_pic:after {
    content: "" !important;
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(30, 30, 30, 0) !important;
    left: 0 !important;
    top: 0 !important;
    transition: all 0.4s ease-in !important;
    z-index: 1 !important;
    pointer-events: none !important;  /* mouse pass-through to a */
}
html body .case_list ul li:hover .scroll_pic:after {
    background: rgba(30, 30, 30, 0.6) !important;
}
html body .case_list ul li .scroll_pic .btn-view {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 9 !important;
    opacity: 0 !important;
    height: 50px !important;
    line-height: 50px !important;
    padding: 0 40px !important;
    margin-left: -85px !important;
    margin-top: -25px !important;
    color: #333 !important;
    border: 0 !important;
    background: #ffffff !important;
    box-shadow: 0px 6px 47px 3px rgba(37, 37, 37, 0.05) !important;
    text-decoration: none !important;
    display: inline-block !important;
    border-radius: 5px !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    overflow: hidden !important;
    transform: perspective(1px) translateZ(0) !important;
    transition: opacity 0.4s ease-in, color 0.4s !important;
}
/* 查看详情按钮：从左到右绿色拉帘（2026-11-07 配合模板中心青柠色调） */
html body .case_list ul li .scroll_pic .btn-view::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(120deg, #8fbf2e 0%, #55951c 100%) !important;
    transform: scaleX(0) !important;
    transform-origin: left center !important;
    transition: transform 0.4s ease-in !important;
    z-index: -1 !important;
}
html body .case_list ul li:hover .scroll_pic .btn-view {
    opacity: 1 !important;
    color: #fff !important;
}
html body .case_list ul li:hover .scroll_pic .btn-view::before {
    transform: scaleX(1) !important;
}

/* --- 筛选按钮样式 --- */
html body .pro_screen ul li a {
    background: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 20px !important;
    color: #555 !important;
}
html body .pro_screen ul li a.active {
    background: #e62022 !important;
    color: #fff !important;
    border-color: #e62022 !important;
    border-radius: 20px !important;
}

/* --- 移动端 <768px：隐藏竖排阴影等装饰 --- */
@media (max-width: 768px) {
    html body .case_list ul {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
    html body .case_list ul li::before,
    html body .case_list ul li::after {
        display: none !important;
    }
}
