/* 全球案例页面专用样式 - 独立样式表，避免与其他板块冲突 */

/* 案例网格布局 */
.cases-page .cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

/* 案例卡片 - 纯图片展示 */
.cases-page .case-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.cases-page .case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cases-page .case-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

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

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

/* 分页样式 */
.cases-page .pagination {
    margin-top: 40px;
    text-align: center;
}

.cases-page .page-info {
    display: block;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.cases-page .page-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.cases-page .page-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.cases-page .page-btn:hover:not(.disabled):not(.active) {
    background: #f5f5f5;
    border-color: #999;
}

.cases-page .page-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.cases-page .page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .cases-page .cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 768px) {
    .cases-page .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .cases-page .case-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .cases-page .cases-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 案例/视频列表页样式（带左侧导航）==================== */
.cases-list-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.cases-main {
}

.cases-main .cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.cases-main .case-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cases-main .case-card-link:hover {
    text-decoration: none;
}

.cases-main .case-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.cases-main .case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cases-main .case-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: #fff;
    padding: 5px;
    box-sizing: border-box;
}

.cases-main .case-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.cases-main .case-info {
    padding: 0 0 3px 0 !important;
    text-align: center;
    background: #fff;
}

.cases-main .case-info h3 {
    font-size: 15px;
    color: #333;
    margin: 0;
    line-height: 1.5;
    font-weight: 600;
}

/* 案例/视频详情页样式 */
.cases-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.cases-detail-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 50px;
}

.cases-detail-single {
    max-width: 100%;
}

.cases-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.cases-tag {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-blue);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 15px;
}

.cases-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.cases-meta {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 14px;
}

.cases-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cases-body {
    margin-bottom: 40px;
}

.cases-text {
    line-height: 1.8;
    color: #666;
    font-size: 16px;
}

.cases-text img {
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    display: block;
}

/* 上一篇/下一篇导航 */
.cases-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-prev,
.nav-next {
    flex: 1;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-gray);
    transition: all 0.3s ease;
    display: block;
}

.nav-prev:hover,
.nav-next:hover {
    background: var(--primary-blue);
    color: white;
}

.nav-prev span:first-child,
.nav-next span:first-child {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.nav-prev:hover span:first-child,
.nav-next:hover span:first-child {
    color: rgba(255, 255, 255, 0.8);
}

.nav-prev span:last-child,
.nav-next span:last-child {
    display: block;
    font-size: 14px;
    line-height: 1.5;
}

.nav-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 返回列表按钮 */
.back-to-list {
    margin-top: 30px;
    text-align: center;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* 响应式：案例/视频列表和详情页 */
@media (max-width: 992px) {
    .cases-list-layout,
    .cases-detail-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        position: static;
        width: 100%;
    }
    
    .cases-main .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cases-main {
        padding: 25px;
    }
    
    .cases-main .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .cases-detail-main {
        padding: 30px 20px;
    }
    
    .cases-header h1 {
        font-size: 22px;
    }
    
    .cases-navigation {
        flex-direction: column;
    }
}
