/* ========================================
   PALワンストップ支援セクション
   改善から「成長し続ける現場」までの4ステップフロー
   ======================================== */

.pal-onestop-section {
    padding: 100px 0 120px;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 50%, #F0F9FF 100%);
    position: relative;
    overflow: hidden;
}

/* 背景装飾 */
.pal-onestop-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.pal-onestop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

/* ヘッダー */
.pal-onestop-header {
    text-align: center;
    margin-bottom: 70px;
}

.pal-onestop-title {
    font-size: 38px;
    font-weight: 700;
    color: #0D1B3E;
    margin: 0 0 20px;
    line-height: 1.3;
}

.pal-onestop-subtitle {
    font-size: 17px;
    color: #2F3F55;
    line-height: 1.85;
    max-width: 900px;
    margin: 0 auto;
}

/* タイムラインコンテナ */
.pal-timeline-container {
    position: relative;
    margin: 60px 0 40px;
}

/* タイムライン（横線） */
.pal-timeline-line {
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 4px;
    background: linear-gradient(90deg, #D1E9FF 0%, #3B82F6 50%, #D1E9FF 100%);
    border-radius: 2px;
    transform: translateY(-50%);
    overflow: hidden;
}

/* タイムライン描画アニメーション */
.pal-timeline-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, #60A5FA 50%, transparent 100%);
    animation: pal-timeline-draw 3s ease-out forwards;
}

@keyframes pal-timeline-draw {
    to {
        left: 100%;
    }
}

/* タイムライン上を移動する青い点 */
.pal-timeline-dot {
    position: absolute;
    top: 50%;
    left: 5%;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    animation: pal-dot-move 8s ease-in-out infinite;
    z-index: 2;
}

@keyframes pal-dot-move {
    0%, 100% { left: 5%; }
    25% { left: 28.75%; }
    50% { left: 52.5%; }
    75% { left: 76.25%; }
    95% { left: 95%; }
}

/* ステップグリッド */
.pal-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* 各ステップカード */
.pal-step-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F5FAFF 100%);
    border: 2px solid #E1EBF7;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.pal-step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
    border-color: #3B82F6;
}

/* ステップアニメーションクラス */
.pal-step-card.active {
    background: linear-gradient(135deg, #EBF5FF 0%, #D1E9FF 100%);
    border-color: #3B82F6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

/* ステップ番号 */
.pal-step-number {
    display: inline-block;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    color: #FFFFFF;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    line-height: 44px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s ease;
}

.pal-step-card.active .pal-step-number {
    animation: pal-step-pulse 1s ease-out;
}

@keyframes pal-step-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ステップラベル */
.pal-step-label {
    font-size: 13px;
    font-weight: 600;
    color: #3B82F6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* ステップタイトル */
.pal-step-title {
    font-size: 19px;
    font-weight: 700;
    color: #1A2B4C;
    margin: 0 0 14px;
    line-height: 1.4;
}

/* ステップ説明 */
.pal-step-description {
    font-size: 14px;
    color: #2F3F55;
    line-height: 1.8;
    margin: 0;
}

/* フッターメッセージ */
.pal-onestop-footer {
    text-align: center;
    margin-top: 50px;
    padding: 24px 30px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFBEB 100%);
    border: 2px solid #FFE3A0;
    border-radius: 16px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.pal-onestop-footer-text {
    font-size: 16px;
    font-weight: 600;
    color: #1A2B4C;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pal-onestop-footer-icon {
    font-size: 20px;
    color: #F59E0B;
}

/* ミニ図解（右下の循環ループ） */
.pal-mini-loop {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 180px;
    height: 180px;
    opacity: 0.15;
    pointer-events: none;
}

.pal-mini-loop-svg {
    width: 100%;
    height: 100%;
    animation: pal-mini-loop-rotate 12s linear infinite;
}

@keyframes pal-mini-loop-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット（1200px以下） */
@media (max-width: 1200px) {
    .pal-onestop-section {
        padding: 80px 0 100px;
    }

    .pal-onestop-title {
        font-size: 32px;
    }

    .pal-onestop-subtitle {
        font-size: 16px;
    }

    .pal-steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .pal-timeline-line {
        display: none; /* タブレット以下では非表示 */
    }

    .pal-timeline-dot {
        display: none;
    }

    .pal-mini-loop {
        width: 150px;
        height: 150px;
        bottom: 30px;
        right: 30px;
    }
}

/* モバイル（768px以下） */
@media (max-width: 768px) {
    .pal-onestop-section {
        padding: 60px 0 80px;
    }

    .pal-onestop-container {
        padding: 0 20px;
    }

    .pal-onestop-header {
        margin-bottom: 50px;
    }

    .pal-onestop-title {
        font-size: 26px;
        margin-bottom: 16px;
    }

    .pal-onestop-subtitle {
        font-size: 15px;
        line-height: 1.75;
    }

    .pal-timeline-container {
        margin: 40px 0 30px;
    }

    .pal-steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pal-step-card {
        padding: 28px 20px;
    }

    .pal-step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
        line-height: 40px;
        margin-bottom: 14px;
    }

    .pal-step-title {
        font-size: 18px;
    }

    .pal-step-description {
        font-size: 14px;
        line-height: 1.75;
    }

    .pal-onestop-footer {
        margin-top: 40px;
        padding: 20px 24px;
    }

    .pal-onestop-footer-text {
        font-size: 15px;
        flex-direction: column;
        gap: 8px;
    }

    .pal-mini-loop {
        display: none; /* モバイルでは非表示 */
    }
}

/* 極小スクリーン（480px以下） */
@media (max-width: 480px) {
    .pal-onestop-title {
        font-size: 22px;
    }

    .pal-onestop-subtitle {
        font-size: 14px;
    }

    .pal-step-title {
        font-size: 17px;
    }

    .pal-step-description {
        font-size: 13px;
    }
}
