/* 变量定义 */
:root {
    --primary-color: #007AFF;
    --text-color: #333333;
    --background-light: #f5f5f7;
    --transition: all 0.3s ease;
    --carousel-height: 600px;
    --carousel-max-width: 1440px;
}

/* 轮播图容器 */
.hero-showcase {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: 1440px;
    height: auto;
    aspect-ratio: 2.4 / 1; /* 1440/600 = 2.4 */
    margin: 0 auto;
    padding: 0;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    transition: opacity 0.5s ease;
    will-change: opacity;
    z-index: 1;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--background-light);
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .hero-showcase {
        border-radius: 10px;
        margin: 0 10px;
    }

    .carousel-button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .carousel-indicators {
        bottom: 10px;
    }

    .carousel-indicator {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

/* 轮播图片容器 */
.carousel-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: var(--transition);
    background: var(--background-light);
}

/* 单个轮播图片 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

/* 加载状态 */
.carousel-slide.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--background-light);
}

.loading-placeholder {
    color: var(--text-color);
    font-size: 1.2em;
    opacity: 0.7;
}

/* 导航按钮 */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 3;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.carousel-button.prev {
    left: 30px;
}

.carousel-button.next {
    right: 30px;
}

/* 指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
    padding: 10px;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
}

.carousel-indicator:hover {
    opacity: 1;
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: white;
    opacity: 1;
}

.carousel-indicator.active {
    background: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-button {
        width: 32px;
        height: 32px;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}
