.description__illustration {
    animation: kazan-header 20s infinite;
}

.description__illustration.izhevsk {
    animation: izhevsk-header 20s infinite;
}

.description__illustration.samara {
    animation: samara-header 20s infinite;
}

.description__illustration.ekt {
    animation: ekt-header 20s infinite;
}

.description__headline {
    max-width: 1000px;
    display: flex;

    & > h1 {
        width: 670px;
    }

    & > div.headline__scroll.kazan {
        align-self: end;
        margin-left: -75px;
    }

    & > div.headline__scroll.izhevsk {
        align-self: end;
        margin-left: -40px;
    }

    & > div.headline__scroll.samara {
        align-self: end;
        margin-left: -45px;
    }

    & > div.headline__scroll.ekt {
        align-self: unset;
        margin-left: unset;
    }
}

.description__headline.ekt {
    flex-flow: column;

    & > h1 {
        width: unset;
    }
}

main.page-main {
    margin-top: 120px;
}

.workspaces {
    .section__headline {
        width: 590px;
        margin: 0 auto;
    }
}

.workspaces__wrapper {
    display: flex;
    flex-flow: column nowrap;
    row-gap: 40px;
    margin-top: var(--in-section-gap);
}

.workspace {
    display: flex;
    flex-flow: row nowrap;
    margin-bottom: 100px;

    .workspace__image {
        width: 555px;
        height: 511px;
        border-radius: 16px;
        overflow: hidden;
        position: relative;
        display: flex;
        align-items: flex-end;
    }

    .workspace__image > h2 {
        color: white;
        margin: 40px;
        line-height: 40px;
    }

    .workspace__image::after {
        display: block;
        content: '';
        width: 555px;
        height: 511px;
        background: linear-gradient(to bottom, rgba(51, 51, 51, 10%) 30%, rgba(51, 51, 51, 80%) 90%), url("../../img/features-card1.jpg");
        background-position: center;
        border-radius: 16px;
        background-size: cover;
        position: absolute;
        top: 0;
        z-index: -1;
        filter: blur(3px);
    }

    .workspace__image.izhevsk::after {
        background: linear-gradient(to bottom, rgba(51, 51, 51, 10%) 30%, rgba(51, 51, 51, 80%) 90%), url("../../img/town/feature/izhevsk-feature-3.webp");
        background-position: center;
        background-size: cover;
    }

    .workspace__image.samara::after {
        background: linear-gradient(to bottom, rgba(51, 51, 51, 10%) 30%, rgba(51, 51, 51, 80%) 90%), url("../../img/town/samara-open-space.jpg");
        background-position: center;
        background-size: cover;
    }

    &:nth-child(2) .workspace__image::after {
        background: linear-gradient(to bottom, rgba(51, 51, 51, 10%) 30%, rgba(51, 51, 51, 80%) 90%), url("../../img/town/flexible-office.jpg");
        background-position: center;
        background-size: cover;
    }

    &:nth-child(2) .workspace__image.izhevsk::after {
        background: linear-gradient(to bottom, rgba(51, 51, 51, 10%) 30%, rgba(51, 51, 51, 80%) 90%), url("../../img/town/izhevsk-flexible-office.webp");
        background-position: center;
        background-size: cover;
    }

    &:nth-child(2) .workspace__image.samara::after {
        background: linear-gradient(to bottom, rgba(51, 51, 51, 10%) 30%, rgba(51, 51, 51, 80%) 90%), url("../../img/town/samara-flexible-office.jpg");
        background-position: center;
        background-size: cover;
    }

    /* Блок «гибкий офис» на samara.html показывается без размытия. Общее
       правило .workspace__image::after размывает фон на 3px, а town.css грузят
       все городские страницы, поэтому цепляемся за модификатор
       office-benefits__image — он встречается только в этой вёрстке. */
    .workspace__image.office-benefits__image::after {
        filter: none;
    }

    .workspace__features {
        display: flex;
        flex-flow: column nowrap;
        justify-content: space-between;
        padding: 5px 0;
    }

    .workspace__feature {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        width: 539px;
        height: 74px;
        background: white;
        font-size: 18px;
        line-height: 25px;
        font-family: "Mont", "Helvetica", sans-serif;
        font-weight: 700;
        filter: drop-shadow(2px 4px 10px rgba(204, 204, 204, 30%));
    }

    .workspace__feature > div.icon {
        width: 32px;
        min-width: 32px;
        height: 32px;
    }

    .workspace__feature.right {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    .workspace__feature.left {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
        justify-content: flex-start;
        gap: 20px;
    }
}

.workspace:nth-child(1) {
    .workspace__feature:nth-child(1) > div.icon {
        background: url("../../img/town/feature-1.png");
    }

    .workspace__feature:nth-child(2) > div.icon {
        background: url("../../img/town/feature-2.svg");
    }

    .workspace__feature:nth-child(3) > div.icon {
        background: url("../../img/town/feature-3.svg");
    }

    .workspace__feature:nth-child(4) > div.icon {
        background: url("../../img/town/feature-4.svg");
    }

    .workspace__feature:nth-child(5) > div.icon {
        background: url("../../img/town/feature-5.svg");
        min-width: 34px;
    }

    .workspace__feature:nth-child(6) > div.icon {
        background: url("../../img/town/feature-6.svg");
    }
}

.workspace:nth-child(2) {
    .workspace__feature > p {
        width: 400px;
    }

    .workspace__feature:nth-child(1) > div.icon {
        background: url("../../img/town/feature-7.svg");
    }

    .workspace__feature:nth-child(2) > div.icon {
        background: url("../../img/town/feature-8.svg");
    }

    .workspace__feature:nth-child(3) > div.icon {
        background: url("../../img/town/feature-9.svg");
    }

    .workspace__feature:nth-child(4) > div.icon {
        background: url("../../img/town/feature-10.svg");
    }

    .workspace__feature:nth-child(5) > div.icon {
        background: url("../../img/town/feature-11.svg");
    }

    .workspace__feature:nth-child(6) > div.icon {
        background: url("../../img/town/feature-12.svg");
    }
}

.office-features {
    display: flex;
    flex-flow: column wrap;
    max-height: 242px;
    margin-top: 40px;
    row-gap: 10px;
    column-gap: 30px;
}

.office-feature {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    width: calc(50% - 15px);
    height: 74px;
    border-radius: 16px;
    padding: 17px;
    background: white;
    font-size: 18px;
    line-height: 25px;
    font-family: "Mont", "Helvetica", sans-serif;
    font-weight: 700;
    filter: drop-shadow(2px 4px 10px rgba(204, 204, 204, 30%));

    & > h4 {
        width: calc(100% - 37px - 40px - 45px);
    }
}

.offices {
    margin-top: 56px;
    margin-bottom: 90px;
    display: flex;
    flex-flow: row nowrap;
    column-gap: 26px;
}

.office {
    display: flex;
    flex-flow: column nowrap;
    width: 258px;
    filter: drop-shadow(2px 4px 10px rgba(204, 204, 204, 30%));

    & button {
        width: 237px;
    }
}

.office__action {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    background-color: white;
    padding-bottom: 10px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.new-prices {
    width: var(--container-width);
    margin: 0 auto;
    position: relative;

    .new-prices__heading {
        text-align: center;
        margin-bottom: 120px;
    }

    .new-prices__bubble {
        width: 475px;
        height: 175px;
        background: url("../../img/town/prices-bubble.svg");
        position: absolute;
        top: 0;
        right: 0;
    }

    .new-price__headline {
        font-family: "Mont", "Helvetica", sans-serif;
        font-size: 36px;
        font-weight: 600;
        line-height: 36px;
        margin-top: 30px;
    }

    .new-price__headline.seats {
        width: 100%;
        display: flex;
        flex-flow: row nowrap;
    }

    .new-price__headline span.decorative {
        font-family: "Zinovia", "Helvetica", sans-serif;
        font-size: 38px;
    }

    .new-price__headline--seats {
        margin-left: 55px;
    }

    .new-price__headline--seats fieldset {
        display: flex;
        flex-flow: row wrap;
        column-gap: 14px;
        row-gap: 14px;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        margin-top: 10px;
        border: none;
        margin-inline: 0;
        padding: 0;
    }

    .new-price__headline--seats label {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        width: 105px;
        height: 45px;
        font-size: 18px;
        font-family: "Mont", "Helvetica", sans-serif;
        font-weight: 700;
        line-height: 25px;
        color: var(--feature-color);
        border: 1px solid var(--feature-color);
        border-radius: 41px;
        padding: 15px 10px;
        transition: border-color 0.2s ease-in, color 0.2s ease-in;
    }

    .new-price__headline--seats input:checked+label {
        color: white;
        background-color: var(--feature-color);
    }
}

.new-price {
    display: flex;
    height: 436px;
    margin-top: 30px;
}

.new-price__content {
    background: url("../../img/town/price-border.svg");
    width: 934px;
    display: flex;
}

.new-price__image {
    position: relative;

    .new-price__title {
        display: flex;
        flex-flow: column;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 20px;
        left: 20px;
        width: 307px;
        height: 88px;
        background: white;
        border-top-left-radius: 44px;
        border-bottom-left-radius: 44px;
    }

    .new-price__title > .new-price__title--heading {
        font-family: "Mont", "Helvetica", sans-serif;
        font-weight: 700;
    }

    .new-price__title > .new-price__title--description {
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
        text-align: center;
    }

    img.mobile {
        display: none;
    }
}

.new-price__image > img {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    width: 310px;
    height: 434px;
    margin-top: 1px;
    margin-left: 1px;
}

.new-price__description {
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    width: 615px;
    padding: 40px 40px 30px;
    background: white;
    z-index: -1;
}

.new-price__description--lines {
    display: flex;
    flex-flow: column;
    width: 100%;
    max-height: calc(100% - 47px);
    justify-content: space-between;
    position: relative;
    row-gap: 8px;
}

.new-price__description--lines.two {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 8px;

    & .new-price__description--line {
        width: calc(100% / 2);
    }
}

.new-price__description--line {
    > svg {
        float: left;
        margin-top: 4px;
        margin-right: 8px;
    }

    &:nth-child(1):not(.not-bold) {
        font-weight: 600;
    }
}

.new-price__description--price {
    align-self: flex-end;
    font-family: "Mont", "Helvetica", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 25px;
    color: var(--feature-color);
    bottom: 24px;
    right: 60px;
    background-color: white;
    width: max-content;
    padding: 10px;
    border: 1px solid var(--feature-color);
    border-radius: 24px;
}

a.new-price__action {
    line-height: 0;
    font-size: 0;
    color: transparent;
}

.new-price__action {
    width: 159px;
    height: 436px;
    cursor: pointer;
    transform-origin: 0 100%;
    transition: transform 200ms linear;

    &:hover {
        transform: rotate(3deg);
    }
}

.new-price__action.tour {
    background: url("../../img/town/take-tour.svg");
}

.new-price__action.book-cr {
    background: url("../../img/town/book-cr.svg");
}

.become-resident {
    width: var(--container-width);
    margin: 100px auto 0;

    & > div.section__headline {
        width: calc(var(--container-width) - 200px);
        line-height: 25px;
        margin-left: 275px;
        margin-bottom: -35px;
        text-align: left;
    }
}

.become-resident__flex {
    & > img {
        border: none;
    }
}

.contact-map {
    display: flex;
    justify-content: flex-start;
    column-gap: 30px;
}

div#yandex-map > iframe,
div#yandex-map-ekt > iframe {
    width: 730px;
    height: 315px;
    border-radius: 16px;
}

.ecosystem__heading {
    width: var(--container-width);
    margin: 0 auto 80px;
    font-family: "Mont", "Helvetica", sans-serif;

    & > h2:nth-child(2) {
        margin-left: 100px;
    }
}

.scroll-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.scroll-track {
    display: flex;
    gap: 20px;
    animation: scroll 40s linear infinite;
    width: max-content;
    align-items: center;

    & img {
        border-radius: 16px;
        flex-shrink: 0;
        opacity: 0; transition: opacity 0.3s ease-in;
    }

    & img.loaded {
        opacity: 1;
    }

    & img[data-src="img/town/ekt/ecosystem1.jpg"] {
        width: 360px;
        height: 346px;
    }

    & img[data-src="img/town/ekt/ecosystem2.jpg"] {
        width: 276px;
        height: 406px;
    }

    & img[data-src="img/town/ekt/ecosystem3.jpg"] {
        width: 413px;
        height: 333px;
    }

    & img[data-src="img/town/ekt/ecosystem4.jpg"] {
        width: 516px;
        height: 352px;
    }

    & img[data-src="img/town/ekt/ecosystem5.jpg"] {
        width: 433px;
        height: 523px;
    }

    & img[data-src="img/town/ekt/ecosystem6.jpg"] {
        width: 512px;
        height: 377px;
    }

    & img[data-src="img/town/ekt/ecosystem7.png"] {
        width: 389px;
        height: 540px;
    }

    & img[data-src="img/town/ekt/ecosystem8.jpg"] {
        width: 459px;
        height: 346px;
    }

    & img[data-src="img/town/ekt/ecosystem9.jpg"] {
        width: 332px;
        height: 514px;
    }

    & img[data-src="img/town/ekt/ecosystem10.jpg"] {
        width: 426px;
        height: 385px;
    }
}

.features__card-play {
    display: none;
}

@media (max-width: 1024px) {
    .description__headline {
        flex-flow: column nowrap;

        & > h1 {
            width: 585px;
        }

        & > div.headline__scroll.kazan,
        & > div.headline__scroll.izhevsk,
        & > div.headline__scroll.samara {
            width: 315px;
            margin-top: -56px;
            margin-left: unset;
            position: relative;
        }

        & > div.headline__scroll.kazan {
            right: 395px;
        }

        & > div.headline__scroll.izhevsk {
            right: 360px;
        }

        & > div.headline__scroll.samara {
            right: 365px;
        }
    }
}

@media (max-width: 768px) {
    .description__headline {
        & > h1 {
            width: 385px;
        }

        & > div.headline__scroll.kazan,
        & > div.headline__scroll.izhevsk,
        & > div.headline__scroll.samara {
            width: 250px;
            margin-top: -42px;
        }

        & > div.headline__scroll.kazan {
            right: 80px;
        }

        & > div.headline__scroll.izhevsk {
            right: 55px;
        }

        & > div.headline__scroll.samara {
            right: 60px;
        }
    }

    .workspaces {
        .section__headline {
            width: var(--container-width-768);
        }
    }

    .workspace {
        flex-flow: column nowrap;
        row-gap: 12px;
        position: sticky;
        top: 70px;
        background-color: white;

        .workspace__image {
            width: var(--container-width-768);
            height: 273px;
        }

        .workspace__image::after {
            width: var(--container-width-768);
            height: 273px;
        }

        .workspace__image > h1 {
            margin: 24px;
            font-size: 30px;
            line-height: 40px;
        }

        .workspace__features {
            align-items: center;
            row-gap: 12px;
        }

        .workspace__feature {
            width: 539px;
            border-radius: 8px;
        }

        &:nth-child(2) {
            flex-flow: column-reverse nowrap;
        }
    }

    .new-prices {
        width: var(--container-width-768);

        .new-price__headline {
            font-size: 20px;
            line-height: 28px;
        }

        .new-price__headline span.decorative {
            font-size: 22px;
        }

        .new-prices__bubble {
            width: var(--container-width-768);
            background-size: contain;
            background-repeat: no-repeat;
            top: 50px;
            right: 0;
        }
    }

    .new-prices__wrapper {
        display: flex;
        flex-flow: row wrap;
        justify-content: space-between;
    }

    .new-price {
        width: 280px;
        flex-flow: column;
        height: 800px;
        top: 64px;

        img:not(.mobile) {
            display: none;
        }

        img.mobile {
            display: block;
        }
    }

    .new-price__content {
        min-height: 666px;
        flex-flow: column;
        background: url("../../img/town/price-border-mobile.svg");
        background-size: cover;
        width: 280px;

        &::after {
            content: '';
            width: 280px;
            height: 25px;
            min-height: 25px;
            background: url(../../img/town/price-border-mobile-2.svg) no-repeat white;
            background-position: 0 bottom;
            background-size: cover;
        }
    }

    .new-price__image > .new-price__title {
        border: 1px solid var(--feature-color);
        border-right: none;
        top: 150px;
        width: calc(100% - 20px);
    }

    .new-price__image .new-price__title--heading {
        font-size: 18px;
        line-height: 25px;
    }

    .new-price__image > img {
        height: 205px;
        width: calc(100% - 2px);
        object-fit: cover;
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
        border-bottom-left-radius: 0;
        margin-right: 1px;
    }

    .new-price__description {
        width: 280px;
        height: 435px;
        padding: 40px 10px 0;
    }

    .new-price__description--lines {
        width: 100%;
        max-height: calc(100% - 42px);
        row-gap: 8px;
        justify-content: flex-start;
    }

    .new-price__description--lines.two {
        .new-price__description--price {
            margin-left: -126px;
        }
    }

    .new-price__description--line {
        font-size: 12px;
        line-height: 16px;
    }

    .new-price__description--price {
        align-self: center;
        font-size: 14px;
        line-height: 20px;
    }

    .new-price__action {
        transform-origin: 0 0;
        min-width: 280px;
        background-size: contain !important;
        background-repeat: no-repeat !important;

        &:hover {
            transform: rotate(3deg);
        }
    }

    .new-price__action.tour {
        background: url("../../img/town/take-tour-mobile.svg");
    }

    .new-price__action.book-cr {
        background: url("../../img/town/book-cr-mobile.svg");
    }

    .become-resident {
        width: var(--container-width-768);

        & > div.section__headline {
            width: var(--container-width-768);
            margin-left: 0;
            font-size: 20px;
            line-height: 28px;
            margin-bottom: 20px;
            text-align: center;
        }
    }

    .contact-map {
        justify-content: space-between;
    }

    div#yandex-map > iframe {
        width: var(--container-width-576);
    }
}

