/* ========================================
   项目案例页面样式
   ======================================== */

/* 页面横幅 */
.page-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
}

.page-banner h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-banner p {
    font-size: 18px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* 案例页面布局 */
.case-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* 侧边栏 */
.case-sidebar {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    font-size: 20px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 10px 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* 案例头部 */
.case-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.case-header h2 {
    font-size: 28px;
    color: var(--text-dark);
}

/* 案例网格 */
.case-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.case-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.case-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.case-image {
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.case-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e8f4f8 100%);
    font-size: 60px;
}

.case-info {
    padding: 20px;
}

.case-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.case-info h3 a {
    color: var(--text-dark);
    text-decoration: none;
}

.case-info h3 a:hover {
    color: var(--primary-color);
}

.case-info p {
    color: var(--text-medium);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.btn-case {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: var(--transition);
}

.btn-case:hover {
    background: var(--primary-dark);
}

/* 空状态 */
.case-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 16px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 案例详情页 */
.case-detail-section {
    padding: 40px 0 80px;
}

.case-detail-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.case-type-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
}

.case-detail-header h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.case-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--text-light);
    font-size: 14px;
}

.case-detail-content {
    max-width: 900px;
    margin: 0 auto;
}

.case-detail-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.case-detail-image img {
    width: 100%;
    height: auto;
}

.case-detail-text {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.case-detail-text h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.case-detail-text p {
    color: var(--text-medium);
    line-height: 1.8;
    font-size: 16px;
}

.case-detail-footer {
    text-align: center;
    margin-top: 40px;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: var(--bg-white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid var(--primary-color);
    font-size: 16px;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--primary-color);
    color: white;
}

/* 首页项目案例区块 */
.cases-section {
    background: var(--bg-light);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.case-category {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.case-category:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.case-category a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.case-category-img {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e8f4f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-category-fallback {
    font-size: 80px;
}

.case-category h3 {
    padding: 20px;
    text-align: center;
    font-size: 20px;
    color: var(--text-dark);
}

/* 响应式 */
@media (max-width: 992px) {
    .case-layout {
        grid-template-columns: 1fr;
    }

    .case-sidebar {
        position: static;
    }

    .case-grid {
        grid-template-columns: 1fr;
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }
}
