/* VOICEページスクロール問題の根本的な修正 */

/* スクロールの基本設定 */
html, body {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* モバイルでのスクロール挙動修正 */
@media (max-width: 768px) {
    /* スムーススクロールを完全に無効化 */
    html, body {
        scroll-behavior: auto !important;
    }
    
    /* スクロールスナップを無効化 */
    * {
        scroll-snap-type: none !important;
        scroll-snap-align: none !important;
        scroll-margin: 0 !important;
        scroll-padding: 0 !important;
    }
    
    /* セクション間の余白を調整 */
    section {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
        margin: 0 !important;
    }
    
    /* 満足度統計セクションの修正 */
    .satisfaction-stats {
        position: relative;
        overflow: visible !important;
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    .stats-grid {
        position: relative;
        z-index: 1;
        margin-top: 40px !important;
    }
    
    /* お客様の声セクションの修正 */
    .testimonials-section {
        position: relative;
        overflow: visible !important;
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    /* タブの固定配置を解除 */
    .service-tabs {
        position: relative !important;
        top: auto !important;
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding: 10px !important;
        margin-bottom: 30px !important;
    }
    
    /* お客様の声カードの位置調整 */
    .testimonials-grid {
        position: relative;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .testimonial-card {
        position: relative !important;
        top: auto !important;
        margin-bottom: 20px !important;
    }
    
    /* スクロール時のジャンプを防ぐ */
    .satisfaction-stats::before,
    .testimonials-section::before {
        content: '';
        display: block;
        height: 0;
        margin: 0;
        padding: 0;
    }
    
    /* アンカーリンクの調整 */
    :target::before {
        content: "";
        display: block;
        height: 80px;
        margin-top: -80px;
    }
    
    /* スクロール位置の修正 */
    .container {
        position: relative !important;
        z-index: 1;
    }
    
    /* 業界別の声セクション */
    .industry-voices {
        position: relative;
        overflow: visible !important;
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    /* 導入の流れセクション */
    .implementation-flow {
        position: relative;
        overflow: visible !important;
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
}

/* 小さい画面でのさらなる調整 */
@media (max-width: 480px) {
    section {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }
    
    .stats-grid {
        margin-top: 30px !important;
    }
    
    .service-tabs {
        margin-bottom: 20px !important;
    }
    
    .testimonial-card {
        margin-bottom: 15px !important;
    }
}

/* iOS Safari専用の修正 */
@supports (-webkit-touch-callout: none) {
    /* iOS Safariでのスクロール問題を修正 */
    body {
        position: relative;
        height: 100%;
    }
    
    section {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}