/* ==========================================================================
   1. 基础容器与背景 (保留你的视觉深度逻辑)
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 550px;
    overflow: hidden;
    background-color: #05191b;
}

#hero-media-container {
    background-color: var(--p-blue);
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0, 0, 0.2, 1) !important;
}

#hero-media-container.loaded {
    opacity: 1 !important;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    animation: heroZoom 30s infinite alternate;
}


@keyframes heroZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

/* 性能优化: hero 不可见时暂停动画，减少GPU占用 */
.hero-section:not(.is-visible) .hero-bg {
    animation-play-state: paused;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        rgba(0, 0, 0, 0.01) 100%;
    z-index: 2;
}

/* ==========================================================================
   2. 动画引擎 (保留你确认的 110% 逻辑)
   ========================================================================== */

/* 基础物理状态 */
.reveal-text {
    opacity: 0;
    transform: translateY(110%);
    /* 保留你修改的 110% */
    display: block;
    animation: none !important;
    /* 强制拦截系统自动动画 */
}

/* 揭幕动画定义 */
@keyframes revealUpAction {
    0% { transform: translateY(110%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* 动画触发开关 */
.hero-text-area.is-ready .reveal-text {
    animation: revealUpAction 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
}

/* 阶梯延迟：严格对应 ID */
.hero-text-area.is-ready #hero_title {
    animation-delay: 0.1s !important;
}

.hero-text-area.is-ready #hero_subtitle {
    animation-delay: 0.3s !important;
}

.hero-text-area.is-ready #hero_desc {
    animation-delay: 0.5s !important;
}

/* 剪裁盒子 */
.reveal-box {
    overflow: hidden !important;
    position: relative;
    margin: 0;
    padding: 0;
    height: auto !important;
}

/* ==========================================================================
   3. 标准布局 (1920px 左右默认样式)
   ========================================================================== */

.hero-section .hero-content-wrapper.fluid-container-portal {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 8% 12vh 8% !important;
    position: relative;
    z-index: 10;
}

.hero-text-area {
    width: 100%;
    max-width: 900px;
    text-align: left;
    color: #ffffff;
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2em, 5vw, 4.5em);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    /* text-transform: uppercase; */
    color: #66b966;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-desc {
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);  /* 提高对比度 */
    text-align: left;
    max-width: 620px;  /* 限制宽度，让文字更集中 */
    /* 增强文字阴影，在亮色背景上也清晰 */
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9), 0 4px 12px rgba(0, 0, 0, 0.6);
}

.btn-primary-portal {
    margin-top: 2.5rem;
    display: inline-block;
    padding: 13px 42px;
    background-color: var(--p-green);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all 0.4s ease;
    border: 1px solid var(--p-green);
    pointer-events: auto;
    opacity: 0;
    /* 按钮延迟通常稍晚于描述文字 */
    animation: revealUpAction 1s ease-out 0.8s forwards;
}

/* ==========================================================================
   4. 分辨率适配 - 标准分辨率档位
   ========================================================================== */


/* --- A. 720P (宽度 1280px 左右) --- */
@media screen and (min-width: 1201px) and (max-width: 1599px) {
    .hero-section .hero-content-wrapper.fluid-container-portal {
        padding: 0 6% 10vh 6% !important;
    }

    .hero-text-area {
        max-width: 750px !important;
    }

    .hero-title {
        font-size: clamp(2.2rem, 3.5vw, 2.8rem) !important;
        margin-bottom: 0.6rem !important;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 0.8rem !important;
    }

    .hero-desc {
        font-size: 0.9rem !important;
        line-height: 1.7 !important;
        max-width: 580px !important;  /* 从 480px 改为 580px */
    }
}

/* --- B. 1080P (宽度 1920px 左右) --- */
@media screen and (min-width: 1600px) and (max-width: 2239px) {
    .hero-section .hero-content-wrapper.fluid-container-portal {
        padding: 0 8% 12vh 8% !important;
    }

    .hero-text-area {
        max-width: 900px !important;
    }

    .hero-title {
        font-size: clamp(2.8rem, 4vw, 3.6rem) !important;
        margin-bottom: 0.8rem !important;
    }

    .hero-subtitle {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }

    .hero-desc {
        font-size: 1rem !important;
        line-height: 1.75 !important;
        max-width: 680px !important;  /* 从 580px 改为 780px */
    }
}

/* --- C. 1440P (宽度 2560px 左右) --- */
@media screen and (min-width: 2240px) and (max-width: 3199px) {
    .hero-section .hero-content-wrapper.fluid-container-portal {
        padding: 0 8% 14vh 8% !important;
    }

    .hero-text-area {
        max-width: 1100px !important;
    }

    .hero-title {
        font-size: clamp(3.2rem, 4vw, 4.5rem) !important;
        margin-bottom: 1.2rem !important;
    }

    .hero-subtitle {
        font-size: clamp(1.4rem, 1.6vw, 1.8rem) !important;
        margin-bottom: 1.5rem !important;
    }

    .hero-desc {
        font-size: clamp(1rem, 1.1vw, 1.2rem) !important;
        line-height: 1.7 !important;
        max-width: 950px !important;  /* 从 720px 改为 950px */
        color: rgba(255, 255, 255, 0.85) !important;
        font-weight: 300 !important;
    }

    .btn-primary-portal {
        margin-top: 3.5vh !important;
        padding: 16px 48px !important;
        font-size: 1.1rem !important;
    }
}

