/* ===== Banner ===== */
.page-banner {
    width: 100%;
    height: 320px;
    background: url("/images/casebanner.jpg") no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

@media (max-width: 768px) {
    .page-banner {
        height: 220px;
    }
    .page-banner .banner-text h1 {
        font-size: 2.2rem;
    }
}

/* ===== 面包屑 ===== */
.page-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px;
    border-bottom: 1px solid #e8ecf2;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #6a7f9b;
}
.page-nav a {
    color: #1a2639;
    text-decoration: none;
    transition: 0.2s;
}
.page-nav a:hover {
    color: #ae1623;
}
.page-nav .sep {
    color: #c0c8d6;
}
.page-nav .current {
    color: #ae1623;
    font-weight: 600;
}

/* ===== 内容主体 ===== */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 80px;
}

/* ===== 头部 ===== */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
}
.news-header-left {
    display: flex;
    flex-direction: column;
}
.news-header-left .main-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a2639;
    letter-spacing: 2px;
}
.news-header-left .sub-title {
    font-size: 0.9rem;
    color: #6a7f9b;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ===== 分类按钮 ===== */
.news-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.news-categories .cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    padding: 8px 18px;
    background: rgb(164, 30, 37);
    border-radius: 0;
    transition: background 0.2s;
    text-decoration: none;
}
.news-categories .cat-item .line {
    display: inline-block;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
}
.news-categories .cat-item.active .line,
.news-categories .cat-item:hover .line {
    width: 24px;
}
.news-categories .cat-item:hover,
.news-categories .cat-item.active {
    background: rgb(164, 30, 37);
    transform: none;
    box-shadow: none;
}
.news-divider {
    width: 100%;
    height: 1px;
    background: #d0d7e2;
    margin: 10px 0 30px 0;
}
@media (max-width: 768px) {
    .content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 20px;
}
    .news-header {
        flex-direction: column;
        gap: 0px;
    }
    .news-header-left .main-title {
        font-size: 1.8rem;
    }
    .news-categories .cat-item {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
}
@media (max-width: 480px) {
    .news-categories .cat-item {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}


/* ==========================================================
   案例网格布局 (1大 + 1上 + 2下) 交替
   ========================================================== */
.case-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.case-row {
    display: flex;
    gap: 4px;
    width: 100%;
    align-items: stretch; /* 确保子元素拉伸到相同高度 */
}
/* ----- 大卡片 (占 1/2 宽度) ----- */
.big-card {
    flex: 1; /* 改为 flex: 1，与 small-group 一致 */
    min-width: 0;
}
.big-card .case-card {
    height: 100%; /* 确保填满父容器高度 */
    aspect-ratio: 4 / 3;
}
/* ----- 右侧/左侧组合 (占 1/2 宽度) ----- */
/* ----- 右侧/左侧组合 (占 1/2 宽度) ----- */
.small-group {
    flex: 1; /* 改为 flex: 1 而不是固定宽度 */
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0; /* 防止flex溢出 */
}

/* ===== 右上/左上 单张图 (高度占大图一半) ===== */
.small-group .top-card {
    flex: 1;
    min-height: 0; /* 防止flex溢出 */
}
.small-group .top-card .case-card {
    height: 100%;
    aspect-ratio: 4 / 3;
}

/* ===== 右下/左下 两张图 (高度占大图一半) ===== */
.small-group .bottom-row {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}
.small-group .bottom-row .case-card {
    height: 100%;
    aspect-ratio: 4 / 3;
}

/* ===== 案例卡片 (无圆角) ===== */
.case-card {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    background: #eef2f7;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.4s ease;
}
.case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
}
.case-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键：超出部分裁剪，保持比例 */
    object-position: center; /* 居中裁剪 */
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.case-card:hover img {
    transform: scale(1.08);
}

/* ===== 卡片链接 ===== */
.case-card .card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
}

/* ===== 卡片覆盖层 ===== */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 22px;
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    transition: all 0.4s ease;
    z-index: 2;
    pointer-events: none;
    min-height: 70px;
}
.card-overlay .title a,
.card-overlay .arrow {
    pointer-events: auto;
}

/* ===== 标题样式 ===== */
.card-overlay .title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    flex: 1;
    min-width: 0;
}
.card-overlay .title a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s ease;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}
.card-overlay .title a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s ease;
}
.card-overlay .title a:hover {
    color: #fff;
}
.card-overlay .title a:hover::after {
    width: 100%;
}

/* ===== 箭头按钮 ===== */
.card-overlay .arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.85rem;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
    pointer-events: auto;
  
    margin-left: 12px;
   
}
.card-overlay .arrow:hover {
   
}
.case-card:hover .card-overlay .arrow {

}

.case-card:hover .card-overlay {
    padding-bottom: 24px;
    
}




/* ==========================================================
   响应式适配
   ========================================================== */
@media (max-width: 992px) {
    .case-row {
        flex-direction: column;
        gap: 4px;
    }
   .big-card {
    flex: 1; /* 改为 flex: 1 而不是固定宽度 */
}
.big-card .case-card {
    aspect-ratio: 4 / 3;
}
    .small-group {
        flex: 1;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .small-group .top-card {
        flex: 0 0 100%;
    }
    .small-group .top-card .case-card {
        aspect-ratio: 16 / 9;
    }
    .small-group .bottom-row {
        flex: 0 0 100%;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .small-group .bottom-row .case-card {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 768px) {
    .case-row {
        gap: 6px;
    }
    .big-card .case-card {
        aspect-ratio: 16 / 10;
    }
    .small-group .top-card .case-card {
        aspect-ratio: 16 / 10;
    }
    .small-group .bottom-row {
        gap: 12px;
    }
    .small-group .bottom-row .case-card {
        aspect-ratio: 16 / 10;
    }
    .card-overlay {
        padding: 14px 16px;
        min-height: 56px;
    }
    .card-overlay .title {
        font-size: 0.85rem;
    }
    .card-overlay .arrow {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        margin-left: 10px;
    }
    .case-card .card-overlay .title a {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .big-card .case-card {
        aspect-ratio: 4 / 3;
    }
    .small-group .top-card .case-card {
        aspect-ratio: 4 / 3;
    }
    .small-group .bottom-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .small-group .bottom-row .case-card {
        aspect-ratio: 4 / 3;
    }
    .card-overlay {
        padding: 10px 12px;
        min-height: 46px;
    }
    .card-overlay .title {
        font-size: 0.7rem;
    }
    .card-overlay .arrow {
        width: 26px;
        height: 26px;
        font-size: 0.6rem;
        margin-left: 6px;
        border-width: 1px;
    }
}

/* ==========================================================
   加载动画
   ========================================================== */
.case-card {
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}
.case-card:nth-child(1) { animation-delay: 0.05s; }
.case-card:nth-child(2) { animation-delay: 0.10s; }
.case-card:nth-child(3) { animation-delay: 0.15s; }
.case-card:nth-child(4) { animation-delay: 0.20s; }
.case-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   分页
   ========================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 48px;
    flex-wrap: wrap;
}
.pagination ul {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination ul li {
    display: inline-block;
}
.pagination ul li a,
.pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a2639;
    background: #f4f7fc;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.pagination ul li a:hover {
    background: #e8ecf3;
    border-color: #cdd5e2;
    transform: translateY(-2px);
}
.pagination ul li.active span {
    background: #ae1623;
    color: #fff;
    border-color: #ae1623;
    box-shadow: 0 4px 16px rgba(174, 22, 35, 0.3);
}
.pagination ul li.disabled span {
    color: #b0b8c5;
    background: #f4f7fc;
    cursor: not-allowed;
    transform: none;
}