/* history page blocks — hero with year strip and numbered chapters */

.history-hero,
.history-chapters {
    font-family: 'Roboto', sans-serif;
}

/* ================= history hero ================= */

.history-hero {
    --bordo: #6b0c26;
    --bordo-soft: #9b4a61;
    --ink: #33282b;
    --muted: #7d6a70;
    --line: #e7dcdf;
    --card: #faf2f3;

    position: relative;
    overflow: hidden;
    padding: 64px 0 72px;
    background-color: #fdfbf9;
    background-image:
        radial-gradient(1100px 520px at 82% -10%, #f7eef0 0%, rgba(247, 238, 240, 0) 70%),
        linear-gradient(180deg, #fdf9f8 0%, #fdfbf9 62%);
}

.history-hero * {
    box-sizing: border-box;
}

/* ---------- decorative engraving ---------- */

.history-hero__decor {
    position: absolute;
    top: -58px;
    right: -90px;
    width: min(56%, 780px);
    opacity: .46;
    mask-image: linear-gradient(250deg, #000 34%, rgba(0, 0, 0, 0) 88%);
    -webkit-mask-image: linear-gradient(250deg, #000 34%, rgba(0, 0, 0, 0) 88%);
    pointer-events: none;
    user-select: none;
}

.history-hero__decor-img {
    display: block;
    width: 100%;
    height: auto;
}

.history-hero__inner {
    position: relative;
    z-index: 1;
}

/* ---------- top: text + quote ---------- */

.history-hero__top {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
    gap: 40px;
    margin-bottom: 48px;
}

.history-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--bordo-soft);
}

.history-hero__eyebrow::after {
    content: '';
    width: 64px;
    height: 1px;
    background-color: #d8c3c9;
}

.history-hero__title {
    margin: 0 0 22px;
    font-size: clamp(34px, 4.4vw, 56px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.01em;
    color: var(--bordo);
}

.history-hero__lead {
    max-width: 520px;
    margin: 0;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.6;
    color: #4d4045;
}

/* ---------- quote card ---------- */

.history-hero__quote {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin: 6px 0 0;
    padding: 28px 30px;
    background-color: var(--card);
    border: 1px solid #f0e2e5;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(107, 12, 38, .05);
}

.history-hero__quote-icon {
    flex-shrink: 0;
    width: 62px;
    height: 62px;
}

.history-hero__quote-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.history-hero__quote-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #4d4045;
}

/* ---------- year strip ---------- */

.history-years {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 26px 8px;
    list-style: none;
    background-color: #fbf6f4;
    border: 1px solid #f0e6e4;
    border-radius: 20px;
    box-shadow: 0 20px 46px rgba(107, 12, 38, .04);
}

.history-years__item {
    position: relative;
    padding: 6px 26px;
}

.history-years__item + .history-years__item::before {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    width: 1px;
    background-color: var(--line);
}

.history-years__year {
    display: block;
    margin-bottom: 10px;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.01em;
    color: var(--bordo);
}

.history-years__text {
    display: block;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
    color: var(--muted);
}

/* ================= adaptive ================= */

@media (max-width: 1500px) {
    .history-hero__decor {
        width: min(54%, 700px);
        right: -70px;
    }

    .history-years__item {
        padding: 6px 20px;
    }
}

@media (max-width: 1200px) {
    .history-hero {
        padding: 56px 0 64px;
    }

    .history-hero__top {
        gap: 32px;
        margin-bottom: 40px;
    }

    .history-hero__decor {
        top: -40px;
        right: -60px;
        width: 56%;
        opacity: .38;
    }

    .history-hero__quote {
        padding: 24px 24px;
        gap: 18px;
    }

    .history-years__year {
        font-size: 30px;
    }

    .history-years__item {
        padding: 6px 16px;
    }
}

@media (max-width: 1024px) {
    .history-hero {
        padding: 44px 0 56px;
    }

    .history-hero__top {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .history-hero__decor {
        top: auto;
        bottom: -30px;
        right: -70px;
        width: 62%;
        opacity: .22;
    }

    .history-hero__lead {
        max-width: none;
    }

    .history-hero__quote {
        max-width: 560px;
    }

    .history-years {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px 0;
        padding: 24px 6px;
    }

    /* dividers follow the 3-column rhythm */
    .history-years__item + .history-years__item::before {
        display: none;
    }

    .history-years__item:not(:nth-child(3n + 1))::before {
        display: block;
    }
}

@media (max-width: 768px) {
    .history-hero {
        padding: 36px 0 48px;
    }

    .history-hero__eyebrow {
        font-size: 12px;
    }

    .history-hero__eyebrow::after {
        width: 44px;
    }

    .history-hero__lead {
        font-size: 16px;
    }

    .history-hero__quote {
        padding: 20px;
        gap: 16px;
    }

    .history-hero__quote-icon {
        width: 52px;
        height: 52px;
    }

    .history-years {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .history-years__item::before,
    .history-years__item:not(:nth-child(3n + 1))::before {
        display: none;
    }

    .history-years__item:not(:nth-child(2n + 1))::before {
        display: block;
    }

    .history-years__year {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .history-hero {
        padding: 28px 0 40px;
    }

    .history-hero__decor {
        width: 88%;
        right: -34px;
        bottom: -14px;
        opacity: .16;
    }

    .history-hero__quote {
        flex-direction: column;
        gap: 14px;
    }

    .history-years {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 8px 4px;
    }

    .history-years__item {
        padding: 18px 20px;
    }

    .history-years__item::before,
    .history-years__item:not(:nth-child(2n + 1))::before {
        display: none !important;
    }

    .history-years__item + .history-years__item {
        border-top: 1px solid var(--line);
    }

    .history-years__year {
        margin-bottom: 6px;
        font-size: 26px;
    }
}

/* ================= history chapters ================= */

.history-chapters {
    --bordo: #6b0c26;
    --bordo-soft: #9b4a61;
    --num: #ead7dc;
    --muted: #7d6a70;
    --line: #ece1e3;
    --card: #faf4f2;

    padding: 8px 0 72px;
    background-color: #fdfbf9;
}

.history-chapters * {
    box-sizing: border-box;
}

.history-chapter {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.92fr) minmax(0, 0.88fr);
    align-items: start;
    column-gap: 40px;
    padding: 44px 0;
}

.history-chapter + .history-chapter {
    border-top: 1px solid var(--line);
}

/* ---------- text column ---------- */

.history-chapter__head {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 26px;
}

.history-chapter__num {
    flex-shrink: 0;
    font-size: 58px;
    font-weight: 400;
    line-height: .92;
    color: var(--num);
}

.history-chapter__title {
    margin: 6px 0 0;
    font-size: clamp(22px, 2.1vw, 28px);
    font-weight: 700;
    line-height: 1.25;
    color: #33282b;
}

.history-chapter__title em {
    font-style: normal;
    color: var(--bordo);
    background-image: linear-gradient(transparent 82%, #e8cdd4 82%);
}

.history-chapter__text p {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: #4d4045;
}

.history-chapter__text p:last-child {
    margin-bottom: 0;
}

/* ---------- media column ---------- */

.history-chapter__media {
    margin: 0;
}

.history-chapter__image {
    display: block;
    width: 100%;
    height: 218px;
    object-fit: cover;
    border-radius: 10px;
    background-color: #f2ece8;
}

.history-chapter__caption {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.5;
    color: #9a8b90;
}

/* ---------- facts card ---------- */

.facts-card {
    padding: 22px 24px 8px;
    background-color: var(--card);
    border: 1px solid #f1e6e4;
    border-radius: 14px;
}

.facts-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ecdfe0;
}

.facts-card__icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    color: var(--bordo);
}

.facts-card__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.facts-card__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--bordo);
}

.facts-card__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.facts-card__row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 13px 0;
}

