/*!
 * 案例页样式（列表 B：图文叠加 / 详情 1：封面 Hero + 侧栏）
 *
 * 只作用于 .mk-cb-*（列表）与 .mk-cs1-*（详情）命名空间，
 * header / nav / footer 沿用站点公共样式，不做任何覆盖。
 * 主色沿用站点 #3484df。
 */

/* html 与 body 同色：手机上 Hero 靠 margin-top 让出导航高度时，
   margin 会与 body 折叠，若 html 是白色，顶部会闪出一条白边 */
html {
    background-color: #f0f2f5;
}

body {
    background-color: #f0f2f5;
}

footer {
    margin-top: 0 !important;
}

/* ==================== 列表 B：图文叠加 ==================== */

.mk-cb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-bottom: 20px;
}

.mk-cb {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #dfe5eb;
    /* 4:3 用 padding 撑高度，兼容不支持 aspect-ratio 的浏览器 */
    padding-top: 75%;
    -webkit-transition: box-shadow .35s ease, -webkit-transform .35s ease;
    transition: box-shadow .35s ease, transform .35s ease;
}

.mk-cb:hover {
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(20, 40, 70, .18);
}

/* 封面：与站点其它栏目一致，用背景图铺满 */
.mk-cb-media {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    -webkit-transition: -webkit-transform .8s ease;
    transition: transform .8s ease;
}

.mk-cb:hover .mk-cb-media {
    -webkit-transform: scale(1.07);
    transform: scale(1.07);
}

/* 底部渐变压暗，保证白字可读 */
.mk-cb:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: -webkit-linear-gradient(top, rgba(8, 18, 32, 0) 40%, rgba(8, 18, 32, .32) 62%, rgba(8, 18, 32, .84) 100%);
    background: linear-gradient(to bottom, rgba(8, 18, 32, 0) 40%, rgba(8, 18, 32, .32) 62%, rgba(8, 18, 32, .84) 100%);
    -webkit-transition: opacity .4s ease;
    transition: opacity .4s ease;
    pointer-events: none;
}

.mk-cb:hover:after {
    opacity: .82;
}

.mk-cb-in {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 20px 20px 18px;
    color: #fff;
}

.mk-cb-kicker {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #9dc9f7;
}

.mk-cb-title {
    display: block;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 74px;
    /* 窄屏遇到长英文单词 / 型号串时不撑破卡片 */
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* hover 才浮现的 "View case →" */
.mk-cb-more {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 12.5px;
    color: #c3dbf3;
    -webkit-transition: max-height .35s ease, opacity .3s ease, margin .35s ease;
    transition: max-height .35s ease, opacity .3s ease, margin .35s ease;
}

.mk-cb:hover .mk-cb-more {
    max-height: 24px;
    opacity: 1;
    margin-top: 9px;
}

/* 左上角圆箭头 */
.mk-cb-arrow {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #16212d;
    font-size: 14px;
    opacity: 0;
    -webkit-transform: translateY(-6px);
    transform: translateY(-6px);
    -webkit-transition: opacity .3s ease, -webkit-transform .3s ease;
    transition: opacity .3s ease, transform .3s ease;
}

.mk-cb:hover .mk-cb-arrow {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

/* 空列表 */
.mk-cases-empty {
    padding: 80px 0;
    text-align: center;
    color: #999;
    font-size: 15px;
}

/* 分页：沿用 bootstrap 的 .pagination，这里只做居中与配色 */
.mk-cases-pages {
    margin-top: 40px;
    padding-bottom: 20px;
    text-align: center;
}

.mk-cases-pages .pagination {
    display: inline-block;
    margin: 0;
}

.mk-cases-pages .pagination > li > a,
.mk-cases-pages .pagination > li > span {
    color: #296dd7;
    border-color: #dbe4f0;
}

.mk-cases-pages .pagination > .active > span,
.mk-cases-pages .pagination > .active > a {
    background: #3484df;
    border-color: #3484df;
    color: #fff;
}

/* ==================== 详情 1：封面 Hero + 侧栏 ==================== */

.mk-cs1-hero {
    position: relative;
    /* 桌面端导航覆盖顶部约 120px，文档流只让出 118px，这里补一点呼吸间距 */
    margin-top: 12px;
    min-height: 440px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    background-color: #23303d;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.mk-cs1-hero:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: -webkit-linear-gradient(top, rgba(9, 18, 30, .5) 0%, rgba(9, 18, 30, .34) 46%, rgba(9, 18, 30, .9) 100%);
    background: linear-gradient(to bottom, rgba(9, 18, 30, .5) 0%, rgba(9, 18, 30, .34) 46%, rgba(9, 18, 30, .9) 100%);
}

.mk-cs1-hero .container {
    position: relative;
    z-index: 2;
    padding-bottom: 92px;
}

.mk-cs1-crumb {
    margin-bottom: 14px;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #a8c7e8;
}

.mk-cs1-crumb a {
    color: #a8c7e8;
}

.mk-cs1-crumb a:hover {
    color: #fff;
}

.mk-cs1-crumb span {
    margin: 0 8px;
    opacity: .55;
}

.mk-cs1-crumb em {
    font-style: normal;
}

.mk-cs1-hero h1 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: 34px;
    line-height: 1.35;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .28);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.mk-cs1-tags {
    font-size: 12.5px;
    color: #d3e2f1;
}

.mk-cs1-tags span {
    display: inline-block;
    margin-right: 22px;
}

.mk-cs1-tags span:before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 50%;
    background: #5aa7f0;
    vertical-align: 2px;
}

