/* Dynamic Design - 動画背景とフロー型レイアウト */

/* ========================================
   サービスフローセクション
======================================== */
.services-flow {
    padding: 100px 0;
    background: linear-gradient(180deg, #f8f9fc 0%, #ffffff 50%, #f8f9fc 100%);
    position: relative;
    overflow: hidden;
}

.services-flow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(228, 88, 52, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.section-title-flow {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
}

.section-badge {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.section-title-flow h2 {
    font-size: 48px;
    font-weight: 800;
    color: #0f1932;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight-gradient {
    background: linear-gradient(135deg, #e45834 0%, #ff6b4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-size: 18px;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* タイムライン型サービス表示 */
.services-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.services-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #667eea 0%, #e45834 100%);
    transform: translateX(-50%);
}

.service-flow-item {
    position: relative;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
}

.service-flow-item:nth-child(odd) {
    padding-right: 50%;
    text-align: right;
}

.service-flow-item:nth-child(even) {
    padding-left: 50%;
    text-align: left;
}

.service-flow-number {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #667eea;
    z-index: 2;
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.service-flow-item:hover .service-flow-number {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 0 20px rgba(102, 126, 234, 0.1);
}

.service-flow-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-top: -10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-flow-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #e45834 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-flow-item:hover .service-flow-content {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.service-flow-item:hover .service-flow-content::before {
    transform: scaleX(1);
}

.service-flow-item:nth-child(odd) .service-flow-content {
    margin-right: 40px;
}

.service-flow-item:nth-child(even) .service-flow-content {
    margin-left: 40px;
}

.service-flow-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.service-flow-text h3 {
    font-size: 28px;
    font-weight: 700;
    color: #0f1932;
    margin-bottom: 10px;
}

.service-flow-price {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #e45834 0%, #ff6b4a 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.service-flow-text p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 16px;
}

.service-flow-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.service-flow-item:nth-child(odd) .service-flow-features {
    justify-content: flex-end;
}

.feature-tag {
    padding: 6px 14px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.feature-tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.service-flow-link {
    display: inline-block;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.service-flow-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.service-flow-link:hover {
    color: #e45834;
}

.service-flow-link:hover::after {
    width: 100%;
    background: #e45834;
}

/* CTA Flow Section */
.services-cta-flow {
    text-align: center;
    margin-top: 100px;
    padding: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.services-cta-flow::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.services-cta-flow h3 {
    font-size: 32px;
    color: white;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.services-cta-flow p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.btn-diagnosis {
    display: inline-block;
    padding: 16px 40px;
    background: white;
    color: #667eea;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-diagnosis:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .services-timeline::before {
        left: 30px;
    }
    
    .service-flow-item {
        padding-left: 80px !important;
        padding-right: 20px !important;
        text-align: left !important;
    }
    
    .service-flow-number {
        left: 30px;
        transform: translateX(0);
    }
    
    .service-flow-item:hover .service-flow-number {
        transform: scale(1.2);
    }
    
    .service-flow-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .service-flow-item:nth-child(odd) .service-flow-features {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .section-title-flow h2 {
        font-size: 32px;
    }
    
    .services-timeline::before {
        left: 20px;
    }
    
    .service-flow-item {
        padding-left: 60px !important;
        padding-right: 10px !important;
    }
    
    .service-flow-number {
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .service-flow-content {
        padding: 25px;
    }
    
    .service-flow-icon {
        font-size: 36px;
    }
    
    .service-flow-text h3 {
        font-size: 22px;
    }
    
    .services-cta-flow {
        padding: 40px 20px;
    }
    
    .services-cta-flow h3 {
        font-size: 24px;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スクロールトリガーアニメーション */
.service-flow-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.service-flow-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-flow-item:nth-child(1) { transition-delay: 0.1s; }
.service-flow-item:nth-child(2) { transition-delay: 0.2s; }
.service-flow-item:nth-child(3) { transition-delay: 0.3s; }

/* 波のアニメーション背景 */
.services-flow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.5' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,133.3C960,128,1056,96,1152,96C1248,96,1344,128,1392,144L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    opacity: 0.3;
}