/* ===== Houses — СЦН (как основной сайт) ===== */
:root {
    --bg: #f2f4f6;
    --bg-secondary: #e8eaed;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafb;
    --surface: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 172, 94, 0.35);
    --text: #222028;
    --text-secondary: #5c5c66;
    --text-muted: #868e96;
    --accent: #00ac5e;
    --accent-light: #1b6eb5;
    --accent-dark: #008f4e;
    --accent-glow: rgba(0, 172, 94, 0.28);
    --gradient-primary: linear-gradient(135deg, #00ac5e 0%, #1b6eb5 100%);
    --gold: #e49631;
    --gold-light: #f5b04a;
    --gold-dark: #c97f1a;
    --gradient-gold: linear-gradient(135deg, #e49631 0%, #f5b04a 50%, #e49631 100%);
    --success: #00ac5e;
    --warning: #fdcb6e;
    --danger: #dc3545;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 15px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: var(--font-sans);
    --container: 1200px;
    --header-h: 76px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent);
}
.houses-footer a {
    color: rgba(255, 255, 255, 0.82);
}
.houses-footer a:hover {
    color: #fff;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header (СЦН) ===== */
.houses-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    min-height: var(--header-h);
}
.houses-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 10px 0;
    flex-wrap: wrap;
}
@media (min-width: 769px) {
    .houses-header__inner {
        flex-wrap: nowrap;
    }
}
.houses-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}
.houses-header__logo-img {
    height: 40px;
    width: auto;
    max-width: min(200px, 42vw);
    object-fit: contain;
    object-position: left center;
}
.houses-header__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
    min-width: 0;
    position: relative;
}
@media (min-width: 769px) {
    .houses-header__nav {
        flex-wrap: nowrap;
    }
}
.houses-header__nav-cluster {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
    order: 1;
}
@media (min-width: 769px) {
    .houses-header__nav-cluster {
        flex-wrap: nowrap;
    }
}
.houses-header__bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
    flex-shrink: 0;
    gap: 6px;
    padding: 5px 8px;
    background: linear-gradient(180deg, #fafafa 0%, #f2f2f4 100%);
    border: 1px solid #e2e2e8;
    border-radius: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.houses-header__bar-link {
    display: none;
    align-items: center;
    color: #2d2a32;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    white-space: nowrap;
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid transparent;
}
.houses-header__bar-link:hover {
    color: var(--accent);
    background: #fff;
    border-color: #e4e4ea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.houses-header__bar-link.active {
    color: var(--accent);
    background: #fff;
    border-color: rgba(0, 172, 94, 0.28);
    box-shadow: 0 0 0 1px rgba(0, 172, 94, 0.12);
}
@media (min-width: 769px) {
    .houses-header__bar-link--core {
        display: inline-flex;
    }
    .houses-header__bar {
        flex-wrap: nowrap;
    }
}
.houses-header__bar-link--md1100 {
    display: none;
}
@media (min-width: 1100px) {
    .houses-header__bar-link--md1100 {
        display: inline-flex;
    }
}
.houses-header__phone {
    font-weight: 700 !important;
    color: #222028 !important;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
    order: 2;
}
.houses-header__phone:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
}

/* ===== Main ===== */
.houses-main {
    padding-top: 40px;
    padding-bottom: 80px;
    min-height: calc(100vh - var(--header-h));
}

