/* ==================================================
   5kzn.ru — ЕДИНЫЙ файл стилей (все страницы)
   ================================================== */

/* === База === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #f8f9fa;
}
.badge { font-weight: 500; }

/* === Шапка: анимация сжатия при прокрутке === */
#mainNavbar {
transition: all 0.3s ease-in-out;
padding-top: 1rem;
padding-bottom: 1rem;
z-index: 1030; /* гарантирует, что меню поверх всего */
}
#mainNavbar .navbar-brand { font-size: 1.5rem; transition: font-size 0.3s ease-in-out; }
#mainNavbar .nav-link { font-size: 1rem; transition: font-size 0.3s ease-in-out; padding-top: 0.5rem; padding-bottom: 0.5rem; }
#mainNavbar .btn { transition: all 0.3s ease-in-out; padding: 0.375rem 0.75rem; }
#mainNavbar.navbar-scrolled { padding-top: 0.4rem; padding-bottom: 0.4rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important; }
#mainNavbar.navbar-scrolled .navbar-brand { font-size: 1.25rem; }
#mainNavbar.navbar-scrolled .nav-link { font-size: 0.9rem; padding-top: 0.25rem; padding-bottom: 0.25rem; }
#mainNavbar.navbar-scrolled .btn { padding: 0.25rem 0.5rem; font-size: 0.8rem; }

/* === Главная: карточки объектов === */
.object-card { height: 100%; transition: all 0.3s; border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.1); overflow: hidden; }
.object-card:hover { transform: translateY(-8px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.object-card-img-wrapper { position: relative; height: 220px; overflow: hidden; background-color: #e9ecef; }
.object-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.object-card:hover .object-card-img { transform: scale(1.08); }
.object-card-body { padding: 1.25rem; display: flex; flex-direction: column; flex-grow: 1; }
.object-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; min-height: 2.6rem; }
.object-card-address { font-size: 0.85rem; color: #6c757d; margin-bottom: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.object-card-price { font-size: 1.25rem; font-weight: 800; color: #0d6efd; }

/* Компактные карточки на телефонах */
@media (max-width: 575.98px) {
.object-card-img-wrapper { height: 150px; }
.object-card-body { padding: 0.75rem; }
.object-card-title { font-size: 0.92rem; min-height: 2.3rem; }
.object-card-address { font-size: 0.78rem; margin-bottom: 0.5rem; }
.object-card-price { font-size: 1.05rem; white-space: nowrap; }
.object-card .badge { font-size: 0.68rem; padding: 0.25em 0.5em; }
.object-card-footer-row { flex-direction: column; align-items: flex-start !important; gap: 2px; }
}

/* === Страница объекта: сетка === */
.object-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 340px;
gap: 24px;
align-items: start;
grid-template-areas:
"header    sidebar"
"photos    sidebar"
"invest    sidebar"
"desc      sidebar"
"map       sidebar"
"questions sidebar"
"form      sidebar"
"stats     sidebar";
}
.object-header        { grid-area: header; }
.object-photos        { grid-area: photos; }
.object-invest        { grid-area: invest; }
.object-description   { grid-area: desc; }
.object-sidebar       { grid-area: sidebar; position: sticky; top: 84px; }
.object-map           { grid-area: map; }
.object-stats         { grid-area: stats; }
.object-questions     { grid-area: questions; }
.object-question-form { grid-area: form; }

/* Служебная строка (номер, дата, просмотры) — внизу, неброско */
.object-stats .service-line { font-size: 0.8rem; color: #adb5bd; margin-bottom: 0; }

/* Плашка цены под заголовком — видна только на мобильных */
.object-price-plate { display: none; }

/* Карусель: фото целиком + размытый фон по бокам */
#objectCarousel .carousel-item { height: 480px; position: relative; background-color: #e9ecef; background-size: cover; background-position: center; }
#objectCarousel .carousel-item::before { content: ""; position: absolute; inset: 0; background: inherit; filter: blur(16px) brightness(0.55); transform: scale(1.05); }
#objectCarousel .carousel-img { position: relative; width: 100%; height: 100%; object-fit: contain; background-color: transparent; }

/* Плейсхолдер ленивой карты */
.map-placeholder { height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #e9ecef; border-radius: 0.5rem; }

/* Липкая панель контактов (мобильные) */
.mobile-contact-bar { display: none; }

@media (max-width: 991.98px) {
.object-layout {
grid-template-columns: 1fr;
grid-template-areas:
"header" "photos" "invest" "desc" "sidebar" "map" "questions" "form" "stats";
}
.object-sidebar { position: static; }
#objectCarousel .carousel-item { height: 320px; }
.object-price-plate { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #e9ecef; border-radius: 0.5rem; padding: 0.5rem 0.75rem; margin-bottom: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.object-price-plate .price { font-weight: 800; font-size: 1.15rem; color: #0d6efd; white-space: nowrap; }
.object-price-plate .area { color: #6c757d; font-size: 0.85rem; }
body { padding-bottom: 76px; }
.mobile-contact-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; display: flex; gap: 0.5rem; padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.12); }
.mobile-contact-bar .btn { flex: 1; font-weight: 700; }
}
