:root {
    --font-family: "Golos Text", serif;
    --second-family: "Merriweather", Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #313131;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

h1 {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 60px;
    line-height: 110%;
    text-transform: uppercase;
}

h2 {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 54px;
    line-height: 120%;
    text-transform: uppercase;
}

h3 {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 36px;
    line-height: 135%;
    text-transform: uppercase;
}

h4 {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 24px;
    line-height: 120%;
    text-transform: uppercase;
}

p {
    font-family: var(--font-family);
    font-size: 20px;
    line-height: 120%;
}

header {
    width: 100%;
    background: url("../images/background.png"), #E6DBCF;
}

footer {
    width: 100%;
    background: #E6DBCF;
    margin-top: 100px;
}

.btn {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    border-radius: 66px;
    padding: 18px 47px;
    text-align: center;
    cursor: pointer;
}

.btn--primary {
    background: #1f1f1f;
    color: #fff;
}

.btn--primary:hover {
    background: #fbce51;
    color: #1f1f1f;
}

.btn--outline-primary {
    border: 2px solid #1f1f1f;
    color: #1f1f1f;
    background: none;
}

.btn--outline-primary:hover {
    background: #1f1f1f;
    color: #fff;
}

.btn--outline-secondary {
    border: 1px solid #3057a2;
    border-radius: 62px;
    padding: 7px 12px;
    color: #3057a2;
    display: inline-flex;
}

.btn--outline-secondary:hover {
    background: #3057a2;
    color: #FFFFFF;
}

.container {
    margin: 0 auto;
    max-width: 1242px;
    padding: 0 20px;
}

.header {
    background: url("../images/chess-city.png") no-repeat center;
}

.header__content {
    max-width: 542px;
    padding: 62px 0 130px 0;
}

.header__logo {
    padding-top: 26px;
    display: inline-block;
}

.header__logo img {
    display: block;
}

.header__title h1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.header__title .line {
    width: 100%;
    text-align: left;
}

.header__title .center {
    text-align: center;
}

.header__title .right {
    text-align: right;
}

.header__subtitle {
    padding: 24px 0 40px 0;
}

.header__subtitle p {
    font-size: 18px;
    line-height: 130%;
    text-align: center;
}

.header__controls {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.header__controls a {
    width: 100%;
}

.running-line {
    background: #f54932;
    padding: 18px 12px;
    width: 100%;
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    align-items: center;
}

.running-line p {
    font-family: var(--second-family);
    text-align: center;
    font-size: 22px;
    color: white;
}

.running-line p::before {
    content: '•';
    display: inline-block;
    vertical-align: middle;
    margin: 0 15px;
    color: #FFFFFF;
}

.running-line__text {
    display: flex;
    width: fit-content;
    animation: running-line 35s linear infinite;
    will-change: transform;
}

.event-box {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-column-gap: 20px;
    grid-row-gap: 64px;
    padding-top: 80px;
}

.event-box__title {
    grid-area: 1 / 1 / 2 / 9;
    padding-right: 41px;
    align-content: center;
}

.event-box__image--people {
    grid-area: 1 / 9 / 2 / 13;
}

.event-box__image img {
    width: 100%;
}

.event-box__image--checkmate {
    grid-area: 2 / 1 / 4 / 6;
}

.event-box__details {
    grid-area: 2 / 6 / 3 / 13;
}

.event-box__table {
    grid-area: 3 / 6 / 4 / 13;
}

.text--highlight {
    font-weight: 700;
    color: #f54932;
}

.text--through {
    text-decoration: line-through;
    text-decoration-color: red;
}

.arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #313131;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
}

.arrow img {
    width: 8px;
    height: 16px;
    display: flex;
    place-self: center;
}

.arrow#prev, #left img {
    transform: rotate(180deg);
}

.arrow:hover {
    background: #fbce51;
}

.arrow:disabled {
    background: #d6d6d6;
}

.event-box__table {
    font-family: var(--font-family);
    font-size: 20px;
    width: 100%;
    border-collapse: collapse;
    margin: 60px 0 48px 0;
}

.event-box__table td {
    border-bottom: 2px solid #D0D0D0;
}

.event-box__table td:first-child {
    width: 45%;
    opacity: 0.7;
    border-right: 2px solid #D0D0D0;
}

.event-box__table td:last-child {
    font-weight: bold;
    padding: 16px;
}

.event-box__contact {
    color: #3057a2;
}

.event-box__table tr:last-child td {
    border-bottom: none;
}

.future {
    padding-top: 200px;
}

.future-title {
    max-width: 806px;
}

.future-title__heading {
    margin: 0;
}

.future-title__subtitle {
    font-weight: 400;
    font-size: 20px;
    line-height: 120%;
    color: #3057a2;
    transform: translateY(-120%) translateX(320px);
    width: 280px;
}

.future-steps {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    padding-top: 54px;
}

.future-steps__item {
    font-family: var(--font-family);
    display: flex;
    background: url("../images/background.png"), #E6DBCF;

    padding: 20px;
    gap: 20px;
    position: relative;
    font-weight: 500;
}

