/*
 * Bulvar Mall — блоки страниц в новом стиле. Подключается после brand.css и header.css.
 * Вместо звёздочек и круглых паттернов VEFA: косая черта «\» у заголовков, плоскости со срезом 22,5°,
 * номера «01 \» как в брендбуке. Размеры спокойнее прежних, но не мелкие:
 * заголовок секции 48 px (было 82), страницы 64 px, отступы секций 80 px (было 100–150).
 */

/* ---------- шкала ---------- */
:root {
    --section-y: 80px;
    --h1: 64px;
    --h2: 48px;
    --lead: 18px;
    --band-pattern: url("/assets/img/brand/band-right.svg?v=1");
    --band-pattern-left: url("/assets/img/brand/band-left.svg?v=1");
    --planes-light: url("/assets/img/brand/planes-light.svg?v=1");
}

h1.page-title.page-title {
    font-size: var(--h1);
}

h2.page-title.page-title,
.events-animated__title.events-animated__title {
    font-size: var(--h2);
    font-weight: 700;
}

/* фирменные «полосы» — три косые черты зелёный / голубой / оранжевый */
.bm-slashes {
    display: inline-flex;
    gap: 9px;
    height: 36px;
    padding-left: 8px;
}

.bm-slashes i {
    width: 9px;
    height: 100%;
    transform: skewX(22.5deg);
}

.bm-slashes i:nth-child(1) { background: var(--brand-green); }
.bm-slashes i:nth-child(2) { background: var(--brand-blue); }
.bm-slashes i:nth-child(3) { background: var(--brand-orange); }

/* номер «01 \» вместо иконок и звёздочек */
.advantages__num {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: var(--brand-graphite);
}

.advantages__num::after {
    content: "";
    width: 24px;
    height: 3px;
    background: var(--num-c, var(--brand-purple));
}

.advantages__card:nth-child(4n+1),
.features-advantages__item:nth-child(4n+1) { --num-c: var(--brand-green); }
.advantages__card:nth-child(4n+2),
.features-advantages__item:nth-child(4n+2) { --num-c: var(--brand-blue); }
.advantages__card:nth-child(4n+3),
.features-advantages__item:nth-child(4n+3) { --num-c: var(--brand-orange); }
.advantages__card:nth-child(4n+4),
.features-advantages__item:nth-child(4n+4) { --num-c: var(--brand-purple); }

/* ================= Главная ================= */

/* новости на баннере: только картинка и заголовок; один блок поверх слайдера — при смене слайда стоит на месте */
.main-banner-swiper > .news {
    --news-gap: 10px;
    --card-height: 76px;

    position: absolute;
    right: 44px;
    bottom: 64px;
    z-index: 5;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    width: 320px;
}

.news-card {
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.news-card img {
    flex: none;
    width: 84px;
    height: 60px;
}

.news-card .news-card__right {
    justify-content: center;
}

.news-card__title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--brand-graphite);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s;
}

.news-card:hover .news-card__title {
    color: var(--brand-purple);
}

.news-mobile .news-card img {
    width: 96px;
    height: 72px;
}

/* логотипы: по умолчанию монохромные, цвет — при наведении; лента на наведении замирает */
.logos img {
    filter: grayscale(1);
    opacity: 0.6;
    transition: filter 0.35s, opacity 0.35s;
}

.logos img:hover {
    filter: none;
    opacity: 1;
}

.organizations:hover .logos {
    animation-play-state: paused;
}

/* акции магазинов */
.promotions {
    margin-top: var(--section-y);
    gap: 36px;
}

.promotions__content {
    min-height: 580px;
}

.promotions__card {
    width: 340px;
}

.promotions__card:hover {
    width: 420px;
}

.promotions__card .poster {
    height: 420px;
}

.promotions__card:hover img {
    height: 500px;
}

.promotions__card h4 {
    font-size: 20px;
    text-transform: none;
}