.facts-card__row + .facts-card__row {
    border-top: 1px solid #ecdfe0;
}

.facts-card__year {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--bordo);
}

.facts-card__text {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.5;
    color: #5d4f54;
}

/* ================= adaptive ================= */

@media (max-width: 1500px) {
    .history-chapter {
        column-gap: 32px;
    }

    .history-chapter__num {
        font-size: 52px;
    }
}

@media (max-width: 1200px) {
    .history-chapters {
        padding-bottom: 64px;
    }

    .history-chapter {
        column-gap: 26px;
        padding: 38px 0;
    }

    .history-chapter__head {
        gap: 16px;
        margin-bottom: 20px;
    }

    .history-chapter__num {
        font-size: 44px;
    }

    .history-chapter__image {
        height: 190px;
    }

    .facts-card {
        padding: 18px 18px 6px;
    }

    .facts-card__row {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 10px;
    }
}

@media (max-width: 1024px) {
    .history-chapters {
        padding-bottom: 56px;
    }

    /* text runs full width, picture and facts share the row below it */
    .history-chapter {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 24px;
        row-gap: 28px;
        padding: 32px 0;
    }

    .history-chapter__content {
        grid-column: 1 / -1;
    }

    .history-chapter__image {
        height: 210px;
    }
}

@media (max-width: 768px) {
    .history-chapters {
        padding-bottom: 48px;
    }

    .history-chapter {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 24px;
        padding: 28px 0;
    }

    .history-chapter__num {
        font-size: 38px;
    }

    .history-chapter__title {
        margin-top: 2px;
    }

    .history-chapter__text p {
        font-size: 14px;
    }

    .history-chapter__image {
        height: 220px;
    }
}