/* ===== Hero ===== */
.houses-hero {
    text-align: center;
    padding: 40px 0 32px;
}
.houses-hero__title {
    font-family: var(--font-sans);
    font-size: clamp(26px, 4.5vw, 40px);
    font-weight: 700;
    color: #222028;
    margin-bottom: 16px;
    line-height: 1.2;
}
.houses-hero__title span {
    color: var(--accent);
}
.houses-hero__subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== Infobar (на всю ширину контентной колонки без 100vw — иначе полоса прокрутки) ===== */
.houses-infobar {
    position: relative;
    width: calc(100% + 48px);
    max-width: none;
    margin-left: -24px;
    margin-right: -24px;
    box-sizing: border-box;
    margin-top: 8px;
    margin-bottom: 22px;
    padding: 10px 20px;
    background: linear-gradient(105deg, #f8faf9 0%, #eef5f1 35%, #f0f4f8 70%, #f7f8fa 100%);
    border-top: 1px solid rgba(0, 172, 94, 0.12);
    border-bottom: 1px solid rgba(27, 110, 181, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.houses-infobar__inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 4px;
}
.houses-infobar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.houses-infobar__ic {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(0, 172, 94, 0.12), rgba(27, 110, 181, 0.1));
    color: var(--accent-dark);
}
.houses-infobar__ic svg {
    display: block;
}
.houses-infobar__text {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.2;
    text-align: left;
}
.houses-infobar__text strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
}
.houses-infobar__text span {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 1px;
}
.houses-infobar__sep {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    flex-shrink: 0;
    display: none;
}
@media (min-width: 720px) {
    .houses-infobar__sep {
        display: block;
    }
    .houses-infobar__inner {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0;
    }
    .houses-infobar__item {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        max-width: 220px;
    }
}
@media (max-width: 719px) {
    .houses-infobar {
        padding: 10px 14px;
    }
    .houses-infobar__item {
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
        justify-content: flex-start;
    }
}

/* ===== Stats ===== */
.houses-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}
.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.stat-card__value {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}
.stat-card__label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Filters ===== */
.houses-filters {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}
.houses-filters__search {
    position: relative;
    margin-bottom: 16px;
}
.houses-filters__search .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.houses-filters__search input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 15px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s;
}
.houses-filters__search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.houses-filters__search input::placeholder {
    color: var(--text-muted);
}
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.search-clear:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}
.houses-filters__controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-select {
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-sans);
    outline: none;
    cursor: pointer;
    min-width: 160px;
    transition: border-color 0.2s;
}
.filter-select:focus {
    border-color: var(--accent);
}
.filter-select option {
    background: var(--bg-card);
    color: var(--text);
}
.view-toggle {
    display: flex;
    gap: 4px;
    margin-left: auto;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.view-btn:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}
.view-btn--active {
    color: var(--accent);
    background: rgba(0, 172, 94, 0.12);
}

/* ===== Results Count ===== */
.houses-count {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ===== Grid / List ===== */
.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.houses-grid--list {
    grid-template-columns: 1fr;
}
.houses-grid--list .building-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
}
.houses-grid--list .building-card__info-grid {
    display: flex;
    gap: 24px;
}

/* ===== Building Card ===== */
.building-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}
.building-card:hover {
    border-color: rgba(0, 172, 94, 0.45);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 172, 94, 0.12);
}
.building-card__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.building-card__icon {
    font-size: 28px;
    flex-shrink: 0;
}
.building-card__title-block {
    flex: 1;
    min-width: 0;
}
.building-card__address {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    line-height: 1.3;
}
.building-card__street {
    font-size: 13px;
    color: var(--text-muted);
}
.building-card__sale {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1;
}
.building-card__sale svg {
    flex-shrink: 0;
}
.building-card__energy {
    font-size: 20px;
    font-weight: 900;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor;
    border-radius: 8px;
}
.building-card__info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.building-card__info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.building-card__info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.building-card__info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.card-age {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}
.building-card__wear {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.building-card__wear-label {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.building-card__wear-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.building-card__wear-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.building-card__wear-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
/* Card rating */
.building-card__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(228, 150, 49, 0.08);
    border: 1px solid rgba(228, 150, 49, 0.2);
    border-radius: var(--radius-sm);
}
.building-card__rating--empty {
    background: transparent;
    border-color: var(--border);
}
.building-card__rating-score {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--font-serif);
}
.building-card__rating-stars {
    display: flex;
    gap: 1px;
}
.card-star {
    font-size: 0.8rem;
    color: var(--border);
    line-height: 1;
}
.card-star--active {
    color: var(--gold);
}
.building-card__rating-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: auto;
}

.building-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.building-card__uk {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.building-card__more {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
}

/* ===== Pagination ===== */
.houses-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.page-btn {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}
.page-btn--active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 700;
}
.page-dots {
    color: var(--text-muted);
    padding: 8px 4px;
}