@media (max-width: 576px) {
    .description__headline {
        & > h1 {
            width: 100%;
        }

        & > div.headline__scroll.kazan,
        & > div.headline__scroll.izhevsk,
        & > div.headline__scroll.samara {
            margin-top: unset;
            width: 190px;
            align-self: start;
            right: 0;
        }
    }

    .description__illustration {
        background-position: center;
    }

    main.page-main {
        margin-top: 80px;
    }

    .workspaces {
        .section__headline {
            width: var(--container-width-576);
        }
    }

    .workspace {
        flex-flow: column nowrap;
        row-gap: 12px;

        .workspace__image {
            width: var(--container-width-576);
            height: 212px;
        }

        .workspace__image::after {
            width: var(--container-width-576);
            height: 212px;
        }

        .workspace__image > h1 {
            margin: 24px;
            font-size: 24px;
            line-height: 31px;
        }

        .workspace__feature {
            width: var(--container-width-576);
            border-radius: 8px;
        }

        .workspace__feature.left {
            gap: 8px;
        }

        .workspace__feature > p {
            font-size: 14px;
            line-height: 20px;
        }

        &:nth-child(2) {
            flex-flow: column-reverse nowrap;
        }
    }

    .office-features {
        max-height: 494px;
    }

    .office-feature {
        width: 100%;
    }

    .offices {
        flex-flow: column;
        align-items: center;
        row-gap: 26px;
    }

    .new-prices {
        width: var(--container-width-576);

        .new-prices__heading {
            margin-bottom: 160px;
        }

        .new-prices__bubble {
            width: var(--container-width-576);
            top: 50px;
            left: 0;
        }

        .new-price__headline.seats {
            flex-flow: column nowrap;
        }

        .new-price__headline--seats {
            margin: 0 auto;
        }

        .new-price__headline--seats label {
            width: 85px;
            height: 40px;
            font-size: 14px;
            line-height: 20px;
        }
    }

    .new-price {
        width: var(--container-width-576);
    }

    .new-price__content {
        width: var(--container-width-576);

        &::after {
            width: calc(var(--container-width-576));
        }
    }

    .new-price__image {
        .new-price__title--heading {
            font-size: 16px;
            line-height: 22px;
        }

        .new-price__title > .new-price__title--description {
            font-size: 12px;
            line-height: 17px;
        }
    }

    .new-price__image > img {
        width: calc(var(--container-width-576) - 2px);
        border-top-left-radius: 23px;
        border-top-right-radius: 23px;
    }

    .new-price__description {
        width: var(--container-width-576);
        padding: 60px 20px 0;
    }

    .new-price__description--line {
        > svg {
            margin-top: 0;
        }
    }

    .new-price__description--lines.two {
        flex-wrap: nowrap;
        justify-content: flex-start;
        row-gap: 8px;

        & .new-price__description--line {
            width: 100%;
        }
    }

    .new-price__action {
        min-width: calc(var(--container-width-576));
    }

    .become-resident {
        width: var(--container-width-576);

        & > div.section__headline {
            width: var(--container-width-576);
        }
    }

    div.contact-map {
        flex-flow: column;
    }

    div#yandex-map > iframe {
        height: 300px;
    }
    div#yandex-map-ekt > iframe {
        width: var(--container-width-576);
    }

    .ecosystem__heading {
        width: var(--container-width-576);
        padding: 0 60px;
        margin: 40px auto;

        & > h2 {
            text-align: center;
        }

        & > h2:nth-child(2) {
            margin-left: 0;
        }
    }

    section.resident-pass {
        margin-top: 60px;
    }
}
