/* intro 通栏大图：
   - 图片保持 .abo_l_s>img{width:100%} 通栏；
   - .abo_list 加 max-width:1920px 作为无 JS 时的兜底；实际由 solutions_detail.tpl 里的脚本按当前窗口宽度动态设置封顶；
   - 覆盖文字用 cqw 跟随图片宽度等比缩放（1920 设计稿下仍是 32px/16px），窗口/缩放变化时图文比例始终一致，不会溢出图片。
      只影响 body.lig_body 的 Solutions 详情页；≤1024 的移动端布局不变。 */
@media all and (min-width: 1025px) {
    .lig_body .abo_list {
        max-width: 1920px;
        margin-left: auto;
        margin-right: auto;
    }
    .lig_body .abo_l_s { container-type: inline-size; }
    .lig_body .abo_list .abo_l_s .abo_l_text .abo_l_num { font-size: 1.2526cqw; }
    .lig_body .abo_list .abo_l_s .abo_l_text .abo_l_name { font-size: 1.6701cqw; }
    .lig_body .abo_list .abo_l_s .abo_l_text .abo_l_info { font-size: .8351cqw; }

    /* 文字区加宽：原 26.0965%，给富文本里的图文横排留更多空间 */
    .lig_body .abo_list .abo_l_s .abo_l_text { width: 45%; }

    /* 奇数项文字区左边界：原 58.33% */
    .lig_body .abo_list .abo_l_s:nth-child(odd) .abo_l_text { left: 52%; }
    
    /* 偶数项文字区左边界：原 15.625% */
    .lig_body .abo_list .abo_l_s:nth-child(even) .abo_l_text { left: 2%; }

    /* 富文本“内容横排”：先只强制不换行，保持原始字号/图标大小，
       观察实际溢出多少，再决定是否缩小。 */
    .lig_body .abo_l_info .content-item { white-space: nowrap; flex-shrink: 0; }
}

/* Solutions 详情页富文本（后台 CKEditor“样式”下拉里的“内容横排”）：
   - 内容横排：每个段落变成 inline-flex，多个“图标+文字”段落自然排成一行；
   - 直接子 <span>（CKEditor 设字号时自动生成的包裹层）同样变成 flex 容器，否则 flex 只作用到整个 <span>，里面的每个“图标+文字”不会各自上下居中；
   - 图标与文字之间 3px；上一项文字与下一个图标之间固定 15px（第一项不留左间距）；
   - 不限制单项宽度，宽窄由内容决定。 */
.lig_body .abo_l_info .content-row { --content-text-shift: 1px; display: inline-flex; align-items: center; padding-top: var(--content-text-shift); }
.lig_body .abo_l_info .content-row > span { display: inline-flex; align-items: center; }

/* 多行文字时，让较短的行相对较长的一行左右居中（单行文字没有可见变化） */
.lig_body .abo_l_info .content-row,
.lig_body .abo_l_info .content-row > span { text-align: center; }

/* 多行文字的行距：默认继承 .abo_l_info 的 1.875，偏大，收紧凑一些 */
.lig_body .abo_l_info .content-row,
.lig_body .abo_l_info .content-row > span { line-height: 1.4; }

/* 图标抵消上面的 padding-top：relative/top 不改变布局，只把图标移回原位，
   因此视觉上只有文字下移，图标位置保持不变 */
.lig_body .abo_l_info .content-row img { margin-right: 4px; position: relative; top: calc(-1 * var(--content-text-shift)); }
.lig_body .abo_l_info .content-row > img:not(:first-child),
.lig_body .abo_l_info .content-row > span > img:not(:first-child) { margin-left: 15px; }
.lig_body .abo_l_info .content-row + .content-row { margin-left: 15px; }
/* 每个“图标+文字”由前台 JS 包一层 .content-item；桌面端仍然横排 */
.lig_body .abo_l_info .content-item { display: inline-flex; align-items: center; }
.lig_body .abo_l_info .content-item + .content-item { margin-left: 7px; }

