/* Keep the scroll surface inside the section; each milestone remains an Elementor container. */
.ja-section.ja-journey {
    --journey-panel: #edf1ea;
    --journey-border: #d3ded2;
    --journey-line: #799588;
    --journey-disc: clamp(92px, 8.3vw, 116px);
    --journey-radius: 24px;
    background: var(--jd-paper, #fff);
    border-block-end: 1px solid var(--jd-line, #dbe3dd);
}

.ja-journey .ja-journey-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    column-gap: clamp(30px, 6vw, 86px);
    row-gap: 8px;
    align-items: end;
    margin-block-end: clamp(26px, 2.8vw, 40px);
}

.ja-journey .ja-journey-label {
    grid-column: 1;
    grid-row: 1;
}

.ja-journey .ja-journey-label :is(.jd-eyebrow, .elementor-heading-title) {
    color: var(--jd-green, #173e32);
    font-size: clamp(34px, 3.2vw, 46px);
    line-height: 1.08;
    font-weight: 500;
    text-transform: none;
    letter-spacing: -.045em;
}

.ja-journey .ja-journey-title {
    grid-column: 1;
    grid-row: 2;
}

.ja-journey .ja-journey-title :is(p, .elementor-heading-title) {
    color: var(--jd-ink, #172d26);
    font-size: clamp(16px, 1.4vw, 19px);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -.015em;
}

.ja-journey .ja-journey-lead {
    grid-column: 2;
    grid-row: 1 / 3;
    max-width: 44ch;
}

.ja-journey .ja-journey-track {
    --journey-column: minmax(0, 1fr);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--journey-column);
    align-items: start;
    gap: 0;
    width: 100%;
    min-width: 0;
    padding: clamp(28px, 3.4vw, 48px) 0 clamp(28px, 3.1vw, 44px);
    border: 1px solid var(--journey-border);
    border-radius: var(--journey-radius);
    background: var(--journey-panel);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-color: #829b8d var(--journey-panel);
    scrollbar-width: thin;
}

.ja-journey .ja-journey-track:has(> .ja-journey-stop:nth-child(4)) {
    --journey-column: max(220px, 22.4%);
}

.ja-journey .ja-journey-track:focus-visible,
.ja-journey .ja-journey-controls button:focus-visible {
    outline: 2px solid var(--jd-green, #173e32);
    outline-offset: 3px;
}

.ja-journey .ja-journey-stop {
    text-align: center;
    scroll-snap-align: start;
}

/* The older editable section used the same year widgets, without subject classes.
   Known Elementor IDs preserve their subjects if an existing site reordered them. */
.ja-journey :where(.ja-journey-stop:nth-child(1)),
.ja-journey .elementor-element-ae60011,
.ja-journey .ja-journey-stop.ja-journey-founded {
    --journey-pictogram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%232c5041' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 53h52M12 52V20l25-7v39M37 26l15 4v22M18 25l3-.8m6-1.6 3-.8M18 32l3-.8m6-1.6 3-.8M18 39l3-.8m6-1.6 3-.8M42 35h4m-4 6h4M23 52v-7l6-1.3v8.3'/%3E%3C/svg%3E");
}

.ja-journey .ja-journey-stop.ja-journey-container {
    --journey-pictogram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%232c5041' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 22 36-8 16 6v27l-36 7-16-6zm0 0 16 6 36-8M22 28v26M12 28v16m5-14v16m12-15v16m7-18v17m7-19v18m7-20v18'/%3E%3C/svg%3E");
}

.ja-journey :where(.ja-journey-stop:nth-child(2)),
.ja-journey .elementor-element-ae60021,
.ja-journey .ja-journey-stop.ja-journey-battery {
    --journey-pictogram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%232c5041' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 20h42a2 2 0 0 1 2 2v20a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V22a2 2 0 0 1 2-2zm44 7h4v10h-4M16 26v12m5-12v12m5-12v12m13-13-5 8h7l-5 7'/%3E%3C/svg%3E");
}

.ja-journey .ja-journey-stop.ja-journey-factory {
    --journey-pictogram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%232c5041' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 52h54M8 51V31l15-9v9l15-9v9h17v20M43 30l1-17h6l1 17M15 38h6v6h-6zm12 0h6v6h-6zm15 13V38h7v13'/%3E%3C/svg%3E");
}

.ja-journey .ja-journey-stop.ja-journey-software {
    --journey-pictogram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%232c5041' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='17' y='7' width='30' height='50' rx='5'/%3E%3Cpath d='M26 12h12m-9 39h6M22 30h4l4-7 5 16 4-9h3'/%3E%3C/svg%3E");
}

.ja-journey :where(.ja-journey-stop:nth-child(3)),
.ja-journey .elementor-element-ae60031,
.ja-journey .ja-journey-stop.ja-journey-mobility {
    --journey-pictogram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%232c5041' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13' cy='43' r='9'/%3E%3Ccircle cx='50' cy='43' r='9'/%3E%3Cpath d='m13 43 11-18 7 18H13m18 0 12-18H25m-2-3-2-5m-4 0h9m12-2h6l6 28M26 51h5'/%3E%3C/svg%3E");
}

.ja-journey .ja-journey-stop .ja-journey-year {
    position: relative;
    width: 100%;
    padding: 0;
    text-align: center;
}

.ja-journey .ja-journey-year .elementor-heading-title {
    color: var(--jd-green, #173e32);
    font-size: clamp(31px, 2.9vw, 41px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.045em;
    font-variant-numeric: lining-nums tabular-nums;
}

.ja-journey .ja-journey-year::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: calc(var(--journey-disc) / 2 - 1px);
    height: 2px;
    background: var(--journey-line);
    pointer-events: none;
}

.ja-journey .ja-journey-stop:first-child .ja-journey-year::before {
    inset-inline-start: 50%;
}

.ja-journey .ja-journey-stop:last-child .ja-journey-year::before {
    inset-inline-end: 50%;
}

.ja-journey .ja-journey-year::after {
    content: "";
    position: relative;
    display: block;
    box-sizing: border-box;
    width: var(--journey-disc);
    height: var(--journey-disc);
    margin: clamp(12px, 1.2vw, 18px) auto 0;
    border: 2px solid #49735d;
    border-radius: 50%;
    background-color: #e0e9dc;
    background-image: var(--journey-pictogram, none);
    background-position: center;
    background-size: 59%;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 5px #f8faf4, inset 0 0 0 6px #b1c4ae;
    pointer-events: none;
}

/* Six-photo timelines use the native Image widget in each editable milestone. */
.ja-journey .ja-journey-photos .ja-journey-year::before,
.ja-journey .ja-journey-photos .ja-journey-year::after {
    content: none;
}

.ja-journey .ja-journey-photos .ja-journey-photo {
    position: relative;
    width: 100%;
    margin-block-start: clamp(12px, 1.2vw, 18px);
    line-height: 0;
}

.ja-journey .ja-journey-photos .ja-journey-photo::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: calc(var(--journey-disc) / 2 - 1px);
    height: 2px;
    background: var(--journey-line);
    pointer-events: none;
}

.ja-journey .ja-journey-photos .ja-journey-stop:first-child .ja-journey-photo::before {
    inset-inline-start: 50%;
}

.ja-journey .ja-journey-photos .ja-journey-stop:last-child .ja-journey-photo::before {
    inset-inline-end: 50%;
}

.ja-journey .ja-journey-photo .elementor-widget-container {
    line-height: 0;
}

.ja-journey .ja-journey-photo :is(a, figure) {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
}

.ja-journey .ja-journey-photo img {
    position: relative;
    z-index: 1;
    display: block;
    box-sizing: border-box;
    width: var(--journey-disc);
    max-width: 100%;
    height: var(--journey-disc);
    margin-inline: auto;
    padding: 5px;
    border: 2px solid #49735d;
    border-radius: 50%;
    object-fit: cover;
    background: #f8faf4;
}

.ja-journey .ja-journey-stop .ja-journey-event {
    padding: clamp(16px, 1.7vw, 23px) 12px 7px;
}

.ja-journey .ja-journey-event .elementor-heading-title {
    color: var(--jd-ink, #172d26);
    font-size: clamp(17px, 1.43vw, 21px);
    line-height: 1.26;
    letter-spacing: -.025em;
    text-wrap: balance;
}

.ja-journey .ja-journey-detail {
    padding-inline: clamp(12px, 1.6vw, 22px);
}

.ja-journey .ja-journey-detail p {
    margin-inline: auto;
    max-width: 34ch;
    font-size: 15px;
    line-height: 1.55;
    text-wrap: pretty;
}

.ja-journey .ja-journey-track:has(+ .ja-journey-controls:not([hidden])) {
    border-bottom: 0;
    border-radius: var(--journey-radius) var(--journey-radius) 0 0;
    padding-block-end: 18px;
}

.ja-journey .ja-journey-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px clamp(16px, 2vw, 28px) 14px;
    border: 1px solid var(--journey-border);
    border-top: 0;
    border-radius: 0 0 var(--journey-radius) var(--journey-radius);
    background: var(--journey-panel);
}

.ja-journey .ja-journey-controls[hidden] {
    display: none;
}

.ja-journey .ja-journey-controls button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #8ba292;
    border-radius: 50%;
    background: #fbfcf9;
    color: var(--jd-green, #173e32);
    font: 23px/1 Arial, sans-serif;
    cursor: pointer;
}

.ja-journey .ja-journey-controls button:hover:not([aria-disabled="true"]) {
    color: #fff;
    background: var(--jd-green, #173e32);
    border-color: var(--jd-green, #173e32);
}

.ja-journey .ja-journey-controls button[aria-disabled="true"] {
    background: transparent;
    color: #77877c;
    border-color: #bac7bb;
    cursor: default;
}

@media (max-width: 767px) {
    .ja-section.ja-journey {
        --journey-radius: 18px;
    }
    .ja-journey .ja-journey-intro {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 8px;
    }
    .ja-journey .ja-journey-lead {
        grid-column: 1;
        grid-row: 3;
        margin-block-start: 5px;
    }
    .ja-journey .ja-journey-track {
        grid-auto-columns: min(68%, 330px);
    }
}
