/* ========== 工程案例详情页专用样式 ========== */

/* 案例页主体布局：左目录 + 右内容 */
.case-layout { max-width: 1350px; margin: 0 auto; display: flex; gap: 30px; align-items: flex-start; }

/* ---- 左侧本页目录 ---- */
.case-sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 100px; }
.case-sidebar-inner { background: #fff; border: 1px solid #e8ecef; border-radius: 14px;
    padding: 22px 16px; box-shadow: 0 4px 16px rgba(13,124,59,0.05); }
.case-sidebar-title { font-size: 0.82rem; color: #8a94a3; letter-spacing: 2px; font-weight: 600;
    margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #f0f2f5; display: flex; align-items: center; gap: 8px; }
.case-sidebar-title::before { content: '☰'; color: #1db954; font-size: 0.9rem; }
.case-toc { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.case-toc a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px;
    color: var(--text); text-decoration: none; font-size: 0.92rem; transition: all 0.2s;
    border-left: 3px solid transparent; }
.case-toc a:hover { background: #f0f7f2; color: var(--primary); }
.case-toc a.active { background: linear-gradient(90deg, rgba(13,124,59,0.10), transparent);
    color: var(--primary); border-left-color: var(--primary); font-weight: 600; }

/* ---- 右侧主体 ---- */
.case-main { flex: 1; min-width: 0; }

/* 图集：上部大图 + 底部缩略图 */
.case-gallery { background: #0f1220; border-radius: 16px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(13,124,59,0.10); margin-bottom: 26px; }
.case-gallery-main { position: relative; aspect-ratio: 16 / 7.5; overflow: hidden; }
.case-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-gallery-tag { position: absolute; left: 16px; bottom: 16px; background: rgba(13,124,59,0.88);
    color: #fff; font-size: 0.8rem; padding: 6px 14px; border-radius: 20px; backdrop-filter: blur(4px); }
.case-gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px; }
.case-gallery-thumbs button { border: none; padding: 0; cursor: pointer; overflow: hidden;
    position: relative; background: #0f1220; border-radius: 6px; }
.case-gallery-thumbs img { width: 100%; height: 96px; object-fit: cover; display: block;
    opacity: 0.5; transition: opacity 0.25s; }
.case-gallery-thumbs button.active img, .case-gallery-thumbs button:hover img { opacity: 1; }
.case-gallery-thumbs button.active::after { content: ''; position: absolute; inset: 0;
    border: 2px solid #1db954; border-radius: 6px; }

/* ---- 内容章节 ---- */
.case-section { background: #fff; border-radius: 16px; padding: 32px 36px; margin-bottom: 22px;
    box-shadow: 0 4px 20px rgba(13,124,59,0.05); }
.case-section h2 { font-size: 1.32rem; color: var(--text); margin-bottom: 8px;
    display: flex; align-items: center; gap: 10px; }
.case-section h2::before { content: ''; width: 6px; height: 22px; border-radius: 3px;
    background: linear-gradient(180deg, #0d7c3b, #1db954); }
.case-section .sec-sub { color: #8a94a3; font-size: 0.9rem; margin-bottom: 20px; }
.case-section p { line-height: 1.9; color: #3d4856; margin-bottom: 14px; font-size: 0.97rem; }
.case-section p:last-child { margin-bottom: 0; }
.case-section strong { color: #0d7c3b; }

/* 案例信息表 */
.case-meta { width: 100%; border-collapse: collapse; margin-top: 6px; }
.case-meta th, .case-meta td { text-align: left; padding: 13px 16px;
    border-bottom: 1px solid #f0f2f5; font-size: 0.95rem; vertical-align: top; }
.case-meta th { width: 150px; background: #f7faf8; color: #0d7c3b; font-weight: 600; }
.case-meta td { color: #3d4856; line-height: 1.75; }
.case-meta tr:last-child th, .case-meta tr:last-child td { border-bottom: none; }

/* 成效指标 */
.case-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 10px; }
.case-result-item { background: linear-gradient(160deg, #f4faf6, #eef7f1);
    border: 1px solid #e0f0e5; border-radius: 12px; padding: 20px 14px; text-align: center; }
.case-result-item b { display: block; font-size: 1.45rem; color: #0d7c3b; line-height: 1.25; }
.case-result-item span { font-size: 0.82rem; color: #5a6b7c; }

/* 标准清单 */
.case-std-list { list-style: none; display: grid; gap: 10px; margin-top: 10px; }
.case-std-list li { display: flex; gap: 10px; align-items: flex-start;
    background: #f7faf8; border-left: 3px solid #1db954; padding: 12px 16px;
    border-radius: 8px; font-size: 0.95rem; color: #3d4856; line-height: 1.7; }
.case-std-list li b { color: #0d7c3b; white-space: nowrap; }

/* 工序列表（案例工艺） */
.case-tech-list { display: grid; gap: 12px; margin-top: 10px; }
.case-tech-item { display: flex; gap: 14px; align-items: flex-start;
    background: #fff; border: 1px solid #e8ecef; border-radius: 10px; padding: 14px 18px; }
.case-tech-item .step { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #0d7c3b, #1db954); color: #fff; font-weight: 700;
    display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.case-tech-item h5 { font-size: 1rem; color: var(--text); margin-bottom: 4px; }
.case-tech-item p { font-size: 0.9rem; color: #6b7a89; line-height: 1.7; margin: 0; }

/* 案例间导航 */
.case-prevnext { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; }
.case-prevnext a { flex: 1; background: #fff; border: 1px solid #e8ecef; border-radius: 14px;
    padding: 18px 22px; text-decoration: none; color: var(--text); transition: all 0.25s;
    display: flex; flex-direction: column; gap: 6px; }
.case-prevnext a:hover { border-color: #1db954; box-shadow: 0 6px 18px rgba(13,124,59,0.12);
    transform: translateY(-2px); }
.case-prevnext .dir { font-size: 0.78rem; color: #8a94a3; letter-spacing: 1px; }
.case-prevnext .name { font-size: 1rem; font-weight: 600; color: var(--text); }
.case-prevnext .next { text-align: right; }

/* ---- 案例总览列表页 ---- */
.case-list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case-list-card { background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 6px 24px rgba(13,124,59,0.08); text-decoration: none; color: inherit;
    transition: all 0.3s; display: flex; flex-direction: column; }
.case-list-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(13,124,59,0.16); }
.case-list-card .clc-img { height: 220px; overflow: hidden; }
.case-list-card .clc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.case-list-card:hover .clc-img img { transform: scale(1.06); }
.case-list-card .clc-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.case-list-card .clc-tag { align-self: flex-start; background: #e8f5ec; color: #0d7c3b;
    font-size: 0.75rem; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.case-list-card h4 { font-size: 1.15rem; color: var(--text); }
.case-list-card p { font-size: 0.92rem; color: #6b7a89; line-height: 1.7; }
.case-list-card .clc-more { margin-top: auto; color: #0d7c3b; font-weight: 600; font-size: 0.9rem; }

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
    .case-layout { flex-direction: column; }
    .case-sidebar { width: 100%; position: static; }
    .case-sidebar-inner { padding: 12px 14px; }
    .case-sidebar-title { margin-bottom: 8px; padding-bottom: 8px; }
    .case-toc { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
    .case-toc a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; padding: 8px 12px; }
    .case-toc a.active { border-left: none; border-bottom-color: var(--primary); background: #f0f7f2; }
    .case-result-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .case-section { padding: 24px 20px; }
    .case-gallery-thumbs img { height: 64px; }
    .case-gallery-main { aspect-ratio: 16 / 10; }
    .case-list-grid { grid-template-columns: 1fr; }
    .case-result-grid { grid-template-columns: repeat(2, 1fr); }
    .case-prevnext { flex-direction: column; }
}