@media (max-width: 576px) {
    .history-chapters {
        padding-bottom: 40px;
    }

    .history-chapter {
        padding: 24px 0;
    }

    .history-chapter__head {
        gap: 12px;
        margin-bottom: 16px;
    }

    .history-chapter__num {
        font-size: 32px;
    }

    .history-chapter__image {
        height: 190px;
    }

    .facts-card__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 12px 0;
    }
}

/* ================= proves zīmogi timeline ================= */

.stamps {
    --bordo: #6b0c26;
    --bordo-soft: #9b4a61;
    --line: #e3ccd2;
    --muted: #7d6a70;

    position: relative;
    overflow: hidden;
    padding: 64px 0 72px;
    background-color: #f8eef0;
    background-image: linear-gradient(180deg, #f9f0f1 0%, #f6eaed 100%);
}

.stamps * {
    box-sizing: border-box;
}

/* большая тиснёная печать справа */
.stamps__decor {
    position: absolute;
    right: -104px;
    top: 96px;
    width: min(26%, 300px);
    opacity: .07;
    pointer-events: none;
    user-select: none;
}

.stamps__decor img {
    display: block;
    width: 100%;
    height: auto;
}

.stamps__inner {
    position: relative;
    z-index: 1;
}

.stamps__head {
    margin-bottom: 44px;
    text-align: center;
}

.stamps__title {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--bordo);
}

.stamps__text {
    margin: 0;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--muted);
}

/* ---------- лента ---------- */

.stamps__list {
    position: relative;
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* вертикальная линия по центру */
.stamps__list::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 50%;
    width: 1px;
    background-color: var(--line);
}

.stamps-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 78px;
    align-items: center;
}

/* точка на линии */
.stamps-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 11px;
    background-color: var(--bordo);
    border: 2px solid #f8eef0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.stamps-item__card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 20px;
    background-color: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(107, 12, 38, .06);
}

.stamps-item--left .stamps-item__card {
    grid-column: 1;
}

.stamps-item--right .stamps-item__card {
    grid-column: 2;
    flex-direction: row-reverse;
}

.stamps-item__figure {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    margin: 0;
}

.stamps-item__figure img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stamps-item__body {
    flex-grow: 1;
}

.stamps-item--right .stamps-item__body {
    text-align: right;
}

.stamps-item__year {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bordo);
}

.stamps-item__text {
    margin: 0;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.55;
    color: #5d4f54;
}

/* ================= adaptive ================= */

@media (max-width: 1200px) {
    .stamps {
        padding: 56px 0 64px;
    }

    .stamps__head {
        margin-bottom: 36px;
    }

    .stamps-item {
        column-gap: 54px;
    }

    .stamps-item__card {
        gap: 14px;
        padding: 13px 16px;
    }

    .stamps-item__figure {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 1024px) {
    .stamps {
        padding: 44px 0 56px;
    }

    .stamps__decor {
        width: 34%;
        right: -56px;
        opacity: .1;
    }

    .stamps-item {
        column-gap: 38px;
    }
}

/* одна колонка: линия уезжает влево, карточки в столбик */
@media (max-width: 768px) {
    .stamps {
        padding: 36px 0 48px;
    }

    .stamps__list {
        gap: 14px;
        padding-left: 30px;
    }

    .stamps__list::before {
        left: 5px;
    }

    .stamps-item {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
    }

    .stamps-item::after {
        left: -25px;
    }

    .stamps-item--left .stamps-item__card,
    .stamps-item--right .stamps-item__card {
        grid-column: 1;
        flex-direction: row;
    }

    .stamps-item--right .stamps-item__body {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .stamps__decor {
        display: none;
    }

    .stamps__list {
        padding-left: 24px;
    }

    .stamps-item::after {
        left: -19px;
    }

    .stamps-item__card {
        gap: 12px;
        padding: 12px 14px;
    }

    .stamps-item__figure {
        width: 46px;
        height: 46px;
    }

    .stamps-item__year {
        font-size: 15px;
    }

    .stamps-item__text {
        font-size: 12.5px;
    }
}