/* ==========================================================================
   About — History page
   ========================================================================== */

.history-page {
    --history-design-width: 1292px;
    width: 100%;
    background: #fff;
    font-family: var(--font-family);
    color: #151515;
}

.history-page__main {
    width: 100%;
    padding-bottom: 80px;
}

.history-container {
    width: min(100%, var(--container-max-width));
    margin: 0 auto;
}

/* Hero */

.history-hero {
    position: relative;
    height: 271px;
    overflow: hidden;
}

.history-hero__bg {
    position: absolute;
    inset: 0;
    background: #3a68d5;
}

.history-hero__decor {
    position: absolute;
    right: 0;
    bottom: 0;
    width: auto;
    height: 96%;
    max-width: 60%;
    object-fit: contain;
    object-position: right bottom;
    pointer-events: none;
}

.history-hero .history-container {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
}

.history-hero__title {
    margin: 0;
    max-width: 830px;
    color: #fff;
    font-size: 62px;
    font-weight: 600;
    line-height: 66px;
}

/* Breadcrumbs */

.history-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding-top: 34px;
    padding-bottom: 45px;
    font-size: 14px;
    font-weight: 300;
    line-height: 24px;
}

.history-breadcrumbs a {
    color: #151515;
}

.history-breadcrumbs a:hover {
    color: #3a68d5;
}

.history-breadcrumbs__sep,
.history-breadcrumbs__current {
    color: #777;
}

/* Section title */

.history-section {
    margin-bottom: 80px;
}

.history-section__title {
    margin: 0 0 40px;
    font-size: 32px;
    font-weight: 600;
    line-height: 46px;
}

.history-block {
    margin-bottom: 80px;
}

/* Card */

.history-card {
    display: grid;
    grid-template-columns: 519px minmax(0, 1fr);
    gap: 48px;
    align-items: stretch;
    padding: 10px;
    border: 0.5px solid #d4d4d4;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
    background: #fff;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.history-card__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 530px;
    object-fit: cover;
    object-position: center top;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.history-card__image--tall {
    min-height: 530px;
}

.history-card__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px 20px 20px 0;
}

.history-card__title {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    line-height: 32px;
}

.history-card__text {
    color: #555;
}

.history-card__text--compact {
    font-size: 17px;
    font-weight: 400;
    line-height: 22px;
}

.history-card__text--large {
    font-size: 21px;
    font-weight: 400;
    line-height: 29px;
}

.history-card__text p {
    margin: 0;
}

.history-card__text p + p {
    margin-top: 8px;
}

/* Medals table */

.history-table-wrap {
    width: 100%;
    max-width: 644px;
    border: 0.5px solid #d4d4d4;
    border-top-left-radius: 15px;
    border-bottom-right-radius: 15px;
    overflow: hidden;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    border: 0;
    table-layout: fixed;
}

.history-table thead {
    background: #3a68d5;
}

.history-table thead th:first-child {
    border-top-left-radius: 14px;
}

.history-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 14px;
}

.history-table th {
    padding: 10px 12px;
    border-left: 0.5px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 15px;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    word-break: break-word;
}

.history-table th:first-child {
    border-left: 0;
    text-align: left;
}

.history-table td {
    padding: 12px;
    border-top: 0.5px solid #d4d4d4;
    border-left: 0.5px solid #d4d4d4;
    color: #101828;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
    word-break: break-word;
}

.history-table td:first-child {
    border-left: 0;
    text-align: left;
}

.history-table tbody tr:last-child td {
    font-weight: 600;
}

/* Highlights */

.history-highlights {
    margin-bottom: 80px;
}

.history-highlights .history-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-highlight {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    border: 0.4px solid #9c9c9c;
    border-top-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background: #fff;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.history-highlight__title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
}

.history-highlight__text {
    color: #555;
    font-size: 18px;
    font-weight: 400;
    line-height: 23px;
}

.history-highlight__text p {
    margin: 0;
}

.history-highlight__text p + p {
    margin-top: 8px;
}