.promotions__card p {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--brand-purple-dark);
    background: var(--brand-purple-light);
    clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 100%, 9px 100%);
}

/* акции ТЦ: вместо картонной текстуры — светлая секция с белыми плоскостями */
.promotions-shop {
    background: var(--planes-light) right top / auto 360px no-repeat, var(--template-page-bg);
}

.promotions-shop__content {
    padding: var(--section-y) 44px !important;
}

.promotions-shop__cards {
    margin-top: 32px;
    gap: 24px;
}

.promotions-shop__right {
    gap: 24px;
}

.promotions-shop__right .promotions-shop__card {
    min-height: 300px;
}

/* картинка и затемнение — внутри карточки (isolation), иначе фон секции их перекрывает */
.promotions-shop__card {
    isolation: isolate;
    padding: 0 28px 28px;
    background: var(--brand-graphite);
}

.promotions-shop__card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(53, 54, 58, 0) 35%, rgba(53, 54, 58, 0.8) 100%);
}

.promotions-shop__card .card-title {
    font-size: 22px;
}

.promotions-shop__card .card-desc {
    font-size: 16px;
    font-weight: 500;
}

.promotions-shop__info-card {
    max-width: none;
    padding: 32px 36px;
    font-size: 18px;
    line-height: 1.5;
    background: var(--band-pattern) right center / auto 100% no-repeat, var(--brand-purple);
}

.promotions-shop__info-card p {
    max-width: 600px;
    margin-top: 20px;
}

/* мероприятия */
.events-animated {
    gap: 32px;
    padding-bottom: var(--section-y);
}

.events-animated__top {
    padding-top: var(--section-y);
}

.events-slide__info .title {
    font-size: 28px;
    line-height: 1.15;
}

.events-slide__info .date {
    font-size: 18px;
}

.events-slide__left .desc {
    font-size: var(--lead);
}

/* «Подпишитесь»: фиолетовая полоса с фирменными плоскостями вместо звёздочек */
/* полосы прижаты к краям, под заголовком — чистая зона (с запасом под длинные слова на других языках) */
.subscribe {
    background: url("/assets/img/brand/band-dark-right.svg?v=1") right center / auto 100% no-repeat,
        url("/assets/img/brand/band-dark-left.svg?v=2") left center / auto 100% no-repeat,
        #1F2023;
}

@media screen and (max-width: 1200px) {
    /* на узких экранах края ближе к заголовку — паттерн опущен вниз и начинается ниже него */
    .subscribe {
        background: url("/assets/img/brand/band-dark-right.svg?v=1") right bottom / auto 78% no-repeat,
            url("/assets/img/brand/band-dark-left.svg?v=2") left bottom / auto 78% no-repeat,
            #1F2023;
    }
}

@media screen and (max-width: 768px) {
    /* на телефоне заголовок занимает почти всю ширину — оставляем только левые полосы внизу, под карточками */
    .subscribe {
        background: url("/assets/img/brand/band-dark-left.svg?v=2") left bottom / auto 55% no-repeat, #1F2023;
    }
}

.subscribe__content {
    padding: 32px 0 48px; /* сверху — столько же, сколько от заголовка до карточек */
    gap: 32px;
}

.subscribe .page-title {
    gap: 0.3em;
}

.subscribe-card__img {
    height: 320px;
}

/* превью поста: ссылка на пост, при наведении — лёгкое приближение, затемнение и кнопка play */
.subscribe-card__media {
    position: relative;
    display: block;
    overflow: hidden;
}

.subscribe-card__media img {
    transition: scale 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.subscribe-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(53, 54, 58, 0.35);
    opacity: 0;
    transition: opacity 0.3s;
}

.subscribe-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
    opacity: 0;
    scale: 0.8;
    transition: opacity 0.3s, scale 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* треугольник play */
.subscribe-card__play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -20px 0 0 -12px;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 32px solid #FFFFFF;
}

