#history .-cards-control a.-disabled {
    pointer-events: none;
    opacity: 0.4;
}

#history,
.page.page-template-index main #history {
    background-image:
        linear-gradient(to bottom, rgba(10, 34, 24, 0.18) 0%, rgba(10, 34, 24, 0.18) 58%, #e9e6dc 58%, #e9e6dc 100%),
        url("../images/bg-coalition-milestones.png") !important;
    background-repeat: no-repeat, no-repeat !important;
    background-size: 100% 100%, cover !important;
    background-position: center top, center top !important;
    background-color: #e9e6dc !important;
}

#history header,
.page.page-template-index main #history header {
    display: block !important;
    margin-bottom: 16px !important;
    gap: 0 !important;
    align-items: initial !important;
    justify-content: initial !important;
}

#history header h2,
.page.page-template-index main #history header h2 {
    margin-bottom: 12px !important;
    color: var(--color-neutral-white);
}

#history .-cards-control,
.page.page-template-index main #history .-cards-control {
    position: absolute;
    left: -56px;
    width: calc(100% + 112px);
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
    padding: 0;
    box-sizing: border-box;
}

#history .-cards-control .btn.btn-icon-primary-medium {
    position: relative;
    top: auto;
    flex-shrink: 0;
    transform: none !important;
    pointer-events: auto;
}


#history .-cards {
    position: relative;
}

#history .-cards-scroll {
    position: relative;
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding-top: 34px;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#history .-cards-scroll::-webkit-scrollbar {
    display: none;
}

#history .-cards-scroll::before {
    content: "";
    position: absolute;
    left: var(--timeline-line-left, 26px);
    width: var(--timeline-line-width, calc(100% - 52px));
    top: 96px;
    height: 4px;
    background: var(--color-brand-primary-pure);
    z-index: 8;
    pointer-events: none;
}

#history .-cards-scroll:focus-visible {
    outline: 2px solid var(--color-brand-primary-pure);
    outline-offset: 4px;
}

#history .-cards-scroll .card.-card-timeline {
    position: relative;
    z-index: 3;
    border-top: none;
    border-radius: 0;
    border-top-left-radius: 16px;
    overflow: visible;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    flex: 0 0 calc((100% - 48px) / 4);
    max-width: calc((100% - 48px) / 4);
    margin-right: 16px;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    filter: grayscale(0.15);
    background-image: none;
}

#history .-cards-scroll .card.-card-timeline:last-child {
    margin-right: 0;
}

#history .-cards-scroll .card.-card-timeline::before {
    display: none;
}

#history .-cards-scroll .card.-card-timeline:last-child::before {
    display: none;
}

#history .-cards-scroll .card.-card-timeline::after {
    content: "";
    position: absolute;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--color-brand-primary-pure);
    top: 55px;
    left: 16px;
    z-index: 9;
    box-shadow: none;
}

#history .-cards-scroll .card.-card-timeline .card-body {
    background: var(--color-neutral-white);
    box-shadow: 0 18px 28px rgba(9, 42, 28, 0.08);
    border-radius: 0;
    border-top-left-radius: 16px !important;
    position: relative;
    z-index: 1;
    display: flex;
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    flex: 1 0 0;
    min-height: 294px;
    height: 294px;
}

#history .-cards-scroll .card.-card-timeline .badge {
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: 0.02em;
}

#history .-cards-scroll .card.-card-timeline h3 {
    color: var(--color-neutral-black);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-md);
    font-style: normal;
    font-weight: var(--font-weight-extrabold);
    line-height: 115%;
    margin-top: var(--spacing-xxl);
    margin-bottom: var(--spacing-sm);
}

#history .-cards-scroll .card.-card-timeline .btn {
    margin-top: auto;
}

#history .-cards-scroll .card.-card-timeline.-active {
    opacity: 1;
    transform: scale(1);
    filter: none;
}

#history .-cards-scroll .card.-card-timeline.-active .card-body {
    background: #f3fbf8;
}

#history .-cards-scroll .card.-card-timeline.-active::after {
    width: 19px;
    height: 19px;
    top: 55px;
    box-shadow: none;
}

#history .-cards-scroll .card.-card-timeline.-out-of-focus {
    opacity: 1;
    filter: grayscale(0.45) brightness(0.94);
}

#history .-cards-scroll .card.-card-timeline.-out-of-focus .card-body {
    background: var(--color-neutral-white);
}

@media (max-width: 992px) {
    #history .-cards-control {
        position: static;
        transform: none;
        display: flex !important;
        justify-content: flex-start;
        pointer-events: auto;
    }

    #history .-cards-scroll {
        padding-top: 30px;
    }

    #history .-cards-scroll .card.-card-timeline {
        flex: 0 0 calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
        margin-right: 16px;
        opacity: 1;
        transform: none;
    }

    #history .-cards-scroll .card.-card-timeline.-active {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    #history .-cards-scroll::before {
        top: 92px;
    }

    #history .-cards-scroll .card.-card-timeline {
        flex: 0 0 100%;
        max-width: 100%;
        margin-right: 12px;
    }

    #history .-cards-control .-right {
        display: none;
    }

    #history .-cards-hint {
        margin-top: var(--spacing-sm);
        margin-bottom: 0;
        color: var(--color-neutral-white);
        font-size: var(--font-size-sm);
        font-weight: var(--font-weight-semibold);
        line-height: 1.3;
        text-align: center;
        opacity: 0.9;
    }
}