/* ===== Map ===== */
.houses-map-section {
    margin-bottom: 48px;
}
.houses-map-section h2 {
    font-family: var(--font-serif);
    font-size: 28px;
    margin-bottom: 12px;
}
.houses-map-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.houses-map {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.map-fallback {
    height: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
    background: var(--bg-card);
}
.map-fallback__text {
    color: var(--text-secondary);
    max-width: 560px;
}
.map-fallback__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== SEO Text ===== */
.houses-seo {
    margin-bottom: 48px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.houses-seo h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text);
}
.houses-seo h3 {
    font-size: 18px;
    margin: 20px 0 10px;
    color: #1565a8;
}
.houses-seo p {
    color: #33323c;
    margin-bottom: 12px;
    line-height: 1.8;
}
.houses-seo p strong {
    color: var(--text);
}
.houses-seo a {
    color: #008f4e;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.houses-seo a:hover {
    color: var(--accent-dark);
}

/* ===== CTA ===== */
.houses-cta {
    text-align: center;
    padding: 48px 32px;
    background: linear-gradient(135deg, rgba(0, 172, 94, 0.08) 0%, rgba(27, 110, 181, 0.06) 100%);
    border: 1px solid rgba(0, 172, 94, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 48px;
}
.houses-cta h2 {
    font-family: var(--font-sans);
    font-size: 28px;
    margin-bottom: 12px;
    color: #222028;
}
.houses-cta p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}
.houses-cta__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
}
.btn--primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    color: #fff;
}
.btn--outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn--outline:hover {
    border-color: var(--accent);
    color: var(--text);
}

.houses-header__burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin: 0;
}
.houses-header__burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #222028;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.houses-header__burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.houses-header__burger.open span:nth-child(2) {
    opacity: 0;
}
.houses-header__burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.houses-header__drawer {
    display: none;
    box-sizing: border-box;
    order: 3;
}
.houses-header__drawer.houses-header__drawer--open {
    display: block;
}
.houses-header__drawer-desktop {
    display: none;
}
@media (min-width: 769px) {
    .houses-header__drawer-desktop {
        display: block;
    }
}
.houses-header__drawer-mobile {
    display: none;
    flex-direction: column;
}
@media (max-width: 768px) {
    .houses-header__drawer.houses-header__drawer--open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        background: #fff;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
        border-bottom: 1px solid #e5e5e5;
        z-index: 99;
        padding-bottom: 12px;
    }
    .houses-header__drawer-desktop {
        display: none !important;
    }
    .houses-header__drawer-mobile {
        display: flex;
        flex-direction: column;
    }
}
.houses-header__drawer-dup--1100 {
    display: none !important;
}
@media (min-width: 769px) and (max-width: 1099px) {
    .houses-header__drawer-dup--1100 {
        display: block !important;
    }
}
.houses-header__drawer-link {
    display: block;
    color: #222028;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s, background 0.15s;
}
.houses-header__drawer-link:hover,
.houses-header__drawer-link.active {
    color: var(--accent);
}
.houses-header__drawer-desktop .houses-header__drawer-link {
    padding: 11px 18px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.houses-header__drawer-desktop .houses-header__drawer-link:last-child {
    border-bottom: none;
}
.houses-header__drawer-mobile .houses-header__drawer-link,
.houses-header__drawer-mobile .houses-header__drawer-phone {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}
.houses-header__drawer-mobile .houses-header__drawer-link:last-of-type {
    border-bottom: 1px solid #eee;
}
.houses-header__drawer-phone {
    margin-top: 4px;
    font-weight: 700 !important;
    color: #222028 !important;
    border-bottom: none !important;
}

@media (min-width: 769px) {
    .houses-header__drawer.houses-header__drawer--open {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        min-width: 280px;
        max-width: min(320px, 92vw);
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 12px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
        padding: 6px 0;
        z-index: 110;
    }
    .houses-header__drawer-desktop .houses-header__drawer-link:first-child {
        border-top: none;
    }
}

/* ===== Footer (СЦН тёмный) ===== */
.houses-footer {
    background: #313131;
    border-top: 1px solid #444;
    padding: 48px 0 0;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
}
.houses-footer > .container {
    padding-bottom: 8px;
}
.houses-footer__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 28px;
}
.houses-footer__logo-link {
    display: inline-block;
    margin-bottom: 12px;
}
.houses-footer__logo-img {
    height: 34px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}