.subscribe-card__media:hover img,
.subscribe-card__media:focus-visible img {
    scale: 1.05;
}

.subscribe-card__media:hover::after,
.subscribe-card__media:focus-visible::after {
    opacity: 1;
}

.subscribe-card__media:hover .subscribe-card__play,
.subscribe-card__media:focus-visible .subscribe-card__play {
    opacity: 1;
    scale: 1;
}

/* на телефонах наведения нет — кнопку play показываем сразу */
@media (hover: none) {
    .subscribe-card__play {
        opacity: 0.92;
        scale: 0.85;
    }
}

/* ================= «О нас» ================= */
.about__content .desc,
.achievements .desc,
.advantages .desc,
.offices-header__content .left .desc {
    font-size: var(--lead);
}

.about__content__info .info-card {
    padding: 24px 28px;
    gap: 6px;
}

.about__content__info .info-card .info-card__title {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-size: 30px;
    font-weight: 700;
}

.about__content__info .info-card .info-card__subtitle {
    font-size: 16px;
}

/* достижения: крупные светлые цифры с косой чертой, разделители под 22,5° */
.achievements {
    padding: var(--section-y) 44px;
}

.achievements__content {
    height: auto;
    padding: 40px 32px;
}

.achievements__item h4 {
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
    font-size: 48px;
    font-weight: 300;
}

.achievements__content .divider {
    transform: skewX(-22.5deg);
}

@media screen and (min-width: 769px) {
    .achievements__content .divider {
        height: 72px;
    }
}

/* преимущества: номер «01 \» вместо иконки */
.advantages {
    padding: var(--section-y) 44px;
}

.advantages__content {
    gap: 24px;
}

.advantages__card {
    padding: 28px;
}

