/* GLOBAL + RESET */
@font-face {
  font-family: 'Onest';
  src: url('../fonts/Onest-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;          /* Диапазон доступной жирности */
  font-style: normal;
  font-display: swap;            /* Пока шрифт грузится – виден системный */
}

:root{
    --bg-site: #efefef;
    --bg-section: #ffffff;
    --bg-light: rgba(242, 247, 255, 1);
    --bg-accent: rgba(0, 97, 254, 1);
    
    --color-primary: rgba(10, 20, 38, 1);
    --color-accent: rgba(0, 97, 254, 1);
    --color-secondary: rgba(135, 145, 159, 1);
    --color-muted: rgba(31, 31, 31, 0.52);
    --color-border: rgba(211, 223, 238, 1);
}

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

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin: 0;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid Highlight;
  outline-offset: 2px;
}

/* Helpers */
.mb-1 {margin-bottom: 0.5rem;}
.mb-2 {margin-bottom: 1rem;}

.container { 
    width: 100%;
    max-width: 1320px; 
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.yoast-breadcrumbs { margin-bottom: 0.75rem; color: var(--color-secondary); font-size: 0.875rem; line-height: 1rem;}
.yoast-breadcrumbs a { color: var(--color-secondary); text-decoration: none;}
.yoast-breadcrumbs a:hover, .yoast-breadcrumbs a:active { color: var(--color-accent); }

/* MAIN */

body {
    background-color: var(--bg-site);
    font-family: 'Onest', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: var(--color-primary);
}

.page-content { background-color: var(--bg-section); padding: 0.75rem 1rem; border-radius: 0.75rem; }
.page-title { font-size: 1.5rem; line-height: 2rem; font-weight: 600;}
.page-content h2 { margin-bottom: 0.5rem;}
.page-content p { margin-bottom: 1rem; }

.site-content { 
    padding: 2.375rem 0;
}

/* Мобильная версия (до 768px) */
.site-header {
    background-color: var(--bg-section);
    padding: 0.75rem 0;
    position: relative;
    z-index: 100;
}

.header-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: inline-block;
    width: 116px;
    height: 36px;
}

.header-logo img {
    width: 100%;
    height: auto;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.header-phone::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background: url(../images/icons/phone.svg) 50% 50% no-repeat;
    background-size: contain;
}

/* ========== КНОПКА БУРГЕРА ========== */
.burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Анимация бургера в крестик */
.burger-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ========== НАВИГАЦИЯ ========== */
.header-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--bg-section);
    flex-direction: column;
    gap: 0;
    padding: 80px 1.5rem 1.5rem;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9;
    overflow-y: auto;
    display: flex;
}

.header-nav.open {
    left: 0;
}

.header-nav a {
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header-nav a:last-child {
    border-bottom: none;
}

.header-nav a:hover,
.header-nav a:active {
    color: var(--color-accent);
}

/* Оверлей (тёмный фон при открытом меню) */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 8;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media all and (min-width: 768px) {
    .burger-btn {
        display: none;
    }
    
    .menu-overlay {
        display: none;
    }
    
    .header-nav {
        position: static;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.75rem 0 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }
    
    .header-nav a {
        padding: 0;
        border-bottom: none;
        font-size: 1rem;
    }
    
    .site-header {
        padding: 1rem 0;
    }
    
    .header-top {
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--color-border);
    }
}

/* ========== СТИЛИ ДЛЯ ПУНКТА С ПОДМЕНЮ ========== */
.menu-item-has-children {
    position: relative;
}

.menu-item-has-children > a {
    display: inline-block;
}

/* Кнопка-стрелка для открытия подменю */
.submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 0 0 0.25rem;
    margin-left: 0.25rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.submenu-toggle svg {
    display: block;
    width: 12px;
    height: 8px;
}

.submenu-toggle.open {
    transform: rotate(180deg);
}

/* Само подменю */
.sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: var(--bg-section);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sub-menu.open {
    display: block;
}

.sub-menu li {
    margin: 0;
    padding: 0;
}

.sub-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.sub-menu li:last-child a {
    border-bottom: none;
}