.houses-footer__brand p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.65;
    margin-top: 8px;
}
.houses-footer__brand p a {
    color: #7ddcb0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.houses-footer__brand p a:hover {
    color: #fff;
}
.houses-footer__nav h4,
.houses-footer__services h4,
.houses-footer__contact h4 {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.houses-footer__nav ul,
.houses-footer__services ul,
.houses-footer__contact ul {
    list-style: none;
}
.houses-footer__nav li,
.houses-footer__services li,
.houses-footer__contact li {
    margin-bottom: 10px;
}
.houses-footer__nav a,
.houses-footer__services a,
.houses-footer__contact a {
    font-size: 14px;
    transition: color 0.2s;
}
.houses-footer__contact li {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}
.houses-footer__legal {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 14px;
}
.houses-footer__legal p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}
.houses-footer__bottom {
    margin-top: auto;
    width: 100%;
    background: #1e1e1e;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 0 14px;
    text-align: center;
}
.houses-footer__bottom-inner {
    max-width: var(--container);
    margin: 0 auto;
}
.houses-footer__bottom p {
    margin: 0;
}
.houses-footer__copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}
.houses-footer__copyright-logo {
    display: block;
    line-height: 0;
}
.houses-footer__copyright-logo img {
    display: block;
    height: 10px;
    width: auto;
    max-width: 180px;
    margin: 0 auto;
    opacity: 0.75;
}
.houses-footer__copyright-text {
    display: block;
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.42);
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: 0.01em;
}

/* ===== House Detail Map ===== */
.detail-map-section {
    margin: 32px 0;
}
.detail-map-section h2 {
    font-family: var(--font-serif);
    font-size: 22px;
    margin-bottom: 16px;
}
#house-detail-map {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

/* ===== Map description & tips ===== */
.map-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: rgba(228, 150, 49, 0.06);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.map-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.map-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: border-color 0.2s, transform 0.2s;
}
.map-tip:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}
.map-tip__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ===== Compare Toggle Button ===== */
.compare-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}
.compare-toggle:hover { border-color: var(--accent); color: var(--text); }
.compare-toggle--active {
    background: rgba(0, 172, 94, 0.12);
    border-color: var(--accent);
    color: var(--accent-light);
}

/* ===== Compare Floating Panel ===== */
.compare-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 998;
    animation: fadeInUp 0.3s ease;
}
.compare-panel__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 172, 94, 0.2);
    backdrop-filter: blur(12px);
}
.compare-panel__count {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.compare-panel__hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.compare-panel__btn {
    padding: 8px 18px !important;
    font-size: 0.82rem !important;
}
.compare-panel__clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.2s;
}
.compare-panel__clear:hover { color: var(--danger); }

/* ===== Compare Modal ===== */
.compare-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeInUp 0.2s ease;
}
.compare-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.compare-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.compare-modal__header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}
.compare-modal__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.compare-modal__close:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.compare-modal__body {
    overflow: auto;
    padding: 0;
}
.compare-table-wrap { overflow-x: auto; }
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.compare-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--accent-light);
    background: rgba(0, 172, 94, 0.06);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.compare-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
}
.compare-table__label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 100px;
}
.compare-table tr:hover td { background: rgba(255,255,255,0.02); }
.compare-table a { color: var(--accent-light); font-weight: 600; }

/* ===== Reviews ===== */
.detail-reviews {
    background: linear-gradient(135deg, rgba(0, 172, 94, 0.06), rgba(27, 110, 181, 0.04));
    border: 1px solid rgba(0, 172, 94, 0.15);
    position: relative;
    overflow: hidden;
}
.detail-reviews::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(0, 172, 94, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.detail-reviews h2 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--accent-light);
}
.reviews-intro {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgba(0, 172, 94, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}
.reviews-empty {
    color: var(--text-muted);
    font-size: 0.84rem;
    text-align: center;
    padding: 14px 0;
}
.review-card {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.review-card:last-child { border-bottom: none; }
.review-card__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.12));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.review-card__body { flex: 1; min-width: 0; }
.review-card__header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}
.review-card__name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}
.review-card__date {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.review-card__text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}
.review-form-wrap {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.review-form__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text);
}
.review-rules {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 10px 14px;
    background: rgba(228, 150, 49, 0.06);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 12px;
}
.review-rules strong { color: var(--text-secondary); }
.review-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.review-form__input,
.review-form__textarea {
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-sm);
    color: #1a1a2e;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.review-form__input:focus,
