/* ==========================================================
   首页 Banner 轮播
   ========================================================== */
.home-banner {
    position: relative;
    width: 100%;
    height: 1162px;
    overflow: hidden;
}

.banner-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.banner-slide {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    height: 100%;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Banner 文字层 */
.banner-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

.banner-text > .container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.banner-text__inner {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.banner-text__en {
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 700;
    font-size: 46px;
    color: #fff;
    line-height: 1;
}

.banner-text__cn {
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 400;
    font-size: 32px;
    color: #fff;
    line-height: 1;
}

/* 左右箭头 */
.banner-arrow {
    position: absolute;
    bottom: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    z-index: 10;
}

.banner-arrow:hover {
    background-color: rgba(0, 145, 226, 0.75);
    border-color: transparent;
}

.banner-arrow--prev {
    left: 60px;
}

.banner-arrow--next {
    right: 60px;
}

/* 指示点 */
.banner-dots {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.45);
    transition: background-color 0.3s, transform 0.3s;
}

.banner-dot.is-active {
    background-color: #fff;
    transform: scale(1.3);
}

/* ==========================================================
   区块1
   ========================================================== */
.home-section-1 {
    height: 842px;
}

.section1-inner {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 100%;
    padding-top: 122px;
    padding-bottom: 56px;
}

/* --- 左侧列 --- */
.section1-left {
    max-width: 730px;
    flex: 0 0 730px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.section1-left-top {
    display: flex;
    flex-direction: column;
}

.section1-body-text {
    margin-top: 70px;
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 300;
    font-size: 22px;
    color: #000;
    line-height: 1.75;
}

.section1-left-bottom {
    /* 底部标题组，由 justify-content: space-between 推到底部 */
}

/* --- 右侧列 --- */
.section1-right {
    display: flex;
    flex-direction: column;
    padding-right: 100px;
    gap: 0;
}

.stat-item {
    padding-top: 16px;
    padding-bottom: 24px;
}

.stat-label {
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 300;
    font-size: 22px;
    color: #000;
    line-height: 1;
}

.stat-value {
    display: flex;
    align-items: baseline;
    margin-top: 20px;
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 500;
    font-size: 70px;
    color: #000;
    line-height: 1;
}

.stat-suffix {
    font-size: 70px;
    font-weight: 500;
    line-height: 1;
}

/* ==========================================================
   区块2 — 手风琴（PC：水平展开，图片 540×823px 居中裁剪）
   ========================================================== */
.home-section-2 {
    width: 100%;
    overflow: hidden;
}

.section2-accordion {
    display: flex;
    width: 100%;
    height: 823px;
}

.section2-item {
    position: relative;
    flex: 1 1 0%;
    overflow: hidden;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    /* 过渡由 JS RAF 自定义动画接管，CSS transition 仅作无 JS 降级 */
    transition: flex-basis 0.5s ease;
}

/* 无 JS 时的 CSS 降级（JS 接管后 inline style 覆盖这里） */
.section2-item:hover {
    flex: 0 0 540px;
}
.section2-accordion:has(.section2-item:hover) .section2-item:not(:hover) {
    flex: 1 1 0%;
}
.section2-accordion.has-hover .section2-item.is-hovered { flex: 0 0 540px; }
.section2-accordion.has-hover .section2-item:not(.is-hovered) { flex: 1 1 0%; }

/* 图片：随容器尺寸变化，object-fit:cover 居中裁剪，无位置计算，无抖动
   max-width:none 覆盖全局 max-width:100%，避免图片被挤压 */
.section2-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

/* 蒙版 — 双伪元素 + opacity 过渡，GPU 合成无闪烁 */
.section2-overlay {
    position: absolute;
    inset: 0;
}

.section2-overlay::before,
.section2-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    transition: opacity 0.4s ease;
    will-change: opacity;
}

.section2-overlay::before {
    background-color: #000;
    opacity: 0.45;
}

.section2-overlay::after {
    background-color: rgb(43, 124, 170);
    opacity: 0;
}

/* 展开态：隐藏暗层，显示蓝色层 */
.section2-item.is-expanded .section2-overlay::before {
    opacity: 0;
}

.section2-item.is-expanded .section2-overlay::after {
    opacity: 0.65;
}

/* hover 蒙版 — 仅限指针设备，触屏不触发，杜绝 tap 闪烁 */
@media (hover: hover) {
    .section2-item:hover .section2-overlay::before,
    .section2-accordion.has-hover .section2-item.is-hovered .section2-overlay::before {
        opacity: 0;
    }

    .section2-item:hover .section2-overlay::after,
    .section2-accordion.has-hover .section2-item.is-hovered .section2-overlay::after {
        opacity: 0.65;
    }

    .section2-accordion:has(.section2-item:hover) .section2-item:not(:hover) .section2-overlay::before,
    .section2-accordion.has-hover .section2-item:not(.is-hovered) .section2-overlay::before {
        opacity: 0.62;
    }
}

/* 文字内容 — 垂直居中 */
.section2-content {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    padding: 0 60px;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.s2-num {
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 500;
    font-size: 54px;
    line-height: 1;
    display: block;
    margin-bottom: 125px;
    transform-origin: left center;
    transition: transform 0.35s ease;
    will-change: transform;
}

.s2-name-cn {
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 300;
    font-size: 26px;
    line-height: 1;
    margin-bottom: 18px;
    transform-origin: left center;
    transition: transform 0.35s ease;
    will-change: transform;
}

/* PC端：名称包裹层，负责与箭头之间的间距 */
.s2-name-group {
    margin-bottom: 90px;
    transition: margin-bottom 0.35s ease;
}

.s2-name-en {
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 500;
    font-size: 20px;
    word-spacing: 100vw;
    line-height: 1.5;
    min-height: 3em;
    margin-bottom: 0;
    transform-origin: left center;
    transition: transform 0.35s ease;
    will-change: transform;
}

/* hover 时文字略微放大 — 仅限指针设备 */
@media (hover: hover) {
    .section2-item:hover .s2-num     { transform: scale(1.148); }
    .section2-item:hover .s2-name-cn { transform: scale(1.154); }
    .section2-item:hover .s2-name-en { transform: scale(1.1); }
}

/* 箭头 — 默认隐藏，hover / 展开 出现 */
.s2-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease 0.08s, transform 0.3s ease 0.08s;
    line-height: 0;
}

.section2-item.is-expanded .s2-arrow {
    opacity: 1;
    transform: translateX(0);
}

@media (hover: hover) {
    .section2-item:hover .s2-arrow {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================
   区块3 — 精选案例
   ========================================================== */
.home-section-3 {
    width: 100%;
    padding-top: 120px;
    padding-bottom: 85px;
}

/* 标题行1：两列，两端靠上对齐 */
.section3-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section3-title-left {
    flex-shrink: 0;
}

.section3-title-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.section3-description p {
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 300;
    font-size: 38px;
    color: #000;
    line-height: 1.45;
}

.section3-more-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 45px;
    font-family: 'HarmonyOS_Sans_SC', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: #000;
    text-decoration: none;
    transition: opacity 0.2s;
}

.section3-more-link:hover {
    opacity: 0.65;
}

/* 列表行：4行 × 3列 grid */
/* section3-grid 核心样式已提升至 main.css，此处仅保留首页上下文间距 */
.home-section-3 .section3-grid {
    margin-top: 115px;
}

/* 标题行2 */
.section3-title-bottom {
    margin-top: 80px;
}

/* ==========================================================
   区块4 — 合作伙伴 Logo 墙
   ========================================================== */
.home-section-4 {
    width: 100%;
    height: 1037px;
    background-image: url('../images/section4-bg.webp');
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    padding-top: 120px;
    padding-bottom: 110px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch; /* 让容器撑满内容高度 */
}

.home-section-4 .container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* logo grid 通用样式已迁移至 main.css */

/* ==========================================================
   响应式
   ========================================================== */
@media screen and (max-width: 1200px) {
    .home-banner {
        height: 700px;
    }

    .banner-text__en {
        font-size: 36px;
    }

    .banner-text__cn {
        font-size: 26px;
    }

    .banner-text__inner {
        gap: 22px;
    }

    .home-section-1 {
        height: auto;
    }

    .section1-inner {
        padding-top: 80px;
        padding-bottom: 60px;
    }

    .section1-left {
        flex: 0 0 55%;
        max-width: 55%;
    }

    .section1-right {
        padding-right: 40px;
    }

    .stat-value,
    .stat-suffix {
        font-size: 56px;
    }

    /* 区块3 */
    .section3-description p {
        font-size: 28px;
    }

    /* 区块4 */
    .home-section-4 {
        height: auto;
        min-height: 600px;
    }

}

@media screen and (max-width: 960px) {
    .home-banner {
        height: 500px;
    }

    .banner-text > .container {
        justify-content: center;
    }

    .banner-text__en {
        font-size: 28px;
    }

    .banner-text__cn {
        font-size: 20px;
    }

    .banner-text__inner {
        gap: 16px;
    }

    .banner-arrow--prev { left: 20px; }
    .banner-arrow--next { right: 20px; }

    .home-section-1 {
        height: auto;
    }

    .section1-inner {
        flex-direction: column;
        gap: 60px;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .section1-left {
        flex: none;
        max-width: 100%;
        gap: 50px;
    }

    .section1-left-top,
    .section1-left-bottom {
        width: 100%;
    }

    .section1-right {
        padding-right: 0;
    }

    /* 区块2：移动端 5 行纵向排列 */
    .section2-accordion {
        flex-direction: column;
        height: auto;
    }

    /* 重置所有 PC 端 flex 规则，统一为行高模式 */
    .section2-item,
    .section2-item:hover,
    .section2-accordion:has(.section2-item:hover) .section2-item,
    .section2-accordion:has(.section2-item:hover) .section2-item:not(:hover),
    .section2-accordion.has-hover .section2-item,
    .section2-accordion.has-hover .section2-item.is-hovered,
    .section2-accordion.has-hover .section2-item:not(.is-hovered) {
        flex: 0 0 160px !important;
        transition: flex-basis 0.45s ease;
    }

    /* 点击展开态 */
    .section2-item.is-expanded {
        flex-basis: 320px !important;
    }

    /* 图片：100% 宽度横条显示，object-fit 居中裁剪竖向图片 */
    .section2-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none;
        object-fit: cover;
        object-position: center;
    }

    /* 展开态：不改变图片缩放，仅靠行高增加显示更多内容 */
    .section2-item:hover .section2-img,
    .section2-item.is-expanded .section2-img {
        transform: none;
    }

    /* 移动端内容横向布局：[序号] [名称组] [箭头] */
    .section2-content {
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 0 24px;
    }

    .s2-num {
        font-size: 32px;
        margin-bottom: 0;
        flex-shrink: 0;
        min-width: 48px;
    }

    /* 移动端名称包裹层：占满剩余空间，垂直排列中英文 */
    .s2-name-group {
        flex: 1;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .s2-name-cn {
        font-size: 18px;
        margin-bottom: 0;
    }

    .s2-name-en {
        font-size: 14px;
        min-height: 0;
        word-spacing: normal;
        margin-bottom: 0;
    }

    /* 箭头在移动端始终显示，提示可展开 */
    .s2-arrow {
        flex-shrink: 0;
        opacity: 0.6;
        transform: translateX(0);
    }

    .section2-item.is-expanded .s2-num     { transform: scale(1.1875); }
    .section2-item.is-expanded .s2-name-cn { transform: scale(1.222); }
    .section2-item.is-expanded .s2-name-en { transform: scale(1.143); }
    .section2-item.is-expanded .s2-arrow {
        opacity: 1;
        transform: translateX(0);
    }

    /* 区块3 */
    .section3-title-row {
        flex-direction: column;
        gap: 50px;
    }

    .section3-title-right {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }

    .section3-description p {
        font-size: 24px;
    }

    .home-section-3 .section3-grid {
        margin-top: 60px;
    }

    /* 区块4 */
    .home-section-4 {
        height: auto;
        min-height: unset;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    /* logo grid 响应式已迁移至 main.css */
}

@media screen and (max-width: 600px) {
    .home-banner {
        height: 300px;
    }

    .banner-text__en {
        font-size: 20px;
    }

    .banner-text__cn {
        font-size: 16px;
    }

    .banner-text__inner {
        gap: 12px;
    }

    .banner-arrow {
        width: 40px;
        height: 40px;
    }

    .section1-body-text {
        font-size: 16px;
        margin-top: 40px;
    }

    .stat-value,
    .stat-suffix {
        font-size: 44px;
    }

    /* 区块3：grid 列数响应式已提升至 main.css */
    .section3-description p {
        font-size: 20px;
    }

}