/* 两栏：正文 + 侧栏，正文卡上浮盖住 hero 下沿 */
.mk-cs1-grid {
    position: relative;
    z-index: 3;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    margin-top: -56px;
    padding-bottom: 60px;
}

.mk-cs1-main {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    padding: 42px 46px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 26px rgba(20, 40, 70, .1);
}

/* 正文排版（内容来自编辑器，这里只兜底图片不溢出） */
.mk-cs1-prose {
    font-size: 15px;
    line-height: 1.95;
    color: #4a5661;
}

.mk-cs1-prose p {
    margin: 0 0 18px;
}

.mk-cs1-prose h1,
.mk-cs1-prose h2 {
    margin: 30px 0 16px;
    padding-left: 12px;
    border-left: 3px solid #3484df;
    font-size: 19px;
    line-height: 1.4;
    font-weight: 600;
    color: #1e2c3a;
}

.mk-cs1-prose h3,
.mk-cs1-prose h4 {
    margin: 26px 0 14px;
    font-size: 17px;
    line-height: 1.4;
    color: #1e2c3a;
}

.mk-cs1-prose ul,
.mk-cs1-prose ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.mk-cs1-prose li {
    margin-bottom: 8px;
}

.mk-cs1-prose img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

.mk-cs1-prose a {
    color: #2b6ec0;
    text-decoration: underline;
}

/* 表格在窄屏会撑破正文宽度，改成可横向滑动的块 */
.mk-cs1-prose table {
    display: block;
    width: 100%;
    margin: 18px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 摘要：正文之前，用一条虚线分开 */
.mk-cs1-lead {
    margin: 0 0 22px !important;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e6e6e6;
    font-size: 16px;
    line-height: 1.9;
    color: #5d6b78;
}

/* 视频区块 */
.mk-cs1-videos {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid #eef2f6;
}

.mk-cs1-vhead {
    margin-bottom: 18px;
}

.mk-cs1-vhead h3 {
    display: inline-block;
    position: relative;
    margin: 0;
    padding-left: 15px;
    font-size: 19px;
    font-weight: 500;
    color: #343434;
}

.mk-cs1-vhead h3:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 19px;
    margin-top: -9px;
    background-color: #3484df;
}

.mk-cs1-vhead em {
    margin-left: 12px;
    font-style: normal;
    font-size: 12.5px;
    color: #98a5b2;
}

