/* ==================== 轮播图 - 滑动过渡版本 ==================== */

.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

/* 轮播幻灯片容器 - 水平排列 */
.hero-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* 当前幻灯片 */
.hero-slide.active {
    opacity: 1;
    z-index: 2;
    transform: translateX(0);
}

/* 即将离开的幻灯片 */
.hero-slide.slide-out-left {
    transform: translateX(-100%);
}

/* 即将进入的幻灯片 */
.hero-slide.slide-in-right {
    transform: translateX(100%);
}

/* 上一张进入 */
.hero-slide.slide-in-left {
    transform: translateX(-100%);
}

/* 下一张离开 */
.hero.slide-out-right {
    transform: translateX(100%);
}

/* 图片容器 */
.hero-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

/* PC和手机图片显示控制 */
.pc-show {
    display: block;
}

.phone-show {
    display: none;
}

@media (max-width: 768px) {
    .pc-show {
        display: none;
    }

    .phone-show {
        display: block;
    }
}

/* 遮罩层 - 跟随幻灯片 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-slide.active .hero-overlay {
    opacity: 1;
}

/* 内容容器 - 延迟显示 */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    z-index: 10;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, -40%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.hero-slide.active .hero-content {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.hero-content h2 {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* 按钮组 */
.hero-btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-outline:hover {
    background: #ffffff;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.btn-accent {
    background: #f59e0b;
    color: #ffffff;
}

.btn-accent:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* 导航按钮 */
.hero-nav-left,
.hero-nav-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
}

.hero-nav-left {
    left: 30px;
}

.hero-nav-right {
    right: 30px;
}

.hero-nav-left button,
.hero-nav-right button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.hero-nav-left button:hover,
.hero-nav-right button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.hero-nav-left button img,
.hero-nav-right button img {
    width: 24px;
    height: 24px;
}

/* 指示器 */
.hero-nav-center {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
}

.hero-indicators {
    display: flex;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 30px;
}

.hero-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.hero-indicator.active {
    background: #ffffff;
    width: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero-slider {
        height: 400px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-nav-left,
    .hero-nav-right {
        display: none;
    }

    .hero-nav-center {
        bottom: 20px;
    }

    .hero-indicators {
        padding: 8px 16px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* 性能优化 - GPU加速 */
.hero-slide,
.hero-content,
.hero-overlay {
    backface-visibility: hidden;
    perspective: 1000px;
}
