/* «История фонда» на /about/. Кадр 2103:1456.
   Stage y0 = Figma 3928. Колонка 1440 (x − 240). Absolute — от 992px (scale 992–1439 — about-laptop-2026).
   Годы — шрифт life (не SVG-цифры). */

.af-history {
    position: relative;
    padding: 48px 0 40px;
    overflow: visible;
    background: transparent;
}

.af-history__stage {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.af-history__title {
    margin: 0 0 36px;
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.8px;
    text-align: center;
    color: #4D4D4D;
}

.af-history__title span {
    color: #3EA74F;
}

.af-history__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
    text-align: center;
}

.af-history__year {
    display: block;
    margin: 0 0 4px;
    font-size: 72px;
    line-height: 1;
    letter-spacing: 3px;
    color: #3EA74F;
}

.af-history__heading {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 0.9;
    text-align: center;
    color: #3EA74F;
}

.af-history__text {
    margin: 0 auto;
    max-width: 36em;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.16px;
    text-align: center;
    color: #4D4D4D;
}

.af-history__connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    width: 15px;
    margin: 16px auto 20px;
}

.af-history__dot {
    display: block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #185E30;
    flex-shrink: 0;
}

.af-history__rail {
    display: block;
    width: 2px;
    height: 48px;
    background: #3EA74F;
    flex-shrink: 0;
}

.af-history__item--extra .af-history__year {
    display: none;
}

@media (min-width: 768px) and (max-width: 991px) {

    body.page-about .af-history__stage {
        max-width: 900px;
        padding: 0 24px;
    }

    body.page-about .af-history__title {
        font-size: 48px;
        margin-bottom: 48px;
    }

    body.page-about .af-history__heading {
        font-size: 28px;
    }

    body.page-about .af-history__text {
        font-size: 18px;
        max-width: 640px;
    }

    body.page-about .af-history__year {
        font-size: 88px;
    }
}

@media (min-width: 992px) {

    body.page-about .af-history {
        padding: 0;
        overflow: visible;
        background: transparent;
    }

    body.page-about .af-history__stage {
        position: relative;
        z-index: 1;
        width: 1440px;
        max-width: 100%;
        height: 2020px;
        margin: 0 auto;
        padding: 0;
        overflow: visible;
    }

    body.page-about .af-history__title,
    body.page-about .af-history__heading,
    body.page-about .af-history__text,
    body.page-about .af-history__year,
    body.page-about .af-history__connector,
    body.page-about .af-history__dot,
    body.page-about .af-history__rail {
        position: absolute;
        margin: 0;
    }

    body.page-about .af-history__item {
        display: contents;
        margin: 0;
        gap: 0;
    }

    body.page-about .af-history__connector {
        display: contents;
        width: auto;
    }

    body.page-about .af-history__title {
        left: 317px;
        top: 0;
        width: 807px;
        font-size: 66px;
        letter-spacing: -1.32px;
        white-space: nowrap;
    }

    body.page-about .af-history__year {
        left: 106px;
        width: 260px;
        font-size: 100px;
        line-height: 1;
        letter-spacing: 3px;
        color: #3EA74F;
        text-align: left;
        white-space: nowrap;
    }

    body.page-about .af-history__heading {
        left: 421px;
        width: 831px;
        font-size: 36px;
        font-weight: 600;
        line-height: 0.9;
        text-align: left;
    }

    body.page-about .af-history__text {
        left: 421px;
        width: 883px;
        max-width: none;
        font-size: 22px;
        letter-spacing: -0.22px;
        text-align: left;
    }

    body.page-about .af-history__dot {
        left: 223px;
        width: 15px;
        height: 15px;
    }

    body.page-about .af-history__rail {
        left: 230px;
        width: 2px;
        height: 75px;
        background: #3EA74F;
    }

    /* 2016 */
    body.page-about .af-history__item--2016 .af-history__heading { top: 165px; }
    body.page-about .af-history__item--2016 .af-history__year { top: 175px; }
    body.page-about .af-history__item--2016 .af-history__text { top: 227px; }
    body.page-about .af-history__connector--2016 .af-history__dot--a { top: 333px; }
    body.page-about .af-history__connector--2016 .af-history__rail { top: 347px; }
    body.page-about .af-history__connector--2016 .af-history__dot--b { top: 419px; }

    /* 2017 */
    body.page-about .af-history__item--2017 .af-history__heading { top: 464px; }
    body.page-about .af-history__item--2017 .af-history__year { top: 474px; }
    body.page-about .af-history__item--2017 .af-history__text { top: 526px; }
    body.page-about .af-history__connector--2017 .af-history__dot--a { top: 621px; }
    body.page-about .af-history__connector--2017 .af-history__rail { top: 635px; }
    body.page-about .af-history__connector--2017 .af-history__dot--b { top: 707px; }

    /* 2021 */
    body.page-about .af-history__item--2021 .af-history__heading { top: 752px; }
    body.page-about .af-history__item--2021 .af-history__year { top: 762px; }
    body.page-about .af-history__item--2021 .af-history__text { top: 814px; }
    body.page-about .af-history__connector--2021 .af-history__dot--a { top: 912px; }
    body.page-about .af-history__connector--2021 .af-history__rail { top: 926px; }
    body.page-about .af-history__connector--2021 .af-history__dot--b { top: 998px; }

    /* 2023 */
    body.page-about .af-history__item--2023 .af-history__heading { top: 1043px; }
    body.page-about .af-history__item--2023 .af-history__year { top: 1053px; }
    body.page-about .af-history__item--2023 .af-history__text { top: 1105px; }
    body.page-about .af-history__connector--2023 .af-history__dot--a { top: 1208px; }
    body.page-about .af-history__connector--2023 .af-history__rail { top: 1222px; }
    body.page-about .af-history__connector--2023 .af-history__dot--b { top: 1294px; }

    /* 2025 (слот бывшего 2024) */
    body.page-about .af-history__item--2025 .af-history__heading { top: 1339px; }
    body.page-about .af-history__item--2025 .af-history__year { top: 1349px; }
    body.page-about .af-history__item--2025 .af-history__text { top: 1401px; }
    body.page-about .af-history__connector--2025 .af-history__dot--a { top: 1494px; }
    body.page-about .af-history__connector--2025 .af-history__rail { top: 1508px; }
    body.page-about .af-history__connector--2025 .af-history__dot--b { top: 1580px; }

    /* 2026 */
    body.page-about .af-history__item--2026 .af-history__heading { top: 1625px; }
    body.page-about .af-history__item--2026 .af-history__year { top: 1635px; }
    body.page-about .af-history__item--2026 .af-history__text { top: 1687px; }

    /* без года — line-height 0.9 как у остальных заголовков (2 строки ≈ 65px, как Figma 64) */
    body.page-about .af-history__item--extra .af-history__heading {
        top: 1795px;
        width: 831px;
        height: auto;
    }

    body.page-about .af-history__item--extra .af-history__text {
        top: 1879px;
    }
}