/* 播放器：覆写 media-player.css 默认的横向滚动缩略图，改成三列卡片 */
.mk-cs1-videos .mk-media {
    margin: 0;
}

.mk-cs1-videos .mk-media .mk-media-stage {
    border-radius: 10px;
}

.mk-cs1-videos .mk-media .mk-media-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    overflow: visible;
    padding: 16px 0 0;
}

.mk-cs1-videos .mk-media .mk-media-thumb {
    -webkit-box-flex: 0;
    -ms-flex: none;
    flex: none;
    width: auto;
    padding: 0 0 36px;
    border: 1px solid #e6ecf2;
    border-radius: 8px;
    -webkit-transition: border-color .2s ease, box-shadow .2s ease;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.mk-cs1-videos .mk-media .mk-media-thumb:hover {
    border-color: #b9d3ee;
    box-shadow: 0 6px 16px rgba(20, 40, 70, .1);
}

.mk-cs1-videos .mk-media .mk-media-thumb.is-active {
    border-color: #3484df;
    box-shadow: 0 0 0 1px #3484df;
}

.mk-cs1-videos .mk-media .mk-media-thumb-title {
    height: 36px;
    padding: 0 10px;
    line-height: 36px;
    font-size: 12.5px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* 侧栏 */
.mk-cs1-side {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 336px;
    flex: 0 0 336px;
    width: 336px;
    margin-left: 30px;
}

.mk-cs1-card {
    margin-bottom: 20px;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(20, 40, 70, .08);
}

.mk-cs1-card h5 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f6;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #8b98a6;
}

.mk-cs1-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px dashed #eef2f6;
    font-size: 13px;
    line-height: 1.6;
}

.mk-cs1-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mk-cs1-row b {
    font-weight: 400;
    color: #8b98a6;
}

.mk-cs1-row span {
    margin-left: 12px;
    color: #25333f;
    text-align: right;
}

.mk-cs1-rel {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f2f5f8;
}

.mk-cs1-rel:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mk-cs1-rel-img {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 74px;
    height: 52px;
    margin-right: 12px;
    border-radius: 5px;
    overflow: hidden;
    background: #e7edf3 center/cover no-repeat;
}

.mk-cs1-rel-t {
    font-size: 13px;
    line-height: 1.55;
    color: #33424f;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 42px;
}

.mk-cs1-rel:hover .mk-cs1-rel-t {
    color: #3484df;
}