.future-steps__item::before {
    content: attr(data-number);
    font-weight: 600;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background-color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.future-steps__item--layout-1 {
    grid-area: 1 / 1 / 2 / 5;
}

.future-steps__item--layout-2 {
    grid-area: 1 / 5 / 2 / 9;
}

.future-steps__item--layout-3 {
    grid-area: 1 / 9 / 3 / 13;
}

.future-steps__item--layout-4 {
    grid-area: 2 / 1 / 3 / 5;
}

.future-steps__item--layout-5 {
    grid-area: 2 / 5 / 3 / 9;
}

.future-steps__item--layout-6 {
    grid-area: 3 / 1 / 4 / 5;
}

.future-steps__item--layout-7 {
    grid-area: 3 / 5 / 4 / 13;
}

.future-steps__item--layout-7 p {
    max-width: 446px;
}

.airplane {
    position: absolute;
    left: 60%;
    transform: translateY(-50%);
}

.participants {
    padding-top: 200px;
}

.participants__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80%;
    margin-bottom: 40px;
}

.participants__item__title {
    padding-top: 28px;
    text-align: center;
}

.participants__item__description {
    opacity: 0.6;
    padding-top: 6px;
    text-align: center;
}

.participants__item__button {
    padding-top: 20px;
}

.participants__title__arrows {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: right;
    transform: translateY(-95px);
}

.participants__current-slide {
    font-size: 16px;
}

.participants__total-slides {
    font-size: 16px;
    opacity: 0.6;
}

.description {
    padding: 40px 0 72px 0;
}

.description p {
    opacity: 0.6;
    font-size: 16px;
}

.card {
    max-width: 394px;
    justify-items: center;
    width: 100%;
    padding: 0 37px;
    margin-bottom: 40px;
}

.card img {
    width: 100%;
}

.carousel .card {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    justify-self: center;
    scroll-snap-align: center;
    white-space: nowrap;
}

.carousel.no-transition {
    scroll-behavior: auto;
}

.caousel.dragging {
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.carousel.dragging .card {
    cursor: grab;
    user-select: none;
}

.wrapper {
    display: flex;
    flex-direction: column;
}

.wrapper .carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(100% / 3);
    overflow: hidden;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

@keyframes running-line {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@media (max-width: 1024px) {
    .future-steps {
        grid-template-columns: 1fr;
    }

    .future-steps__item--layout-1,
    .future-steps__item--layout-2,
    .future-steps__item--layout-3,
    .future-steps__item--layout-4,
    .future-steps__item--layout-5,
    .future-steps__item--layout-6,
    .future-steps__item--layout-7 {
        grid-area: auto;
    }

    .carousel .card {
        white-space: wrap;
    }
}

@media (max-width: 768px) {
    .dots-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .dot {
        width: 10px;
        height: 10px;
        background-color: #d9d9d9;;
        border-radius: 50%;
        margin: 0 6px;
        cursor: pointer;
    }

    .dot.active {
        background-color: #313131;;
    }

    h1,
    h2 {
        font-size: 36px;
    }

    h3 {
        font-size: 28px;
    }

    .future,
    .participants {
        padding-top: 120px;
    }

    .running-line {
        height: 38px;
    }

    .header {
        background-position: -680px bottom;
        margin-bottom: -40px;
    }

    .btn--outline-primary {
        background: #fff;
        opacity: 0.9;
        border: none;
    }

    .header__content {
        padding: 40px 0 341px 0;
        max-width: 100%;
    }

    .header__controls {
        flex-direction: column;
        width: 100%;
    }

    .event-box__table,
    .event-box__table tbody,
    .event-box__table tr,
    .event-box__table td {
        display: block;
        width: 100%;
        padding: 0;
    }

    .event-box__table td {
        padding: 12px 0;
    }

    .event-box__table td:first-child {
        width: 100%;
        border-right: none;
        border-bottom: none;
    }

    .event-box__table td:last-child {
        padding: 12px 0;
    }

    .event-box {
        grid-template-columns: 1fr;
    }

    .event-box__title,
    .event-box__image--people,
    .event-box__image--checkmate,
    .event-box__details,
    .event-box__table {
        grid-area: unset;
    }

    .event-box__image img {
        width: 100%;
        height: auto;
    }

    .future-title__subtitle {
        position: relative;
        transform: translateX(0%);
        width: 100%;
    }

    .wrapper .carousel {
        grid-auto-columns: 100%;
    }

    .wrapper .carousel {
        order: -1;
    }

    .participants__title__arrows {
        justify-content: center;
        transform: translateY(0);
    }

    .carousel .card {
        max-width: 100%;
        white-space: nowrap;
    }

    .future-steps {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 0;
    }

    .future-steps::-webkit-scrollbar {
        display: none;
    }

    .future-steps__item {
        flex: 0 0 100%;
        scroll-snap-align: start;
        padding: 16px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        user-select: none;
    }

    .future-steps__arrows {
        display: flex;
        justify-content: center;
        gap: 16px;
        margin-top: 16px;
    }
}