/* --- D. 2160P (宽度 3840px 左右) --- */
@media screen and (min-width: 3200px) {
    .hero-section .hero-content-wrapper.fluid-container-portal {
        padding: 0 10vw 16vh 10vw !important;
    }

    .hero-text-area {
        max-width: 1400px !important;
    }

    .hero-title {
        font-size: clamp(3.8rem, 4.5vw, 5.5rem) !important;
        margin-bottom: 2vh !important;
    }

    .hero-subtitle {
        font-size: clamp(1.6rem, 2vw, 2.4rem) !important;
        margin-bottom: 2.5vh !important;
    }

    .hero-desc {
        font-size: clamp(1.1rem, 1.3vw, 1.6rem) !important;
        line-height: 1.7 !important;
        max-width: 1100px !important;  /* 从 900px 改为 1100px */
        color: rgba(255, 255, 255, 0.85) !important;
        font-weight: 300 !important;
    }

    .btn-primary-portal {
        margin-top: 4.5vh !important;
        padding: 20px 60px !important;
        font-size: 1.2rem !important;
    }
}

/* ==========================================================================
   5. 移动端 & 平板适配 (保持不变)
   ========================================================================== */

/* --- E. 平板竖屏 / 小屏设备 (991px 以下) --- */
@media screen and (max-width: 991px) {
    .hero-section .hero-content-wrapper.fluid-container-portal {
        justify-content: flex-end !important;
        align-items: flex-start !important;
        padding: 0 6% 70px 6% !important;
        margin-top: 0;
    }

    .hero-text-area {
        text-align: left !important;
        align-items: flex-start !important;
        max-width: 100% !important;
    }

    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
        margin-bottom: 0.6rem !important;
        text-align: left !important;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
        text-align: left !important;
    }

    .hero-desc {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        text-align: justify !important;
        max-width: 80% !important;  /* ← 从 100% 改为 80%，避开河流 */
        width: auto;
    }
}

/* --- F. 手机竖屏 (480px 以下) --- */
@media screen and (max-width: 480px) {
    .reveal-box {
        margin: 0 0 8px 0;
    }

    .hero-text-area.is-ready .reveal-text {
        animation-duration: 0.7s !important;
    }

    .hero-section .hero-content-wrapper.fluid-container-portal {
        justify-content: center !important;
        align-items: flex-start !important;
        padding: 100px 8% 30px 8% !important;
        height: auto !important;
        min-height: 100vh;
        margin: 8% 0 0 0;
    }

    .hero-text-area {
        text-align: left !important;
        max-width: 100% !important;
        gap: 6px !important;
        margin-top: 3%;
    }

    .hero-title {
        font-size: 1.3rem !important;
        margin-bottom: 2px !important;
    }

    .hero-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 4px !important;
    }

    .hero-desc {
        font-size: 0.7rem !important;
        line-height: 1.5 !important;
        display: block;
        overflow: visible;
        max-width: 100% !important;
    }
}

/* --- G. iPad 系列 (768px - 1024px) --- */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .hero-title {
        font-size: clamp(2.5rem, 6vw, 3.6rem) !important;
        line-height: 1.1 !important;
        margin-bottom: 0.8rem !important;
    }

    .hero-subtitle {
        font-size: clamp(1.1rem, 2vw, 1.4rem) !important;
        margin-bottom: 1.2rem !important;
    }

    .hero-desc {
        max-width: 75% !important;
        font-size: 0.95rem !important;
    }

    /* iPad 横屏 */
    @media (orientation: landscape) {
        .hero-section {
            min-height: 100vh !important;
        }

        /* 修复：使用完整选择器匹配特异性，确保覆盖 991px 的 padding */
        .hero-section .hero-content-wrapper.fluid-container-portal {
            padding: 90px 6% 50px 6% !important;
        }

        .hero-title {
            font-size: clamp(1.8rem, 5vh, 3rem) !important;
            margin-bottom: 0.5rem !important;
        }

        .hero-subtitle {
            font-size: clamp(1rem, 2.5vh, 1.3rem) !important;
            margin-bottom: 0.8rem !important;
        }

        .hero-desc {
            max-width: 65% !important;
            font-size: 0.85rem !important;
            line-height: 1.6 !important;
        }
    }
}

/* ==========================================================================
   6. 手机横屏专属适配 (方案A)
      字号从 vw 改为 vh，随视口高度缩放；顶部留 90px 避开导航栏
   ========================================================================== */
@media screen and (max-width: 991px) and (orientation: landscape) {
    .hero-section .hero-content-wrapper.fluid-container-portal {
        padding: 90px 6% 40px 6% !important;
    }

    .hero-title {
        font-size: clamp(1.3rem, 4vh, 2rem) !important;
        margin-bottom: 0.3rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
    }

    .hero-desc {
        font-size: 0.75rem !important;
        line-height: 1.5 !important;
        max-width: 75% !important;
    }
}