.mk-cs1-cta {
    padding: 26px;
    border-radius: 12px;
    background: -webkit-linear-gradient(left top, #3484df, #2765b3);
    background: linear-gradient(to right bottom, #3484df, #2765b3);
    color: #fff;
}

.mk-cs1-cta h5 {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #fff;
}

.mk-cs1-cta p {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.8;
    color: #d9e9fa;
}

.mk-cs1-cta a {
    display: block;
    padding: 10px 0;
    border-radius: 22px;
    background: #fff;
    color: #2765b3;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    -webkit-transition: background .2s ease, color .2s ease;
    transition: background .2s ease, color .2s ease;
}

.mk-cs1-cta a:hover {
    background: #eaf3fd;
    color: #1c4f8f;
}

/* ==================== 响应式 ==================== */

@media screen and (max-width: 1199px) {
    .mk-cb-grid {
        gap: 20px;
    }

    .mk-cb-in {
        padding: 16px 16px 14px;
    }

    .mk-cb-title {
        font-size: 16px;
    }

    .mk-cs1-hero {
        min-height: 380px;
    }

    .mk-cs1-hero h1 {
        font-size: 28px;
    }

    .mk-cs1-main {
        padding: 34px 32px;
    }

    .mk-cs1-side {
        -ms-flex-preferred-size: 300px;
        flex-basis: 300px;
        width: 300px;
        margin-left: 24px;
    }
}

@media screen and (max-width: 991px) {
    .mk-cb-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 侧栏塌到正文下面，横向排布 */
    .mk-cs1-grid {
        display: block;
        margin-top: -40px;
    }

    .mk-cs1-side {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        width: auto;
        margin: 20px -10px 0;
        position: static;
    }

    .mk-cs1-side > div {
        -webkit-box-flex: 1;
        -ms-flex: 1 1 260px;
        flex: 1 1 260px;
        margin: 0 10px 20px;
    }

    .mk-cs1-hero {
        min-height: 320px;
    }

    .mk-cs1-hero h1 {
        font-size: 24px;
    }

    .mk-cs1-hero .container {
        padding-bottom: 74px;
    }
}

@media screen and (max-width: 767px) {
    .mk-cb-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mk-cb-title {
        font-size: 16px;
    }

    .mk-cs1-main {
        padding: 24px 20px;
    }

    /* 手机端主导航一开始就是 fixed（common.js 在 ≤767 时把触发高度设成 0），
       文档流里不再给它留位置，Hero 会被盖住 70px，这里把 Hero 整体下推让开 */
    .mk-cs1-hero {
        margin-top: 64px;
        min-height: 260px;
    }

    /* 正文 / 侧栏到底部之间的留白收小，别让手机上一屏全是空白 */
    .mk-cs1-grid {
        padding-bottom: 32px;
    }

    .mk-cs1-hero h1 {
        font-size: 21px;
        margin-bottom: 12px;
    }

    .mk-cs1-prose {
        font-size: 14.5px;
        line-height: 1.9;
    }

    .mk-cs1-lead {
        font-size: 15px;
        line-height: 1.8;
    }

    /* 手机上缩略图两列，避免挤成一条 */
    .mk-cs1-videos .mk-media .mk-media-thumbs {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mk-cs1-vhead em {
        display: block;
        margin: 6px 0 0 15px;
    }

    /* 侧栏卡片、正文卡在手机上收紧边距 */
    .mk-cs1-card {
        padding: 20px;
    }

    .mk-cs1-videos {
        margin-top: 26px;
        padding-top: 24px;
    }

    /* 分页缩小一点，避免页数多时挤成两行还很宽 */
    .mk-cases-pages {
        margin-top: 26px;
    }

    .mk-cases-pages .pagination > li > a,
    .mk-cases-pages .pagination > li > span {
        padding: 5px 9px;
        font-size: 12.5px;
    }

    .mk-cases-empty {
        padding: 50px 0;
        font-size: 14px;
    }

    /* 手指点击区域做大一点 */
    .mk-cs1-cta a {
        padding: 12px 0;
    }
}

/* 触屏设备没有真实的 hover：直接显示 "View case" 和箭头，并关掉悬停位移 */
@media (hover: none) {
    .mk-cb-more {
        max-height: 24px;
        opacity: 1;
        margin-top: 9px;
    }

    .mk-cb-arrow {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }

    .mk-cb:hover {
        -webkit-transform: none;
        transform: none;
        box-shadow: none;
    }

    .mk-cb:hover .mk-cb-media {
        -webkit-transform: none;
        transform: none;
    }
}

/* 小屏（iPhone SE 一类 320~400px）再收一档 */
@media screen and (max-width: 400px) {
    .mk-cs1-hero {
        margin-top: 58px;
        min-height: 230px;
    }

    .mk-cs1-hero h1 {
        font-size: 19px;
        line-height: 1.4;
    }

    .mk-cs1-hero .container {
        padding-bottom: 62px;
    }

    .mk-cs1-crumb {
        font-size: 11px;
        letter-spacing: .8px;
    }

    .mk-cs1-tags span {
        margin-right: 14px;
    }

    .mk-cs1-grid {
        margin-top: -32px;
        padding-bottom: 26px;
    }

    .mk-cs1-main {
        padding: 20px 16px;
    }

    .mk-cs1-card {
        padding: 18px 16px;
    }

    .mk-cs1-videos .mk-media .mk-media-thumb-title {
        font-size: 12px;
    }
}
