/*
 * Страница «Интерактивный каталог» (start/catalog) — встройка каталога Plan7 на сайт.
 * Макет: Figma «Новые страницы сайта», страница «Встройка на сайт» (1440 / 768 / 390).
 * Все классы с префиксом p7c-, общие классы /start (wrappc, section_title, faq_*, suitable_modal_*) не переопределяются
 * глобально: только внутри .p7c-page.
 */

.p7c-page {
    --p7c-dark: #3D392A;
    --p7c-gray: #A5A5A5;
    --p7c-bg: #F6F6F6;
    --p7c-border: #E5E5E5;
    --p7c-yellow: #FECC17;
    color: var(--p7c-dark);
    font-family: 'Montserrat', sans-serif;
    display: block;
    overflow: hidden;
}

.p7c-page *,
.p7c-page *::before,
.p7c-page *::after {
    box-sizing: border-box;
}

/* ---------- Общее: секции и заголовки ---------- */
.p7c-section {
    margin-top: 80px;
}

.p7c-page .p7c-title {
    font-size: 38px;
    line-height: 46px;
    font-weight: 800;
    margin: 0 0 41px;
    display: block;
}

.p7c-page .p7c-title--tight {
    margin-bottom: 21px;
}

.p7c-page .p7c-title-decor {
    left: 2px;
    top: 0;
    margin-top: 30px;
}

/* ---------- Кнопки ---------- */
.p7c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: var(--p7c-yellow);
    color: var(--p7c-dark);
    font: 600 14px/17px 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background-color .2s ease;
    white-space: nowrap;
}

.p7c-btn:hover {
    background: #FFD333;
}

.p7c-link {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--p7c-gray);
    font: 600 14px/17px 'Montserrat', sans-serif;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.p7c-link:hover {
    color: var(--p7c-dark);
}

/* ---------- Герой ---------- */
.p7c-hero {
    /* шапка /start/* фиксированная: 113px на десктопе, 54px до 1200px */
    margin-top: 116px;
}

