/* working process css*/

.process-flow {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    flex-wrap: wrap;
    gap: 20px;
}

.step-container {
    flex: 1;
    min-width: 250px;
    text-align: center;
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: slideInUp 0.8s ease-out forwards;
}

.step-container:nth-child(1) { animation-delay: 0.2s; }
.step-container:nth-child(2) { animation-delay: 0.4s; }
.step-container:nth-child(3) { animation-delay: 0.6s; }
.step-container:nth-child(4) { animation-delay: 0.8s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.step-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border: 2px solid #FF131D;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    position: relative;
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.icon-circle::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, #e74c3c, #FF131D);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.step-container:hover .icon-circle {
    transform: translateY(-8px) scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(255, 19, 29, 0.4);
}

.step-container:hover .icon-circle::before {
    opacity: 0.1;
}

.icon-circle i {
    font-size: 28px;
    color: #FF131D;
    transition: all 0.3s ease;
    transform: scale(1);
}

.step-container:hover .icon-circle i {
    transform: scale(1.2) rotate(-5deg);
}

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #e74c3c, #FF131D);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.step-container:hover .step-number {
    transform: scale(1.2) rotate(360deg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.step-content h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.step-container:hover .step-content h3 {
    color: #FF131D;
    transform: translateY(-2px);
}

.step-content p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.step-container:hover .step-content p {
    color: #2c3e50;
    transform: translateY(-1px);
}

/* Advanced CSS Connecting Lines */
.step-container::after {
    content: '';
    position: absolute;
    top: 40px;
    left: calc(50% + 40px);
    width: calc(100vw / 4 - 80px);
    max-width: 220px;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        #bdc3c7 0px,
        #bdc3c7 8px,
        transparent 8px,
        transparent 16px
    );
    z-index: -1;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left center;
    animation: drawLine 1s ease-out forwards;
}

/* Hide connecting line on last step */
.step-container:nth-child(4)::after {
    display: none;
}

/* Staggered line animation */
.step-container:nth-child(1)::after { animation-delay: 1s; }
.step-container:nth-child(2)::after { animation-delay: 1.3s; }
.step-container:nth-child(3)::after { animation-delay: 1.6s; }

