/* Landing refinements. Loaded after the base theme; explicit scopes also
   override the legacy inline partial styles without affecting the catalogue. */
body .managed-offer {
    min-width: 0;
    padding: 28px;
    border: 1px solid #dfe8f1;
    border-radius: 18px;
    background: #f7f9fc;
    box-sizing: border-box;
}
body .managed-offer__eyebrow {
    margin-bottom: 12px;
    color: #3d7bb4;
    font-size: 13px;
    font-weight: 700;
}
body .managed-offer__title {
    margin: 0 0 16px;
    color: #1d3d6e;
    font-size: clamp(21px, 2.5vw, 27px);
    line-height: 1.3;
    overflow-wrap: break-word;
}
body .managed-offer__terms {
    margin: 0;
    white-space: pre-line;
    color: #42536b;
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
body .managed-offer__source {
    display: inline-block;
    margin-top: 14px;
    font-size: 14px;
    text-decoration: underline;
}
body .managed-offer__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}
body .managed-offer__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 10px;
    background: #1d3d6e;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    text-decoration: none;
}
body .managed-offer__button:hover { background: #2c568a; color: #fff; }
body .managed-offer__catalog { font-size: 14px; font-weight: 600; }
body .managed-offer-general { margin-bottom: 24px; }
body .managed-offer-accordions { display: grid; gap: 16px; }
body .managed-offer-accordion {
    overflow: hidden;
    border: 1px solid #dfe8f1;
    border-radius: 16px;
}
body .managed-offer-accordion > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 56px;
    padding: 16px 24px;
    box-sizing: border-box;
    color: #1d3d6e;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
body .managed-offer-accordion > summary::-webkit-details-marker { display: none; }
body .managed-offer-accordion[open] > summary > span { transform: rotate(45deg); }
body .managed-offer-accordion .managed-offer { border: 0; border-radius: 0; }
body .managed-offer a:focus-visible,
body .managed-offer-accordion > summary:focus-visible {
    outline: 3px solid #70b9e9;
    outline-offset: -3px;
}
@media (max-width: 767px) {
    body .managed-offer { padding: 22px 18px; }
    body .managed-offer__button { width: 100%; }
    body .managed-offer-accordion > summary { padding: 16px 18px; }
}

/* A stable background while the hero photograph is still downloading. */
body .hero-section[data-landing-hero],
body .reviews-hero[data-landing-hero],
body .commercial-hero[data-landing-hero] {
    background-color: #1d3d6e;
}

/* Keep the original full-width desktop heroes from each page/partial.
   Content-sized geometry is only needed on phones and tablets. */
@media (max-width: 959px) {
    body .hero-section[data-landing-hero],
    body .reviews-hero[data-landing-hero],
    body .commercial-hero[data-landing-hero] {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100%;
        margin-left: 0 !important;
        transform: none;
        height: auto;
        min-height: 560px;
        max-height: none;
        background-color: #1d3d6e;
    }
    body [data-landing-hero] .hero-content,
    body [data-landing-hero] .reviews-hero-content,
    body [data-landing-hero] .commercial-hero__content {
        position: relative;
        inset: auto;
        min-height: inherit;
        padding: 64px 0 80px;
        box-sizing: border-box;
    }
    body [data-landing-hero] .hero-content__inner,
    body [data-landing-hero] .reviews-hero-inner,
    body [data-landing-hero] .commercial-hero__inner {
        box-sizing: border-box;
        width: 100%;
        max-width: 1264px;
        margin: 0 auto;
        padding: 0 32px;
        overflow-wrap: break-word;
    }
    body [data-landing-hero] .hero-content__inner > *,
    body [data-landing-hero] .reviews-hero-inner > *,
    body [data-landing-hero] .commercial-hero__inner > * { max-width: 760px; }
}
body [data-landing-hero] .hero-stats,
body [data-landing-hero] .reviews-hero-stats,
body [data-landing-hero] .commercial-hero__stats {
    box-sizing: border-box;
    max-width: 100%;
}
body [data-landing-hero] .hero-btn,
body [data-landing-hero] .reviews-hero-btn,
body [data-landing-hero] .commercial-hero__btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    min-height: 48px;
    line-height: 1.4;
}
body [data-landing-hero] .hero-dot,
body [data-landing-hero] .commercial-hero__dot {
    width: 28px;
    height: 28px;
    background-clip: content-box;
    border: 9px solid transparent;
    box-sizing: border-box;
}
body [data-landing-hero] a:focus-visible,
body [data-landing-hero] button:focus-visible,
body .scroll-arrow:focus-visible,
body .hm-corps-tab:focus-visible,
body .mo-corps-tab:focus-visible,
body .mo-sub-tab:focus-visible,
body .mo-type-tab:focus-visible {
    outline: 3px solid #70b9e9;
    outline-offset: 4px;
}
body .projects-header,
body .housing-header,
body .construction-header,
body .furnish-gallery-header,
body .constructions-latest__header,
body .mortgage-banks__header {
    gap: 16px;
    flex-wrap: wrap;
}
body .housing-card__info,
body .parking-card__info,
body .docs-item__text,
body .housings-section__grid > *,
body .mortgage-calc__grid > *,
body .contacts-section__grid > * {
    min-width: 0;
}
body .projects-scroll-wrap,
body .housing-scroll-wrap,
body .furnish-scroll-wrap,
body .construction-scroll-wrap,
body .infrastructure-scroll-wrap,
body .parking-scroll-wrap,
body .mortgage-banks__scroll-wrap {
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
    overscroll-behavior-x: contain;
    padding-bottom: 18px;
}
body .project-card,
body .housing-card,
body .furnish-card,
body .construction-card,
body .infrastructure-card,
body .parking-card {
    scroll-snap-align: start;
}
body .housings-section__grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
}
body .housings-section__cards {
    grid-template-columns: minmax(0, 1fr);
    padding: 2px 4px 12px;
}
body .housings-section__cards .housing-card__img-wrap {
    height: 220px;
}
body .mortgage-faq__item--open .mortgage-faq__a,
body .furnish-faq__item--open .furnish-faq__a,
body .docs-item--open .docs-item__body {
    max-height: none;
}
body .docs-item__link {
    overflow-wrap: anywhere;
}
body .soc-intro p {
    text-align: left;
}
body .soc-card:focus-within .soc-card__text {
    opacity: 1;
    max-height: none;
}
body .editorial-content {
    overflow-wrap: anywhere;
}
body .keys-landing .uk-button {
    white-space: normal;
    line-height: 1.4;
    min-height: 48px;
    padding: 14px 22px;
}