@media all and (max-width: 1024px) {
    /* 移动端不再固定两列：每个“图标+文字”按内容宽度完整显示（不换行、不压缩），
       一行能放下 2 个就排 2 个，放不下就自动换行；
       单个条目比整行还宽时也保持完整，允许伸进两侧留白。 */
    .lig_body .abo_l_info .content-row,
    .lig_body .abo_l_info .content-row > span:not(.content-item) {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 12px;
        row-gap: 14px;
        width: 100%;
    }
    .lig_body .abo_l_info .content-item {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;   /* 图标靠左，按内容宽度排列 */
        flex: 0 0 auto;                /* 不压缩，保证文字完整 */
        white-space: nowrap;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
    .lig_body .abo_l_info .content-item + .content-item { margin-left: 0; }
}

/* 极窄屏保护：单个“图标+文字”比整行还宽时（目前只有 Flexible Supporting Accessory &
   Customization，自然宽约 363px），允许它在条目内部换行，避免被屏幕右侧裁掉。
   382px 以上这条不会生效，条目仍保持完整一行。 */
@media all and (max-width: 382px) {
    .lig_body .abo_l_info .content-item {
        white-space: normal;
        max-width: 100%;
    }
}

/* 富文本正文与旧【标题】/【内容】的行高对齐：
   - 第一段通常是编辑器里设了 26px 的标题，行高收到 1.3 → 约 33.8px（旧标题约 34px）；
   - 其余段落继续继承 .abo_l_info 的 1.875（16px 下约 30px，和旧内容一致）；
   - 段间距用 .24rem（1920 下 24px，原来 16px）；最后一段不留底距。 */
.lig_body .abo_l_info > p:first-child { line-height: 1.3; }
.lig_body .abo_l_info > p { margin-bottom: .24rem; }
.lig_body .abo_l_info > p:last-child { margin-bottom: 0; }

/* 富文本第一段是区块标题：即使编辑器里套了 <strong>，也和页面大标题 .pub_title 一样用常规字重，
   避免区块标题比页面主标题还粗。 */
.lig_body .abo_l_info > p:first-child strong { font-weight: 400; }

/* Applications 模块：图片 + 图标 + 标题 + 描述。
   卡片宽度、容器宽度按设计稿可调；数量超过可视数量时由 solutions_detail.tpl
   里的脚本复制一份列表并加 .is-marquee，实现无缝跑马灯。 */
.lig_body .app_src_case { padding: .6rem 0 .7rem; }
.lig_body .app_src_block { width: 97%; max-width: 1824px; margin: 0 auto; }

/* 静态排列时不裁剪，卡片的阴影才能显示；跑马灯时才裁剪溢出 */
.lig_body .app_viewport { overflow: visible; }
.lig_body .app_viewport.is-marquee {
    overflow: hidden;
    /* 跑马灯需要裁剪横向移动的列表，但别把卡片底部阴影/圆角一起裁掉：
       在裁剪区域里补上下内边距，再用负 margin 把整体布局高度拉回来 */
    padding: 24px 0 34px;
    margin: -24px 0 -34px;
}

.lig_body .app_list { display: flex; }
.lig_body .app_item {
    --app-card-w: 350px;
    --app-card-h: 400px;
    --app-img-h: 265px;
    --app-icon-size: 30px;
    --app-icon-gap: .12rem;
    --app-divider-w: 2px;
    --app-text-pad: .12rem;
    flex: 0 0 var(--app-card-w);
    height: var(--app-card-h);
    display: flex;
    flex-direction: column;
    margin-right: 18px;
    background: #fff;
    border-radius: .2rem;
    /* 左右/四周很淡（.05），底部单独一层更明显（.15）。
       底部这层用较大负扩散把左右两侧收住，只让阴影主要落在卡片下方。 */
    box-shadow:
        0 0 10px rgba(0,0,0,.05),
        0 20px 20px -15px rgba(0,0,0,.15);
    overflow: hidden;
    box-sizing: border-box;
}

.lig_body .app_img { flex: 0 0 var(--app-img-h); overflow: hidden; }
.lig_body .app_img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lig_body .app_body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: .14rem .18rem .14rem; }
.lig_body .app_head { display: flex; align-items: flex-start; gap: var(--app-icon-gap); }
.lig_body .app_icon {
    flex: 0 0 auto;
    width: var(--app-icon-size);
    height: var(--app-icon-size);
    /* 图标与标题第一行垂直居中：行高 20px（16px × 1.25），图标 30px，上移 5px。
       标题有两行时图标也只对齐第一行，不会落到两行中间。 */
    margin-top: -5px;
    object-fit: contain;
    display: block;
}

