.service-approach-block {
    padding: 120px 0;
    overflow-x: hidden; 
}

.service-approach-block .section-title {
    color: #1A1A1A;
    text-align: center;
    font-size: 48px;
    font-style: normal;
    font-weight: 300;
    line-height: 140%;
    margin: 0 auto 26px auto; 
    letter-spacing: 2px;
    max-width: 729px;
    width: auto; 
}

.main-timeline-sec {
    width: 100%;
}

.timeline {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 21px 68px;
    position: relative;
    padding-left: 74px;
}

.timeline-container {
    width: calc((100% - 136px) / 3); 
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 60px; 
    left: 0;
    width: 16px;
    height: 16px;
    background-color: #544FF8;
    border-radius: 50%;
    z-index: 3;
}

.timeline-line-wrapper {
    position: absolute;
    top: 68px; 
    left: 9px; 
    width: calc(100% + 56px); 
    height: 2px;
    z-index: 2;
}

.timeline-dotted-line,
.timeline-straight-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.timeline-dotted-line {
    background-image: linear-gradient(to right, #ccc 40%, rgba(255, 255, 255, 0) 0%);
    background-position: bottom;
    background-size: 10px 2px;
    background-repeat: repeat-x;
}

.timeline-straight-line {
    background-color: #544FF8;
    left:3px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 68px;
    left: 0;
    width: 74px;
     background-size: 10px 2px;
    border-top: 2px dotted #ccc;
    z-index: 1;
     
}
/* --- Responsive Blue Line Logic --- */
/* Base style for the blue connecting line */
.timeline-container:nth-child(n+2)::after {
    content: '';
    position: absolute;
    top: 68px;
    left: -74px;
    width: 74px;
    border-top: 2px solid #544FF8;
    z-index: 1;
    display: none;
}

/* Hide on the first item always */
.timeline-container:first-child::after {
    display: none !important;
}

/* Default (3-column): Show on the first item of each row */
.timeline-container:nth-child(3n+1)::after {
    display: block;
}

.timeline-header {
    position: relative;
    min-height: 50px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

.step-number {
    font-size: 30px;
    font-weight: 500;
    color: #544FF8;
}

.timeline-title {
    color: #000;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    margin: 0;
    padding-left: 10px; 
}

.timeline-body p {
    color: #444;
    font-size: 16px !important;
    line-height: 24px !important;
    margin: 0;
    padding-top: 28px;
    
}

/* --- Second to Last Item Line Styling --- */
/* On the second to last item, show a gradient line */
.timeline-container:nth-last-child(2) .timeline-straight-line {
    background: linear-gradient(91deg, #544FF8 40.23%, #2EB6AE 100%);
}

.timeline-container:last-child .timeline-line-wrapper {
    width: 100vw;

}

.timeline-container:last-child .timeline-straight-line {
    display: none;
}

@media (max-width: 800px) {
    .timeline-container {
        /* 2 columns for medium screens */
        width: calc((100% - 68px) / 2); /* 2 items per row */
    }
    
    /* Hide the 3-column rule */
    .timeline-container:nth-child(3n+1)::after {
        display: none;
    }
    /* 2-column: Show on the first item of each row */
    .timeline-container:nth-child(2n+1)::after {
        display: block;
    }
}

@media (max-width: 600px) {
    .timeline-container {
        width: 100%;
    }
    
    /* Hide rules from wider screens */
    .timeline-container:nth-child(3n+1)::after,
    .timeline-container:nth-child(2n+1)::after {
        display: none;
    }
    /* 1-column: Show on all items except the first */
    .timeline-container:nth-child(n+2)::after {
        display: block;
    }
}