@media (max-width: 959px) {
    body .housings-section__grid {
        grid-template-columns: minmax(0, 1fr);
    }
    body .housings-section__map-wrap {
        position: relative;
        top: auto;
        min-height: 320px;
    }
    body .housings-section__map-wrap #map { height: 320px; }
    body .housings-section__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 767px) {
    body .hero-section[data-landing-hero],
    body .reviews-hero[data-landing-hero],
    body .commercial-hero[data-landing-hero] {
        height: auto;
        min-height: 0;
        max-height: none;
    }
    body [data-landing-hero] .hero-content,
    body [data-landing-hero] .reviews-hero-content,
    body [data-landing-hero] .commercial-hero__content {
        padding: 38px 0 52px;
        min-height: 0;
    }
    body [data-landing-hero] .hero-content__inner,
    body [data-landing-hero] .reviews-hero-inner,
    body [data-landing-hero] .commercial-hero__inner {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }
    body [data-landing-hero] .hero-title,
    body [data-landing-hero] .reviews-hero-title,
    body [data-landing-hero] .commercial-hero__title {
        font-size: clamp(30px, 8vw, 42px);
        line-height: 1.13;
        margin-bottom: 16px;
        overflow-wrap: break-word;
    }
    body [data-landing-hero] .hero-title--sub { font-size: 24px; }
    body [data-landing-hero] .hero-badge,
    body [data-landing-hero] .reviews-hero-badge,
    body [data-landing-hero] .commercial-hero__badge {
        max-width: 100%;
        box-sizing: border-box;
        font-size: 12px;
        line-height: 1.5;
        letter-spacing: .01em;
        margin-bottom: 18px;
    }
    body [data-landing-hero] .hero-subtitle,
    body [data-landing-hero] .reviews-hero-subtitle,
    body [data-landing-hero] .commercial-hero__subtitle {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 24px;
        color: rgba(255,255,255,.94);
    }
    body [data-landing-hero] .hero-stats,
    body [data-landing-hero] .reviews-hero-stats,
    body [data-landing-hero] .commercial-hero__stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 16px;
        padding: 16px;
        margin-bottom: 24px;
    }
    body [data-landing-hero] .hero-stat,
    body [data-landing-hero] .reviews-hero-stat,
    body [data-landing-hero] .commercial-hero__stat {
        min-width: 0;
        padding: 0;
    }
    body [data-landing-hero] .hero-stat__divider,
    body [data-landing-hero] .reviews-hero-divider,
    body [data-landing-hero] .commercial-hero__divider { display: none; }
    body [data-landing-hero] .hero-stat__value,
    body [data-landing-hero] .reviews-hero-stat__value,
    body [data-landing-hero] .commercial-hero__stat-value {
        font-size: 17px;
        line-height: 1.3;
        overflow-wrap: break-word;
    }
    body [data-landing-hero] .hero-stat__label,
    body [data-landing-hero] .reviews-hero-stat__label,
    body [data-landing-hero] .commercial-hero__stat-label {
        font-size: 12px;
        line-height: 1.45;
        color: rgba(255,255,255,.84);
    }
    body [data-landing-hero] .hero-actions,
    body [data-landing-hero] .reviews-hero-actions,
    body [data-landing-hero] .commercial-hero__actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    body [data-landing-hero] .hero-btn,
    body [data-landing-hero] .reviews-hero-btn,
    body [data-landing-hero] .commercial-hero__btn { width: 100%; }
    body [data-landing-hero] .hero-scroll,
    body [data-landing-hero] .reviews-scroll { display: none; }
    body [data-landing-hero] .hero-dots,
    body [data-landing-hero] .commercial-hero__dots { bottom: 8px; right: 16px; }
    body .housing-title,
    body .projects-title { font-size: 28px; line-height: 1.2; }
    body .housing-map-btn { min-height: 44px; display: inline-flex; align-items: center; }
    body .project-card { width: min(320px, calc(100vw - 56px)); }
    body .housing-scroll-wrap .housing-card,
    body .parking-scroll-wrap .parking-card {
        width: min(340px, calc(100vw - 56px));
    }
    body .housing-card__img-wrap { height: 260px; }
    body .housing-card__labels { right: 12px; }
    body .housing-card__title { font-size: 17px; line-height: 1.35; }
    body .hm-card__list li { font-size: 14px; line-height: 1.55; }
    body .hm-card__label { color: #5d6d82; }
    body .hm-card--accent .hm-card__label { color: #fff; }
    body .mo-corps-tabs,
    body .mo-sub-tabs {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
        border-radius: 12px;
        gap: 4px;
    }
    body .mo-corps-tab,
    body .mo-sub-tab,
    body .mo-type-tab,
    body .hm-corps-tab {
        min-height: 46px;
        flex: 1 1 120px;
        padding: 12px;
        line-height: 1.4;
        border-radius: 8px;
    }
    body .mortgage-calc__input { font-size: 16px; min-height: 48px; }
    body .mortgage-calc__fields { grid-template-columns: minmax(0, 1fr); }
    body .mo-rate-card { padding: 22px 18px; }
    body .mo-rate-card__list li { font-size: 14px; line-height: 1.55; }
    body .mortgage-faq__q,
    body .furnish-faq__q { padding: 18px; line-height: 1.5; }
    body .docs-item__header { flex-wrap: wrap; }
    body .docs-item__name { flex: 1 1 65%; }
    body .docs-item__count { order: 3; flex: 1 1 100%; }
    body .docs-item__arrow { margin-left: auto; }
    body .soc-page .soc-hero__plate { padding: 16px 20px; font-size: 26px; }
    body .keys-landing .uk-button { width: 100%; }
}

@media (max-width: 539px) {
    body .housings-section__cards { grid-template-columns: minmax(0, 1fr); }
    body .housings-section__cards .housing-card__img-wrap { height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
    body [data-landing-hero] *,
    body .soc-reveal { animation: none !important; transition: none !important; }
    body .soc-reveal { opacity: 1; transform: none; }
}
