/**
 * 特徴セクション スタイル（新デザイン）
 * css/components/features.css
 */

/* ================================
   特徴セクション
================================ */
.features-section {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    background-color: #ffffff; /* 白背景をデフォルトに */
}

/* 最初のセクションの場合の追加スタイル */
.features-section.first-section {
    padding-top: 20px; /* ヘッダーの高さを考慮 */
    display: flex;
    align-items: center;
}

/* 背景画像用の要素 */
.features-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}



/* 青いグラデーションを削除 */
.features-section::before,
.features-section::after {
    display: none !important;
}

/* コンテナを相対位置に */
.features-section .container {
    position: relative;
    z-index: 2;
}



.section-header img{
    max-width: 680px;
    margin-bottom: 55px;
    margin-left: -50px;
}

.first-section .section-title {
    font-size: 42px;
    font-weight: var(--font-weight-light);
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

/* コンテナ */
.features-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}


/* ================================
   左側：テキストポイント
================================ */
.features-points {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-start; /* 左寄せ */
}

.feature-point {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    max-width: 500px; /* 最大幅を制限 */
}


.feature-point.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* ポイント番号 */
.point-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    position: relative;
    transition: all 0.3s ease;
}

.feature-point:hover .point-number {
    background: var(--accent-hover);
    transform: scale(1.1);
}

/* 番号の背景効果 */
.point-number::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.2;
    transform: scale(1.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1.3);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ポイントコンテンツ */
.point-content {
    flex: 1;
}

.point-content h3 {
    font-size: 22px;
    font-weight: var(--font-weight-medium);
    color: #000;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 800;
}

.point-content p {
    font-size: 15px;
    font-weight: var(--font-weight-light);
    color: #000;
    line-height: 1.8;
    margin: 0;
}

/* ================================
   右側：スライドバナー
================================ */
.features-slider {
    position: relative;
    height: 200px !important; /* 500pxから350pxに減少 */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}


/* スライダートラック */
.slider-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* スライダーコンテンツ */
.slider-content {
    display: flex;
    flex-direction: column;
    animation: slideUp 15s linear infinite;
}

@keyframes slideUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* ホバー時に一時停止 */
.features-slider:hover .slider-content {
    animation-play-state: paused;
}

/* バナーアイテム */
.feature-banner {
    position: relative;
    height: 100px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feature-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.feature-banner:hover img {
    transform: scale(1.1);
}

/* バナーオーバーレイ */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(44, 62, 80, 0.9) 0%,
        rgba(52, 152, 219, 0.7) 100%
    );
    color: white;
    display: flex;
    align-items: center;
    padding: 0 30px;
    transition: all 0.3s ease;
}



.banner-overlay h4 {
    font-size: 18px;
    font-weight: var(--font-weight-medium);
    margin-bottom: 4px;
}

.banner-overlay p {
    font-size: 13px;
    font-weight: var(--font-weight-light);
    opacity: 0.9;
    margin: 0;
}

/* ================================
   装飾要素
================================ */
/* スライダーの上下グラデーション */
.features-slider::before,
.features-slider::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 30px;
    z-index: 1;
    pointer-events: none;
}

.features-slider::before {
    top: 0;
    background: linear-gradient(to bottom, white 0%, transparent 100%);
}

.features-slider::after {
    bottom: 0;
    background: linear-gradient(to top, white 0%, transparent 100%);
}

/* ================================
   レスポンシブ対応
================================ */
@media (max-width: 1024px) {
    .features-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .features-slider {
        height: 400px;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    @media (max-width: 768px) {
        .features-container {
            grid-template-columns: 1fr;
            gap: 40px;
            margin-top: 160px;
        }
        
        .section-header img{
            max-width: 360px;
            margin: 0px 0px -120px -20px; 
        }

        .feature-point {
            max-width: 265px; /* 最大幅を制限 */
        }


        /* モバイルでスライダーを横スクロールに */
        .features-slider {
            height: auto !important;
            min-height: 100px;
            overflow-x: auto !important;
            overflow-y: hidden !important;
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
            scroll-snap-type: x mandatory;
        }
        
        .slider-track {
            position: relative !important;
            height: 100%;
            width: 100%;
        }
        
        /* 横並びレイアウト */
        .slider-content {
            display: flex !important;
            flex-direction: row !important;
            animation: none !important; /* 縦アニメーションを無効 */
            width: max-content;
            gap: 10px;
            padding: 10px 15px;
        }
        
        /* バナーを横並びに */
        .feature-banner {
            flex: 0 0 auto;
            width: 200px !important;
            height: 80px !important;
            scroll-snap-align: start;
            border-radius: 8px;
            background: #f8f9fa;
            border: 1px solid #e5e7eb;
        }
        
        /* 自動横スクロールアニメーション（オプション） */
        @keyframes scrollLeft {
            0% {
                transform: translateX(0);
            }
            100% {
                transform: translateX(-50%);
            }
        }
        
        /* 自動スクロールを有効にする場合 */
        .slider-content.auto-scroll {
            animation: scrollLeft 20s linear infinite;
        }
        
        /* ホバー/タッチで一時停止 */
        .features-slider:hover .slider-content.auto-scroll,
        .features-slider:active .slider-content.auto-scroll {
            animation-play-state: paused;
        }
        
        /* スクロールバーのスタイル */
        .features-slider::-webkit-scrollbar {
            height: 6px;
        }
        
        .features-slider::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }
        
        .features-slider::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 3px;
        }
    }
    

@media (max-width: 480px) {
    .features-container {
        gap: 40px;
    }
    
    .feature-point {
        gap: 16px;
    }
    
    .point-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .point-content h3 {
        font-size: 16px;
    }
    
    .point-content p {
        font-size: 13px;
    }
    
    .features-slider {
        height: 300px;
    }
    
    .feature-banner {
        height: 60px;
    }
    
    .banner-overlay h4 {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .banner-overlay p {
        font-size: 11px;
    }
}

/* ================================
   アクセシビリティ
================================ */
.feature-point:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 8px;
}

.feature-banner:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* ================================
   印刷対応
================================ */
@media print {
    .features-slider {
        display: none;
    }
    
    .features-container {
        grid-template-columns: 1fr;
    }
    
    .point-number::before {
        display: none;
    }
}

/**
 * 特徴セクション スライダー追加スタイル
 * 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;
    }
}