/* Service Flow Section - Rich Design */

.service-flow {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.service-flow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,106.7C96,117,192,139,288,138.7C384,139,480,117,576,138.7C672,160,768,224,864,224C960,224,1056,160,1152,154.7C1248,149,1344,203,1392,229.3L1440,256L1440,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"></path></svg>') no-repeat center;
    background-size: cover;
    opacity: 0.3;
}

.service-flow .section-header {
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.flow-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Flow Item Container */
.flow-item {
    position: relative;
    margin-bottom: 0;
    opacity: 0;
    animation: fadeInLeft 0.8s ease forwards;
}

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

.flow-item:last-child .flow-connector {
    display: none;
}

/* Flow Step Container */
.flow-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
    position: relative;
    transition: transform 0.3s ease;
}

.flow-step:hover {
    transform: translateX(10px);
}

/* Number Circle - Enhanced Design */
.flow-number {
    flex-shrink: 0;
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.4rem;
    margin-right: 2rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    position: relative;
    z-index: 2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 8px 35px rgba(102, 126, 234, 0.6); }
    100% { box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4); }
}

/* Connector Line - Animated Gradient */
.flow-connector {
    width: 3px;
    height: 50px;
    background: linear-gradient(180deg, 
        rgba(102, 126, 234, 0.8) 0%, 
        rgba(102, 126, 234, 0.4) 50%, 
        rgba(102, 126, 234, 0.1) 100%);
    margin-left: 29px;
    margin-top: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.flow-connector::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.8) 50%, 
        transparent 100%);
    animation: flowDown 2s linear infinite;
}

@keyframes flowDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(200%); }
}

/* Content Box - Premium Design */
.flow-content {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), 
                      linear-gradient(135deg, #667eea, #764ba2);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.flow-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flow-content:hover::before {
    opacity: 1;
}

.flow-content:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.flow-title {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.flow-text {
    font-size: 1rem;
    color: #5A6C7D;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.flow-time {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #667eea;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.8rem;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 25px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.flow-time:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    transform: scale(1.05);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .flow-timeline {
        padding: 0 15px;
    }
    
    .flow-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .flow-number {
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
    
    .flow-connector {
        width: 2px;
        height: 50px;
        margin: -5px auto 5px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .flow-content {
        width: 100%;
        max-width: 320px;
    }
    
    .flow-title {
        font-size: 1.05rem;
    }
    
    .flow-text {
        font-size: 0.9rem;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .flow-timeline {
        max-width: 700px;
    }
}

/* Animation on scroll */
.flow-step.revealed {
    animation: fadeInUp 0.6s ease-out;
}

.flow-step.revealed:nth-child(1) { animation-delay: 0.1s; }
.flow-step.revealed:nth-child(3) { animation-delay: 0.2s; }
.flow-step.revealed:nth-child(5) { animation-delay: 0.3s; }
.flow-step.revealed:nth-child(7) { animation-delay: 0.4s; }