.sub-menu li a:hover {
    color: var(--color-accent);
    background-color: var(--bg-light);
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ (до 768px) ========== */
@media all and (max-width: 767px) {
    .menu-item-has-children {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--color-border);
    }
    
    .menu-item-has-children > a {
        flex: 1;
        padding: 0.875rem 0;
        border-bottom: none;
    }
    
    .submenu-toggle {
        padding: 0.875rem 0.5rem;
        margin: 0;
    }
    
    .sub-menu {
        width: 100%;
        background-color: var(--bg-light);
        box-shadow: none;
        border-radius: 0;
        margin-top: 0;
        padding-left: 1rem;
    }
    
    .sub-menu li a {
        padding: 0.75rem 0 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* ========== ДЕСКТОПНАЯ ВЕРСИЯ (768px и выше) ========== */
@media all and (min-width: 768px) {
    /* Пункт с подменю */
    .menu-item-has-children {
        display: inline-block;
        position: relative;
    }
    
    .menu-item-has-children > a {
        display: inline-block;
        padding: 0;
        border-bottom: none;
    }
    
    .submenu-toggle {
        display: inline-flex;
    }
    
    /* ⭐ ГЛАВНОЕ РЕШЕНИЕ: убираем зазор */
    .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 240px;
        background-color: var(--bg-section);
        border-radius: 0.5rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        z-index: 100;
        margin-top: 0;           /* ✅ Убираем отступ сверху */
        padding-top: 0;          /* ✅ Убираем внутренний отступ */
    }
    
    /* ⭐ НЕВИДИМЫЙ МОСТИК между ссылкой и подменю */
    .menu-item-has-children::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 10px;            /* Высота "моста" — закрывает зазор */
        background: transparent;
    }
    
    /* Подменю появляется при ховере на родителе ИЛИ на самом подменю */
    .menu-item-has-children:hover .sub-menu,
    .sub-menu:hover {
        display: block;
    }
    
    /* Анимация для плавности (опционально) */
    .sub-menu {
        display: none;
        opacity: 0;
        transform: translateY(-5px);
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: none;   /* Скрытое меню не перехватывает события мыши */
    }
    
    .menu-item-has-children:hover .sub-menu,
    .sub-menu:hover {
        display: block;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;    /* Видимое меню реагирует на мышь */
    }
}


.site-footer {
    background-color: var(--bg-section); padding: 1rem 0;
}
.site-footer a { text-decoration: none; color: var(--color-primary); }
.site-footer a:hover, .site-footer a:active { color: var(--color-accent); }



.footer-logo { display: inline-block; width: 103px; height:32px;  margin-bottom: 1rem; } 
.footer-contacts,.footer-worktime,.footer-address { margin-bottom: 1rem;}
.footer-contacts a { display: flex; flex-direction: column;}

.footer-contacts,.footer-worktime,.footer-address,.footer-details { font-size: 0.875rem;}
.footer-phone { font-size: 1rem; font-weight: 500; margin-bottom: 1rem;}

.details-row { display: flex; flex-wrap: wrap; gap: 0.5rem;}


.footer-cols { margin-bottom: 1rem;}
.footer-cols h4 { margin-bottom: 0.75rem;}
.footer-menu {}
.footer-menu a { display: block; font-size: 0.875rem; line-height: 1rem; margin-bottom: 0.75rem; }
.footer-oferta {
    border-top: 1px solid var(--color-border); padding: 1rem 0;
}
.footer-oferta p { font-size: 0.75rem; line-height: 1rem; color: var(--color-muted);}
.footer-copyright { font-size: 0.75rem; line-height: 1rem; }
.footer-copyright * { margin-right: 1.5rem;}



/* REVIEWS */
.reviews-item {
    background-color: var(--bg-section);
    padding: 0.75rem 1rem; border-radius: 0.75rem; margin-bottom: 1.5rem;}
