/* Hero 首屏区域样式 */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background: var(--hero-gradient);
    background-image: url('../images/placeholder/hero-bg.png');
    /* 后续替换真实背景 */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
    width: 100%;
}

/* 叠加层效果，确保文字清晰 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.4);
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
}

.hero-text-box {
    max-width: 800px;
}

.hero-subtitle {
    font-size: 30px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(20px);
    color: rgba(255, 255, 255, 0.80);
    font-family: PingFang SC, PingFang SC;
}

.hero-title {
    font-size: 62px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 50px;
    margin-top: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
}

.hero-btns {
    display: flex;
    opacity: 0;
    transform: translateY(20px);
}

/* 滚动提示动画 */
.hero-scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--white);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 8px;
    background-color: var(--white);
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: mouse-scroll 1.5s infinite;
}

@keyframes mouse-scroll {
    0% {
        opacity: 1;
        top: 8px;
    }

    100% {
        opacity: 0;
        top: 25px;
    }
}

/* 动画类触发 (配合 animations.js) */
.hero-subtitle.active,
.hero-title.active,
.hero-btns.active {
    opacity: 1;
    transform: translateY(0);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-subtitle.active {
    transition-delay: 0.2s;
}

.hero-title.active {
    transition-delay: 0.4s;
}

.hero-btns.active {
    transition-delay: 0.8s;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        /* 移动端移除 fixed，避免兼容性问题 */
        background-attachment: scroll;
        /* 确保背景图居中显示中间区域 */
        background-position: center center;
        background-size: cover;
        /* 如果图片很大，可以尝试 contain 或调整位置 */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* 首屏按钮在移动端保持一行（已在responsive.css中定义） */
    .hero-btns {
        flex-direction: row;
        gap: 10px;
    }

    .hero-btns .btn {
        flex: 1;
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* iOS 设备特殊处理 */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        /* iOS 设备上，fixed 背景支持不好，使用 scroll */
        background-attachment: scroll;
    }
    
    @media (max-width: 768px) {
        .hero-section {
            /* 在 iOS 移动端，确保背景图居中显示中间区域 */
            background-position: 50% 50%;
            background-size: cover;
            /* 如果背景图很大，可能需要调整尺寸以确保显示中间部分 */
            /* 可以尝试：background-size: 150% auto; 或 background-size: auto 120%; */
        }
    }
}

/* 针对小屏幕设备进一步优化 */
@media (max-width: 480px) {
    .hero-section {
        /* 在小屏幕设备上，确保背景图居中显示 */
        background-position: center center;
        background-size: cover;
        /* 如果只显示左上角，可以尝试调整背景尺寸 */
        /* background-size: 180% auto; 或根据实际图片调整 */
    }
}