/* ==========================================
   全体像のBefore/After - 完全再設計版
   POC学習ループと統一されたデザイン
   ========================================== */

/* セクション全体 */
#global-before-after {
    padding: 120px 0;
    background: linear-gradient(180deg, #EFF6FF 0%, #DBEAFE 50%, #EFF6FF 100%);
    position: relative;
    overflow: hidden;
}

/* 背景グリッドパターン */
#global-before-after::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(0deg, #3b82f6 0px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, #3b82f6 0px, transparent 1px, transparent 40px);
}

/* ヘッダー */
.global-ba-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.global-ba-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.3;
}

.global-ba-subtitle {
    font-size: 20px;
    color: #475569;
    font-weight: 500;
    line-height: 1.6;
}

/* Before/After メインビジュアルコンテナ */
.global-ba-visual-container {
    max-width: 1400px;
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
    gap: 0;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Before カード */
.global-ba-before-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.15);
    border: 3px solid #fee2e2;
    position: relative;
    overflow: hidden;
    min-height: 450px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.global-ba-before-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.2);
}

.global-ba-before-card::before {
    content: 'BEFORE';
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

/* After カード */
.global-ba-after-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15);
    border: 3px solid #d1fae5;
    position: relative;
    overflow: hidden;
    min-height: 450px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.global-ba-after-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.2);
}

.global-ba-after-card::before {
    content: 'AFTER';
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    z-index: 10;
}

/* 画像スタイル */
.global-ba-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    object-fit: contain;
    max-width: 100%;
    max-height: 380px;
    transition: transform 0.4s ease;
}

.global-ba-before-card:hover .global-ba-image,
.global-ba-after-card:hover .global-ba-image {
    transform: scale(1.02);
}

/* 中央矢印 */
.global-ba-arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.global-ba-arrow {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    animation: arrow-pulse 2s infinite;
}

@keyframes arrow-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
    }
}

/* 問題点 / 解決策カードグリッド */
.global-ba-cards-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    position: relative;
    z-index: 1;
}

/* 問題→解決 ペアカード */
.global-ba-pair {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

/* 問題カード（Before / 赤系） */
.global-ba-problem-card {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
    border: 3px solid #fee2e2;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.12);
    position: relative;
    transition: all 0.3s ease;
}

.global-ba-problem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.18);
}

.global-ba-problem-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.global-ba-problem-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.global-ba-problem-number {
    font-size: 14px;
    font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    padding: 4px 12px;
    border-radius: 20px;
}

.global-ba-problem-text {
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
}

/* 中央矢印（ペア内） */
.global-ba-pair-arrow {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

/* 解決策カード（After / 青・緑系） */
.global-ba-solution-card {
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border: 3px solid #dbeafe;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
    position: relative;
    transition: all 0.3s ease;
}

.global-ba-solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.18);
}

.global-ba-solution-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.global-ba-solution-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.global-ba-solution-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.global-ba-solution-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* 結論メッセージバナー */
.global-ba-conclusion {
    margin-top: 80px;
    text-align: center;
    padding: 48px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
    border: 2px solid #dbeafe;
    position: relative;
    z-index: 1;
}

.global-ba-conclusion-text {
    font-size: 18px;
    color: #475569;
    line-height: 1.8;
    margin: 0;
}

.global-ba-conclusion-text strong {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* レスポンシブ（タブレット） */
@media (max-width: 1200px) {
    .global-ba-visual-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .global-ba-arrow-container {
        transform: rotate(90deg);
    }
    
    .global-ba-title {
        font-size: 40px;
    }
    
    .global-ba-cards-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* レスポンシブ（スマホ） */
@media (max-width: 768px) {
    #global-before-after {
        padding: 60px 0;
    }
    
    .global-ba-header {
        margin-bottom: 48px;
    }
    
    .global-ba-title {
        font-size: 32px;
    }
    
    .global-ba-subtitle {
        font-size: 16px;
    }
    
    .global-ba-visual-container {
        gap: 24px;
        margin-bottom: 48px;
    }
    
    .global-ba-before-card,
    .global-ba-after-card {
        min-height: 320px;
        height: 320px;
        padding: 20px;
    }
    
    .global-ba-image {
        max-height: 280px;
    }
    
    .global-ba-cards-grid {
        gap: 24px;
    }
    
    .global-ba-pair {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .global-ba-pair-arrow {
        transform: rotate(90deg);
        margin: 0 auto;
    }
    
    .global-ba-conclusion {
        padding: 32px 20px;
        margin-top: 48px;
    }
    
    .global-ba-conclusion-text {
        font-size: 16px;
    }
}