.review-form__textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.review-captcha__input {
    max-width: 120px;
}
.review-form__input::placeholder,
.review-form__textarea::placeholder { color: #888; }
.review-textarea-wrap {
    position: relative;
}
.review-char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.72rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}
.review-char-counter--warn { color: var(--danger); }
.review-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.73rem;
    color: var(--text-muted);
    line-height: 1.4;
    cursor: pointer;
}
.review-consent input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
}
.review-consent a {
    color: var(--accent-light);
    text-decoration: underline;
}
.review-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.review-form__hint {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-style: italic;
}
.review-form__submit {
    padding: 8px 20px !important;
    font-size: 0.84rem !important;
    flex-shrink: 0;
}
.review-card__votes {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.review-vote {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}
.review-vote:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}
.review-vote--like:hover { border-color: #00b894; color: #00b894; }
.review-vote--dislike:hover { border-color: #e17055; color: #e17055; }
.review-vote:disabled { opacity: 0.5; cursor: default; }
.review-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.review-captcha__label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}
.review-captcha__input {
    max-width: 100px !important;
    text-align: center;
}
.review-pending-msg {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.2);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 0.84rem;
    line-height: 1.5;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

/* ===== Similar Houses ===== */
.similar-intro {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.similar-houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.similar-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
}
.similar-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 172, 94, 0.1);
}
.similar-card__address {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent-light);
}
.similar-card__meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.similar-card__detail {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== Light theme for new features ===== */
[data-theme="light"] .compare-toggle { background: #fff; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .compare-toggle--active { background: rgba(59,130,246,0.08); }
[data-theme="light"] .compare-panel__inner { background: #fff; box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
[data-theme="light"] .compare-modal { background: #fff; }
[data-theme="light"] .compare-table th { background: rgba(59,130,246,0.04); }
[data-theme="light"] .compare-table tr:hover td { background: rgba(0,0,0,0.02); }
[data-theme="light"] .compare-modal__close:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .review-form__input,
[data-theme="light"] .review-form__textarea { background: #fff; border-color: rgba(0,0,0,0.15); color: #1a1a2e; }
[data-theme="light"] .review-card__avatar { background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1)); }
[data-theme="light"] .review-rules { background: rgba(212,168,83,0.04); }
[data-theme="light"] .similar-card { background: #fff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .review-card__text { color: #2a2a3e; }

@media (max-width: 768px) {
    .compare-panel { right: 8px; bottom: 84px; left: 8px; }
    .compare-panel__inner { justify-content: center; flex-wrap: wrap; gap: 8px; }
    .compare-overlay { padding: 12px; }
    .compare-modal { max-height: 85vh; }
    .compare-table { font-size: 0.8rem; }
    .compare-table th, .compare-table td { padding: 10px 10px; }
    .review-form__footer { flex-direction: column; align-items: stretch; }
    .review-form__submit { width: 100%; justify-content: center; }
    .similar-houses-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .similar-houses-grid { grid-template-columns: 1fr; }
}

/* ===== Infrastructure Filters & List ===== */
.infra-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.infra-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.infra-filter:hover {
    border-color: var(--accent);
    color: var(--text);
}
.infra-filter--active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.infra-list {
    margin-top: 16px;
}
.infra-list__empty {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
    padding: 16px;
}
.infra-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}
.infra-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, transform 0.2s;
}
.infra-item:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.infra-item__icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}
.infra-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.infra-item__name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.infra-item__meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== Price Analytics ===== */
.detail-price-analytics {
    background: linear-gradient(135deg, rgba(0, 172, 94, 0.08), rgba(27, 110, 181, 0.04));
    border: 1px solid rgba(0, 172, 94, 0.2);
}
.price-analytics-intro {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.price-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.price-stat {
    text-align: center;
    padding: 20px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.price-stat__value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-light);
    margin-bottom: 4px;
    font-family: var(--font-serif);
}
.price-stat__label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.price-chart-wrap {
    position: relative;
    height: 280px;
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.price-analytics-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
}

[data-theme="light"] .detail-price-analytics {
    background: linear-gradient(135deg, rgba(0, 172, 94, 0.06), rgba(27, 110, 181, 0.02));
    border-color: rgba(0, 172, 94, 0.15);
}
[data-theme="light"] .price-stat { background: #fff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .price-chart-wrap { background: #fff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .infra-item { background: #fff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .infra-filter { background: #fff; border-color: rgba(0,0,0,0.1); color: #4a4a5e; }
[data-theme="light"] .infra-filter--active { background: var(--accent); color: #fff; border-color: var(--accent); }

@media (max-width: 768px) {
    .price-stats { grid-template-columns: 1fr; gap: 10px; }
    .price-stat { padding: 14px 10px; }
    .price-stat__value { font-size: 1.1rem; }
    .price-chart-wrap { height: 220px; padding: 10px; }
    .infra-list__grid { grid-template-columns: 1fr; }
    .infra-filters { gap: 6px; }
    .infra-filter { padding: 6px 10px; font-size: 0.75rem; }
}

/* ===== Rating section ===== */
.detail-rating-section {
    background: linear-gradient(135deg, rgba(228, 150, 49, 0.08), rgba(201, 127, 26, 0.04));
    border: 1px solid rgba(228, 150, 49, 0.2);
    position: relative;
    overflow: hidden;
}
.detail-rating-section::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(228, 150, 49, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.detail-rating-section h2 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--gold);
}
.rating-intro {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 10px 14px;
    background: rgba(228, 150, 49, 0.06);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold);
}
.rating-overall {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.rating-overall__score {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-serif);
    color: var(--gold);
    line-height: 1;
    min-width: 72px;
    text-align: center;
}
.rating-overall__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 4px;
}
.rating-avg-star {
    font-size: 1.4rem;
    color: #d1d5db;
    line-height: 1;
    text-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.rating-avg-star--full {
    color: #e49631;
    text-shadow: none;
}
.rating-avg-star--half {
    color: #e49631;
    opacity: 0.55;
    text-shadow: none;
}
.rating-overall__label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.rating-overall__votes {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.rating-criteria {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.rating-criterion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.rating-criterion:last-child {
    border-bottom: none;
}
.rating-criterion__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 500;
    width: 100%;
}
.rating-criterion__icon {
    font-size: 1.2rem;
}
.rating-criterion__crowd {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
}
.rating-criterion__stars {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.rating-star {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font-size: 1.45rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 6px;
    min-width: 2.25rem;
    text-align: center;
    transition: color 0.15s, transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.rating-star:hover {
    transform: scale(1.08);
    color: #e49631;
    border-color: rgba(228, 150, 49, 0.45);
    box-shadow: 0 2px 8px rgba(228, 150, 49, 0.2);
}
.rating-star--active {
    color: #c97f1a;
    border-color: rgba(228, 150, 49, 0.55);
    background: linear-gradient(180deg, #fff8ed 0%, #fff 100%);
}
.rating-star--active:hover {
    color: #e49631;
}
.rating-thanks {
    margin-top: 20px;
    padding: 14px 20px;
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.2);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

/* ===== Description section (was AI) ===== */
.detail-description {
    background: linear-gradient(135deg, rgba(27, 110, 181, 0.08), rgba(0, 172, 94, 0.08));
    border: 1px solid rgba(27, 110, 181, 0.2);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.detail-description::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6c5ce7, #00cec9, #6c5ce7);
    background-size: 200% 100%;
    animation: shimmer 3s ease infinite;
}
.detail-description__text {
    line-height: 1.8;
    color: #2d2d35;
    font-size: 0.95rem;
}
.detail-description__text p {
    margin: 0 0 1rem;
}
.detail-description__text p:last-child {
    margin-bottom: 0;
}

/* ===== Facade gallery ===== */
.detail-facade {
    background: linear-gradient(135deg, rgba(27, 110, 181, 0.06), rgba(0, 172, 94, 0.06));
    border: 1px solid rgba(27, 110, 181, 0.15);
    border-radius: 16px;
    padding: 2rem;
}
.facade-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.facade-gallery__item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: rgba(0,0,0,0.2);
}
.facade-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.facade-gallery__item:hover img {
    transform: scale(1.03);
}

/* ===== Sale listings (квартиры в продаже) ===== */
.detail-sale-listings {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.08), rgba(0, 172, 94, 0.06));
    border: 1px solid rgba(0, 184, 148, 0.2);
    border-radius: 16px;
    padding: 2rem;
}
.sale-listings-intro {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.sale-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.sale-listing-card {
    display: block;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
}
.sale-listing-card:hover {
    border-color: rgba(0, 184, 148, 0.4);
    background: var(--bg-card-hover);
}
.sale-listing-card__price {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}
.sale-listing-card__info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.sale-listing-card__link {
    font-size: 0.9rem;
    color: var(--accent-light);
}

/* ===== Loading / Empty / Error ===== */
.house-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 18px;
}
.house-loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 24px auto 0;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.house-error {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.house-error h2 {
    color: var(--text);
    margin-bottom: 12px;
}
.house-error p {
    margin-bottom: 24px;
}
.houses-empty,
.houses-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 16px;
}
.houses-empty button {
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 14px;
}

/* ===== Detail Page ===== */
/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--text-secondary);
}
.breadcrumb a:hover {
    color: var(--accent);
}

