/* ============================================================
   Process Steps Widget — v6
   Line runs dot-to-dot only (centre of row to centre of row).
   Dot is absolutely centred. Line segments are ::before/::after
   on the spine column, clipped to exactly 50% height each.
   ============================================================ */

.psw-wrap, .psw-wrap * { box-sizing: border-box; }

.psw-wrap { width: 100%; overflow: hidden; }

/* ── STEP ROW ── */
.psw-step {
    display: grid;
    grid-template-columns: 1fr 20px 1fr;
    grid-template-areas: "text spine img";
    align-items: stretch;
    position: relative;
}
.psw-step--rev { grid-template-areas: "img spine text"; }

/* ── TEXT COLUMN ── */
.psw-col--text {
    grid-area: text;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
}
.psw-step:not(.psw-step--rev) .psw-col--text {
    align-items: flex-end;
    text-align: right;
}
.psw-step--rev .psw-col--text {
    align-items: flex-start;
    text-align: left;
}
.psw-text-inner { max-width: 380px; width: 100%; }

.psw-num {
    display: block;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: #d5d5d5;
    letter-spacing: -2px;
    margin-bottom: 4px;
}
.psw-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0 0 8px; padding: 0;
}
.psw-badge {
    font-size: 0.78rem;
    color: #999;
    margin: 0 0 18px; padding: 0;
    line-height: 1.4;
}
.psw-desc {
    font-size: 0.875rem;
    line-height: 1.8;
    color: #555;
    margin: 0; padding: 0;
}

/* ============================================================
   SPINE COLUMN — the line is drawn with two pseudo-elements:
     ::before  = top half    (from top-edge to centre)
     ::after   = bottom half (from centre to bottom-edge)
   The dot sits absolutely at vertical centre (top:50%).

   For the FIRST step  → ::before is invisible (no row above)
   For the LAST step   → ::after  is invisible (no row below)

   This means:
     • first step  draws only the BOTTOM half-line  (centre → down)
     • last step   draws only the TOP    half-line  (up → centre)
     • middle steps draw BOTH halves (full continuous line)

   Result: the visible line runs exactly from dot centre to
   dot centre, never touching the outer edges.
   ============================================================ */
.psw-col--spine {
    grid-area: spine;
    position: relative;         /* anchor for absolute dot */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Top-half line (centre of this row → top edge → meets bottom of row above) */
.psw-col--spine::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background-color: #6a111587;
    top: 0;
    bottom: 50%;            /* from top edge down to exact centre */
}

/* Bottom-half line (centre → bottom edge → meets top of row below) */
.psw-col--spine::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background-color: #6a111587;
    top: 50%;               /* from exact centre down to bottom edge */
    bottom: 0;
}

/* First step: hide the top half (nothing above) */
.psw-step:first-child .psw-col--spine::before { display: none; }

/* Last step: hide the bottom half (nothing below) */
.psw-step:last-child .psw-col--spine::after  { display: none; }

/* The dot — centred absolutely on the spine */
.psw-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #c0392b;
    box-shadow: 0 0 0 5px rgba(192, 57, 43, 0.13);
    transition: transform 0.3s ease;
    z-index: 3;
}
.psw-step:hover .psw-dot {
    transform: translate(-50%, -50%) scale(1.5);
}

/* ── IMAGE COLUMN ── */
.psw-col--img {
	padding:40px;
    grid-area: img;
    overflow: hidden;
}
.psw-image-inner {
    width: 100%;
    height: 320px;
    overflow: hidden;
}
.psw-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}
.psw-step:hover .psw-image-inner img { transform: scale(1.04); }

.psw-placeholder {
    width: 100%;
    height: 100%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.8rem;
    text-align: center;
    padding: 20px;
}

/* ============================================================
   TABLET  600px – 900px
   ============================================================ */
@media (min-width: 600px) and (max-width: 900px) {
    .psw-col--text { padding: 30px 24px; }
    .psw-text-inner { max-width: 100%; }
    .psw-num        { font-size: 2.8rem; }
    .psw-title      { font-size: 1.2rem; }
    .psw-badge      { font-size: 0.72rem; margin-bottom: 12px; }
    .psw-desc       { font-size: 0.8rem;  line-height: 1.65; }
    .psw-image-inner { height: 240px; }
	.psw-col--img { padding:20px;}
}

/* ============================================================
   MOBILE  < 600px
   ============================================================ */
@media (max-width: 599px) {

    .psw-step,
    .psw-step--rev {
        display: flex !important;
        flex-direction: column !important;
    }

    .psw-col--text,
    .psw-step--rev .psw-col--text {
        order: 1 !important;
        width: 100% !important;
        padding: 24px 18px 16px !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
	
	.psw-col--img { padding:15px;}

    .psw-num, .psw-title, .psw-badge, .psw-desc {
        text-align: left !important;
    }

    .psw-text-inner { max-width: 100%; }

    .psw-col--spine { display: none !important; }

    .psw-col--img,
    .psw-step--rev .psw-col--img {
        order: 2 !important;
        width: 100% !important;
    }

    .psw-image-inner        { height: 210px !important; width: 100%; }
    .psw-image-inner img    { width: 100% !important; height: 100% !important; }

    .psw-num   { font-size: 2.4rem; letter-spacing: -1px; }
    .psw-title { font-size: 1.15rem; }
    .psw-badge { font-size: 0.74rem; margin-bottom: 12px; }
    .psw-desc  { font-size: 0.84rem; line-height: 1.7; }
}

@media (max-width: 400px) {
    .psw-col--text,
    .psw-step--rev .psw-col--text { padding: 20px 14px 14px !important; }
    .psw-image-inner { height: 170px !important; }
    .psw-num         { font-size: 2rem; }
    .psw-title       { font-size: 1.05rem; }
}
