/* ==========================================
   レイアウト改善セクション完全再設計
   視覚中心・SaaS風・インフォグラフィック重視
   ========================================== */

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

/* 背景装飾 */
.layout-redesign-bg {
    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);
}

/* ヘッダー */
.layout-redesign-header {
    text-align: center;
    margin-bottom: 60px;
}

.layout-redesign-title {
    font-size: 48px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.layout-redesign-subtitle {
    font-size: 20px;
    color: #64748b;
    font-weight: 400;
}

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

/* Before側 */
.layout-ba-before {
    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;
}

.layout-ba-before::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側 */
.layout-ba-after {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
    border: 3px solid #dbeafe;
    position: relative;
    overflow: hidden;
    min-height: 450px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-ba-after::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;
}

/* 画像スタイル - サイズ完全統一 */
.layout-infographic-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    transition: transform 0.5s ease;
    object-fit: contain;
    max-width: 100%;
    max-height: 380px;
}

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

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

.layout-arrow-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    animation: pulseArrow 2s ease-in-out infinite;
}

.layout-arrow-icon i {
    font-size: 28px;
    color: white;
}

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

/* 課題・改善点カード */
.layout-points-section {
    max-width: 1400px;
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

/* 課題カード（Before） */
.layout-problems-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.1);
    border-left: 6px solid #ef4444;
}

.layout-problems-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.layout-problems-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.layout-problems-icon i {
    font-size: 34px;
    color: white;
}

.layout-problems-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.layout-problems-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.layout-problem-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 16px;
    color: #334155;
    line-height: 1.6;
}

.layout-problem-icon {
    width: 28px;
    height: 28px;
    background: #fee2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.layout-problem-icon i {
    font-size: 14px;
    color: #ef4444;
}

/* 改善点カード（After） */
.layout-improvements-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
    border-left: 6px solid #3b82f6;
}

.layout-improvements-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.layout-improvements-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.layout-improvements-icon i {
    font-size: 34px;
    color: white;
}

.layout-improvements-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.layout-improvements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.layout-improvement-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 16px;
    color: #334155;
    line-height: 1.6;
}

.layout-improvement-icon {
    width: 28px;
    height: 28px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.layout-improvement-icon i {
    font-size: 14px;
    color: #10b981;
}

/* 成果KPIセクション - SaaS風軽量デザイン */
.layout-kpi-section {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 60px 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.layout-kpi-header {
    text-align: center;
    margin-bottom: 50px;
}

.layout-kpi-title {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.layout-kpi-subtitle {
    font-size: 18px;
    color: #64748b;
    margin: 0;
}

.layout-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.layout-kpi-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    border: 2px solid #bbf7d0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.layout-kpi-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.layout-kpi-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.2);
    border-color: #86efac;
}

.layout-kpi-card:hover::before {
    opacity: 1;
}

.layout-kpi-icon {
    font-size: 56px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

.layout-kpi-value {
    font-size: 56px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px 0;
    line-height: 1;
}

.layout-kpi-label {
    font-size: 16px;
    color: #064e3b;
    margin: 0;
    font-weight: 600;
}

/* アニメーション用クラス */
.layout-kpi-value.animated {
    animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .layout-ba-visual {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .layout-ba-arrow {
        transform: rotate(90deg);
    }

    .layout-points-section {
        grid-template-columns: 1fr;
    }

    .layout-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .layout-redesign-title {
        font-size: 32px;
    }

    .layout-redesign-subtitle {
        font-size: 16px;
    }

    .layout-ba-before,
    .layout-ba-after {
        padding: 20px;
        min-height: 300px;
    }
    
    .layout-infographic-image {
        max-height: 350px;
    }

    .layout-problems-card,
    .layout-improvements-card {
        padding: 30px 20px;
    }

    .layout-kpi-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .layout-kpi-section {
        padding: 40px 30px;
    }
}