/* Responsive */

@media (min-width: 1293px) {
    .history-page {
        --history-content-width: min(var(--content-max-width), 100vw - 2 * var(--container-padding-x));
        --history-scale: max(1, calc(var(--history-content-width) / var(--history-design-width)));
    }

    .history-hero__title {
        max-width: calc(830px * var(--history-scale));
    }

    .history-card {
        grid-template-columns: minmax(0, calc(519px * var(--history-scale))) minmax(0, 1fr);
        gap: calc(48px * var(--history-scale));
    }

    .history-card__image,
    .history-card__image--tall {
        min-height: calc(530px * var(--history-scale));
    }

    .history-card__body {
        padding: calc(20px * var(--history-scale)) calc(20px * var(--history-scale)) calc(20px * var(--history-scale)) 0;
    }

    .history-table-wrap {
        max-width: calc(644px * var(--history-scale));
    }

    .history-table th {
        padding: calc(10px * var(--history-scale)) calc(12px * var(--history-scale));
    }

    .history-table td {
        padding: calc(12px * var(--history-scale));
    }
}

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

    .history-hero {
        height: 240px;
    }

    .history-hero__title {
        font-size: 52px;
        line-height: 56px;
    }

    .history-breadcrumbs {
        padding-top: 28px;
        padding-bottom: 36px;
    }

    .history-block,
    .history-section,
    .history-highlights {
        margin-bottom: 64px;
    }

    .history-section__title {
        font-size: 28px;
        line-height: 40px;
        margin-bottom: 32px;
    }

    .history-card {
        grid-template-columns: 35% minmax(0, 1fr);
        gap: 32px;
        align-items: stretch;
    }

    .history-card__body {
        padding: 12px 12px 12px 0;
    }

    .history-card__image,
    .history-card__image--tall {
        width: 100%;
        height: 100%;
        min-height: 0;
        aspect-ratio: auto;
        object-fit: cover;
        object-position: center top;
    }

    .history-card__title {
        font-size: 28px;
        line-height: 32px;
    }

    .history-table-wrap {
        max-width: none;
    }
}

@media (max-width: 1000px) {
    .history-hero {
        height: 220px;
    }

    .history-hero__title {
        font-size: 46px;
        line-height: 50px;
    }

    .history-card {
        gap: 28px;
    }

    .history-card__text--large {
        font-size: 19px;
        line-height: 27px;
    }
}

@media (max-width: 900px) {
    .history-hero {
        height: 200px;
    }

    .history-hero__title {
        font-size: 40px;
        line-height: 44px;
    }

    .history-hero__decor {
        max-width: 50%;
        height: 90%;
    }

    .history-breadcrumbs {
        padding-top: 24px;
        padding-bottom: 28px;
        gap: 12px;
    }

    .history-section__title {
        font-size: 26px;
        line-height: 34px;
    }

    .history-card__text--compact {
        font-size: 16px;
        line-height: 21px;
    }

    .history-highlight {
        padding: 28px 24px;
    }

    .history-highlight__title {
        font-size: 22px;
        line-height: 28px;
    }

    .history-highlight__text {
        font-size: 16px;
        line-height: 22px;
    }

    .history-table th {
        font-size: 10px;
        line-height: 13px;
        letter-spacing: 0.6px;
        padding: 8px 6px;
    }

    .history-table td {
        font-size: 14px;
        line-height: 18px;
        padding: 8px 6px;
    }
}

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

    .history-hero {
        height: 180px;
    }

    .history-hero__title {
        font-size: 34px;
        line-height: 38px;
    }

    .history-breadcrumbs {
        padding-top: 20px;
        padding-bottom: 24px;
        font-size: 13px;
        line-height: 20px;
    }

    .history-breadcrumbs__current {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .history-block,
    .history-section,
    .history-highlights {
        margin-bottom: 48px;
    }

    .history-section__title {
        font-size: 24px;
        line-height: 30px;
        margin-bottom: 24px;
    }

    .history-card {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        overflow: hidden;
    }

    .history-card__image,
    .history-card__image--tall {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
        border-bottom-right-radius: 0;
    }

    .history-card__body {
        gap: 20px;
        padding: 24px 20px 28px;
    }

    .history-card__title {
        font-size: 24px;
        line-height: 28px;
    }

    .history-card__text--large {
        font-size: 17px;
        line-height: 25px;
    }

    .history-highlights .history-container {
        gap: 16px;
    }

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

    .history-highlight__title {
        font-size: 20px;
        line-height: 26px;
    }

    .history-highlight__text {
        font-size: 15px;
        line-height: 21px;
    }
}

