/* ── 学员案例 ── */
.case { background: #f7f7f7; padding: 0 0 60px; }
.case-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }
.case-tab { padding: 8px 22px; border: 1.5px solid #ddd; border-radius: 25px; font-size: 14px; cursor: pointer; color: #555; transition: all .2s; background: #fff; }
.case-tab.active, .case-tab:hover { background: #f5a623; border-color: #f5a623; color: #fff; }
.case-panel { display: none; }
.case-panel.active { display: block; }
.case-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.case-photos { display: grid; gap: 10px; height: 400px; grid-template-rows: 1fr; align-items: stretch; }
.case-photos.cols2 { grid-template-columns: 1fr 1fr 1fr; }
.case-photos.cols2 img:first-child { grid-column: 2; }
.case-photos.cols2 img:last-child { grid-column: 3; }
.case-photos.cols3 { grid-template-columns: 1fr 1fr 1fr; }
.case-photos img { width: 100%; height: 100%; min-height: 0; border-radius: 8px; object-fit: contain; background: #f5f5f5; display: block; }
.case-info { background: #fff; border-radius: 10px; padding: 28px; box-shadow: 0 2px 12px rgba(0,0,0,.06); height: 400px; overflow: hidden; }
.case-tag { display: inline-block; background: rgba(245,166,35,0.12); color: #f5a623; font-size: 12px; padding: 3px 12px; border-radius: 12px; margin-bottom: 12px; }
.case-info h3 { font-size: 22px; color: #111; margin-bottom: 14px; font-weight: 700; }
.case-result { background: linear-gradient(135deg, #fff8ee, #fff); border: 1px solid #fde3a0; border-radius: 8px; padding: 14px 18px; margin-bottom: 14px; }
.case-result strong { color: #f5a623; font-size: 15px; }
.case-info p { color: #666; font-size: 14px; line-height: 1.9; }
.case-video-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case-video-item { border-radius: 10px; overflow: hidden; background: #000; position: relative; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.case-video-item video { width: 100%; height: 200px; object-fit: cover; display: block; }
.case-video-label { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: 13px; padding: 18px 12px 10px; }

/* ── 学员见证视频一排 ── */
.witness-section { width: 100%; padding: 48px 24px 0; box-sizing: border-box; }
.witness-label { text-align: center; margin-bottom: 20px; color: #999; font-size: 14px; letter-spacing: 1px; }
.witness-row { display: flex; gap: 10px; align-items: flex-end; }
.witness-item {
    flex: 1;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    cursor: pointer;
    aspect-ratio: 9 / 16;
    transition: transform .25s ease, box-shadow .25s ease;
}
.witness-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.witness-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.witness-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s ease, opacity .25s ease;
}
.witness-item:hover .witness-overlay { background: rgba(0,0,0,0.15); }
.witness-item.playing .witness-overlay { background: transparent; opacity: 0; }
.witness-item.playing:hover .witness-overlay { background: rgba(0,0,0,0.22); opacity: 1; }
.witness-play-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s, transform .2s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.witness-item:hover .witness-play-icon {
    background: rgba(245,166,35,0.85);
    border-color: transparent;
    transform: scale(1.12);
    box-shadow: 0 6px 20px rgba(245,166,35,0.4);
}
/* 播放三角 */
.witness-play-icon::after {
    content: '';
    width: 0; height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 13px solid rgba(255,255,255,0.95);
    margin-left: 3px;
    transition: border-left-color .2s;
}
/* 暂停双竖线 */
.witness-play-icon.pausing::after { display: none; }
.witness-play-icon.pausing::before {
    content: '';
    width: 11px; height: 13px;
    border-left: 3.5px solid rgba(255,255,255,0.95);
    border-right: 3.5px solid rgba(255,255,255,0.95);
    box-sizing: border-box;
}
.witness-item.active {
    box-shadow: 0 0 0 2px #f5a623, 0 12px 32px rgba(245,166,35,0.2);
    transform: translateY(-4px);
}
.witness-item.active:hover {
    transform: translateY(-8px) scale(1.02);
}

/* ── 响应式 ── */

/* 平板竖屏 */
@media (max-width: 900px) {
    .case { padding: 0 0 50px; }
    .witness-section { padding: 36px 16px 0; }
}

@media (max-width: 820px) {
    .case-layout { grid-template-columns: 1fr; }
    .case-info { height: auto; }
    .case-photos { height: 280px; }
    .witness-item { flex: 0 0 180px; }
    /* cols2：重置为 2 列居中，清除桌面端的列偏移 */
    .case-photos.cols2 { grid-template-columns: 1fr 1fr; }
    .case-photos.cols2 img:first-child { grid-column: auto; }
    .case-photos.cols2 img:last-child  { grid-column: auto; }
}

/* 大屏手机横屏 */
@media (max-width: 768px) {
    .case-layout { grid-template-columns: 1fr; }
    .case-info { height: auto; }
    .case-photos { height: 260px; }
    /* cols2 居中（继承 820px 已设置，再次确保） */
    .case-photos.cols2 { grid-template-columns: 1fr 1fr; }
    .case-photos.cols2 img:first-child { grid-column: auto; }
    .case-photos.cols2 img:last-child  { grid-column: auto; }
    .case-video-row { grid-template-columns: 1fr 1fr; }
    /* 见证视频：横向滚动 */
    .witness-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        gap: 8px;
    }
    .witness-item { flex: 0 0 160px; }
}

/* 手机竖屏（中等） */
@media (max-width: 600px) {
    .case-photos { height: 220px; }
    .case-info { padding: 20px; }
    .case-info h3 { font-size: 18px; }
    .witness-section { padding: 36px 16px 0; }
    .witness-item { flex: 0 0 140px; }
}

/* 主流手机 */
@media (max-width: 480px) {
    .case-video-row { grid-template-columns: 1fr; }
    .case-photos { height: 180px; }
    .witness-section { padding: 32px 16px 0; }
    .witness-item { flex: 0 0 120px; }
    .case-tabs { gap: 6px; }
    .case-tab { padding: 7px 16px; font-size: 13px; }
}

/* 小屏安卓 */
@media (max-width: 390px) {
    .case-photos { height: 160px; }
    .witness-section { padding: 28px 14px 0; }
    .case-info h3 { font-size: 16px; }
    .case-result strong { font-size: 14px; }
    .witness-item { flex: 0 0 110px; }
}
