/* Наши блоки портала поверх оформления Home Lengo (своё, не из пакета шаблона) */
.portal-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: #161e2d; }
.portal-logo__mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #1563df; color: #fff; }
.portal-langs { display: flex; gap: 6px; margin-right: 12px; }
.portal-langs a { font-weight: 700; font-size: 13px; color: #5c6368; padding: 4px 8px; border-radius: 8px; }
.portal-langs a.is-on { background: #e9f0fc; color: #1563df; }
.portal-hero { background: linear-gradient(rgba(14,22,40,.55), rgba(14,22,40,.55)), var(--hero-img, #1c2433) center / cover no-repeat !important; }
.portal-deal .nice-select { min-width: 140px; }
.portal-title { padding: 150px 0 50px; background: linear-gradient(rgba(14,22,40,.6), rgba(14,22,40,.6)), var(--title-img, #1c2433) center / cover no-repeat; color: #fff; }
.portal-title__h { color: #fff; margin: 8px 0; }
.portal-title__crumbs, .portal-title__crumbs a, .portal-title__sub { color: rgba(255,255,255,.8); }
.portal-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.portal-city { display: flex; flex-direction: column; padding: 22px; border-radius: 16px; background: #f7f7f7; transition: background .2s; }
.portal-city:hover { background: #e9f0fc; }
.portal-city__name { font-weight: 700; font-size: 18px; color: #161e2d; }
.portal-city__count { color: #5c6368; font-size: 14px; }
.portal-complex { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff; margin-bottom: 24px; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.portal-complex__img { aspect-ratio: 4 / 3; background: #eee; overflow: hidden; }
.portal-complex__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.portal-complex:hover img { transform: scale(1.04); }
.portal-complex__body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; color: #5c6368; }
.portal-complex__body b { color: #161e2d; font-size: 18px; }
.portal-complex--row { flex-direction: row; }
.portal-complex--row .portal-complex__img { width: 180px; aspect-ratio: 4 / 3; flex: none; }
.portal-broker { text-align: center; padding: 28px 18px; border-radius: 16px; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.06); margin-bottom: 24px; }
.portal-broker__avatar { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: #1563df; color: #fff; font-size: 34px; font-weight: 800; }
.portal-broker__name { margin-bottom: 4px; }
.portal-broker__count { font-weight: 600; color: #161e2d; }
.portal-broker__links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.portal-avatar { display: grid; place-items: center; background: #1563df; color: #fff; font-weight: 700; }
.portal-sold { background: #161e2d !important; }
.portal-post { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; color: #161e2d; }
.portal-post__img { aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #eee; }
.portal-post__img img { width: 100%; height: 100%; object-fit: cover; }
.portal-post__meta { color: #5c6368; font-size: 13px; }
.portal-post__title { font-weight: 700; font-size: 18px; }
.portal-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.portal-ask__form { display: grid; gap: 12px; }
.portal-ask__done { padding: 16px; border-radius: 12px; background: #e9f0fc; font-weight: 600; }
.portal-listing__bar { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; }
.portal-switch { display: inline-flex; background: #f3f3f3; border-radius: 999px; padding: 4px; }
.portal-switch a { padding: 6px 18px; border-radius: 999px; font-weight: 600; color: #5c6368; }
.portal-switch a.is-on { background: #1563df; color: #fff; }
.portal-map { display: grid; grid-template-columns: 380px 1fr; gap: 20px; height: calc(100vh - 200px); min-height: 520px; }
.portal-map__list { overflow-y: auto; }
.portal-map__map { border-radius: 16px; overflow: hidden; z-index: 0; }
.portal-mini { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px; border-radius: 12px; color: #161e2d; }
.portal-mini:hover { background: #f3f6fd; }
.portal-mini img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; }
.portal-mini > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: #5c6368; }
.portal-mini b { color: #161e2d; }
.portal-gallery { padding-top: 110px; }
.portal-gallery__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 10px; border-radius: 16px; overflow: hidden; margin-bottom: 30px; }
.portal-gallery__grid a { display: block; overflow: hidden; background: #eee; }
.portal-gallery__grid .is-main { grid-row: span 2; }
.portal-gallery__grid img { width: 100%; height: 100%; object-fit: cover; }
.portal-detail__head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.portal-detail__price { text-align: right; }
.portal-detail__price .price { color: #1563df; }
.portal-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.portal-facts > div { padding: 14px 16px; border-radius: 12px; background: #f7f7f7; }
.portal-facts span { display: block; font-size: 13px; color: #5c6368; }
.portal-facts b { color: #161e2d; }
.portal-h { margin: 32px 0 12px; }
.portal-perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.portal-nearby { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.portal-nearby li { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: #f7f7f7; }
.portal-nearby .nearby__what { flex: 1; }
.portal-mapbox { height: 340px; border-radius: 16px; overflow: hidden; z-index: 0; }
.portal-side { position: sticky; top: 110px; padding: 24px; border-radius: 16px; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.portal-side .portal-broker { box-shadow: none; padding: 0 0 16px; border-bottom: 1px solid #eee; border-radius: 0; }
.portal-service { padding: 28px; border-radius: 16px; background: #f7f7f7; margin-bottom: 24px; height: calc(100% - 24px); }
.portal-service__num { color: #1563df; font-weight: 800; }
.portal-faq details { border-bottom: 1px solid #eee; padding: 18px 0; }
.portal-faq summary { cursor: pointer; font-weight: 700; font-size: 18px; color: #161e2d; }
.portal-article { max-width: 780px; font-size: 17px; line-height: 1.8; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.pager a, .pager span { min-width: 42px; padding: 8px 12px; text-align: center; border-radius: 999px; border: 1px solid #e4e4e4; }
.pager .is-active { background: #1563df; color: #fff; border-color: #1563df; }
@media (max-width: 991px) {
  .portal-contact, .portal-map { grid-template-columns: 1fr; height: auto; }
  .portal-map__map { order: -1; height: 55vh; }
  .portal-gallery__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 140px; }
  .portal-gallery__grid .is-main { grid-column: span 2; grid-row: auto; }
  .portal-gallery__grid a:nth-child(n+4) { display: none; }
  .portal-side { position: static; margin-top: 24px; }
  .portal-langs { display: none; }
}

/* --- Шапка: логотип не сжимается, меню компактнее, справа — языки, сердечко и «Продать нам» --- */
.main-header .logo-box { flex: none; }
.portal-logo { white-space: nowrap; }
.portal-header-right { display: flex; align-items: center; gap: 14px; flex: none; }
.portal-header-right .portal-langs { margin-right: 0; }
.portal-fav-link { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #e4e4e4; display: grid; place-items: center; color: #161e2d; }
.portal-fav-link:hover { border-color: #1563df; color: #1563df; }
.portal-fav-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.portal-fav-link .fav-count { position: absolute; top: -4px; right: -6px; }
.portal-cta { min-width: 0 !important; white-space: nowrap; padding: 12px 26px; }
@media (min-width: 1200px) { .main-menu .navigation > li { padding-left: 34px !important; } .main-header .inner-header-left { gap: 40px !important; } }
@media (min-width: 1200px) and (max-width: 1440px) { .main-menu .navigation > li { padding-left: 24px !important; } .portal-langs { display: none; } }
.portal-menu-accent > a { color: #1563df !important; }
@media (max-width: 1199px) { .portal-header-right .portal-cta, .portal-header-right .portal-langs { display: none; } }

/* --- Подвал (своя разметка) --- */
.portal-footer { background: #161e2d; color: #a3abb0; padding: 0 0 24px; margin-top: 40px; }
.portal-footer a { color: #e5e7eb; }
.portal-footer a:hover { color: #fff; }
.portal-footer__cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: #1563df; color: #fff; border-radius: 20px; padding: 32px 40px; transform: translateY(-40px); }
.portal-footer__cta h4 { color: #fff; margin: 0 0 6px; }
.portal-footer__cta p { color: rgba(255,255,255,.85); margin: 0; }
.portal-footer__cta .tf-btn { background: #fff !important; color: #1563df !important; border-color: #fff !important; }
.portal-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 56px; }
.portal-footer__cta + .portal-footer__grid, .container:has(.portal-footer__cta) + .portal-footer__grid { padding-top: 16px; }
.portal-footer__grid h6 { color: #fff; margin-bottom: 14px; }
.portal-footer__grid > div > a:not(.portal-logo):not(.tf-btn):not(.portal-footer__phone) { display: block; padding: 4px 0; }
.portal-logo--light { color: #fff !important; margin-bottom: 14px; }
.portal-footer__about { margin: 10px 0 18px; }
.portal-footer__phone { display: block; font-size: 22px; font-weight: 800; color: #fff !important; margin-bottom: 4px; }
.portal-footer__mail { display: block; margin-bottom: 8px; }
.portal-footer__muted { color: #a3abb0; }
.portal-messengers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.portal-messengers a { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); font-weight: 600; font-size: 14px; }
.portal-messengers a:hover { border-color: #fff; }
.portal-footer__btn { color: #fff !important; border-color: rgba(255,255,255,.4) !important; }
.portal-footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; }
@media (max-width: 991px) { .portal-footer__grid { grid-template-columns: 1fr 1fr; } .portal-footer__cta { padding: 24px; } }
@media (max-width: 575px) { .portal-footer__grid { grid-template-columns: 1fr; } }

/* --- Выкуп --- */
.portal-hero__sell { margin-top: 18px; color: #fff; text-align: center; font-weight: 600; }
.portal-hero__sell a { color: #fff; text-decoration: underline; }
.portal-buyout-band { background: #f3f7fe; }
.portal-buyout-band__in { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.portal-benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.portal-benefits--2 { grid-template-columns: 1fr 1fr; }
.portal-benefit { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 6px 24px rgba(0,0,0,.05); }
.portal-benefit__icon { font-size: 28px; display: block; margin-bottom: 10px; }
.portal-benefit h6 { margin-bottom: 6px; }
.portal-steps { list-style: none; counter-reset: st; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 24px 0 56px; }
.portal-steps li { counter-increment: st; display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: 16px; border: 1px solid #e4e4e4; }
.portal-steps li::before { content: counter(st); width: 40px; height: 40px; border-radius: 50%; background: #1563df; color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.portal-buyout-form { max-width: 880px; margin: 0 auto; padding: 36px; border-radius: 20px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.portal-buyout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.portal-buyout-grid .buyout-wide { grid-column: 1 / -1; }
@media (max-width: 991px) {
  .portal-buyout-band__in, .portal-benefits, .portal-steps { grid-template-columns: 1fr 1fr; }
  .portal-buyout-band__in { grid-template-columns: 1fr; }
}
@media (max-width: 575px) { .portal-benefits, .portal-benefits--2, .portal-steps, .portal-buyout-grid { grid-template-columns: 1fr; } .portal-buyout-form { padding: 20px; } }

/* Меню — в одну строку; левая часть шапки занимает свободное место */
.main-header .inner-header-left { flex: 1 1 auto; min-width: 0; }
.main-header .nav-outer { flex: 1 1 auto; min-width: 0; }
.main-menu .navigation { display: flex; flex-wrap: nowrap; white-space: nowrap; }
@media (min-width: 1200px) { .main-menu .navigation > li { padding-left: 26px !important; } }
@media (min-width: 1200px) and (max-width: 1500px) { .main-menu .navigation > li { padding-left: 18px !important; } .main-menu .navigation > li > a { font-size: 15px; } }
/* Кнопка в подвале: прозрачная с белым текстом */
.portal-footer .portal-footer__btn { background: transparent !important; color: #fff !important; border: 1px solid rgba(255,255,255,.4) !important; min-width: 0; }
.portal-footer .portal-footer__btn:hover { border-color: #fff !important; }

/* --- Карточки объектов одинакового размера: фото 4:3, название ровно 2 строки, цена прижата к низу --- */
.row > [class*="col-"]:has(> .homelengo-box) { display: flex; }
.homelengo-box { display: flex; flex-direction: column; width: 100%; }
.homelengo-box .archive-top .images-style { aspect-ratio: 4 / 3; height: auto !important; overflow: hidden; }
.homelengo-box .archive-top .images-style img { width: 100%; height: 100% !important; object-fit: cover; }
.homelengo-box .archive-bottom { flex: 1; display: flex; flex-direction: column; }
.homelengo-box .content-top { flex: 1; }
.homelengo-box .content-top h6 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; line-height: 1.3; }
.homelengo-box .meta-list { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.homelengo-box .content-bottom { margin-top: auto; }
.homelengo-box .content-bottom .price { white-space: nowrap; }
.homelengo-box .content-bottom > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }

/* --- О нас: текст, цифры, офис, карта --- */
.portal-about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.portal-about__text { font-size: 17px; line-height: 1.7; color: #5c6368; white-space: pre-line; }
.portal-about__stats { display: flex; gap: 40px; margin-top: 28px; flex-wrap: wrap; }
.portal-about__stats b { display: block; font-size: 36px; line-height: 1.1; color: #1563df; }
.portal-about__stats span { color: #5c6368; }
.portal-office { padding: 32px; border-radius: 16px; background: #f7f7f7; }
.portal-office ul { list-style: none; padding: 0; margin: 16px 0 24px; }
.portal-office li { padding: 10px 0; border-bottom: 1px solid #e4e4e4; }
.portal-office li span { display: block; font-size: 13px; color: #8e8e93; }
.portal-office-map { height: 420px; border-radius: 16px; margin-top: 40px; z-index: 0; }
@media (max-width: 991px) { .portal-about { grid-template-columns: 1fr; gap: 32px; } .portal-office-map { height: 300px; } }
.portal-area__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.portal-area__item { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 76px; min-width: 170px; padding: 18px 22px; border-radius: 14px; background: #f7f7f7; color: inherit; transition: background .2s; }
a.portal-area__item:hover { background: #e8f0fd; }
.portal-area__item span { font-size: 13px; color: #5c6368; margin-top: 2px; }