.advantages__card .icon {
    width: auto;
    height: auto;
    justify-content: flex-start;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

.advantages__card .info h4 {
    font-size: 20px;
}

.advantages__card .info p {
    font-size: 16px;
}

/* фиолетовый блок контактов (О нас, Офисы) */
.contacts {
    padding: var(--section-y) 0;
    background: var(--band-pattern-left) left bottom / auto 100% no-repeat, var(--brand-purple);
}

.contacts__content {
    gap: 64px;
}

.contacts .desc {
    margin-top: 16px;
    font-size: var(--lead);
}

.contacts .contacts__list {
    margin-top: 32px;
    gap: 16px;
}

.contacts .contacts__list li span {
    width: 36px;
    height: 36px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
}

.contacts .map {
    height: 420px;
}

/* ================= «Офисы» ================= */
.features {
    margin-top: 0;
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.features-advantages {
    margin-top: 28px;
    padding: 40px 44px;
    background: var(--template-page-bg);
}

.features-advantages .title {
    font-size: 32px;
    font-weight: 600;
}

.features-advantages__items {
    margin-top: 28px;
    gap: 48px;
}

.features-advantages__item {
    gap: 16px;
}

.features-advantages__item p {
    font-size: var(--lead);
}

.features__content__title {
    font-size: 32px;
}

.features__content__desc {
    font-size: var(--lead);
}

/* ================= «Контакты» и «Аренда» ================= */
.contacts-page,
.tenants-page {
    padding: var(--section-y) 0;
    background: var(--band-pattern) right bottom / auto 100% no-repeat, var(--brand-purple);
}

.contacts-page__left .page-title,
.tenants-page__content .page-title {
    color: #FFFFFF;
}

.contacts-page__left .desc,
.tenants-page__content .desc {
    font-size: var(--lead);
}

.contacts-page .form,
.tenants-page .form {
    padding: 28px;
    border-radius: var(--radius);
}

.contacts-page .form__field,
.tenants-page .form__field {
    height: 52px;
    font-size: 16px;
    background: var(--template-page-bg);
}

.contacts-page textarea.form__field,
.tenants-page textarea.form__field {
    height: 120px;
}

/* ================= каталоги, услуги, общее ================= */
.template-page {
    padding-top: 48px;
}

.filters__btn {
    font-size: 16px;
}

.floor__title {
    font-size: 28px;
}

.flip-card {
    --info-title-size: 28px;
    --info-text-size: 16px;

    height: 440px;
}

.services__card {
    --title-size: 20px;
    --desc-size: 16px;

    padding: 24px;
}

.footer {
    --col-title-size: 16px !important;
    --col-content-size: 22px !important;
    --text-size: 16px !important;
    --nav-link-size: 16px !important;
}

/* ---------- карточки каталога: «разрез» вместо переворота (js/card-cut.js) ---------- */
.cut-piece--b {
    display: none; /* копия нужна только для эффекта на широких экранах с мышью */
}

@media (hover: hover) and (min-width: 769px) {
    /* половинки уходят за край карточки, не заезжая на соседние */
    .cut-card {
        overflow: hidden;
        border-radius: var(--radius);
    }

    .cut-card .flip-card--inner,
    .cut-card:hover .flip-card--inner {
        transform: none;
        transition: none;
    }

    /* оборот всегда лежит под лицевой стороной */
    .cut-card .flip-card--back {
        z-index: 1;
        transform: none;
    }

    .cut-card .cut-piece {
        z-index: 2;
        transition: none;
        will-change: transform, opacity;
    }

    /* в покое карточка целая: копия и обрезка включаются только на время разреза (класс is-cut),
       иначе на тёмных логотипах виден тонкий шов по линии среза */
    .cut-card.is-cut .cut-piece--b {
        display: block;
    }

    /* линия разреза «» под 22,5°: сверху 21,5 %, снизу 78,5 % ширины;
       левая половинка заходит под правую на 2 px — без просвета по шву */
    .cut-card.is-cut .cut-piece--a {
        clip-path: polygon(0 0, calc(21.5% + 2px) 0, calc(78.5% + 2px) 100%, 0 100%);
    }

    .cut-card.is-cut .cut-piece--b {
        clip-path: polygon(21.5% 0, 100% 0, 100% 100%, 78.5% 100%);
    }

    /* сами половинки двигает js/card-cut.js (Web Animations), здесь — только появление текста оборота */
    .cut-card.is-cut .flip-card--back > * {
        animation: bm-rise 0.45s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }
}

/* ---------- адаптив ---------- */
@media screen and (max-width: 1280px) {
    :root {
        --section-y: 64px;
        --h1: 52px;
        --h2: 40px;
    }

    .flip-card {
        height: 400px;
    }

    .footer {
        --col-content-size: 18px !important;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --section-y: 48px;
        --h1: 40px;
        --h2: 32px;
        --lead: 16px;
    }

    .template-page {
        padding-top: 32px;
    }

    .promotions__card,
    .promotions__card:hover {
        width: 280px;
    }

    .promotions__card .poster,
    .promotions__card:hover img {
        height: 360px;
    }

    .promotions__content {
        min-height: 0;
    }

    .promotions-shop {
        background: var(--template-page-bg);
    }

    .promotions-shop__content {
        padding: var(--section-y) 16px !important;
    }

    .promotions-shop__info-card {
        padding: 24px;
        font-size: 16px;
    }

    .achievements,
    .advantages {
        padding: var(--section-y) 16px;
    }

    .achievements__item h4 {
        font-size: 36px;
    }

    .advantages__card {
        padding: 22px;
    }

    .features-advantages {
        padding: 28px 22px;
    }

    .features-advantages .title,
    .features__content__title {
        font-size: 24px;
    }

    .features-advantages__items {
        gap: 24px;
    }

    .contacts .map {
        height: 320px;
    }

    .subscribe-card__img {
        height: 300px;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --h1: 34px;
        --h2: 28px;
    }
}
