/* Hero Slider Styles */
.hero-slider-wrapper {
    position: relative;
    width: 100%; /* 填满 .page-inner 容器 */
    height: 500px; /* 固定高度 */
    overflow: hidden;
    background: #f5f5f5;
    margin: 0; /* 无外边距 */
    padding: 0; /* 无内边距 */
}

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

/* 幻灯片 */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden; /* 完全隐藏非活动幻灯片 */
    transition: opacity 0.6s ease-in-out, visibility 0s 0.6s; /* 延迟隐藏 */
    pointer-events: none;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible; /* 立即显示 */
    transition: opacity 0.6s ease-in-out, visibility 0s 0s; /* 立即可见 */
    pointer-events: all;
    z-index: 2; /* 活动幻灯片在上层 */
}

/* 单张图片模式 */
.hero-slider.single-slide .hero-slide {
    position: relative;
}

/* 幻灯片链接 */
.slide-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* 图片容器 */
.slide-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 填充整个容器，保持比例 */
    object-position: center;
}


/* 幻灯片内容 */
.slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    z-index: 1; /* 确保在按钮下方 */
    pointer-events: none; /* 不拦截点击事件 */
}

.slide-content * {
    pointer-events: auto; /* 内容本身可以点击 */
}

.slide-content-inner {
    text-align: center;
    color: white;
    max-width: 800px;
}

.slide-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.slide-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-button {
    display: inline-block;
    padding: 15px 40px;
    background: #ff7000;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 112, 0, 0.3);
}

.slide-button:hover {
    background: #e66300;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 112, 0, 0.4);
}

/* 导航箭头 */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slider-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.slider-arrow svg {
    width: 24px;
    height: 24px;
    color: #333;
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

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

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

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

.slider-dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-slider-wrapper {
        height: 350px; /* 移动端降低高度 */
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .slide-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
    
    .slider-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    .slider-dots {
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .hero-slider-wrapper {
        height: 250px; /* 小屏幕进一步降低高度 */
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slide-subtitle {
        font-size: 0.9rem;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
    }
}

/* 加载动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-slide.active .slide-content-inner {
    animation: slideIn 0.8s ease-out;
}

/* 编辑模式样式 */
.tp-edit-mode .hero-slider-wrapper {
    border: 2px dashed rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
}

/* 确保编辑模式下的幻灯片不遮挡按钮 */
.tp-edit-mode .hero-slide {
    z-index: 1 !important;
}

.tp-edit-mode .hero-slide.active {
    z-index: 2 !important;
}

/* 确保按钮区域不被遮挡 */
.tp-edit-mode .hero-slider-wrapper .tp-block-controls {
    z-index: 999999 !important;
}