.p7c-hero-box {
    position: relative;
    height: 380px;
    border-radius: 16px;
    background: var(--p7c-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.p7c-hero-content {
    position: relative;
    z-index: 1;
    padding: 0 60px;
    margin-top: 20px;
}

.p7c-hero-title {
    margin: 0;
    font-size: 38px;
    line-height: 46px;
    font-weight: 800;
    color: var(--p7c-dark);
}

.p7c-hero-subtitle {
    margin: 8px 0 0;
    font-size: 18px;
    line-height: 22px;
    font-weight: 600;
    color: var(--p7c-gray);
}

.p7c-hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.p7c-hero-img {
    position: absolute;
    right: 0;
    top: 0;
    width: 578px;
    height: 380px;
    overflow: hidden;
}

.p7c-hero-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
}

/* Жёлтая полоса на башне (Vector 234 в макете), координаты в долях картинки 578×380 */
.p7c-hero-accent {
    position: absolute;
    left: 58.31%;
    top: 26.05%;
    width: 34.78%;
    height: auto;
    mix-blend-mode: hard-light;
    pointer-events: none;
}

/* ---------- Возможности вашего каталога ---------- */
.p7c-features {
    margin-top: 68px;
}

.p7c-feat-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p7c-feat-row {
    display: grid;
    gap: 12px;
}

.p7c-feat-row--1 { grid-template-columns: 520fr 340fr 340fr; }
.p7c-feat-row--2 { grid-template-columns: 340fr 520fr 340fr; }
.p7c-feat-row--3 { grid-template-columns: 340fr 340fr 520fr; }

.p7c-feat {
    position: relative;
    display: block;
    height: 258px;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 1px solid var(--p7c-border);
    border-radius: 16px;
    background: var(--p7c-bg);
    overflow: hidden;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.p7c-feat:hover,
.p7c-feat:focus-visible {
    border-color: var(--p7c-yellow);
    box-shadow: 0 6px 24px rgba(61, 57, 42, .08);
    outline: none;
}

.p7c-feat-media {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.p7c-feat-img {
    position: absolute;
    display: block;
    max-width: none;
    height: auto;
}

.p7c-feat-fade {
    position: absolute;
    left: 0;
    right: 0;
    top: 143px;
    height: 115px;
    background: linear-gradient(180deg, rgba(246, 246, 246, 0) 0%, #F6F6F6 33.5%);
    pointer-events: none;
}

.p7c-feat--sync .p7c-feat-fade {
    top: 102px;
    height: 156px;
}

.p7c-feat-body {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p7c-feat-title {
    display: block;
    font-size: 20px;
    line-height: 24px;
    font-weight: 800;
    color: var(--p7c-dark);
}

.p7c-feat-text {
    display: block;
    font-size: 14px;
    line-height: 17px;
    font-weight: 500;
    color: var(--p7c-gray);
    max-width: 480px;
}

/* Многоформатное отображение: текст сверху, справа планшет и карточка */
.p7c-feat--formats .p7c-feat-body {
    top: 20px;
    bottom: auto;
    right: auto;
    width: 350px;
}
.p7c-feat--formats .p7c-feat-title { max-width: 300px; }
.p7c-feat-img--ipad { left: 240px; top: 134px; width: 304px; }
.p7c-feat-img--card { left: 380px; top: 8px; width: 136px; }

.p7c-feat-img--genplan { left: 0; top: 0; width: 100%; height: 149px; object-fit: cover; }
.p7c-feat-img--filters { left: 63px; top: 27px; width: 336px; }
.p7c-feat-img--promo { left: 25px; top: 32px; width: 291px; }
.p7c-feat-img--analytics { left: 18px; top: 27px; width: 305px; }
.p7c-feat-img--plan { left: 11px; top: 19px; width: 214px; }
.p7c-feat-img--plancard { left: 194px; top: -123px; width: 122px; }
.p7c-feat-img--mortgage { left: 11px; top: 48px; width: 319px; }
.p7c-feat-img--chess { left: 275px; top: 16px; width: 400px; }
.p7c-feat-img--engage { left: 101px; top: 61px; width: 317px; }

/* Кастомизация статусов: легенда */
.p7c-statuses {
    position: absolute;
    left: 35px;
    top: 26px;
    display: grid;
    grid-template-columns: 64px 64px;
    column-gap: 40px;
    row-gap: 28px;
}

.p7c-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 15px;
    font-weight: 600;
    color: var(--p7c-gray);
}

.p7c-status::before {
    content: "";
    width: 32px;
    height: 20px;
    border-radius: 4px;
    background: var(--c);
}

/* Вовлечение клиентов: мягкие фигуры на фоне */
.p7c-blob {
    position: absolute;
    width: 130px;
    height: 130px;
    background: url(../img/blob.svg) center / 107px 94px no-repeat;
    opacity: .78;
}
.p7c-blob--1 { left: -39px; top: -26px; }
.p7c-blob--2 { left: 90px; top: 115px; }
.p7c-blob--3 { left: 430px; top: 91px; }
.p7c-blob--4 { left: 239px; top: 213px; }
.p7c-blob--5 { left: 234px; top: -69px; }

/* ---------- Типы недвижимости ---------- */
.p7c-types {
    margin-top: 68px;
}

.p7c-types-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.p7c-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    color: var(--p7c-dark);
    text-decoration: none;
}

.p7c-type-img {
    width: 197px;
    height: 197px;
    max-width: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}

a.p7c-type:hover .p7c-type-img {
    transform: translateY(-4px);
}

.p7c-type-label {
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
}

/* ---------- Карточка вашего помещения ---------- */
.p7c-tags {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.p7c-tag {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 15px;
    border: 1px solid var(--p7c-bg);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    line-height: 17px;
    font-weight: 600;
    color: var(--p7c-dark);
    white-space: nowrap;
    margin: 0;
}

.p7c-tag--active {
    border-color: var(--p7c-yellow);
}

.p7c-card-preview {
    display: block;
    padding: 15px;
    border: 1px solid var(--p7c-border);
    border-radius: 16px;
    background: var(--p7c-bg);
}

.p7c-card-preview img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    background: #fff;
}

/* ---------- Установка на ваш сайт ---------- */
.p7c-install-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.p7c-install-card {
    position: relative;
    height: 300px;
    border: 1px solid var(--p7c-border);
    border-radius: 16px;
    background: var(--p7c-bg);
    overflow: hidden;
}

.p7c-install-body {
    position: relative;
    z-index: 1;
    padding: 19px 19px 0;
}

.p7c-page .p7c-install-title {
    margin: 0;
    font-size: 20px;
    line-height: 24px;
    font-weight: 800;
    color: var(--p7c-dark);
}

.p7c-install-text {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 17px;
    font-weight: 500;
    color: var(--p7c-gray);
}

.p7c-install-img {
    position: absolute;
    top: 90px;
    left: 50%;
    width: 293px;
    height: auto;
    transform: translateX(-50%);
}

.p7c-install-card--widget .p7c-install-img {
    width: 250px;
}

/* ---------- Преимущества ---------- */
.p7c-adv-grid {
    display: grid;
    grid-template-columns: 508fr 656fr;
    column-gap: 60px;
    align-items: start;
}

.p7c-adv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.p7c-adv-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 49px;
    margin: 0;
}

.p7c-adv-title {
    font-size: 20px;
    line-height: 24px;
    font-weight: 800;
}

.p7c-adv-text {
    font-size: 14px;
    line-height: 17px;
    font-weight: 500;
    color: var(--p7c-gray);
}

.p7c-adv-media {
    border: 1px solid var(--p7c-border);
    border-radius: 16px;
    background: var(--p7c-bg);
    overflow: hidden;
    aspect-ratio: 656 / 434;
}

.p7c-adv-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Дополнительный функционал ---------- */
.p7c-extra {
    margin-top: 80px;
    padding: 40px 0;
    background: #FAFAFA;
}

.p7c-extra-grid {
    display: grid;
    grid-template-columns: 774fr 410fr;
    column-gap: 40px;
    align-items: center;
}

.p7c-extra-list {
    list-style: none;
    margin: 0;
    padding: 16px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 24px;
}

.p7c-extra-item {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 96px;
    margin: 0;
    padding: 24px 16px 14px;
    border: 1px solid var(--p7c-border);
    border-radius: 16px;
    background: #fff;
}

.p7c-extra-item--wide {
    grid-column: 1 / -1;
}

.p7c-extra-num {
    position: absolute;
    left: 16px;
    top: -16px;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 20px;
    background: var(--p7c-yellow);
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
}

.p7c-extra-text {
    font-size: 18px;
    line-height: 22px;
    font-weight: 800;
}

.p7c-extra-img {
    display: block;
    width: 100%;
    max-width: 410px;
    height: auto;
    justify-self: end;
}

/* ---------- FAQ (общие классы, отступ как в макете) ---------- */
.p7c-page .p7c-faq {
    margin-top: 80px;
}

/* ===================== Планшет ===================== */
@media (max-width: 1199px) {
    .p7c-section,
    .p7c-types,
    .p7c-features,
    .p7c-extra,
    .p7c-page .p7c-faq {
        margin-top: 64px;
    }

    .p7c-page .p7c-title {
        font-size: 30px;
        line-height: 37px;
        margin-bottom: 30px;
    }

    .p7c-page .p7c-title-decor {
        margin-top: 22px;
    }

    .p7c-hero {
        margin-top: 74px;
    }

    .p7c-hero-box {
        height: 300px;
    }

    .p7c-hero-content {
        padding: 0 20px;
        margin-top: 0;
    }

    .p7c-hero-title {
        font-size: 30px;
        line-height: 37px;
    }

    .p7c-hero-img {
        width: 456px;
        height: 300px;
        right: -40px;
    }

    .p7c-feat-row,
    .p7c-feat-row--1,
    .p7c-feat-row--2,
    .p7c-feat-row--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .p7c-feat-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .p7c-feat-row {
        display: contents;
    }

    .p7c-feat--engage {
        grid-column: 1 / -1;
    }

    .p7c-feat--formats .p7c-feat-body { width: 215px; left: 12px; top: 12px; }
    .p7c-feat-img--ipad { left: 70px; top: 134px; }
    .p7c-feat-img--card { left: 210px; top: 8px; }
    .p7c-feat-img--chess { left: 212px; }
    .p7c-feat-img--engage { left: 50%; transform: translateX(-50%); }
    .p7c-blob--3 { left: auto; right: -40px; }

    .p7c-types-list {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        margin: 0 -16px;
        padding: 0 16px 8px;
        scrollbar-width: none;
    }

    .p7c-types-list::-webkit-scrollbar {
        display: none;
    }

    .p7c-type {
        flex: 0 0 180px;
    }

    .p7c-type-img {
        width: 180px;
        height: 180px;
    }

    .p7c-tags {
        margin-bottom: 30px;
    }

    .p7c-tag {
        height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }

    .p7c-install-list {
        grid-template-columns: 1fr;
    }

    .p7c-install-card {
        height: 170px;
        display: flex;
        align-items: center;
    }

    .p7c-install-body {
        padding: 0 220px 0 19px;
        max-width: 560px;
    }

    .p7c-install-img {
        top: 10px;
        left: auto;
        right: 20px;
        width: 180px;
        transform: none;
    }

    .p7c-install-card--widget .p7c-install-img {
        width: 160px;
    }

    .p7c-adv-grid {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }

    .p7c-adv-media {
        order: -1;
    }

    .p7c-extra {
        padding: 40px 0;
    }

    .p7c-extra-grid {
        grid-template-columns: 1fr;
        row-gap: 24px;
    }

    .p7c-extra-img {
        order: 2;
        justify-self: center;
    }
}

/* ===================== Мобильный ===================== */
@media (max-width: 767px) {
    .p7c-section,
    .p7c-types,
    .p7c-features,
    .p7c-extra,
    .p7c-page .p7c-faq {
        margin-top: 56px;
    }

    .p7c-page .p7c-title {
        font-size: 22px;
        line-height: 27px;
        margin-bottom: 20px;
    }

    .p7c-page .p7c-title-decor {
        margin-top: 14px;
        width: 80px;
    }

    .p7c-hero {
        margin-top: 66px;
    }

    .p7c-hero-box {
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding-top: 20px;
    }

    .p7c-hero-content {
        padding: 0 16px;
    }

    .p7c-hero-title {
        font-size: 22px;
        line-height: 27px;
    }

    .p7c-hero-subtitle {
        font-size: 14px;
        line-height: 17px;
    }

    .p7c-hero-actions {
        margin-top: 16px;
    }

    .p7c-hero-img {
        position: relative;
        right: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 578 / 380;
        margin-top: 12px;
    }

    .p7c-feat-grid {
        grid-template-columns: 1fr;
    }

    .p7c-feat--engage {
        grid-column: auto;
    }

    .p7c-feat-title {
        font-size: 18px;
        line-height: 22px;
    }

    .p7c-feat-text {
        font-size: 13px;
        line-height: 16px;
    }

    .p7c-feat--formats .p7c-feat-body {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto;
    }

    .p7c-feat--formats { height: 238px; }
    .p7c-feat--genplan { height: 216px; }
    .p7c-feat-img--ipad { left: 100px; top: -2px; width: 280px; }
    .p7c-feat-img--card { left: 30px; top: 0; width: 100px; }
    .p7c-feat--formats .p7c-feat-media::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 110px;
        bottom: 0;
        background: linear-gradient(180deg, rgba(246, 246, 246, 0) 0%, #F6F6F6 40%);
    }
    .p7c-feat-img--chess { left: 212px; }
    .p7c-statuses { left: 20px; column-gap: 24px; }
    .p7c-feat-img--engage { width: 260px; top: 50px; }

    .p7c-type {
        flex-basis: 134px;
    }

    .p7c-type-img {
        width: 134px;
        height: 134px;
    }

    .p7c-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -16px 20px;
        padding: 0 16px 4px;
        scrollbar-width: none;
    }

    .p7c-tags::-webkit-scrollbar {
        display: none;
    }

    .p7c-tag {
        flex: 0 0 auto;
    }

    .p7c-card-preview {
        padding: 8px;
    }

    .p7c-card-preview img {
        border-radius: 10px;
    }

    .p7c-install-card {
        height: 180px;
        align-items: flex-start;
    }

    .p7c-install-body {
        padding: 19px 120px 0 19px;
    }

    .p7c-page .p7c-install-title {
        font-size: 18px;
        line-height: 22px;
    }

    .p7c-install-img {
        top: auto;
        bottom: -20px;
        right: -20px;
        width: 150px;
    }

    .p7c-install-card--widget .p7c-install-img {
        width: 130px;
        right: -6px;
    }

    .p7c-adv-grid {
        row-gap: 20px;
    }

    .p7c-adv-list {
        gap: 20px;
    }

    .p7c-adv-title {
        font-size: 18px;
        line-height: 22px;
    }

    .p7c-adv-media {
        border-radius: 9px;
    }

    .p7c-extra {
        padding: 32px 0;
    }

    .p7c-extra-list {
        grid-template-columns: 1fr;
    }

    .p7c-extra-img {
        order: -1;
        max-width: 300px;
    }

    .p7c-extra-text {
        font-size: 16px;
        line-height: 20px;
    }
}
