/* 案例页面专用导航栏 - 相对定位 */
html body.cases-page header.main-header.white-header#header,
body.cases-page .main-header.white-header,
body.cases-page .white-header {
    position: relative !important;
    background: var(--white) !important;
    top: auto !important;
}

/* 页面横幅 */
.page-banner {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    margin-top: 0;
}

.page-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* 章节标题 */
.section-header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

/* 视频展示区域 */
.video-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 50px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.video-section video {
    width: 100%;
    height: auto;
    display: block;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.section-header p {
    font-size: 16px;
    color: #666;
    letter-spacing: 2px;
}

/* 案例内容区域 */
.cases-content {
    padding: 40px 0 60px;
    background: #f8f9fa;
}

/* 瀑布流布局 - 缩小版 */
.cases-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 8px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* 案例卡片基础样式 */
.case-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    cursor: pointer;
}

.case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 91, 172, 0.15);
}

/* 卡片尺寸 - 缩小 */
.case-card.large {
    grid-row: span 28;
}

.case-card.medium {
    grid-row: span 24;
}

.case-card.small {
    grid-row: span 20;
}

.case-card.wide {
    grid-column: span 2;
    grid-row: span 22;
}

/* 案例图片 */
.case-image {
    position: relative;
    width: 100%;
    height: 60%;
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.case-card:hover .case-image img {
    transform: scale(1.05);
}

/* 案例叠加层 */
.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 91, 172, 0.2) 0%, transparent 40%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px;
}

.case-number {
    background: var(--primary);
    color: white;
    font-size: 24px;
    font-weight: 700;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    opacity: 0.9;
}

/* 案例信息 */
.case-info {
    padding: 15px;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.case-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.case-info p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 响应式布局 */
@media (max-width: 1400px) {
    .cases-masonry {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1200px) {
    .cases-masonry {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .case-card.wide {
        grid-column: span 1;
    }
}

@media (max-width: 992px) {
    .cases-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .cases-masonry {
        grid-template-columns: 1fr;
    }
    
    .case-card.large,
    .case-card.medium,
    .case-card.small,
    .case-card.wide {
        grid-row: span auto;
        grid-column: span 1;
    }
    
    .case-image {
        height: 180px;
    }
    
    .banner-overlay h1 {
        font-size: 32px;
    }
    
    .cases-content {
        padding: 30px 0 50px;
    }
}

/* 移动端优化 */
@media (max-width: 480px) {
    .page-banner {
        height: 220px;
        margin-top: 60px;
    }
    
    .banner-overlay h1 {
        font-size: 26px;
    }
    
    .banner-overlay p {
        font-size: 13px;
    }
    
    .case-number {
        font-size: 20px;
        width: 38px;
        height: 38px;
    }
    
    .case-info h3 {
        font-size: 14px;
    }
    
    .case-info p {
        font-size: 11px;
    }
}
