/* 幻灯片专用样式 */

/* 幻灯片容器 */
.hero-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-top: 0;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 幻灯片 */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 幻灯片背景 */
.slide:nth-child(1) {
    background-image: url('/images/index1.jpg');
    background-color: #667eea;
}

.slide:nth-child(2) {
    background-image: url('/images/index2.jpg');
    background-color: #764ba2;
}

.slide:nth-child(3) {
    background-image: url('/images/index3.jpg');
    background-color: #667eea;
}

.slide.active {
    opacity: 1;
}

/* 幻灯片遮罩层 */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 幻灯片内容 */
.slide-content {
    position: relative;
    z-index: 2;
    max-width: 75vw;
    width: 75%;
    text-align: center;
    color: white;
    animation: fadeInUp 1s ease;
}

/* 幻灯片1 - 文字位置 */
.slide-1-content {
    text-align: right;
    padding-left: 10%;
}

/* 幻灯片2 - 文字位置 */
.slide-2-content {
    text-align: right;
    padding-left: 10%;
}

/* 幻灯片3 - 文字位置 */
.slide-3-content {
    text-align: right;
    padding-left: 10%;
}

/* 入场动画定义 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* 幻灯片文字样式 */
.slide-content h1 {
    font-size: 56px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-content h2 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-content p {
    font-size: 22px;
    margin-bottom: 40px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.slide-content .cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.6s ease-out 0.6s forwards;
    opacity: 0;
}

.slide-content .cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 左右箭头 */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 30px;
}

.slider-arrow.next {
    right: 30px;
}

/* 底部圆点指示器 */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.dot {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background: white;
    border-color: #667eea;
    transform: scale(1.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-slider {
        aspect-ratio: 4 / 3;
        height: auto;
    }
    
    /* 移动端幻灯片背景图（可独立设置，与电脑端不同） */
    .slide:nth-child(1) {
        background-image: url('/images/wap1.jpg');
        background-color: #667eea;
    }
    
    .slide:nth-child(2) {
        background-image: url('/images/wap2.jpg');
        background-color: #764ba2;
    }
    
    .slide:nth-child(3) {
        background-image: url('/images/wap3.jpg');
        background-color: #667eea;
    }
    
    .slide-content h1 {
        font-size: 24px;
        color: #fff;
        margin-bottom: 10px;
    }
    
    .slide-content h2 {
        font-size: 22px;
        color: #fff;
        margin-bottom: 10px;
    }
    
    .slide-content {
        max-width: 90vw;
        width: 90%;
        text-align: center;
        color: #fff;
        padding: 20px 16px;
        background: rgba(245, 166, 35, 0.4);
        border-radius: 12px;
    }
    
    /* 移动端文字位置独立设置 */
    .slide-1-content {
        text-align: center;
        padding-left: 0;
    }
    
    .slide-2-content {
        text-align: center;
        padding-left: 0;
    }
    
    .slide-3-content {
        text-align: center;
        padding-left: 0;
    }
    
    .slide-content p {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.95);
        margin-bottom: 20px;
    }
    
    .slide-content .cta-button {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .slider-arrow {
        display: none;
    }
    
    .slider-dots {
        bottom: 20px;
        gap: 10px;
    }
    
    .dot {
        width: 12px;
        height: 12px;
    }
}
