/* Custom Colors from the Image */
:root {
    --color-primary-custom: #0d6efd;    /* Light Blue */
    --color-secondary-custom: #4d4c4e;  /* Purple */
    --color-danger-custom: #ee9b00;     /* Pink */
    
    --bg-light-blue: #e0f7fa;
    --bg-light-purple: #ede7f6;
    --bg-light-pink: #fce4ec;
}

/* --- Global Layout & Grid Overrides --- */
.flow-container {
    max-width: 1400px;
}

.flow-section {
    border-top: 5px solid #ccc; /* Main horizontal divider line */
    position: relative; /* Context for absolute positioning of stage lines */
}

/* Vertical Stage Divider Lines (RTL Adjustment: Use 'right' instead of 'left') */
.flow-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(16.666% - 1px); /* Match col-md-2 width (12/2 = 16.666%) */
    left: auto; /* Ensure 'left' is unset */
    width: 2px;
    background-color: #ccc;
    z-index: 1;
}

/* Coloring the Stage Line for each section */
.first-mile-line { border-top-color: var(--color-primary-custom); }
.mid-mile-line { border-top-color: var(--color-secondary-custom); }
.last-mile-line { border-top-color: var(--color-danger-custom); }

.stage-title {
    z-index: 2; /* Ensure title is above the vertical line */
}

/* --- Process Blocks Styling (The main cards) --- */
.process-row {
    gap: 1.5rem; /* Spacing between blocks and connectors */
    padding-right: 2rem !important; /* Adjust spacing after the vertical line (RTL) */
}

.process-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 150px; /* Fixed width for card-like appearance */
    min-height: 150px;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
    position: relative;
    z-index: 3;
}

.icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* --- Split Node Styling --- */
.process-block-split {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 180px; /* Slightly wider to accommodate two nodes */
    height: 150px;
    position: relative;
    z-index: 3;
}

.top-node, .bottom-node {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    font-size: 0.75rem;
}

.top-node .icon-wrap, .bottom-node .icon-wrap {
    flex-shrink: 0;
    /* Use margin-left for spacing in RTL */
    margin-left: 0.5rem; 
    margin-right: 0; 
    margin-bottom: 0;
}

/* --- Connector Styling (RTL Adjusted) --- */
.connector {
    width: 30px; /* Width of the horizontal line part */
    height: 5px;
    position: relative;
    z-index: 2;
}

/* Small Right-to-Left Arrow (->) is now Left-to-Right in code for visual effect */
.connector-sm-r-to-l::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    top: 50%;
    transform: translateY(-50%);
}

.connector-sm-r-to-l::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    top: 50%;
    transform: translateY(-50%);
    /* The arrow head points left in an RTL flow (visual direction) */
    left: 0; 
    right: auto;
}

/* Coloring the Connectors */
.connector-primary.connector-sm-r-to-l::after { background: var(--color-primary-custom); }
.connector-secondary.connector-sm-r-to-l::after { background: var(--color-secondary-custom); }
.connector-danger.connector-sm-r-to-l::after { background: var(--color-danger-custom); }

/* The arrow head (border) is on the right side of the element in LTR flow, 
   but since the flow is visual RTL, the arrow must point left.
   We use 'border-right' to create a left-pointing arrow (>) */
.connector-primary.connector-sm-r-to-l::before { border-right: 4px solid var(--color-primary-custom); }
.connector-secondary.connector-sm-r-to-l::before { border-right: 4px solid var(--color-secondary-custom); }
.connector-danger.connector-sm-r-to-l::before { border-right: 4px solid var(--color-danger-custom); }


/* Utility Classes for Custom Colors */
.text-primary-custom { color: var(--color-primary-custom) !important; }
.text-secondary-custom { color: var(--color-secondary-custom) !important; }
.text-danger-custom { color: var(--color-danger-custom) !important; }

.bg-light-blue { background-color: var(--bg-light-blue) !important; }
.bg-light-purple { background-color: var(--bg-light-purple) !important; }
.bg-light-pink { background-color: var(--bg-light-pink) !important; }

/* Mobile Responsiveness: Stack blocks vertically on small screens */
@media (max-width: 767.98px) {
    .flow-section::after {
        /* Move the vertical line to the right side of the screen in RTL */
        right: 20px;
        left: auto;
    }
    .process-row {
        flex-direction: column;
        align-items: flex-end; /* Align right in RTL */
        padding-right: 50px !important; /* Space for the vertical line (RTL) */
        padding-left: 0 !important;
        gap: 0;
    }
    .process-block, .process-block-split {
        width: 100%;
        margin-bottom: 2rem;
        /* Ensure text and icon flow correctly inside the blocks */
        text-align: right; 
    }
    .connector {
        /* Hide or change horizontal connectors on mobile for vertical flow */
        display: none;
    }
}