/* Detail Header */
.detail-header {
    margin-bottom: 32px;
}
.detail-header__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.detail-header__title {
    font-family: var(--font-serif);
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    line-height: 1.3;
    flex: 1;
}
.detail-header__uk {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Rating badge (top of detail page) */
.detail-header__actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
}
.detail-rating-badge,
.detail-reviews-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color 0.2s, transform 0.2s;
    width: 80px;
    height: 80px;
    box-sizing: border-box;
}
.detail-rating-badge {
    border: 1px solid rgba(228, 150, 49, 0.25);
}
.detail-reviews-badge {
    border: 1px solid rgba(0, 172, 94, 0.2);
}
.detail-rating-badge:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}
.detail-reviews-badge:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.detail-rating-badge__score {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-serif);
    color: var(--gold);
    line-height: 1;
}
.detail-rating-badge__stars {
    display: flex;
    gap: 1px;
}
.mini-star {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1;
}
.mini-star--active {
    color: var(--gold);
}
.detail-rating-badge__label,
.detail-reviews-badge__label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1;
}
.detail-reviews-badge__icon {
    font-size: 1.2rem;
    line-height: 1;
}
.detail-reviews-badge__count {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-serif);
    color: var(--accent-light);
    line-height: 1;
}

/* Detail Metrics */
.detail-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 36px;
}
.metric-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s, transform 0.3s;
}
.metric-badge:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.metric-badge__icon {
    font-size: 28px;
    flex-shrink: 0;
}
.metric-badge__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.metric-badge__label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Detail Section */
.detail-section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.detail-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Detail Table */
.detail-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-row__label {
    font-size: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.detail-row__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

/* Detail Map */
.detail-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}
.detail-map iframe {
    display: block;
    width: 100%;
    min-height: 400px;
}


