/* ============================================================
   Car Service Timeline Widget — timeline.css
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.cst-timeline {
    background-color: #000;
    padding: 60px 40px;
    position: relative;
    /*overflow: hidden;*/
    box-sizing: border-box;
}

/* ── Track: the vertical dashed line ─────────────────────── */
.cst-track {
    position: relative;
}

/* The dashed line sits on the dot-wrapper column (left: auto via flex) */
.cst-track::before {
    content: '';
    position: absolute;
    /* Align with the centre of .cst-dot-wrapper column.
       left = width of .cst-step-left (100px) + half dot-wrapper width (14px centre) */
    left: calc(var(--cst-left-col, 100px) + 7px);
    top: 6px;
    bottom: 6px;
    border-left: 2px dashed #ffffff;
    z-index: 0;
}

/* ── Individual step — 3-column flex row ─────────────────── */
.cst-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.cst-step:not(:last-child) {
    margin-bottom: 70px;
}

/* ── LEFT column: step number ─────────────────────────────── */
.cst-step-left {
    flex: 0 0 var(--cst-left-col, 100px);
    width: var(--cst-left-col, 100px);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;   /* push number flush to the line */
    padding-right: 20px;
    padding-top: 2px;
    box-sizing: border-box;
}

/* ── Step number text ─────────────────────────────────────── */
.cst-step-number {
    display: inline-block;
    font-family: 'Arial Black', Arial, sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #ff0000;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── CENTER column: dot on the line ──────────────────────── */
.cst-dot-wrapper {
    flex: 0 0 14px;
    width: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    z-index: 1;
    position: relative;
}

.cst-dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #ff0000;
    border: 2px solid #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.cst-step:hover .cst-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(255, 0, 0, 0.25);
}

/* ── RIGHT column: title + description ───────────────────── */
.cst-step-body {
    flex: 1;
    padding-left: 24px;
    box-sizing: border-box;
}

/* ── Step title ──────────────────────────────────────────── */
.cst-step-title {
    font-family: 'Arial Black', Arial, sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: clamp(18px, 2.5vw, 26px);
    line-height: 1.2;
    color: #ff0000;
    margin: 0 0 10px;
    padding: 0;
    letter-spacing: -0.01em;
}

/* ── Description ─────────────────────────────────────────── */
.cst-step-desc {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #cccccc;
    margin: 0;
    padding: 0;
    max-width: 520px;
}

/* ── Icon (optional) ─────────────────────────────────────── */
.cst-step-icon {
    margin-bottom: 10px;
    color: #ff0000;
    font-size: 20px;
}

.cst-step-icon svg {
    fill: #ff0000;
    width: 22px;
    height: 22px;
}

/* ============================================================
   ALTERNATING / CENTER variant
   ============================================================ */
.cst-timeline--center .cst-track::before {
    left: 50%;
    transform: translateX(-50%);
}

.cst-timeline--center .cst-step:nth-child(odd) {
    flex-direction: row-reverse;
}

.cst-timeline--center .cst-step:nth-child(odd) .cst-step-left {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 20px;
}

.cst-timeline--center .cst-step:nth-child(odd) .cst-step-body {
    padding-left: 0;
    padding-right: 24px;
    text-align: right;
}

/* ============================================================
   SCROLL ANIMATION
   ============================================================ */
.cst-timeline--animate .cst-step {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.cst-timeline--animate .cst-step.cst-visible {
    opacity: 1;
    transform: translateY(0);
}

.cst-timeline--animate .cst-step:nth-child(1) { transition-delay: 0s;    }
.cst-timeline--animate .cst-step:nth-child(2) { transition-delay: 0.12s; }
.cst-timeline--animate .cst-step:nth-child(3) { transition-delay: 0.24s; }
.cst-timeline--animate .cst-step:nth-child(4) { transition-delay: 0.36s; }
.cst-timeline--animate .cst-step:nth-child(5) { transition-delay: 0.48s; }
.cst-timeline--animate .cst-step:nth-child(6) { transition-delay: 0.60s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .cst-timeline {
        padding: 40px 20px;
    }
    .cst-step-title {
        font-size: 16px;
    }
    .cst-step-left {
        flex: 0 0 72px;
        width: 72px;
        padding-right: 14px;
    }
    .cst-track::before {
        left: calc(72px + 7px);
    }
    /* Collapse center layout to left-only on mobile */
    .cst-timeline--center .cst-step:nth-child(odd) {
        flex-direction: row;
    }
    .cst-timeline--center .cst-step:nth-child(odd) .cst-step-left {
        justify-content: flex-end;
        padding-right: 14px;
        padding-left: 0;
    }
    .cst-timeline--center .cst-step:nth-child(odd) .cst-step-body {
        padding-right: 0;
        padding-left: 24px;
        text-align: left;
    }
    .cst-timeline--center .cst-track::before {
        left: calc(72px + 7px);
        transform: none;
    }
}

