/* 官网公司优势模块独立样式（2026-10-25 改版）。
   卡片按「图标优先、编号兜底」渲染：有条目图标时为 48px 圆角图标徽章 + 右上角编号角标，
   无图标回落 44px 圆形编号徽章；白底 1px 细描边 + 8px 圆角。
   hover 语言与产品卡一致：边框 tint-300 + 上浮 2px + 投影 0 10px 24px rgba(10,58,92,.10)，
   仅 (hover:hover) 指针设备启用；prefers-reduced-motion 关闭位移动画。
   容器并入全站 .site-shell（1270px）；右图 8px 圆角 + 投影，与 About 页媒体处理一致。
   方向属性全部使用逻辑属性，Arabic RTL 下由 dir="rtl" 自动镜像，无需单独规则。
   无图降级：媒体为空时隐藏右列，网格占满（flex 自然处理）。 */
.public-adv {
    background: #fff;
    padding: 64px 0 56px;
    position: relative;
}

/* 标题行与 about 模块同一胶囊模式：主色 24×48 装饰 + 32px/800。 */
.public-adv__title {
    width: 100%;
    margin: 0 0 40px;
    padding-inline-start: 36px;
    position: relative;
    color: var(--site-ink);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: .4px;
}
.public-adv__title::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    border-start-start-radius: 24px;
    border-end-start-radius: 24px;
    background: var(--site-primary);
}

/* 内容行：卡片网格 + 40px 间距 + 右图列（约 30%），与网格同高。 */
.public-adv__row {
    display: flex;
    gap: 40px;
    align-items: stretch;
}
.public-adv__grid {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 卡片：白底细描边，transition 只负责 hover 三属性。 */
.public-adv__card {
    background: #fff;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    padding: 28px 30px 30px;
    min-height: 268px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.public-adv__card-top {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

/* 图标徽章：48px 圆角方块，tint-100 底；hover 填充主色、图标反白。 */
.public-adv__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--site-tint-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    overflow: hidden;
    transition: background .25s;
}
.public-adv__icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: filter .25s;
}

/* 编号兜底徽章：44px 圆形，tint-100 底 + 主色字；hover 填充主色反白。 */
.public-adv__num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--site-tint-100);
    color: var(--site-primary);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    transition: background .25s, color .25s;
}

/* 有图标时的编号角标：右上角小字，不与徽章争权重。 */
.public-adv__num-corner {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--site-tint-300);
    padding-top: 9px;
}

.public-adv__card-title {
    margin: 0 0 10px;
    color: var(--site-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}
.public-adv__card-desc {
    margin: 0;
    color: var(--site-neutral-500);
    font-size: 14px;
    line-height: 1.75;
}

/* hover：仅指针设备；减少动态偏好时关闭位移动画。 */
@media (hover: hover) {
    .public-adv__card:hover {
        border-color: var(--site-tint-300);
        box-shadow: 0 10px 24px rgba(10, 58, 92, .10);
        transform: translateY(-2px);
    }
    .public-adv__card:hover .public-adv__icon { background: var(--site-primary); }
    .public-adv__card:hover .public-adv__icon img { filter: brightness(0) invert(1); }
    .public-adv__card:hover .public-adv__num { background: var(--site-primary); color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
    .public-adv__card,
    .public-adv__icon,
    .public-adv__icon img,
    .public-adv__num { transition: none; }
    .public-adv__card:hover { transform: none; }
}

/* 右图列：8px 圆角 + 投影；无图时不渲染（模板 th:if），网格自动占满。 */
.public-adv__media {
    width: 30%;
    flex-shrink: 0;
    position: relative;
    min-height: 268px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(10, 58, 92, .12);
}
.public-adv__media img {
    width: 100%;
    height: 100%;
    min-height: 268px;
    object-fit: cover;
    display: block;
}

@media screen and (max-width: 1280px) {
    .public-adv { padding: 56px 0 48px; }
    .public-adv__title { font-size: 28px; margin-bottom: 32px; }
    .public-adv__media { width: 32%; }
    .public-adv__card { padding: 24px 26px 26px; min-height: 240px; }
    .public-adv__media, .public-adv__media img { min-height: 240px; }
}

/* 移动端堆叠：标题 → 通栏图片 → 2×2 紧凑网格（图片用 order 前置）。 */
@media screen and (max-width: 920px) {
    .public-adv { padding: 40px 0 32px; }
    .public-adv__title { font-size: 26px; margin-bottom: 24px; }
    .public-adv__title::before { width: 20px; height: 40px; }
    .public-adv__row { display: flex; flex-direction: column; gap: 16px; }
    .public-adv__media { order: -1; width: 100%; min-height: 200px; }
    .public-adv__media img { min-height: 200px; }
    .public-adv__grid { gap: 12px; }
    .public-adv__card { padding: 20px 20px 22px; min-height: 0; }
    .public-adv__card-top { margin-bottom: 12px; }
    .public-adv__icon { width: 40px; height: 40px; border-radius: 10px; }
    .public-adv__icon img { width: 20px; height: 20px; }
    .public-adv__num { width: 36px; height: 36px; font-size: 14px; }
    .public-adv__num-corner { font-size: 12px; padding-top: 7px; }
    .public-adv__card-title { font-size: 16px; }
    .public-adv__card-desc { font-size: 13px; line-height: 1.65; }
}

/* 小屏：四张卡单列纵排。 */
@media screen and (max-width: 520px) {
    .public-adv__title { font-size: 24px; }
    .public-adv__media, .public-adv__media img { min-height: 180px; }
    .public-adv__grid { grid-template-columns: 1fr; }
}
