/* 案例页面特定样式 */

/* 全局样式重置和基础设置 */

/* 案例网格布局 - 固定宽度，从左到右紧密排列 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 365px);
    grid-auto-flow: row;
    gap: 30px;
    justify-content: start;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 案例卡片样式 - 确保无论显示数量多少，宽度始终为365px */
.case-card {
    width: 365px;
    max-width: 365px;
    min-width: 365px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* 案例图片容器样式 */
.case-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f3f4f6;
}

/* 案例图片样式 */
.case-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* 案例图片悬停效果 */
.case-image:hover {
    transform: scale(1.05);
}

/* 案例内容区域样式 */
.case-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.case-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.3;
}

.case-content p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* 案例详情按钮样式 */
.case-cta {
    display: inline-block;
    padding: 8px 20px;
    background-color: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto;
}

.case-cta:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 手机端响应式设计 */
@media (max-width: 768px) {
    /* 调整网格布局为单列 */
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
        margin-top: 30px;
        max-width: 100%;
    }
    
    /* 调整卡片宽度为100% */
    .case-card {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }
    
    /* 调整图片高度适配手机 */
    .case-image {
        height: 150px;
    }
    
    /* 调整内容区域内边距 */
    .case-content {
        padding: 15px;
    }
    
    /* 调整标题大小 */
    .case-content h3 {
        font-size: 18px;
    }
    
    /* 调整段落文字大小 */
    .case-content p {
        font-size: 13px;
    }
    
    /* 调整按钮大小 */
    .case-cta {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* 无案例状态样式 */
.no-cases {
    text-align: center;
    padding: 80px 0;
    color: #6b7280;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* 加载指示器样式 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误信息样式 */
.error-message {
    text-align: center;
    padding: 40px 0;
    color: #ef4444;
    font-size: 16px;
}

.error-message .retry-button {
    margin-top: 20px;
    padding: 10px 24px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.error-message .retry-button:hover {
    background-color: #2563eb;
}

/* 调试面板样式 */
#debug-panel {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

#debug-info {
    font-family: monospace;
    font-size: 12px;
    color: #333;
    line-height: 1.5;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 案例筛选器区域样式 */
.cases-filter-section {
    background-color: #f8f9fa;
    padding: 40px 0;
}

.cases-filter {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.filter-tab {
    padding: 10px 24px;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #4b5563;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.filter-tab.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* 相关文章区域样式 */
.related-articles {
    padding: 80px 0;
    background-color: white;
}

.related-articles .jx-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.related-articles h2 {
    font-size: 32px;
    color: #1f2937;
    margin-bottom: 12px;
    text-align: center;
}

.related-articles p {
    font-size: 16px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 60px;
}

/* 文章容器样式 - 网格布局 */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    justify-content: start;
    justify-items: start;
}

/* 文章卡片样式 */
.article-card {
    width: 340px;
    margin: 0;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 文章封面图片样式 */
.article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

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

/* 图片容器添加溢出隐藏 */
.article-card .article-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

/* 图片加载占位效果 */
.article-image.no-image, .article-image.image-error {
    background: linear-gradient(135deg, #f8fafc 25%, #e2e8f0 25%, #e2e8f0 50%, #f8fafc 50%, #f8fafc 75%, #e2e8f0 75%, #e2e8f0 100%);
    background-size: 20px 20px;
    animation: placeholder-shimmer 2s linear infinite;
}

@keyframes placeholder-shimmer {
    0% { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

/* 文章内容区域样式 */
.article-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 文章元信息样式 - 包含标签、日期和分类 */
.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-date {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-date::before {
    content: "📅";
    font-size: 12px;
}

.article-category {
    font-size: 12px;
    color: white;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
}

.article-card:hover .article-category {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 文章标题样式 */
.article-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.35;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-title:hover {
    color: #3b82f6;
}

.article-title a {
    color: inherit;
    text-decoration: none;
    display: block;
}

/* 文章摘要样式 */
.article-excerpt {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 精美的悬停效果 - 添加顶部装饰线 */
.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.article-card:hover::before {
    transform: scaleX(1);
}

/* 文章页脚样式 */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* 文章标签样式 - 元信息区域的标签 */
.article-meta .article-tags {
    display: inline-block;
    margin-right: 8px;
}

.article-tag {
    display: inline-block;
    font-size: 12px;
    color: #6b7280;
    text-decoration: none;
    padding: 2px 8px;
    background-color: #f3f4f6;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-right: 6px;
}

.article-tag:hover {
    background-color: #e5e7eb;
    color: #374151;
}

/* 阅读更多按钮样式 */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-top: auto;
}

.read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    transition: left 0.3s ease;
    z-index: -1;
}

.read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.read-more:hover::before {
    left: 0;
}

/* 按钮图标动画 */
.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 80px 0;
}

.loading-icon {
    font-size: 40px;
    color: #3b82f6;
    margin-bottom: 16px;
}

.loading-text {
    font-size: 16px;
    color: #6b7280;
}

/* 无文章状态样式 */
.no-articles {
    text-align: center;
    padding: 80px 0;
    color: #6b7280;
    font-size: 16px;
}

/* 错误加载样式 */
.error-loading {
    text-align: center;
    padding: 80px 0;
}

/* 行业分类标签样式 */
.case-industry {
    font-size: 12px;
    color: #1890ff;
    background: #e6f7ff;
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
}

/* 各行业专属颜色 */
.case-industry.industry-manufacturing {
    background: linear-gradient(135deg, #f97316, #fb923c); /* 制造业 - 橙色 */
    color: white;
}

.case-industry.industry-energy {
    background: linear-gradient(135deg, #10b981, #34d399); /* 能源化工 - 绿色 */
    color: white;
}

.case-industry.industry-medical {
    background: linear-gradient(135deg, #ef4444, #f87171); /* 医疗行业 - 红色 */
    color: white;
}

.case-industry.industry-education {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa); /* 教育行业 - 紫色 */
    color: white;
}

.case-industry.industry-government {
    background: linear-gradient(135deg, #3b82f6, #60a5fa); /* 政府部门 - 蓝色 */
    color: white;
}

.case-industry.industry-tech {
    background: linear-gradient(135deg, #6366f1, #818cf8); /* 科技金融 - 靛蓝色 */
    color: white;
}

/* 行业标签悬停效果 */
.article-card:hover .case-industry {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.error-loading p {
    color: #ef4444;
    margin-bottom: 20px;
    font-size: 16px;
}

.reload-btn {
    padding: 10px 24px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.reload-btn:hover {
    background-color: #2563eb;
}

/* 行动召唤区域样式 */
.call-to-action {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    padding: 80px 0;
    text-align: center;
    color: white;
}

.call-to-action .jx-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.call-to-action h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: white;
}

.call-to-action p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.call-to-action .jx-btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: white;
    color: #3b82f6;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.call-to-action .jx-btn:hover {
    background-color: #f9fafb;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .articles-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .article-card {
        width: 100%;
        max-width: 340px;
    }
}

@media (max-width: 768px) {
    .related-articles {
        padding: 60px 0;
    }
    
    .related-articles h2 {
        font-size: 28px;
    }
    
    .articles-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .article-card {
        max-width: none;
    }
    
    .call-to-action h2 {
        font-size: 30px;
    }
    
    .call-to-action p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .related-articles h2 {
        font-size: 24px;
    }
    
    .article-image {
        height: 180px;
    }
    
    .call-to-action h2 {
        font-size: 26px;
    }
}