/**
 * 導入企業無限スライダーコンポーネント
 * CSSアニメーションのみで実装した無限ループスライダー
 */

.company-slider-section {
    padding: 80px 0;
    overflow: hidden;
    /* スライダーのはみ出し部分を隠す */
}

/* セクションヘッダー */
.company-slider-section .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.company-slider-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    position: relative;
}

.company-slider-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--main-color), #5a9bd8);
    border-radius: 2px;
}

.company-slider-section .section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* スライダーラッパー */
.company-slider-wrapper {
    padding: 2rem 0;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* 無限スライダーコンテナ */
.company-slider {
    display: flex;
    width: 200%;
    /* 2つのロゴセットを並べるため2倍の幅 */
    animation: infiniteSlide 15s linear infinite;
}

/* ロゴグループ */
.company-logos {
    margin-right: 10px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    justify-content: space-around;
    width: 50%;
    /* スライダーの半分の幅 */
    flex-shrink: 0;
}

/* 個別ロゴアイテム */
.company-logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
}

.company-logo-item img {
    max-width: 100%;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 無限スライドアニメーション */
@keyframes infiniteSlide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
        /* 半分移動して元の位置に戻る */
    }
}

/* ホバー時にアニメーションを一時停止 */
/* .company-slider:hover {
    animation-play-state: paused;
} */

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .company-slider-section {
        padding: 60px 0;
    }

    .company-logo-item {
        min-width: 140px;
        height: 70px;
        margin: 0 12px;
    }

    .company-logo-item img {
        max-height: 40px;
    }
}

@media (max-width: 768px) {
    .company-slider-section {
        padding: 50px 0;
    }

    .company-slider-section .section-header {
        margin-bottom: 40px;
    }

    .company-slider-section .section-title {
        font-size: 2rem;
    }

    .company-slider-section .section-subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }

    .company-logo-item {
        min-width: 120px;
        height: 60px;
        margin: 0 8px;
        padding: 0 15px;
    }

    .company-logo-item img {
        max-height: 35px;
    }

    /* モバイルでアニメーション速度を調整 */
    .company-slider {
        animation-duration: 25s;
    }
}

@media (max-width: 480px) {
    .company-slider-section .section-title {
        font-size: 1.8rem;
    }

    .company-logo-item {
        min-width: 100px;
        height: 50px;
        margin: 0 6px;
        padding: 0 12px;
    }

    .company-logo-item img {
        max-height: 30px;
    }
}

/* アクセシビリティ：アニメーション抑制設定 */
@media (prefers-reduced-motion: reduce) {
    .company-slider {
        animation: none;
    }

    .company-logos {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .company-logo-item {
        position: static;
        margin: 10px;
    }
}