/* ============================================================
   案例详情-2 (case_detail_2)
   左栏(案例分类 + 推荐案例) + 右栏(标题 / 简短介绍 / 封面 / 正文 / 分享 / 上下条)
   还原自 测试案例.html 的 .ly_cases_detail_2

   这里只放骨架(布局、间距、字号层级、移动端抽屉);
   凡是配置面板能改的东西 —— 背景色、模块上下左右间距、分类名颜色与悬停色、
   标题颜色与分端字号、简短介绍颜色与底色、封面裁切方式 ——
   都由模板内联的实例级 <style> 按 data-module-id 下发, 不在这个文件里写死,
   否则同一页面放两个实例会互相串色。
   ============================================================ */

.ly_cases_detail_2 {
    box-sizing: border-box;
}

.ly_cases_detail_2 .wide > .section {
    box-sizing: border-box;
}

.ly_cases_detail_2 .wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
}

.ly_cases_detail_2 .fl {
    float: left;
}

.ly_cases_detail_2 .clear {
    clear: both;
}

.ly_cases_detail_2 .clearfix::after {
    content: "";
    display: block;
    clear: both;
}

/* ---------------- 左栏: 案例分类 ---------------- */
.ly_cases_detail_2 .left_side {
    width: 18%;
    box-sizing: border-box;
}

.ly_cases_detail_2 .left_side > .top_title {
    line-height: 1.5;
    height: 42px;
    font-size: 20px;
    border-bottom: 1px solid #e8e8e8;
    box-sizing: border-box;
}

.ly_cases_detail_2 .left_side ul.list {
    padding: 10px 0;
    margin: 0;
    list-style: none;
}

.ly_cases_detail_2 .left_side ul.list li {
    list-style: none;
}

.ly_cases_detail_2 .left_side ul.list li a {
    display: block;
    line-height: 40px;
    font-size: 14px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

.ly_cases_detail_2 .category_empty {
    padding: 12px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #999;
}

/* ---------------- 左栏: 推荐案例 ---------------- */
.ly_cases_detail_2 .relate_box {
    margin-top: 20px;
}

.ly_cases_detail_2 .relate_box > .top_title {
    line-height: 1.5;
    height: 42px;
    font-size: 20px;
    border-bottom: 1px solid #e8e8e8;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ly_cases_detail_2 .relate_box .pro_list {
    padding: 6px 0;
}

.ly_cases_detail_2 .relate_box .related_item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ly_cases_detail_2 .relate_box .related_item:last-child {
    border-bottom: 0;
}

.ly_cases_detail_2 .relate_box .pic_box {
    width: 80px;
    flex: 0 0 80px;
}

.ly_cases_detail_2 .relate_box .pic_box a {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.ly_cases_detail_2 .relate_box .pic_box img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ly_cases_detail_2 .relate_box .content {
    flex: 1;
    min-width: 0;
    padding-left: 10px;
}

.ly_cases_detail_2 .relate_box .g_name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 18px;
    font-size: 14px;
    color: #222;
    text-decoration: none;
}

.ly_cases_detail_2 .relate_box .g_number {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* PC 端不出底部推荐案例(移动端才翻出来) */
.ly_cases_detail_2 .relate_box.list_bottom_box {
    display: none;
}

/* ---------------- 右栏 ---------------- */
.ly_cases_detail_2 .right_side {
    width: 79.02%;
    min-height: 400px;
    box-sizing: border-box;
    position: relative;
}

.ly_cases_detail_2 .right_side.full {
    width: 100%;
}

/* 移动端分类抽屉开关条: PC 隐藏 */
.ly_cases_detail_2 .right_side .cate_top_title {
    display: none;
}

.ly_cases_detail_2 .right_side > .top_title {
    position: relative;
    line-height: 1.2;
}

.ly_cases_detail_2 .right_side > .top_title h1 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

/* 简短介绍: 浅灰底色块 */
.ly_cases_detail_2 .right_side > .bottom_brief {
    margin-top: 25px;
    padding: 20px 32px;
    line-height: 1.5;
    font-size: 14px;
    word-break: break-word;
}

/* ---------------- 封面图 ---------------- */
.ly_cases_detail_2 .right_side .img_box {
    margin-top: 50px;
}

.ly_cases_detail_2 .img_box .compute_process_img {
    position: relative;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
}

/* 适应图片: 原比例自然排版, 不裁切(此时"填充方式 / 图片展示区域"两项不起作用) */
.ly_cases_detail_2 .img_box.fit_height .compute_process_img img {
    display: block;
    width: 100%;
    height: auto;
}

/* 660px: 固定高度, 裁切方式取实例变量 */
.ly_cases_detail_2 .img_box.fixed_height .compute_process_img {
    height: 660px;
}

.ly_cases_detail_2 .img_box.fixed_height .compute_process_img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--cd2-img-fit, cover);
    object-position: var(--cd2-img-position, center center);
}

