/**
 * 特徴セクション スライダー追加スタイル
 * css/components/features-slider.css
 */

/* ================================
   スライダーカーソル
================================ */
.features-slider {
    cursor: grab;
}

.features-slider.grabbing {
    cursor: grabbing;
}

/* ================================
   スクロールインジケーター
================================ */
.scroll-indicator {
    display: none;
    width: 100%;
    height: 4px;
    margin-top: 10px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.scroll-indicator-bar {
    width: 100%;
    height: 100%;
    position: relative;
    background: #f0f0f0;
    border-radius: 2px;
}

.scroll-indicator-thumb {
    height: 100%;
    width: 20%;
    background: var(--accent, #007cba);
    border-radius: 2px;
    transition: left 0.1s ease;
    position: absolute;
    top: 0;
    left: 0;
}

/* モバイルでのみ表示 */
@media (max-width: 768px) {
    .scroll-indicator {
        display: block;
    }
}

/* ================================
   タッチデバイス用スタイル
================================ */
.features-slider.touch-device {
    /* スクロールバーを非表示 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.features-slider.touch-device::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* ================================
   スライダーナビゲーション（オプション）
================================ */
.slider-nav {
    display: none;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.slider-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.slider-nav-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.slider-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .slider-nav {
        display: flex;
    }
}

/* ================================
   アニメーションクラス
================================ */
.features-slider.animate-in {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInFromRight 0.6s ease forwards;
}

@keyframes slideInFromRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================================
   モバイル用追加スタイル
================================ */
@media (max-width: 768px) {
    /* スライダーコンテナ */
    .features-slider {
        position: relative;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
    }
    
    /* 各バナーにスナップポイントを設定 */
    .feature-banner {
        scroll-snap-align: start;
        scroll-margin-left: 20px;
    }
    
    /* 最初と最後のアイテムの余白 */
    .slider-content {
        padding: 10px 20px;
    }
    
    .feature-banner:first-child {
        margin-left: 0;
    }
    
    .feature-banner:last-child {
        margin-right: 20px;
    }
}

/* ================================
   パフォーマンス最適化
================================ */
@media (prefers-reduced-motion: reduce) {
    .slider-content {
        animation: none !important;
    }
    
    .feature-banner,
    .slider-nav-btn {
        transition: none !important;
    }
}