/* Wear Gauge */
.wear-gauge {
    max-width: 500px;
}
.wear-gauge__labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.wear-gauge__bar {
    height: 12px;
    background: linear-gradient(90deg, var(--success) 0%, var(--warning) 50%, var(--danger) 100%);
    border-radius: 6px;
    position: relative;
    opacity: 0.3;
    margin-bottom: 8px;
}
.wear-gauge__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, var(--warning) 50%, var(--danger) 100%);
    border-radius: 6px;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
}
.wear-gauge__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

/* Detail CTA */
.detail-cta {
    text-align: center;
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(0, 172, 94, 0.08) 0%, rgba(27, 110, 181, 0.06) 100%);
    border: 1px solid rgba(0, 172, 94, 0.2);
    border-radius: var(--radius-lg);
    margin: 40px 0;
}
.detail-cta h2 {
    font-family: var(--font-sans);
    font-size: 24px;
    margin-bottom: 12px;
    color: #222028;
}
.detail-cta p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.detail-cta__buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .houses-footer__inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .houses-header__bar {
        display: none;
    }
    .houses-header__burger {
        display: flex;
    }
    .houses-grid {
        grid-template-columns: 1fr;
    }
    .houses-filters__controls {
        flex-direction: column;
    }
    .filter-select {
        width: 100%;
    }
    .view-toggle {
        margin-left: 0;
    }
    .houses-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-header__top {
        flex-direction: column;
        gap: 12px;
    }
    .detail-header__actions {
        gap: 6px;
        width: 100%;
    }
    .detail-rating-badge,
    .detail-reviews-badge {
        flex-direction: row;
        gap: 5px;
        width: auto;
        height: auto;
        padding: 6px 10px;
        flex: 1;
        min-width: 0;
    }
    .detail-rating-badge__score,
    .detail-reviews-badge__count {
        font-size: 1.1rem;
    }
    .detail-rating-badge__stars { display: none; }
    .detail-rating-badge__label,
    .detail-reviews-badge__label {
        font-size: 0.55rem;
    }
    .detail-reviews-badge__icon {
        font-size: 1rem;
    }
    .detail-header__actions .compare-toggle {
        padding: 6px 8px;
        font-size: 0.72rem;
    }
    .rating-criterion {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .rating-overall {
        flex-direction: column;
        text-align: center;
    }
    .rating-overall__score {
        font-size: 2.4rem;
    }
    .map-tips {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .detail-row__value {
        text-align: left;
    }
    .houses-map {
        height: 350px;
    }
    #house-detail-map {
        height: 300px;
    }
    .houses-cta__buttons,
    .detail-cta__buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    .houses-footer__inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 480px) {
    .houses-stats {
        grid-template-columns: 1fr;
    }
    .detail-metrics {
        grid-template-columns: 1fr;
    }
    .building-card__info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.building-card {
    animation: fadeInUp 0.4s ease forwards;
}
.building-card:nth-child(2) { animation-delay: 0.05s; }
.building-card:nth-child(3) { animation-delay: 0.1s; }
.building-card:nth-child(4) { animation-delay: 0.15s; }
.building-card:nth-child(5) { animation-delay: 0.2s; }
.building-card:nth-child(6) { animation-delay: 0.25s; }

.stat-card {
    animation: fadeInUp 0.5s ease forwards;
}
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.3s; }
.stat-card:nth-child(5) { animation-delay: 0.4s; }