/* ---------------- 正文富文本 ---------------- */
/* 不设 color / font-family: 正文颜色与字体走 .deco-content 公共 class(全局设置),
   这里只管排版度量 —— 写死颜色会因选择器权重更高把全局设置盖掉 */
.ly_cases_detail_2 .right_side > .contents {
    margin-top: 45px;
    padding-bottom: 20px;
    min-height: 300px;
    line-height: 1.8;
    font-size: 16px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.ly_cases_detail_2 .contents_title {
    line-height: 1;
    margin-bottom: 15px;
    color: #333;
    font-size: 30px;
}

.ly_cases_detail_2 .contents img {
    max-width: 100%;
    height: auto;
}

.ly_cases_detail_2 .contents video,
.ly_cases_detail_2 .contents iframe {
    max-width: 100%;
}

.ly_cases_detail_2 .contents table {
    max-width: 100%;
    border-collapse: collapse;
    /* 窄屏下表格整体横向滚动, 避免撑破容器 */
    display: block;
    overflow-x: auto;
}

.ly_cases_detail_2 .contents table td,
.ly_cases_detail_2 .contents table th {
    border: 1px solid #e8e8e8;
    padding: 6px 10px;
}

.ly_cases_detail_2 .contents p {
    margin: 0 0 12px;
}

.ly_cases_detail_2 .contents p:last-child {
    margin-bottom: 0;
}

.ly_cases_detail_2 .contents ul,
.ly_cases_detail_2 .contents ol {
    padding-left: 22px;
    margin: 0 0 12px;
}

.ly_cases_detail_2 .contents ul li {
    list-style: disc;
}

.ly_cases_detail_2 .contents ol li {
    list-style: decimal;
}

.ly_cases_detail_2 .contents h1,
.ly_cases_detail_2 .contents h2,
.ly_cases_detail_2 .contents h3,
.ly_cases_detail_2 .contents h4,
.ly_cases_detail_2 .contents h5,
.ly_cases_detail_2 .contents h6 {
    margin: 18px 0 10px;
    line-height: 1.4;
    scroll-margin-top: 90px;
}

.ly_cases_detail_2 .contents blockquote {
    margin: 0 0 12px;
    padding: 10px 16px;
    border-left: 3px solid #e8e8e8;
    background-color: #fafafa;
}

.ly_cases_detail_2 .contents a {
    text-decoration: underline;
}

/* 移动端正文: PC / 移动两份内容按视口切显隐(不用 JS 判断) */
.ly_cases_detail_2 .right_side > .contents.mobile_contents {
    display: none;
}

.ly_cases_detail_2 .detail_empty {
    margin-top: 45px;
    padding: 60px 20px;
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    color: #999;
    background-color: #fafafa;
}

/* ---------------- 社媒分享条 ---------------- */
.ly_cases_detail_2 .share {
    width: auto;
    margin-bottom: 40px;
    padding: 30px 0 50px;
    border-bottom: 1px solid #e8e8e8;
}

.ly_cases_detail_2 .share_toolbox ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.ly_cases_detail_2 .share_toolbox li {
    list-style: none;
    margin-right: 20px;
    margin-bottom: 20px;
}

.ly_cases_detail_2 .share_toolbox li:last-child {
    margin-right: 0;
}

.ly_cases_detail_2 .share_toolbox a {
    display: block;
    text-decoration: none;
}

.ly_cases_detail_2 .share_toolbox a i {
    display: block;
    width: 26px;
    height: 26px;
    background: var(--share-icon) no-repeat center / contain;
    transition: filter 0.2s;
}

/* 常态彩色, 悬停转灰 —— 与产品/新闻详情页一致 */
.ly_cases_detail_2 .share_toolbox a:hover i {
    filter: grayscale(1);
}

/* ---------------- 上一条 / 下一条 ---------------- */
.ly_cases_detail_2 .cases_box .item {
    margin-top: 30px;
}

.ly_cases_detail_2 .cases_box .item:first-child {
    margin-top: 0;
}

.ly_cases_detail_2 .cases_box .item .icon {
    width: 85px;
    padding: 0 10px;
    box-sizing: border-box;
    line-height: 30px;
    background-color: #fecf00;
    font-size: 14px;
    text-align: center;
}

.ly_cases_detail_2 .cases_box .item .icon a {
    color: #000;
    text-decoration: none;
}

.ly_cases_detail_2 .cases_box .item .title {
    width: calc(100% - 85px);
    padding-left: 12px;
    box-sizing: border-box;
    line-height: 30px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.ly_cases_detail_2 .cases_box .item .title a {
    color: #222;
    text-decoration: none;
}

/* ============================================================
   移动端(≤1000px): 左栏收成抽屉, 推荐案例搬到正文底部
   ============================================================ */
@media screen and (max-width: 1000px) {
    /* 抽屉: 默认不显示, 由 .cate_top_title 点开加 .show;
       top 值在 JS 里按开关条的位置算(开关条上下位置随标题行数变化) */
    .ly_cases_detail_2 .left_side {
        display: none;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 82%;
        background-color: #fff;
        border: 1px solid #484a4e;
        box-sizing: border-box;
        z-index: 2;
    }

    .ly_cases_detail_2 .left_side.show {
        display: block;
    }

    .ly_cases_detail_2 .left_side > .top_title {
        display: none;
    }

    .ly_cases_detail_2 .left_side ul.list {
        padding: 0;
        max-height: 225px;
        overflow: auto;
    }

    .ly_cases_detail_2 .left_side ul.list li a {
        padding: 0 15px;
        line-height: 45px;
        font-size: 14px;
    }

    /* 抽屉里不重复推荐案例(它在正文底部有一份) */
    .ly_cases_detail_2 .left_side .relate_box {
        display: none;
    }

    .ly_cases_detail_2 .right_side {
        width: 100%;
        padding-right: 0;
    }

    /* 分类开关条: 右侧 +/- 由 i 元素用两根伪元素画, 展开时横杠留下、竖杠隐藏 */
    .ly_cases_detail_2 .right_side .cate_top_title {
        display: block;
        position: relative;
        margin-top: 20px;
        padding: 0 45px 0 0;
        height: 35px;
        line-height: 35px;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
        cursor: pointer;
    }

    .ly_cases_detail_2 .right_side .cate_top_title i {
        position: absolute;
        right: 10px;
        top: 50%;
        width: 13px;
        height: 13px;
        margin-top: -7px;
    }

    .ly_cases_detail_2 .right_side .cate_top_title i::before,
    .ly_cases_detail_2 .right_side .cate_top_title i::after {
        content: "";
        position: absolute;
        background-color: #666;
    }

    .ly_cases_detail_2 .right_side .cate_top_title i::before {
        left: 0;
        top: 6px;
        width: 13px;
        height: 1px;
    }

    .ly_cases_detail_2 .right_side .cate_top_title i::after {
        left: 6px;
        top: 0;
        width: 1px;
        height: 13px;
    }

    .ly_cases_detail_2 .right_side .cate_top_title i.cur::after {
        display: none;
    }

    .ly_cases_detail_2 .right_side > .top_title {
        margin-top: 33px;
    }

    .ly_cases_detail_2 .right_side > .bottom_brief {
        margin-top: 33px;
        padding: 15px 20px;
        font-size: 14px;
        line-height: 1.5;
    }

    .ly_cases_detail_2 .right_side .img_box {
        margin-top: 25px;
    }

    .ly_cases_detail_2 .right_side > .contents {
        margin-top: 30px;
        font-size: 14px;
        min-height: 0;
    }

    .ly_cases_detail_2 .contents_title {
        font-size: 18px;
    }

    /* 移动端优先用移动端正文(配了才有这一份) */
    .ly_cases_detail_2 .right_side > .contents.pc_contents {
        display: none;
    }

    .ly_cases_detail_2 .right_side > .contents.mobile_contents {
        display: block;
    }

    .ly_cases_detail_2 .detail_empty {
        margin-top: 30px;
        padding: 40px 15px;
    }

    .ly_cases_detail_2 .share {
        position: static;
        width: 100%;
        margin-bottom: 30px;
        padding: 20px 0 30px;
    }

    .ly_cases_detail_2 .share_toolbox li {
        margin-bottom: 0;
        margin-right: 20px;
    }

    .ly_cases_detail_2 .cases_box .item {
        margin-top: 20px;
    }

    .ly_cases_detail_2 .cases_box .item .icon {
        width: 88px;
    }

    .ly_cases_detail_2 .cases_box .item .title {
        width: calc(100% - 88px);
        padding-left: 15px;
        line-height: 20px;
        -webkit-line-clamp: unset;
    }

    /* 底部推荐案例: 两列卡片 */
    .ly_cases_detail_2 .relate_box.list_bottom_box {
        display: block;
        margin-top: 30px;
    }

    .ly_cases_detail_2 .relate_box.list_bottom_box > .top_title {
        height: 35px;
        line-height: 35px;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .ly_cases_detail_2 .relate_box.list_bottom_box .pro_list {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 10px 0 0;
    }

    .ly_cases_detail_2 .relate_box.list_bottom_box .related_item {
        display: block;
        width: 48%;
        padding: 0;
        margin-bottom: 20px;
        border-bottom: 0;
    }

    .ly_cases_detail_2 .relate_box.list_bottom_box .pic_box {
        width: 100%;
        flex: none;
    }

    .ly_cases_detail_2 .relate_box.list_bottom_box .content {
        padding: 10px 0 0;
    }
}
