/* === 1. 核心变量与重置 === */
:root {
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --text-light: #666666;
    --primary-color: #ffb700;
    --accent-color: #ffe169;
    --dark-bg: #0a0e17;
    --dark-card: #141a26;
    --grid-gap: 24px;
    --container-width: 1320px;
    --radius-unified: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Alibaba PuHuiTi 3.0', 'Alibaba PuHuiTi', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* === 3. Hero 区域 === */
.page-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background: #222;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

.page-hero .container {
    position: relative;
    z-index: 1;
    padding-top: 60px;
}

.hero-breadcrumb {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-hero h1 {
    font-size: clamp(40px, 5vw, 64px);
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.page-hero p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto;
}

/* === 4. 合作伙伴与客户 (上下分栏 - New) === */

/* 通用部分样式 */
.partner-section,
.client-section {
    padding: 100px 0;
}

.partner-section {
    background: #fff;
}

.client-section {
    background: #f9f9f9;
    /* 浅灰背景区分 */
}

/* Logo 棋盘格容器 (全宽) */
.logo-checkerboard {
    display: grid;
    /* 修改：增加列数，适应通栏宽度 */
    grid-template-columns: repeat(6, 1fr);
    border: 1px solid #eee;
    /* 外边框 */
    border-radius: var(--radius-unified);
    overflow: hidden;
    background: white;
    /* 确保背景色 */
}

/* 单个 Logo 格子 */
.logo-cell {
    aspect-ratio: 1;
    /* 正方形 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* 关键修改：增加内边距，作为Logo的四周留白 */
    position: relative;
    opacity: 0;
    /* 初始隐藏，用于动画 */
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 翻牌动画关键帧 */
@keyframes flipInX {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }

    to {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

/* 激活类：JS 添加此类触发动画 */
.logo-cell.animate-flip {
    animation: flipInX 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 明暗背景类 (由 JS 动态分配) */
.logo-cell.bg-light {
    background-color: #ffffff;
}

.logo-cell.bg-dark {
    background-color: #f8f9fa;
}

/* Logo 图片样式 */
.logo-cell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 核心：适应正方形 */
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.4s ease;
    transform: scale(0.8);
    /* 默认稍小，配合 padding 进一步留白 */
    /* 确保图片不会撑破格子 */
    max-width: 100%;
    max-height: 100%;
}

/* 悬停效果 */
.logo-cell:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(0.9);
    /* 悬停微放大，但仍在padding范围内 */
}

/* 悬停时格子本身高亮 */
.logo-cell:hover {
    z-index: 2;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    /* 悬停变白突显 */
}

/* === 5. 行业案例 (Waterfall) === */
.cases-section {
    padding: 80px 0;
    background: #fff;
}

/* 恢复白色背景 */

.waterfall-container {
    column-count: 3;
    column-gap: 24px;
}

.case-card {
    background: white;
    border-radius: var(--radius-unified);
    overflow: hidden;
    margin-bottom: 24px;
    break-inside: avoid;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    /* 增加浅边框 */
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.case-img {
    width: 100%;
    height: auto;
    display: block;
}

.case-body {
    padding: 24px;
}

.case-tags {
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    border-radius: 4px;
    margin-right: 6px;
}

.case-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-main);
}

.case-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -ms-flex-direction: column;
    -webkit-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -moz-line-clamp: 3;
    line-clamp: 3;
}

.case-kpi {
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
}

.kpi-item {
    text-align: center;
}

.kpi-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1.2;
}

.kpi-label {
    font-size: 11px;
    color: #888;
}

/* === 6. 底部 CTA === */
.cta-btn {
    display: inline-block;
    height: var(--btn-height-lg);
    padding: 0 48px;
    background: var(--primary-color);
    color: var(--text-main);
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 40px;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 183, 0, 0.3);
    background: white;
}

@media (max-width: 1024px) {
    .waterfall-container {
        column-count: 2;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .logo-checkerboard {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .waterfall-container {
        column-count: 1;
    }

    .logo-checkerboard {
        grid-template-columns: repeat(3, 1fr);
    }
}