.author-anonymous { color: #555;}


/* AGENTS */
.agents { display: flex; gap: 1rem; flex-direction: column; flex-wrap: wrap; margin-bottom: 1rem; }
.agents-item { color: var(--color-primary); text-decoration: none; display: block;
              background-color: var(--bg-section); text-align: center; padding: 0.5rem; box-shadow: 0px 0px 5px var(--color-border); }
.agents-item:hover, .agents-item:active { background-color: var(--color-border);}
.agents-item img { max-width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; }
.agents-item h3 {}
.agents-item .agent-appoinment { color: var(--color-light); font-size: 0.875rem; line-height: 1;}

.agent-info { display: flex; gap: 1rem; margin-bottom: 1rem; }
.agent-info .agent-photo { width: 30%; }
.agent-info .agent-contacts { }

.agents-search { background-color: var(--bg-section); padding: 1rem; margin-bottom: 1rem; box-shadow: 0 0 5px var(--color-border); }
.agents-search form { width: 100%; }
.agents-search form input { width: calc(100% - 110px);}
.agents-search form button { width: 100px; }



/* news, articles */
.post-list {
    display: grid; gap: 1rem; margin-bottom: 1rem;
    grid-template-columns: repeat(3, 1fr); /* example: three equal columns */
    grid-template-rows: 1fr 1fr 1fr;
}
.post-item { background: #fff; padding: 0.75rem 1rem; border-radius: 0.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
display: flex; flex-direction: column; gap: 1rem;

}
.post-title { line-height: 1.2; height: 100px;}
.post-item a { text-decoration: none; color: var(--color-primary);}
.post-excerpt { font-size: 0.825rem; line-height: 1rem;}

.post_wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

/* Основной контент (левая колонка) */
.post_single {
    flex: 2; /* занимает 2 части от общего пространства */
    min-width: 0; /* предотвращает переполнение */
}


.sidebar {
    flex: 1; /* занимает 1 часть */
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    align-self: start; /* не растягивается по высоте */
}

/* Стили для списка новостей */
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar  li {    margin-bottom: 12px;
}

.sidebar li a {display: inline-block;
    text-decoration: none;
    color: #0073aa;
    line-height: 1!important;
}

aside li a:hover {
    text-decoration: underline;
}


.office_item:not(:first-child) { border-top: 1px solid var(--color-border); margin: 1rem 0; padding-top: 1rem; }

/* Адаптивность: на узких экранах колонки идут друг под другом */
@media (max-width: 768px) {
    .post_wrapper {
        flex-direction: column;
    }
}

@media all and (min-width:768px){
    
    .agents { flex-direction: row;}
    .agents-item { width: calc(50% - 0.5rem);}
    
    .page-content { padding: 1rem 1.5rem;}
    
    
    .footer-cols { display: flex; gap: 1rem; flex-wrap: wrap; }
    .footer-cols > div { width: calc(50% - 0.5rem); }
}


@media all and (min-width:1200px){    
    .agents-item { width: calc(25% - 0.75rem);}
    
    .page-content { padding: 1.5rem 2rem;}
    
    
    .site-footer { padding: 2rem 0;}
    .footer-cols { gap: 2rem; }
    .footer-cols > div {
        width: calc(25% - 1.5rem);
    }
}

@view-transition {
    navigation: auto;
}



.properties-filters {
    background-color: rgba(255, 255, 255, 0.8); border-radius: 0.75rem; padding: 0.25rem;
    backdrop-filter: blur(38.400001525878906px);
    box-shadow: 0px 1px 4px 0px rgba(75, 87, 103, 0.08);
    display: flex; gap: 0.75rem; justify-content: space-between; align-items:  center;
    margin-bottom: 3rem;
}

.properties-filters > div {
    background: rgba(242, 244, 247, 1);
border-radius: 8px;
padding: 12px;
gap: 4px;

flex:1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.properties-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.properties-views {
  display: flex;
  gap: 0.25rem;
  background:rgba(255, 255, 255, 1);
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.properties-view {
  background: none;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 0.25rem;
  cursor: pointer;
  color: #555;
  transition: border-color 0.2s, color 0.2s;
}

.properties-view:hover {
  color: #000;
}

.properties-view.active {
  border-color: #007bff;
  color: #007bff;
}
.properties-items.grid-view {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.properties-items.list-view { display: flex; flex-direction: column; gap: 1rem;}

.properties-item a { text-decoration: none; color: #333; display: flex; flex-direction: column; gap: 1rem;width: 100%;}

.properties-items.grid-view .properties-item a { display: flex; flex-direction: column; align-items: center; justify-content: stretch;
                  padding: 0.25rem; border-radius: 1rem; background: #fff; text-align: center;}
.properties-items.list-view .properties-item a { display: flex; flex-direction: row; align-items: start; justify-content: space-between;
                  padding: 0.25rem; border-radius: 1rem; background: #fff;}
.properties-item.view-grid {}
.properties-item.view-list {}

.properties-items .property-desc { display: none;}

.properties-item .property-photo {
    width: 100%;                 /* ширина родителя */
    aspect-ratio: 5 / 3;         /* современный способ задать пропорции */
    overflow: hidden;
    border-radius: 8px;
    background: #f0f2f5;
}

.properties-item .property-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.properties-items.list-view  .property-photo {
    max-width: 312px;
}

.properties-items.list-view .property-main-info { flex: 1;}
.properties-items.list-view .property-desc { display: block;}

.property-contacts button{
border-radius: 10px;
padding: 8px;
gap: 5px;
display: flex; width:100%; align-items: center; justify-content: center;
background: rgba(237, 243, 254, 1);
border:none;
cursor: pointer;
}
 
.property-cols {
    display: flex;
    gap: 1rem;           /* 16px при базовом размере шрифта 16px */
    max-width: 81rem;    /* 1296px → 81rem (если 1rem=16px) */
    width: 100%;
    margin: 0 auto 5.5rem;
    justify-content: space-between;
}

.left-col {
    flex: 0 0 calc(67% - 0.5rem);
    width: calc(67% - 0.5rem);
    display: flex; gap: 1rem; flex-direction: column;
}

.main-info {

    display: flex; flex-direction: column;
border-radius: 12px;
padding: 20px;
gap: 16px;
background: rgba(255, 255, 255, 1);

box-shadow: 0px 2px 4px -2px rgba(24, 39, 75, 0.04), 0px 2px 3px -2px rgba(24, 39, 75, 0.08);

}

.chars-info {
border-radius: 12px;
justify-content: space-between;
padding: 20px;
background: rgba(255, 255, 255, 1);

box-shadow: 0px 2px 4px -2px rgba(24, 39, 75, 0.04), 0px 2px 3px -2px rgba(24, 39, 75, 0.08);


}

.right-col {
    flex: 0 0 calc(33% - 0.5rem);
    width: calc(33% - 0.5rem);
    display: flex; gap: 1rem; flex-direction: column;
}

.properties-related { margin-bottom: 5rem;}
.properties-related h2 { margin-bottom: 1.5rem;}



.property-meta {

border-radius: 12px;
padding: 20px;
gap: 36px;
opacity: 1;
display: flex; flex-direction: column;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 4px -2px rgba(24, 39, 75, 0.04),
0px 2px 3px -2px rgba(24, 39, 75, 0.08);


}

.property-agent {

        border-radius: 12px;
        padding: 20px;
        gap: 36px;

    
    
    
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 2px 4px -2px rgba(24, 39, 75, 0.04),
    0px 2px 3px -2px rgba(24, 39, 75, 0.08);

    
    
}
.property-agent-info { display: flex; gap: 1rem; align-items: center;margin-bottom: .5rem;}
.property-agent-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;           /* делаем контейнер круглым */
    overflow: hidden;             /* обрезаем всё, что выходит за границы */
    flex-shrink: 0;               /* полезно при использовании во flex-контейнере */
}

.property-agent-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;            /* масштабирует изображение, заполняя контейнер, обрезая лишнее */
    display: block;               /* убираем лишний отступ снизу у img */
}
.property-agent-appoinment {

font-weight: 500;
color: rgba(172, 172, 172, 1);


}




.property-agent-name {
font-weight: 500;
font-size: 20px;
line-height: 24px;
color: rgba(0, 0, 0, 1);
}


.property-agent-desc { background: rgba(248, 249, 250, 1);
border-radius: 8px;
padding: 8px;
gap: 8px; margin-bottom: 2.25rem;
}

.property-agent-actions {
    display: flex; flex-direction: column; gap: 0.75rem;
}
 
.property-agent-actions a {
    border-radius: 8px;
    gap: 8px;
    padding-top: 12px;
    padding-right: 24px;
    padding-bottom: 12px;
    padding-left: 24px;
    display: flex;
    text-decoration: none; align-items: center; justify-content: center;
}

.property-agent-actions a.call_me {
    background: rgba(0, 97, 254, 1);
    color: #fff;
    font-weight: 500;
}

.property-agent-actions a.order_call {
    background: rgba(0, 97, 254, 0.09);
    color: rgba(0, 97, 254, 1);
    font-weight: 500;
}

.agent-free-consult {
border-radius: 12px;
padding: 8px;
gap: 24px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 4px -2px rgba(24, 39, 75, 0.04), 0px 2px 3px -2px rgba(24, 39, 75, 0.08);

}

.free-consult-wrap { display: flex; gap: 1rem; align-items: stretch; background: rgba(237, 243, 254, 1); border-radius: 0.75rem; }
.consult-form {
    flex: 1 1 auto;       /* занимает всё свободное место */
    min-width: 0;         /* предотвращает переполнение */
    display: flex; flex-direction: column; gap: 1.25rem;

padding: 1.5rem;


}
.consult-form h3 {
font-weight: 600;
font-style: SemiBold;
font-size: 1.5rem;
line-height: 2rem;
text-align: center;
color: rgba(31, 31, 31, 1);

}

.consult-form label {
font-weight: 300;
font-size: 12px;

line-height: 16px;
color: rgba(135, 145, 159, 1);

}

.consult-form form {
    display: flex; flex-direction: column; gap: 1rem;
}

.consult-form form input{

border-radius: 12px;
padding-top: 16px;
padding-right: 24px;
padding-bottom: 16px;
padding-left: 24px;
gap: 8px;
background: rgba(255, 255, 255, 1);

border: 1px solid rgba(211, 223, 238, 1);
color: rgba(135, 145, 159, 1);

}


.consult-form form input[type="submit"]{
    display: flex;align-items: center; justify-content: center;
border-radius: 8px;
padding-top: 12px;
padding-right: 24px;
padding-bottom: 12px;
padding-left: 24px;
gap: 8px;
border:none;
background: rgba(0, 97, 254, 1);
color: #fff;
font-weight: 500;
}


.consult-photo {
    width: 100%;          /* заполняет доступное пространство */
    max-width: 316px;     /* не больше оригинала */
    aspect-ratio: 1 / 1;  /* сохраняем квадрат */
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.consult-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chars-info h2 { margin-bottom: 0.5rem; 
font-weight: 600;
font-size: 24px;
line-height: 32px;
color: rgba(19, 20, 21, 1);

}
.char_items-wrap { display: flex; gap: 2.5rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(219, 225, 232, 1); }
.char_items { display: flex; flex-direction: column;  gap: 0.75rem; flex: 1; /* или flex: 1 1 0; — обе колонки равной ширины */
    min-width: 0; }
.char_item { display: flex; gap: 0.75rem; justify-content: space-between; color: rgba(135, 145, 159, 1); }
.char_item span { color: rgba(31, 31, 31, 1);
}

.property-description , .banks-block {
    padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(219, 225, 232, 1); 
}
.property-description p:not(:last-child){ margin-bottom: 1rem;}


/* Оригинальный стиль галереи */
.property-gallery {
    background: #fff;
    border-radius: 16px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 4px solid #fff;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    height: auto;
    max-height: 324px;
    align-items: center;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin-bottom: 1rem;
    box-shadow: 0px 2px 4px -2px rgba(24, 39, 75, 0.04), 0px 2px 3px -2px rgba(24, 39, 75, 0.08);
}
.property-gallery::-webkit-scrollbar {
    display: none;
}

/* Теперь ссылки — flex-элементы, занимают всю высоту */
.property-gallery > a {
    height: 100%;                /* занимают высоту контейнера */
    flex: 0 0 auto;              /* не сжимаются */
    display: block;              /* или flex, но block достаточно */
    text-decoration: none;       /* убираем подчеркивание */
    border-radius: 12px;         /* чтобы картинка тоже скруглилась, но можно убрать */
    overflow: hidden;            /* обрезаем лишнее, чтобы скругление работало */
}

/* Картинки внутри ссылок — растягиваются на всю ссылку */
.property-gallery > a img {
    height: 100%;                /* растягиваем по высоте ссылки */
    width: auto;                 /* ширина автоматически (пропорционально) */
    max-height: 316px;           /* можно оставить или убрать, т.к. уже ограничено через a */
    display: block;
    object-fit: cover;           /* или contain, выбирайте */
    border-radius: 12px;         /* скругление для самой картинки */
}


.main-chars { display: flex; justify-content: space-between; gap: 1rem;}
.main-char { display: flex; flex-direction: column; gap: 0.25rem; color: rgba(118, 122, 140, 1);font-family: Onest;
font-size: 14px;
line-height: 20px; flex:1;
 }
.main-char span {font-family: Onest;
font-weight: 500;
font-size: 20px;
line-height: 24px;
color: rgba(19, 20, 21, 1);

}

.error-content { padding: 4rem 0; text-align: center; }




/* ===== Лайтбокс с фиксированными размерами ===== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

/* Модальное окно — фиксированные размеры */
.lightbox-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 95%;
    max-width: 1280px;
    height: 85vh;                 /* фиксированная высота */
    max-height: 788px;            /* ограничим для больших экранов */
    min-height: 480px;            /* минимальная высота, чтобы не съезжало */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    cursor: default;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Кнопка закрытия — поверх всего */
.lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #1e293b;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.lightbox-close:hover {
    background: #ef4444;
    color: #fff;
}

/* Основной блок: фото + информация, занимает всё свободное место */
.lightbox-main {
    display: flex;
    flex: 1;                     /* занимает всё доступное пространство */
    min-height: 0;               /* важно для flex */
    padding: 0.25rem 0.25rem 0 0.25rem;
    gap: 16px;
}

/* Левая часть – фото */
.lightbox-image-wrapper {
    flex: 2.2;                   /* больше места для фото */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(19, 20, 21, 1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 0;               /* разрешаем сжатие */
}
.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;         /* вписываем без искажений */
    display: block;
}

/* Кнопки навигации поверх фото */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 24px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    backdrop-filter: blur(4px);
}
.lightbox-nav:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.lightbox-nav.prev {
    left: 10px;
}
.lightbox-nav.next {
    right: 10px;
}
.lightbox-nav.hidden {
    display: none;
}

/* Правая часть – информация, фиксированная ширина, скролл при необходимости */
.lightbox-info {
    flex: 1;
    padding: 10px 0 10px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 300px;
    max-width: 324px;
}
.lightbox-info h3 {
    font-size: 22px;
    margin: 0 0 6px 0;
    color: #0f172a;
    line-height: 1.3;
}
.lightbox-info .price {
    font-size: 26px;
    font-weight: 700;
    color: #3b82f6;
    margin: 4px 0;
}
.lightbox-info .agent {
    font-size: 15px;
    color: #475569;
    margin: 4px 0;
}
.lightbox-info .agent strong {
    color: #0f172a;
}

/* Миниатюры снизу — фиксированная высота */
.lightbox-thumbs {
    padding: 8px 12px 12px 12px;
    overflow-x: auto;
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;              /* не сжимается */
    height: 92px;                /* фиксированная высота */
    -webkit-overflow-scrolling: touch;
    align-items: center;
}
.lightbox-thumbs::-webkit-scrollbar {
    height: 6px;
}
.lightbox-thumbs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.lightbox-thumbs img {
    height: 64px;                /* фиксированная высота миниатюр */
    width: 87px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: 0.2s;
}
.lightbox-thumbs img:hover {
    border-color: #3b82f6;
}
.lightbox-thumbs img.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6;
}

/* ===== Адаптивность для мобильных ===== */
@media (max-width: 768px) {
    .lightbox-overlay {
        padding: 10px;
    }
    .lightbox-modal {
        width: 100%;
        height: 95vh;             /* почти весь экран */
        max-height: 95vh;
        min-height: unset;
        border-radius: 12px;
    }
    .lightbox-main {
        flex-direction: column;
        padding: 10px 10px 0 10px;
        gap: 10px;
    }
    .lightbox-image-wrapper {
        flex: 2;
        min-height: 200px;
    }
    .lightbox-image-wrapper img {
        max-height: 50vh;
    }
    .lightbox-info {
        max-width: unset;
        min-width: unset;
        padding: 4px 0;
        flex: 0.8;
        overflow-y: auto;
    }
    .lightbox-info h3 {
        font-size: 18px;
        margin-bottom: 2px;
    }
    .lightbox-info .price {
        font-size: 20px;
    }
    .lightbox-info .agent {
        font-size: 14px;
    }
    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    .lightbox-nav.prev {
        left: 4px;
    }
    .lightbox-nav.next {
        right: 4px;
    }
    .lightbox-thumbs {
        height: 60px;             /* уменьшаем высоту миниатюр */
        padding: 8px 10px 10px 10px;
    }
    .lightbox-thumbs img {
        height: 38px;
    }
}


.property-actions__btn--favorite.active {
    color: #ef4444;
    border-color: #ef4444;
    background: #fee2e2;
}