/* ----------------------------------------------------------
   HISTORY TIMELINE
---------------------------------------------------------- */

.bmg-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 24px;
    padding-bottom: 48px;
}


/* Remove the unused space after the final timeline item */
.bmg-timeline-item:last-child {
    padding-bottom: 0 !important;
}


/* ----------------------------------------------------------
   RAIL AND MARKER
---------------------------------------------------------- */

.bmg-timeline-item__rail {
    position: relative;
}


/*
 * The line is hidden by default.
 * It is displayed only when another timeline item follows.
 */
.bmg-timeline-item__rail::after {
    content: "";
    position: absolute;
    top: 22px;
    bottom: -48px;
    left: 11px;
    width: 2px;
    display: none;
    background: var(--color-primary);
}


/* Show the line when a later timeline item exists */
.bmg-timeline-item:has(~ .bmg-timeline-item)
    .bmg-timeline-item__rail::after {
    display: block;
}


.bmg-timeline-item__marker {
    position: relative;
    z-index: 1;
    display: block;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    border: 5px solid var(--color-primary);
    border-radius: 50%;
    background: #fff;
}


/* ----------------------------------------------------------
   CONTENT
---------------------------------------------------------- */

.bmg-timeline-item__content {
    min-width: 0;
}


.bmg-timeline-item__date {
    margin: 0 0 6px;
    color: @primary-blue;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


.bmg-timeline-item__description > :first-child {
    margin-top: 0;
}


.bmg-timeline-item__description > :last-child {
    margin-bottom: 0;
}


/* ----------------------------------------------------------
   SMALL SCREENS
---------------------------------------------------------- */

@media (max-width: 639px) {

    .bmg-timeline-item {
        grid-template-columns: 18px minmax(0, 1fr);
        column-gap: 16px;
        padding-bottom: 36px;
    }


    .bmg-timeline-item:last-child {
        padding-bottom: 0;
    }


    .bmg-timeline-item__marker {
        width: 18px;
        height: 18px;
        border-width: 4px;
    }


    .bmg-timeline-item__rail::after {
        top: 17px;
        bottom: -36px;
        left: 8px;
    }
}