@keyframes drawLine {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Arrow at the end of each line */
.step-container::before {
    content: '';
    position: absolute;
    top: 37px;
    left: calc(50% + 40px + 100vw / 4 - 88px);
    max-left: calc(50% + 40px + 212px);
    width: 0;
    height: 0;
    border-left: 8px solid #bdc3c7;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    z-index: -1;
    opacity: 0;
    transform: translateX(-10px);
    animation: showArrow 0.5s ease-out forwards;
}

.step-container:nth-child(4)::before {
    display: none;
}

.step-container:nth-child(1)::before { animation-delay: 1.8s; }
.step-container:nth-child(2)::before { animation-delay: 2.1s; }
.step-container:nth-child(3)::before { animation-delay: 2.4s; }

@keyframes showArrow {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover effect for connecting lines */
.step-container:hover::after {
    background: repeating-linear-gradient(
        to right,
        #FF131D 0px,
        #FF131D 8px,
        transparent 8px,
        transparent 16px
    );
    animation: pulseLine 2s ease-in-out infinite;
}

.step-container:hover::before {
    border-left-color: #FF131D;
    animation: pulseArrow 2s ease-in-out infinite;
}

@keyframes pulseLine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes pulseArrow {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(2px) scale(1.1); }
}

/* Active state animation */
.step-container:active {
    transform: scale(0.98);
}

.step-container:active .icon-circle {
    background: #FF131D;
    transform: scale(0.95);
}

.step-container:active .icon-circle i {
    color: #ffffff;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .process-flow {
        flex-wrap: wrap;
        justify-content: center;
        gap: 60px 40px;
    }
    
    .step-container {
        flex: 0 0 calc(50% - 20px);
        min-width: 300px;
    }
    
    /* Hide horizontal lines */
    .step-container::after,
    .step-container::before {
        display: none;
    }
    
    /* Vertical connecting lines for tablet */
    .step-container:nth-child(1)::after {
        display: block;
        top: 100px;
        left: 50%;
        transform: translateX(-50%) scaleY(0);
        width: 2px;
        height: 60px;
        background: repeating-linear-gradient(
            to bottom,
            #bdc3c7 0px,
            #bdc3c7 8px,
            transparent 8px,
            transparent 16px
        );
        animation: drawVerticalLine 1s ease-out 1.5s forwards;
    }
    
    .step-container:nth-child(2)::after {
        display: block;
        top: 100px;
        right: 50%;
        transform: translateX(50%) scaleY(0);
        width: 2px;
        height: 60px;
        background: repeating-linear-gradient(
            to bottom,
            #bdc3c7 0px,
            #bdc3c7 8px,
            transparent 8px,
            transparent 16px
        );
        animation: drawVerticalLine 1s ease-out 1.8s forwards;
    }

    .step-container:nth-child(3)::after {
        display: block;
        top: 100px;
        left: 50%;
        transform: translateX(-50%) scaleY(0);
        width: 2px;
        height: 60px;
        background: repeating-linear-gradient(
            to bottom,
            #bdc3c7 0px,
            #bdc3c7 8px,
            transparent 8px,
            transparent 16px
        );
        animation: drawVerticalLine 1s ease-out 2.1s forwards;
    }

    @keyframes drawVerticalLine {
        to {
            opacity: 1;
            transform: translateX(-50%) scaleY(1);
        }
    }

    /* Vertical arrows */
    .step-container:nth-child(1)::before,
    .step-container:nth-child(2)::before,
    .step-container:nth-child(3)::before {
        display: block;
        top: 152px;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 0;
        height: 0;
        border-top: 8px solid #bdc3c7;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-bottom: none;
        opacity: 0;
        animation: showVerticalArrow 0.5s ease-out forwards;
    }

    .step-container:nth-child(2)::before {
        right: 50%;
        left: auto;
        transform: translateX(50%) translateY(-10px);
    }

    .step-container:nth-child(1)::before { animation-delay: 2.3s; }
    .step-container:nth-child(2)::before { animation-delay: 2.6s; }
    .step-container:nth-child(3)::before { animation-delay: 2.9s; }

    @keyframes showVerticalArrow {
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
}

@media (max-width: 768px) {
    .process-flow {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }
    
    .step-container {
        flex: none;
        width: 100%;
        max-width: 350px;
    }
    
    /* Remove tablet-specific lines */
    .step-container:nth-child(1)::after,
    .step-container:nth-child(2)::after,
    .step-container:nth-child(3)::after,
    .step-container:nth-child(1)::before,
    .step-container:nth-child(2)::before,
    .step-container:nth-child(3)::before {
        display: none;
    }
    
    /* Simple vertical connecting lines for mobile */
    .step-container:not(:last-child)::after {
        display: block;
        top: 100px;
        left: 50%;
        transform: translateX(-50%) scaleY(0);
        width: 2px;
        height: 50px;
        background: repeating-linear-gradient(
            to bottom,
            #bdc3c7 0px,
            #bdc3c7 8px,
            transparent 8px,
            transparent 16px
        );
        animation: drawVerticalLine 0.8s ease-out forwards;
    }
    
    .step-container:nth-child(1)::after { animation-delay: 1.2s; }
    .step-container:nth-child(2)::after { animation-delay: 1.5s; }
    .step-container:nth-child(3)::after { animation-delay: 1.8s; }
    
    .step-container:not(:last-child)::before {
        display: block;
        top: 142px;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 0;
        height: 0;
        border-top: 8px solid #bdc3c7;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        opacity: 0;
        animation: showVerticalArrow 0.5s ease-out forwards;
    }
    
    .step-container:nth-child(1)::before { animation-delay: 1.8s; }
    .step-container:nth-child(2)::before { animation-delay: 2.1s; }
    .step-container:nth-child(3)::before { animation-delay: 2.4s; }
    
    .step-content h3 {
        font-size: 18px;
    }
    
    .step-content p {
        font-size: 13px;
    }
}

/* Additional advanced CSS effects */
.step-container {
    position: relative;
}

.step-container::after {
    transition: all 0.3s ease;
}

/* Floating animation for icons */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.step-container:nth-child(1) .icon-circle { animation: float 3s ease-in-out infinite; animation-delay: 0s; }
.step-container:nth-child(2) .icon-circle { animation: float 3s ease-in-out infinite; animation-delay: 0.5s; }
.step-container:nth-child(3) .icon-circle { animation: float 3s ease-in-out infinite; animation-delay: 1s; }
.step-container:nth-child(4) .icon-circle { animation: float 3s ease-in-out infinite; animation-delay: 1.5s; }

/* Gradient text effect on hover */
.step-container:hover .step-content h3 {
    background: linear-gradient(45deg, #e74c3c, #FF131D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