.metric-badge {
    animation: fadeInUp 0.4s ease forwards;
}
.metric-badge:nth-child(2) { animation-delay: 0.05s; }
.metric-badge:nth-child(3) { animation-delay: 0.1s; }
.metric-badge:nth-child(4) { animation-delay: 0.15s; }
.metric-badge:nth-child(5) { animation-delay: 0.2s; }
.metric-badge:nth-child(6) { animation-delay: 0.25s; }


/* ===== Useful Links Grid ===== */
.useful-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.useful-link-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
}
.useful-link-card:hover {
    border-color: var(--accent-glow);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 172, 94, 0.12);
}
.useful-link-card__icon {
    font-size: 1.6rem;
    line-height: 1;
}
.useful-link-card__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent-light);
}
.useful-link-card__desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== Blog Articles on House Page ===== */
.blog-articles-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}
.blog-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.blog-article-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
}
.blog-article-card:hover {
    border-color: var(--gold-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(228, 150, 49, 0.1);
}
.blog-article-card__img {
    height: 140px;
    overflow: hidden;
}
.blog-article-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.blog-article-card:hover .blog-article-card__img img {
    transform: scale(1.05);
}
.blog-article-card__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.blog-article-card__cat {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gold);
}
.blog-article-card__title {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .useful-links-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .useful-link-card {
        padding: 14px;
    }
    .useful-link-card__icon { font-size: 1.3rem; }
    .useful-link-card__title { font-size: 0.85rem; }
    .useful-link-card__desc { font-size: 0.75rem; }
    .blog-articles-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .blog-article-card__img { height: 100px; }
}
@media (max-width: 480px) {
    .useful-links-grid { grid-template-columns: 1fr; }
    .blog-articles-grid { grid-template-columns: 1fr; }
}

/* ===== Наверх ===== */
.houses-back-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 172, 94, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
}
.houses-back-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.houses-back-top:hover {
    background: #008f4e;
    color: #fff;
}

/* ===== Print ===== */
@media print {
    .houses-header,
    .houses-footer,
    .houses-filters,
    .houses-cta,
    .detail-cta,
    .houses-map-section,
    .btn,
    .houses-back-top {
        display: none;
    }
    body {
        background: #fff;
        color: #000;
    }
    .building-card,
    .stat-card,
    .detail-section,
    .metric-badge {
        border-color: #ddd;
        background: #fff;
    }
}