@media (max-width: 600px) {
    .history-table-wrap {
        max-width: none;
    }

    .history-table,
    .history-table thead,
    .history-table tbody,
    .history-table tr {
        display: block;
        width: 100%;
    }

    .history-table thead tr,
    .history-table tbody tr {
        display: flex;
        flex-wrap: wrap;
    }

    .history-table thead th:first-child,
    .history-table tbody td:first-child {
        flex: 0 0 100%;
        width: 100%;
        border-left: 0;
        text-align: left;
    }

    .history-table thead th:not(:first-child),
    .history-table tbody td:not(:first-child) {
        flex: 1 1 0;
        min-width: 0;
        border-top: 0.5px solid rgba(255, 255, 255, 0.35);
        border-left: 0.5px solid rgba(255, 255, 255, 0.35);
        text-align: center;
        font-size: 9px;
        line-height: 12px;
        letter-spacing: 0.4px;
        padding: 8px 4px;
    }

    .history-table tbody td:not(:first-child) {
        border-top: 0.5px solid #d4d4d4;
        border-left: 0.5px solid #d4d4d4;
        color: #101828;
        font-size: 14px;
        line-height: 18px;
        font-weight: 400;
        letter-spacing: 0;
        padding: 10px 4px;
    }

    .history-table thead th:nth-child(2),
    .history-table tbody td:nth-child(2) {
        border-left: 0;
    }

    .history-table tbody tr {
        border-top: 0.5px solid #d4d4d4;
    }

    .history-table tbody tr:last-child td {
        font-weight: 600;
        background: #f8f8f8;
    }

    .history-table tbody tr:last-child td:last-child {
        border-bottom-right-radius: 14px;
    }
}

@media (max-width: 480px) {
    .history-hero {
        height: 160px;
    }

    .history-hero__title {
        font-size: 28px;
        line-height: 32px;
    }

    .history-hero__decor {
        max-width: 45%;
        opacity: 0.85;
    }

    .history-breadcrumbs {
        padding-top: 16px;
        padding-bottom: 20px;
        gap: 10px;
    }

    .history-block,
    .history-section,
    .history-highlights {
        margin-bottom: 40px;
    }

    .history-section__title {
        font-size: 22px;
        line-height: 28px;
    }

    .history-card__image,
    .history-card__image--tall {
        aspect-ratio: 4 / 3;
        border-top-left-radius: 24px;
    }

    .history-card__body {
        padding: 20px 16px 24px;
    }

    .history-card__title {
        font-size: 22px;
        line-height: 26px;
    }

    .history-card__text--compact {
        font-size: 15px;
        line-height: 20px;
    }

    .history-card__text--large {
        font-size: 16px;
        line-height: 24px;
    }

    .history-table thead th:not(:first-child) {
        font-size: 8px;
        padding: 7px 3px;
    }

    .history-table tbody td:not(:first-child) {
        font-size: 13px;
        line-height: 17px;
        padding: 9px 3px;
    }

    .history-table tbody td:first-child {
        font-size: 14px;
        padding: 9px 12px;
    }

    .history-highlight {
        padding: 20px 16px;
        border-top-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .history-card:hover,
    .history-highlight:hover {
        transform: translateY(-6px);
        box-shadow: 0 14px 36px rgba(58, 104, 213, 0.18);
    }
}