/* inv-s.ru, 2026-09-30. Section headings and apartment detail layout. */

/* Match the section headings used on the company pages. The selectors are
   scoped to the home page so shared partials keep their own page styling. */
body.page-home .projects-title,
body.page-home .housing-title,
body.page-home .construction-promo__title,
body.page-home .home-company__title,
body.page-home .hm-title,
body.page-home .partners-grid-title,
body.page-home .partners-title,
body.page-home .home-news-rail__heading h2,
body.page-home .quick-apartment-picker__head h2,
body.page-home .feat2-title,
body.page-home .places-title,
body.page-home .cta-section__title {
    color: #1d3d6e;
    font-family: inherit;
    font-size: clamp(30px, 4vw, 44px);
    font-style: normal;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    text-transform: none;
    overflow-wrap: break-word;
}

/* The details card uses the page scrollbar, with no nested scroll area. */
.catalog-unit-v2__layout > .catalog-unit-v2__sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
}

.catalog-unit-v2__layout > .catalog-unit-v2__visual {
    height: auto;
    align-self: start;
}

.catalog-unit-v2__summary,
.catalog-unit-v2__details {
    min-width: 0;
}

@media (max-width: 1100px) {
    /* One copy of the plan: the two parts of the sidebar become grid items.
       This ordering works without JavaScript and after a viewport resize. */
    .catalog-unit-v2__layout > .catalog-unit-v2__sidebar {
        display: contents;
    }

    .catalog-unit-v2__summary,
    .catalog-unit-v2__details {
        grid-column: 1;
        box-sizing: border-box;
        padding: 24px;
        border: 1px solid var(--unit-line);
        border-radius: 22px;
        background: #fff;
        box-shadow: 0 12px 34px rgba(29, 61, 110, .06);
    }

    .catalog-unit-v2__summary {
        grid-row: 1;
        order: 0;
    }

    .catalog-unit-v2__summary .catalog-unit-v2__price-block {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .catalog-unit-v2__layout > .catalog-unit-v2__visual {
        grid-column: 1;
        grid-row: 2;
        order: 1;
    }

    .catalog-unit-v2__layout > .catalog-unit-v2__tour {
        grid-column: 1;
        grid-row: auto;
        order: 2;
    }

    .catalog-unit-v2__details {
        grid-row: auto;
        order: 3;
    }

    .catalog-unit-v2__details > .catalog-unit-v2__commercial-status:first-child {
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    body.page-home .projects-title,
    body.page-home .housing-title,
    body.page-home .construction-promo__title,
    body.page-home .home-company__title,
    body.page-home .hm-title,
    body.page-home .partners-grid-title,
    body.page-home .partners-title,
    body.page-home .home-news-rail__heading h2,
    body.page-home .quick-apartment-picker__head h2,
    body.page-home .feat2-title,
    body.page-home .places-title,
    body.page-home .cta-section__title {
        font-size: clamp(26px, 8vw, 32px);
    }

    .catalog-unit-v2__summary,
    .catalog-unit-v2__details {
        padding: 22px 16px;
        border-radius: 18px;
    }
}

@media (max-width: 479px) {
    .catalog-unit-v2__summary,
    .catalog-unit-v2__details {
        padding: 20px 14px;
    }
}
