/**
 * Hero Slider 模塊樣式
 * 用於實現可滑動的英雄輪播組件
 */

/* 輪播容器 */
.hero-slider {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--section-spacing, 40px);
}

/* 輪播項目容器 */
.slider-container {
    display: flex;
    transition: transform 3s ease-in-out;
    height: 400px;
    position: relative;
    touch-action: pan-y;
}

.slider-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* 不要再用 opacity/visibility/absolute */
}

.slider-item.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
    visibility: visible;
}

/* 輪播圖片 */
.slider-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* 暗色漸變效果 */
.slider-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

/* 輪播內容 */
.slider-content {
    position: relative;
    z-index: 2;
    padding: 60px;
    width: 60%;
    color: white;
}

.slider-content h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
}

.slider-content p {
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* 輪播按鈕 */
.slider-btn {
    background-color: var(--accent-color, #c62828);
    color: white;
    padding: 10px 25px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.slider-btn:hover {
    background-color: #8a1a29;
    color: white;
}

/* 輪播控制區 */
.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

/* 前後切換按鈕 */
.slider-prev-btn,
.slider-next-btn {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0 10px;
}

.slider-prev-btn:hover,
.slider-next-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* 輪播指示點 */
.slider-dots {
    display: flex;
    justify-content: center;
    margin: 0 15px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background-color: white;
}

/* 觸摸指示器 */
.swipe-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    pointer-events: none;
    opacity: 0;
    animation: fadeInOut 2s ease-in-out;
    z-index: 10;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 響應式調整 */
@media (max-width: 768px) {
    .slider-container {
        height: 300px;
    }
    
    .slider-image {
        height: 300px;
    }
    
    .slider-content {
        width: 80%;
        padding: 30px;
    }
    
    .slider-content h2 {
        font-size: 24px;
    }
    
    .slider-content p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        height: 250px;
    }
    
    .slider-image {
        height: 250px;
    }
    
    .slider-content {
        width: 90%;
        padding: 20px;
    }
    
    .slider-content h2 {
        font-size: 20px;
    }
    
    .slider-content p {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .slider-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}
