/* =========================================================
   首页 Hero 第 2 屏：定制化 / 自动化产线（图 + 字 两栏）
   追加到 /skin/css/handemo-home.css 末尾，不影响其它 slide。
   ========================================================= */

/* 原模板 .hero-slide::before 是给 background-image 用的遮罩，本屏不需要 */
.hero-slide--custom::before {
    display: none;
}

.hero-slide--custom {
    background: linear-gradient(100deg, #ffffff 0%, #ffffff 34%, #eaf3fd 62%, #cee1f9 100%);
}

/* 关键：本屏激活时接管 .hero 高度，让 909px 的手机版内容不被 680px 固定高度裁掉。
   未激活时仍是绝对定位，不参与高度计算。 */
.hero.hero--custom-active {
    min-height: 680px;
    height: auto;
}

.hero-slide--custom.active {
    position: relative;
    inset: auto;
    min-height: 680px;
    background-color: transparent;
}

/* 本屏没有背景图，不需要白色渐变压图 */
.hero-slide--custom .hero-grid {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.1vw, 18px);
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0 26px;
}

/* ---------- 左栏文案 ---------- */
.hero-slide--custom .hero-content {
    flex: 0 0 clamp(340px, 37%, 470px);
    max-width: 470px;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0;
}

.hero-slide--custom .eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    letter-spacing: 0.06em;
}

.hero-slide--custom h1,
.hero-slide--custom h2 {
    max-width: none;
    margin: 0 0 18px;
    color: var(--blue-dark);
    font-size: clamp(26px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.hero-slide--custom .hero-copy {
    max-width: 460px;
    margin: 0 0 22px;
    color: #24405f;
    font-size: 15.5px;
    line-height: 1.68;
}

.hero-slide--custom .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

/* ---------- 三个卖点横排 ---------- */
.hero-slide--custom .hero-perks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 26px);
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-slide--custom .hero-perk {
    position: relative;
    display: block;
    padding-top: 2px;
    color: var(--blue-dark);
}

.hero-slide--custom .hero-perk__num {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    color: #fff;
    background: linear-gradient(180deg, #0a58bd, #06469d);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(6, 70, 157, 0.26);
}

.hero-slide--custom .hero-perk strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12.5px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.hero-slide--custom .hero-perk > span:last-child {
    display: block;
    color: #2b4463;
    font-size: 11.5px;
    line-height: 1.45;
}

/* ---------- 右栏图片 ---------- */
.hero-slide--custom .hero-media {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    /* 左对齐：放大的图只向右溢出，绝不向左压到文案栏 */
    justify-content: flex-start;
    min-width: 0;
    margin: 0;
}

.hero-slide--custom .hero-media img {
    display: block;
    /* 右栏比左栏矮，图片向右延伸进页面边距，避免上下大片留白、机器偏小。
       clamp 上限 140px，绝不会越出页面右边缘。 */
    --bleed: clamp(0px, calc((100vw - 1280px) / 2 - 10px), 140px);
    width: calc(100% + var(--bleed));
    max-width: none;
    height: auto;
    object-fit: contain;
    max-height: min(600px, 68vh);
}

/* ---------- 中大屏（≤1240px）：文案在上、产线在下 ---------- */
@media (max-width: 1240px) {
    .hero-slide--custom {
        background: linear-gradient(180deg, #ffffff 0%, #eef5fd 46%, #d3e4fa 100%);
    }
    .hero-slide--custom .hero-grid {
        display: block;
        width: min(1080px, calc(100% - 44px));
        padding: 28px 0 24px;
    }
    .hero-slide--custom .hero-content {
        max-width: 1080px;
    }
    .hero-slide--custom .hero-copy {
        max-width: 760px;
        margin-bottom: 18px;
    }
    .hero-slide--custom h1,
    .hero-slide--custom h2 {
        max-width: 780px;
        margin-bottom: 12px;
        font-size: clamp(24px, 3vw, 30px);
    }
    .hero-slide--custom .hero-actions {
        margin-bottom: 20px;
    }
    .hero-slide--custom .hero-perks {
        gap: clamp(12px, 1.4vw, 22px);
    }
    .hero-slide--custom .hero-media {
        max-width: 860px;
        margin: 18px auto 0;
        justify-content: center;
    }
    .hero-slide--custom .hero-media img {
        --bleed: 0px;
        max-height: none;
    }
}

/* ---------- 手机（≤620px）：卖点改竖排 ---------- */
@media (max-width: 620px) {
    .hero-slide--custom .hero-grid {
        width: calc(100% - 36px);
        padding: 34px 0 26px;
    }
    .hero-slide--custom h1,
    .hero-slide--custom h2 {
        font-size: 24px;
        line-height: 1.16;
    }
    .hero-slide--custom .hero-copy {
        font-size: 14px;
        margin-bottom: 20px;
    }
    .hero-slide--custom .hero-actions {
        margin-bottom: 26px;
    }
    .hero-slide--custom .hero-actions .btn {
        flex: 1 1 46%;
        min-width: 0;
        padding: 0 12px;
        font-size: 12.5px;
    }
    .hero-slide--custom .hero-perks {
        grid-template-columns: 1fr;
        gap: 11px;
    }
    .hero-slide--custom .hero-perk {
        display: grid;
        grid-template-columns: 32px 1fr;
        column-gap: 12px;
        align-items: start;
    }
    .hero-slide--custom .hero-perk__num {
        grid-row: span 2;
        margin-bottom: 0;
    }
    .hero-slide--custom .hero-perk strong {
        margin-top: 3px;
    }
    .hero-slide--custom .hero-media {
        max-width: 380px;
        margin: 16px auto 0;
    }
}