/* 分隔线恢复为标题的绝对定位伪元素（原来的写法）。
   标题区固定两行高：1 行的标题也占满两行，底下【介绍】的起始位置不会上下跳；
   标题超过两行时第 2 行末尾显示省略号。 */
.lig_body .app_name {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 2.5em;   /* 两行：line-height 1.25 × 2 */
    padding-left: var(--app-text-pad);
    font-family: Manrope-Bold, Manrope, sans-serif;
    font-size: 16px;
    line-height: 1.25;
    color: #333;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.lig_body .app_name::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;   /* 第一行行高 20px 的中点，和单行标题对齐 */
    transform: translateY(-50%);
    width: var(--app-divider-w);
    height: 20px;
    background: #d0d0d0;
}

/* 介绍最多 3 行，超出省略号；完整内容通过 title 属性在悬停时显示 */
.lig_body .app_desc {
    margin-top: .04rem;
    margin-left: calc(var(--app-icon-size) + var(--app-icon-gap) + var(--app-text-pad));
    font-size: 12px;
    line-height: 1.45;
    color: #444;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* 没有【介绍】的卡片：标题区不再固定两行、不做省略，让标题完整显示。
   此时整个正文区都可以留给标题；空的介绍节点隐藏，避免残留间距。 */
.lig_body .app_item.no-desc .app_name {
    height: auto;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}
.lig_body .app_item.no-desc .app_desc { display: none; }

/* 没有上传图标时不预留左侧空间 */
.lig_body .app_item.no-icon .app_name { padding-left: 0; }
.lig_body .app_item.no-icon .app_name::before { display: none; }
.lig_body .app_item.no-icon .app_desc { margin-left: 0; }

/* 既没有图标、也没有介绍的卡片：只剩标题，标题文字左右居中，仍保持顶部对齐。 */
.lig_body .app_item.no-icon.no-desc .app_name { text-align: center; }
.lig_body .app_list:not(.is-marquee) { justify-content: center; }
.lig_body .app_list:not(.is-marquee) .app_item:last-child { margin-right: 0; }
.lig_body .app_list.is-marquee {
    justify-content: flex-start;
    width: max-content;
    animation: app-marquee var(--app-duration, 40s) linear infinite;
}
.lig_body .app_viewport:hover .app_list.is-marquee { animation-play-state: paused; }

@keyframes app-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .lig_body .app_list.is-marquee { animation: none; }
}
@media all and (max-width: 1600px) {
    .lig_body .app_item { --app-card-w: 280px; --app-card-h: 320px; --app-img-h: 212px; }
}
@media all and (max-width: 1366px) {
    .lig_body .app_item { --app-card-w: 260px; --app-card-h: 297px; --app-img-h: 197px; }
}
@media all and (max-width: 1024px) {
    .lig_body .app_src_case { padding: .4rem 0 .5rem; }
    .lig_body .app_src_block { width: 92%; }
    /* 移动端卡片高度改为自适应：3 行介绍不会再被固定高度裁掉半行；
       保留 274px 最小高度，短内容的卡片仍和设计稿一致 */
    .lig_body .app_item { --app-card-w: 240px; --app-img-h: 182px; height: auto; min-height: 274px; margin-right: 20px; }
}

/* 产品项：描述（keywords）有值但内容（content）为空时，描述不使用粗体 */
.lig_body .lig_src2_case .sol_pro_list a .lig_pro_xb.no-content {
    font-family: Manrope, sans-serif;
}
