/* =====================================================
   ДИЗАЙН-СИСТЕМА
   Палитра: глубокий морской синий + лазурный + сдержанное золото (акцент)
   Типографика: Fraunces (заголовки, с характером) + Manrope (текст, чистый)
   Фирменный элемент: арка — отсылка к средиземноморской архитектуре побережья
   ===================================================== */

:root {
    --navy: #0A2E4E;        /* глубокий морской синий - основной тёмный, ФОН градиентов - не меняется в тёмной теме */
    --navy-text: var(--navy); /* тот же синий, но именно для ТЕКСТА - в тёмной теме светлеет отдельно от фона героя */
    --teal: #1D6FA5;        /* лазурный - вторичный, ссылки, hover */
    --sky: #4B9FD6;         /* светло-голубой - для лёгких акцентов/бейджей */
    --sand: #E4EEF6;        /* холодный светло-голубой - фон карточек-акцентов */
    --sand-light: #F4F8FB;  /* почти белый с голубым подтоном - фон секций */
    --gold: #C99A3E;  /* сдержанное золото - ЕДИНСТВЕННЫЙ тёплый акцент, только кнопки/цена/рейтинг */
    --ink: #16232E;
    --muted: #62778C;
    --white: #FFFFFF;
    --border: #D7E4ED;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(10, 46, 78, 0.08);
    --shadow-hover: 0 8px 28px rgba(10, 46, 78, 0.14);
}

/* ===== Тёмная (ночная) тема =====
   Фон героя/градиенты (--navy, --teal, --sky) НЕ трогаем - они и так тёмные/насыщенные,
   выглядят хорошо в обеих темах. Меняем только то, что реально должно поменять
   светлоту: фон страницы/карточек, текст, границы. */
[data-theme="dark"] {
    --navy-text: #8FC1E8;   /* заголовки/ссылки - было тёмным на светлом, стало светлым на тёмном */
    --sand: #1B2A38;        /* фон полей ввода/бейджей - было светло-голубым, стало тёмным */
    --sand-light: #0D1620;  /* фон страницы - было почти белым, стало глубоким тёмно-синим */
    --gold: #D8AD57;        /* чуть ярче для контраста на тёмном фоне */
    --ink: #DCE7F0;         /* основной текст - было тёмным, стало светлым */
    --muted: #93A9BE;       /* приглушённый текст - светлее для читаемости на тёмном */
    --white: #16232E;       /* фон карточек/поверхностей - было буквально белым, стало тёмной поверхностью */
    --border: #2A3B4A;      /* границы - приглушённые, тёмные */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.4);
}

/* Точечные переопределения - эти места используют захардкоженные светлые цвета
   (не переменные), которые иначе смотрелись бы светлыми плашками на тёмном фоне */
[data-theme="dark"] .error-msg { color: #FF9B9B; background: #3A1F1F; }
[data-theme="dark"] .success-msg { color: #7DD9A0; background: #1A3324; }
[data-theme="dark"] .calendar-day.busy { color: #E89B9B; background: #3A2426; }
[data-theme="dark"] .busy-date-item { color: #E0958F; }
[data-theme="dark"] .fixed-params-list .param-val-green { color: #6FD696; }
[data-theme="dark"] .lightbox-overlay { background: rgba(0,0,0,.97); }
[data-theme="dark"] .price-marker-inner { background: var(--white); color: var(--ink); border-color: var(--navy-text); }

/* Плавный переход между темами, а не резкое мигание */
body, .topbar, .property-info, .property-sidebar, .filter-bar, .catalog-card, .property-card,
.booking-block, .calc-block, .callback-block, .reviews-section, input, select, textarea {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

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

body {
    font-family: 'Manrope', -apple-system, sans-serif;
    color: var(--ink);
    background: var(--sand-light);
    line-height: 1.55;
    font-size: 15px;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
a { color: var(--teal); text-decoration: none; }
h2 { font-size: 24px; margin: 30px 0 16px; color: var(--navy-text); }
h3 { font-size: 18px; margin-bottom: 10px; color: var(--navy-text); }

/* ===== Шапка ===== */
/* ===== Шапка (две строки: тонкая служебная сверху + основная с лого/меню/телефоном) ===== */
.topbar { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.topbar-utility { background: var(--navy); }
.topbar-utility-inner { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 12.5px; }
.topbar-utility a { color: rgba(255,255,255,.75); font-weight: 600; }
.topbar-utility a:hover { color: var(--white); }
.topbar-utility-right { display: flex; align-items: center; gap: 16px; }
.topbar-utility .icon-link { color: rgba(255,255,255,.75); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 0; }
.header-phone { font-weight: 700; color: var(--navy-text); font-size: 15px; white-space: nowrap; }
.header-phone:hover { color: var(--gold); }
.header-contact { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.header-callback-link {
    background: none; border: none; color: var(--teal); font-size: 12px; font-weight: 600;
    cursor: pointer; padding: 0; text-decoration: underline; font-family: inherit;
}
.header-callback-link:hover { color: var(--gold); }

/* ===== Модалка "Обратный звонок" ===== */
.callback-modal-box {
    max-width: 380px; padding: 28px; background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
}
.callback-modal-box h3 { margin-bottom: 16px; }
#callbackForm { display: flex; flex-direction: column; gap: 10px; }
#callbackForm .btn { margin-top: 6px; }

.phone-with-code { display: flex; gap: 8px; }
.phone-with-code input { flex: 1; }

/* ===== Свой выпадающий список кодов стран (с картинками флагов) ===== */
.phone-code-picker { position: relative; flex: 0 0 110px; }
.phone-code-display {
    width: 100%; height: 100%; display: flex; align-items: center; gap: 6px;
    background: var(--sand-light); border: 1px solid var(--border); border-radius: 10px;
    padding: 11px 10px; cursor: pointer; font-size: 14px; color: var(--ink); font-family: inherit;
}
.phone-code-display img { border-radius: 2px; flex-shrink: 0; }
.phone-code-arrow { margin-left: auto; color: var(--muted); font-size: 11px; }
.phone-code-dropdown {
    display: none; position: absolute; top: 100%; left: 0; z-index: 70; margin-top: 4px;
    background: var(--white); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-hover); max-height: 260px; overflow-y: auto; width: 220px;
}
.phone-code-dropdown.open { display: block; }
.phone-code-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.phone-code-option img { border-radius: 2px; flex-shrink: 0; }
.phone-code-option:hover { background: var(--sand); }
.callback-consent { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.callback-consent a { text-decoration: underline; }

.consent-modal-box {
    max-width: 640px; padding: 28px; background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-hover); max-height: 80vh; overflow-y: auto;
}
.consent-modal-box h3 { margin-bottom: 14px; }
.consent-text p { margin-bottom: 12px; line-height: 1.6; }
.consent-text ul { margin: 0 0 0 20px; }
.consent-text li { margin-bottom: 12px; line-height: 1.6; font-size: 14px; color: var(--ink); }

.mobile-only-nav-item { display: none; }
@media (max-width: 768px) {
    .topbar-utility { display: none; }  /* на мобильном служебная строка скрыта - её пункты дублируются внутрь гамбургер-меню */
    .mobile-only-nav-item { display: block; }
}
.logo { font-family: 'Fraunces', serif; font-weight: 700; font-size: 21px; color: var(--navy-text); display: flex; align-items: center; gap: 9px; }
.logo-icon { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.logo span { color: var(--gold); }
.topnav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topnav > a { color: var(--ink); font-weight: 600; font-size: 14px; }
.topnav > a:hover { color: var(--gold); }
.menu-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--navy-text); cursor: pointer; padding: 4px; }

.switch-group { display: flex; align-items: center; gap: 10px; }
.dropdown { position: relative; }
.dropdown-toggle {
    background: var(--sand); border: 1px solid var(--border); border-radius: 20px;
    padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--navy-text); cursor: pointer;
}
.dropdown-menu {
    display: none; position: absolute; right: 0; top: 110%; background: var(--white);
    border-radius: 10px; box-shadow: var(--shadow-hover); overflow: hidden; min-width: 140px; z-index: 50;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 9px 14px; font-size: 13px; color: var(--ink); }
.dropdown-menu a:hover, .dropdown-menu a.active { background: var(--sand); color: var(--gold); }

.currency-switch { display: flex; gap: 2px; background: var(--sand); border-radius: 20px; padding: 3px; border: 1px solid var(--border); }
.cur-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--muted); }
.cur-btn.active { background: var(--navy); color: var(--white); }

.theme-toggle {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background: var(--sand); border: 1px solid var(--border); border-radius: 50%;
    font-size: 16px; cursor: pointer; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold); }

/* ===== Hero с арочным фирменным элементом ===== */
.hero {
    background: linear-gradient(165deg, var(--navy) 0%, var(--teal) 65%, var(--sky) 130%);
    border-radius: 0 0 40px 40px;
    padding: 56px 20px 40px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute; right: -60px; top: -40px; width: 320px; height: 320px;
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 50% 50% 0 0 / 60% 60% 0 0;
    pointer-events: none;
}
.hero-arch { max-width: 640px; margin: 0 auto; text-align: center; color: var(--white); }
.hero-eyebrow {
    display: inline-block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(255,255,255,0.65); margin-bottom: 14px; font-weight: 600;
}
.hero h1 { font-size: 34px; line-height: 1.15; margin-bottom: 12px; color: var(--white); }
.hero-count { font-size: 16px; font-weight: 700; color: var(--gold); margin: 6px 0 4px; }
.hero-sub { font-size: 15px; color: rgba(255,255,255,0.8); max-width: 480px; margin: 0 auto 28px; }

.search-form {
    background: var(--white); padding: 20px;
    max-width: 720px; margin: 0 auto; text-align: left; box-shadow: var(--shadow-hover);
    border-radius: 22px 22px var(--radius) var(--radius);
}
.form-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.form-row input, .form-row select { flex: 1; min-width: 140px; }

input, select, textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; background: var(--sand-light); color: var(--ink); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; background: var(--white); }

.btn { display: inline-block; padding: 13px 22px; border-radius: 10px; border: none; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; transition: transform .15s ease, box-shadow .15s ease; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--white); width: 100%; }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(193, 80, 46, 0.35); }
.btn-whatsapp {
    background: linear-gradient(135deg, #2EE874 0%, #25D366 100%);
    color: var(--white); width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 3px 10px rgba(37,211,102,.35);
}
.btn-whatsapp:hover { box-shadow: 0 5px 16px rgba(37,211,102,.5); transform: translateY(-1px); }
.btn-telegram {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: var(--white); width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 3px 10px rgba(34,158,217,.35);
}
.btn-telegram:hover { box-shadow: 0 5px 16px rgba(34,158,217,.5); transform: translateY(-1px); }
.btn-telegram svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ===== Преимущества ===== */
.advantages { padding-top: 44px; }
.advantages h2 { text-align: center; }
.advantages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.advantage-item {
    background: var(--white); padding: 20px 16px; border-radius: var(--radius); text-align: center;
    font-weight: 600; font-size: 14px; color: var(--navy-text); box-shadow: var(--shadow); border: 1px solid var(--border);
}
.adv-icon { display: block; font-family: 'Fraunces', serif; font-size: 26px; color: var(--gold); margin-bottom: 8px; }

/* ===== Категории на главной ===== */
.catalog-preview h2 { text-align: center; }

/* ===== Блок "О нас" на главной ===== */
.about-block { padding: 10px 20px 50px; }
.about-block-inner {
    max-width: 780px; margin: 0 auto; background: var(--white); border-radius: var(--radius);
    padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.about-block-inner h2 { margin-bottom: 14px; }
.about-block-inner p { margin: 10px 0; line-height: 1.7; color: var(--ink); }
.about-block-inner ul { margin: 10px 0 10px 20px; }
.about-block-inner li { margin: 6px 0; line-height: 1.6; color: var(--ink); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 40px; }
.catalog-card {
    background: var(--white); padding: 0; border-radius: var(--radius); text-align: center;
    display: flex; flex-direction: column; align-items: center; overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform .18s ease, box-shadow .18s ease;
}
.catalog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.catalog-card-arch {
    display: block; width: 100%; height: 70px;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    border-radius: 0 0 60% 60% / 0 0 100% 100%;
}
.catalog-card-photo { display: block; width: 100%; height: 130px; object-fit: cover; }
.catalog-card-label { font-weight: 700; color: var(--navy-text); font-size: 15px; margin-top: 16px; padding: 0 12px; }
.catalog-card-count { font-family: 'Fraunces', serif; color: var(--gold); font-size: 26px; margin: 6px 0 20px; }

/* ===== Листинг + фильтры ===== */
.listing-layout { display: flex; flex-direction: column; gap: 20px; margin: 24px 0; }

/* ===== Горизонтальная панель фильтра сверху (как у референса) ===== */
.filter-bar { background: var(--white); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.filter-bar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-bar-row select, .filter-bar-row input { flex: 1 1 160px; min-width: 140px; }
.filter-bar-dates { flex: 1 1 260px; }
.filter-bar-dates .date-range-display { height: 100%; display: flex; align-items: center; }
.filter-bar-row .btn { flex: 0 0 auto; }

.filter-bar-checkboxes { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 14px; }
.checkbox-label { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; text-transform: none !important; font-size: 14px; }
.checkbox-label input { width: auto; }

.filter-advanced-toggle {
    background: none; border: none; color: var(--teal); font-weight: 600; font-size: 14px;
    cursor: pointer; padding: 4px 0; font-family: inherit; margin-left: auto;
}
.filter-advanced-toggle:hover { color: var(--gold); }

.filter-bar-advanced { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.filter-bar-advanced.open { display: block; }
.filter-bar-advanced-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 14px; }
.filter-bar-advanced-grid label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.filter-bar-advanced-grid .form-row { display: flex; gap: 8px; }
.filter-bar-advanced-grid .form-row input { min-width: 0; }
.info-icon-btn {
    background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px;
    padding: 0; margin-left: 3px; vertical-align: middle;
}
.info-icon-btn:hover { color: var(--gold); }
.clear-field-btn {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted);
    font-size: 13px; text-decoration: none; line-height: 1;
}
.clear-field-btn:hover { color: #A83232; } /* иначе числовые поля не сжимаются меньше своей стандартной ширины и вылезают за карточку */

.results { width: 100%; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }

/* ===== Гид по районам ===== */
.district-guide-box { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 18px; }
.district-guide-box h3 { margin: 0 0 12px; }
.district-guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .district-guide-cols { grid-template-columns: 1fr; } }
.district-guide-pros strong { color: #1E6B45; }
.district-guide-cons strong { color: #A83232; }
.district-guide-pros p, .district-guide-cons p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink); }

/* ===== Консьерж-сервис ===== */
.concierge-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; margin-bottom: 24px; }
.concierge-card { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.concierge-card-title { font-weight: 700; margin-bottom: 4px; }
.concierge-card-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ===== Групповой подбор ===== */
.group-result-box { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 22px; }
.group-result-box h3 { margin: 0 0 4px; }
.results-header h1 { font-size: 21px; color: var(--navy-text); }
.results-count { font-size: 15px; font-weight: 500; color: var(--muted); font-family: 'Manrope', sans-serif; }

@media (max-width: 768px) {
    .filter-bar-row select, .filter-bar-row input, .filter-bar-dates { flex: 1 1 100%; }
    .filter-advanced-toggle { margin-left: 0; }
}

/* Хлебные крошки */
.breadcrumbs { font-size: 13px; color: var(--muted); margin: 16px 0 6px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--gold); }
.sort-select { width: auto; }

.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.property-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden; display: block;
    box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform .18s ease, box-shadow .18s ease;
}
.property-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.property-card-img { position: relative; aspect-ratio: 4/3; background: var(--sand); }
.property-card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: rgba(10, 46, 78,.85); color: var(--white); font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 20px; }
.property-card-body { padding: 14px; }
.property-price { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 700; color: var(--gold); }
.property-title { font-weight: 700; margin: 5px 0; color: var(--navy-text); font-size: 14px; }
.property-loc, .property-meta { font-size: 12.5px; color: var(--muted); }

/* ===== Стандарт карточки объекта: id-плашка + быстрые теги удобств ===== */
.property-card-id {
    text-align: right; font-size: 11px; color: var(--muted); font-weight: 600;
    margin-top: -6px; margin-bottom: 4px; opacity: .75;
}
.property-quick-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.property-quick-tags span {
    background: var(--sand-light); color: var(--teal); font-size: 11px; padding: 3px 9px; border-radius: 12px;
}

/* ===== Карточка объекта - двухколоночная раскладка (галерея+описание слева, бронирование справа) ===== */
.property-page { display: flex; gap: 26px; margin: 24px 0; align-items: flex-start; flex-wrap: wrap; }
.property-main { flex: 1 1 600px; min-width: 0; }
.property-sidebar {
    width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 769px) {
    .property-sidebar { position: sticky; top: 90px; }
}
.gallery { width: 100%; margin-bottom: 24px; }
.gallery img#mainPhoto { width: 100%; border-radius: var(--radius); object-fit: cover; max-height: 460px; aspect-ratio: 4/3; }
.clickable-photo { cursor: zoom-in; transition: opacity .15s ease; }
.clickable-photo:hover { opacity: .92; }

.main-photo-wrap { position: relative; }
.photo-counter-badge {
    position: absolute; top: 12px; left: 12px; background: rgba(10,46,78,.7); color: var(--white);
    font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 20px;
}
.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(10,46,78,.55); color: var(--white);
    border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.gallery-nav:hover { background: rgba(10,46,78,.8); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.thumb.active-thumb { border-color: var(--navy-text); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; justify-content: center; }
.thumb { width: 96px; height: 74px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.thumb:hover { border-color: var(--gold); }

/* ===== Полноэкранный просмотр фото (лайтбокс) ===== */
.lightbox-overlay {
    display: none; position: fixed; inset: 0; background: rgba(10, 20, 26, .95);
    z-index: 1000; align-items: center; justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 8px; }
.lightbox-close {
    position: absolute; top: 20px; right: 24px; background: rgba(255,255,255,.12); color: var(--white);
    border: none; width: 42px; height: 42px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: var(--white);
    border: none; width: 52px; height: 52px; border-radius: 50%; font-size: 30px; cursor: pointer; line-height: 1;
}
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(255,255,255,.12); color: var(--white); padding: 6px 16px; border-radius: 20px; font-size: 13px;
}
@media (max-width: 600px) {
    .lightbox-nav { width: 42px; height: 42px; font-size: 24px; }
    .lightbox-close { width: 36px; height: 36px; font-size: 16px; top: 12px; right: 12px; }
}

.property-info {
    width: 100%; background: var(--white);
    border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.property-id { color: var(--muted); font-size: 12px; }
.property-info h1 { font-size: 26px; margin: 6px 0; }
.property-address { color: var(--muted); margin: 4px 0 14px; font-size: 14px; }
.price-block { margin: 14px 0; }
.price-main { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 700; color: var(--gold); }
.price-orig { font-size: 12px; color: var(--muted); }
.specs-table { width: 100%; margin: 18px 0; border-collapse: collapse; }
.specs-table td { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.specs-table td:first-child { color: var(--muted); }
.separator { height: 1px; background: var(--border); margin: 16px 0; }
.fixed-params-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin: 12px 0; padding: 0; }
.fixed-params-list li { font-size: 14px; color: var(--ink); }
.fixed-params-list .param-val-green { color: #1E6B45; font-weight: 700; }
@media (max-width: 480px) { .fixed-params-list { grid-template-columns: 1fr; } }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.amenities span { background: var(--sand); padding: 7px 12px; border-radius: 20px; font-size: 13px; color: var(--navy-text); font-weight: 600; }
.description { margin: 18px 0 6px; color: var(--ink); line-height: 1.7; }
.description p { margin: 0 0 8px; }
.description p:last-child { margin-bottom: 0; }
.description ul, .description ol { margin: 0 0 14px 22px; }
/* Quill может сохранять выравнивание и через CSS-класс, и через инлайн-стиль -
   стиль отработает сам, а класс без этого правила не значил бы ничего на публичной странице */
.description .ql-align-center { text-align: center; }
.description .ql-align-right { text-align: right; }
.description .ql-align-justify { text-align: justify; }
.description-collapsed { max-height: 220px; overflow: hidden; position: relative; }
.description-collapsed::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50px;
    background: linear-gradient(transparent, var(--white));
}
.description-toggle {
    display: none; background: none; border: none; color: var(--teal); font-weight: 700;
    font-size: 13px; cursor: pointer; padding: 0 0 14px; text-decoration: underline;
}
.agent-info { margin-top: 14px; color: var(--muted); font-size: 13px; }
.rating-summary { color: var(--gold); font-weight: 700; font-size: 14px; margin: 4px 0 10px; }

/* ===== Отзывы ===== */
.reviews-section { background: var(--white); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow); border: 1px solid var(--border); max-width: 820px; margin-left: auto; margin-right: auto; }

/* ===== Модальное окно отзывов ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(10,20,26,.6); z-index: 900;
    align-items: flex-start; justify-content: center; overflow-y: auto; padding: 60px 16px;
}
.modal-overlay.open { display: flex; }
.modal-content-box { position: relative; margin: 0; width: 100%; max-width: 600px; }
.modal-close-btn {
    position: absolute; top: 14px; right: 14px; background: var(--sand); border: none; color: var(--navy-text);
    width: 32px; height: 32px; border-radius: 50%; font-size: 15px; cursor: pointer;
}
.modal-close-btn:hover { background: var(--gold); color: var(--white); }
.reviews-list { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; }
.review-card { background: var(--sand-light); border-radius: 10px; padding: 16px; border: 1px solid var(--border); }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-header strong { color: var(--navy-text); }
.review-stars { font-size: 13px; }
.review-text { font-size: 14px; color: var(--ink); margin: 6px 0; }
.review-date { font-size: 12px; color: var(--muted); }
.review-form-toggle summary { cursor: pointer; font-weight: 700; color: var(--gold); padding: 10px 0; }
.review-form { max-width: 100%; margin-top: 12px; padding: 0; box-shadow: none; border: none; }
.review-form label { display: block; margin: 10px 0 5px; font-weight: 700; font-size: 13px; color: var(--navy-text); }

/* ===== Формы ===== */
.auth-form-wrap {
    background: var(--white); padding: 28px; border-radius: var(--radius); max-width: 520px; margin: 24px auto;
    box-shadow: var(--shadow); border: 1px solid var(--border);
}
.property-form {
    background: var(--white); padding: 32px; border-radius: var(--radius); max-width: 900px; margin: 24px auto;
    box-shadow: var(--shadow); border: 1px solid var(--border);
}
.auth-form label, .property-form label { display: block; margin: 14px 0 5px; font-weight: 700; font-size: 13px; color: var(--navy-text); }
.error-msg { color: #A83232; background: #FBE9E7; padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.success-msg { color: #1E6B45; background: #E4F3EA; padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 16px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 8px; }

/* ===== Загрузка фото сайта вручную (admin/site_images.php) ===== */
.site-image-slot { padding: 16px 0; border-bottom: 1px solid var(--border); }
.site-image-slot:last-of-type { border-bottom: none; }
.site-image-current { display: flex; align-items: center; gap: 14px; margin: 8px 0 12px; }
.site-image-current img { width: 140px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* ===== Занятость объектов (шахматка) ===== */
.occupancy-nav { display: flex; align-items: center; gap: 16px; margin: 16px 0; }
.occupancy-table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); max-height: 75vh; }
.occupancy-table { border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.occupancy-table th, .occupancy-table td { border: 1px solid var(--border); padding: 4px 3px; text-align: center; min-width: 44px; }
.occupancy-table thead th { background: var(--sand-light); color: var(--muted); font-weight: 700; }
.occupancy-month-row th { position: sticky; top: 0; z-index: 3; }
.occupancy-month-label { color: var(--navy-text) !important; font-size: 12px; border-bottom: 2px solid var(--gold) !important; }
.occupancy-day-row th { position: sticky; top: 27px; z-index: 2; }
.occupancy-dow { font-weight: 400; color: var(--muted); font-size: 9px; }
.occupancy-weekend { color: #A83232 !important; }
.occupancy-prop-col { position: sticky; left: 0; background: var(--white); text-align: left !important; min-width: 150px; z-index: 4; font-weight: 600; }
thead .occupancy-prop-col { background: var(--sand-light); z-index: 5; }
.occupancy-free { background: #E4F3EA; vertical-align: middle; }
.occupancy-busy { background: #F6A9A9; vertical-align: middle; font-weight: 700; }
.occupancy-cell-price { font-weight: 700; color: var(--ink); line-height: 1.2; }
.occupancy-busy .occupancy-cell-price { color: #7A1F1F; font-size: 11px; }
.occupancy-cell-guests { font-size: 9px; color: var(--muted); }
.occupancy-busy .occupancy-cell-guests { color: #7A1F1F; opacity: .8; }
.occupancy-legend { display: flex; gap: 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.occupancy-legend-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.occupancy-free { position: relative; cursor: default; }
.occupancy-price-editable { cursor: pointer; border-radius: 3px; }
.occupancy-price-editable:hover { background: rgba(201,154,62,.25); }
.occupancy-price-input { border: 1px solid var(--gold); border-radius: 4px; font-size: 11px; text-align: center; padding: 1px 2px; }
.occupancy-block-btn, .occupancy-unblock-btn {
    position: absolute; top: 1px; right: 1px; background: none; border: none; cursor: pointer;
    font-size: 9px; opacity: 0; padding: 1px; line-height: 1;
}
.occupancy-free:hover .occupancy-block-btn { opacity: .6; }
.occupancy-free:hover .occupancy-block-btn:hover { opacity: 1; }
.occupancy-busy { position: relative; }
.occupancy-unblock-btn { opacity: .6; }
.occupancy-unblock-btn:hover { opacity: 1; }

/* ===== Отчёты доходы/расходы ===== */
.report-period-tabs { display: flex; gap: 8px; margin: 16px 0 6px; }
.report-period-tab { padding: 8px 18px; border-radius: 20px; background: var(--white); border: 1px solid var(--border); color: var(--ink); font-weight: 600; font-size: 14px; }
.report-period-tab.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.report-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin: 18px 0; }
.report-summary-card { background: var(--white); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.report-summary-card span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.report-summary-card strong { font-size: 24px; }
.report-income strong { color: #1E6B45; }
.report-expense strong { color: #A83232; }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
@media (max-width: 640px) { .report-columns { grid-template-columns: 1fr; } }

/* На широком экране некоторые естественно парные поля ставим по два в ряд -
   на телефоне (см. медиа-запрос ниже) они всё равно вернутся в один столбец */
.property-form .field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) {
    .property-form .field-pair { grid-template-columns: 1fr; }
}

/* ===== Вход через соцсети ===== */
.social-login-buttons { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.social-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px;
    border-radius: 10px; font-weight: 700; font-size: 14px; border: 1px solid var(--border); color: var(--navy-text);
}
.social-btn-google { background: #fff; }
.social-btn-vk { background: #E8F1FB; }
.social-btn-yandex { background: #FEF2E0; }
.social-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.telegram-widget-wrap { display: flex; justify-content: center; margin: 10px 0; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ===== Личный кабинет обычного пользователя ===== */
.account-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.account-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }

/* ===== Реферальный блок ===== */
.ref-block { background: linear-gradient(135deg, var(--sand), var(--sand-light)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 20px 0; }
.ref-link-box { display: flex; gap: 8px; margin: 12px 0; }
.ref-link-box input { flex: 1; background: var(--white); }
.ref-link-box button { width: auto; white-space: nowrap; }
.ref-code { font-size: 14px; color: var(--navy-text); }

/* ===== Статистика ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 14px; margin: 18px 0; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-number { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 700; color: var(--gold); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ===== Админка ===== */
.admin-nav { display: flex; gap: 14px; margin: 18px 0; flex-wrap: wrap; }
.admin-nav a { background: var(--white); padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--navy-text); border: 1px solid var(--border); }
.admin-nav-cta { background: var(--gold) !important; color: var(--white) !important; border-color: var(--gold) !important; }
.admin-nav a:hover { border-color: var(--gold); color: var(--gold); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; margin: 14px 0; box-shadow: var(--shadow); }
.admin-table-nested-row td { background: var(--sand-light); font-size: 13px; color: var(--muted); padding-left: 24px !important; }
.badge-inline { display: inline-block; background: var(--sand); color: var(--navy-text); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }
.admin-table th, .admin-table td { padding: 11px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.admin-table th { background: var(--sand); color: var(--navy-text); font-weight: 700; }
.btn-small { padding: 7px 12px; border-radius: 8px; border: none; font-size: 12px; cursor: pointer; margin-right: 4px; font-weight: 700; }
.btn-approve { background: #1E6B45; color: var(--white); }
.btn-reject { background: #A83232; color: var(--white); }

/* ===== Подвал ===== */
.footer { text-align: center; padding: 30px 20px; color: var(--muted); font-size: 13px; margin-top: 50px; }

/* ===== Избранное / Сравнение - шапка ===== */
.icon-link { position: relative; }
.count-badge { background: var(--gold); color: var(--white); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; margin-left: 2px; }

/* ===== Действия на карточках (избранное/сравнение) ===== */
.property-card { position: relative; }
.property-card-link { display: block; color: inherit; }
.property-card-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; z-index: 5; }
.action-btn {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.92); border-radius: 50%; font-size: 14px; color: var(--navy-text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); border: none; cursor: pointer; font-family: inherit;
}
.action-btn.active { background: var(--gold); color: var(--white); }
.property-id-row { display: flex; justify-content: space-between; align-items: center; }
.views-count { font-size: 12px; color: var(--muted); }
.property-actions-row { display: flex; gap: 10px; margin: 10px 0; }
.property-actions-row .action-btn { width: auto; height: auto; border-radius: 20px; padding: 7px 14px; font-size: 13px; font-weight: 600; }

/* ===== Карта в каталоге ===== */
.results-header-actions { display: flex; align-items: center; gap: 10px; }
.btn-map-toggle { background: var(--sand); border: 1px solid var(--border); border-radius: 20px; padding: 8px 16px; font-size: 13px; font-weight: 700; color: var(--navy-text); cursor: pointer; }
.btn-map-toggle:hover { background: var(--gold); color: var(--white); }

/* ===== Поделиться ===== */
.share-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.share-label { font-size: 13px; color: var(--muted); }
.share-btn {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    background: var(--sand); border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--navy-text); border: none; cursor: pointer;
}
.share-btn:hover { background: var(--teal); color: var(--white); }

/* ===== Калькулятор ===== */
.calc-block { background: var(--sand-light); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.calc-block label { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 700; color: var(--navy-text); }

/* ===== Разбивка спальных мест (форма ввода) ===== */
.beds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 10px 0; }
.beds-field label { font-size: 12px; font-weight: 600; margin: 0 0 4px; color: var(--muted); text-transform: none; }
.beds-total { background: var(--sand); border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--navy-text); margin: 8px 0 4px; }
.beds-total strong { color: var(--gold); font-family: 'Fraunces', serif; font-size: 17px; }

/* ===== Разбивка спальных мест (отображение на карточке) ===== */
.beds-breakdown { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ===== Выпадающий список подсказок адреса (Яндекс.Suggest) ===== */
.yandex-suggest-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: var(--white); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-hover); margin-top: 4px; max-height: 220px; overflow-y: auto;
}
.yandex-suggest-item { padding: 10px 14px; font-size: 14px; color: var(--ink); cursor: pointer; border-bottom: 1px solid var(--border); }
.yandex-suggest-item:last-child { border-bottom: none; }
.yandex-suggest-item:hover { background: var(--sand); color: var(--navy-text); }

/* ===== Метки с ценой на карте (в стиле Booking) ===== */
.price-marker { background: none; border: none; }
.price-marker-inner {
    background: var(--white); color: var(--navy-text); font-weight: 700; font-size: 13px;
    padding: 5px 10px; border-radius: 20px; box-shadow: 0 2px 6px rgba(10,46,78,.3);
    border: 2px solid var(--navy); white-space: nowrap; font-family: 'Manrope', sans-serif;
    display: inline-block; transform: translate(-50%, -50%);
}
.price-marker-inner:hover { background: var(--gold); color: var(--white); border-color: var(--gold); z-index: 1000; position: relative; }
.calc-result { margin-top: 12px; font-size: 17px; color: var(--gold); font-family: 'Fraunces', serif; font-weight: 700; }

/* ===== Заявка на звонок ===== */
.callback-block { background: var(--sand-light); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.callback-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

/* ===== Бронирование ===== */
.booking-block { background: var(--sand-light); border: 2px solid var(--gold); border-radius: 12px; padding: 18px; }
.booking-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.booking-success h3 { margin-bottom: 8px; }
.booking-success p { margin: 6px 0; }

/* ===== Интерактивный календарь дат ===== */
.date-range-picker, .guest-picker { position: relative; }
.date-range-display, .guest-display {
    background: var(--white); border: 1px solid var(--border); border-radius: 10px;
    padding: 11px 14px; font-size: 14px; color: var(--ink); cursor: pointer; user-select: none;
}
.date-range-display:hover, .guest-display:hover { border-color: var(--gold); }
.calendar-dropdown, .guest-dropdown {
    display: none; position: absolute; top: 100%; left: 0; z-index: 60; margin-top: 6px;
    background: var(--white); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-hover); padding: 14px;
}
.calendar-dropdown.open, .guest-dropdown.open { display: block; }
.calendar-nav { display: flex; justify-content: space-between; margin-bottom: 8px; }
.calendar-nav button {
    background: var(--sand); border: none; width: 30px; height: 30px; border-radius: 50%;
    font-size: 16px; cursor: pointer; color: var(--navy-text);
}
.calendar-nav button:hover { background: var(--gold); color: var(--white); }
.calendar-months { display: flex; gap: 20px; flex-wrap: wrap; }
.calendar-month-title { text-align: center; font-weight: 700; color: var(--navy-text); font-size: 13px; margin-bottom: 6px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 30px); gap: 3px; }
.calendar-dow { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.calendar-day { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; font-size: 12.5px; }
.calendar-day.empty { visibility: hidden; }
.calendar-day.disabled { color: var(--border); }
.calendar-day.busy { color: #C97070; text-decoration: line-through; background: #FBEAEA; }
.calendar-day.available { color: var(--ink); cursor: pointer; }
.calendar-day.available:hover { background: var(--sand); }
.calendar-day.selected { background: var(--navy); color: var(--white); font-weight: 700; }
.calendar-day.in-range { background: var(--sand); }

.busy-dates-list { margin: 4px 0 8px; }
.busy-date-item { font-size: 12.5px; color: #A85454; padding: 2px 0; }

/* ===== Счётчик гостей ===== */
.guest-dropdown { width: 240px; }
.guest-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.guest-row:last-child { border-bottom: none; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
    width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--white);
    font-size: 15px; cursor: pointer; color: var(--navy-text); line-height: 1;
}
.stepper button:hover { background: var(--sand); }
.stepper span { min-width: 16px; text-align: center; font-weight: 600; }

@media (max-width: 480px) {
    .calendar-months { gap: 12px; }
    .calendar-grid { grid-template-columns: repeat(7, 26px); }
    .calendar-day, .calendar-dow { width: 26px; height: 26px; }
}

/* ===== Похожие объекты ===== */
.similar-section { margin: 30px 0; }

/* ===== Комплекс / номера внутри комплекса ===== */
.complex-parent-link { background: var(--sand); display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 13px; margin: 6px 0 10px; }
.complex-parent-link a { font-weight: 700; }
.complex-rooms-section { margin: 30px 0; }
.complex-rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; margin-top: 14px; }
.complex-room-card { display: block; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform .18s ease; }
.complex-room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.complex-room-card-img { aspect-ratio: 4/3; background: var(--sand); overflow: hidden; }
.complex-room-card-img img { width: 100%; height: 100%; object-fit: cover; }
.complex-room-card-body { padding: 12px 14px; }

/* ===== Сравнение объектов ===== */
.compare-table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; text-align: center; }
.compare-label { text-align: left !important; font-weight: 700; color: var(--navy-text); background: var(--sand); white-space: nowrap; }
.compare-photo { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.compare-price { font-family: 'Fraunces', serif; font-weight: 700; color: var(--gold); font-size: 16px; }
.compare-remove { display: block; font-size: 11px; color: #A83232; margin-top: 4px; }

/* ===== Мастер добавления объекта (шаги) ===== */
.wizard-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: 0; }
.wizard-tab {
    background: none; border: none; padding: 10px 14px; font-size: 13px; font-weight: 700; color: var(--muted);
    cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.wizard-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-nav { display: flex; gap: 10px; margin-top: 20px; }
.wizard-nav .btn { width: auto; flex: 1; }
.btn-outline {
    background: var(--white); border: 1px solid var(--border); color: var(--navy-text); border-radius: 10px;
    padding: 13px 20px; font-size: 14px; font-weight: 700; cursor: pointer; flex: 1;
}

/* ===== Загрузчик фото с превью и перетаскиванием ===== */
.dropzone {
    border: 2px dashed var(--border); border-radius: 12px; padding: 28px; text-align: center;
    color: var(--muted); font-size: 14px; cursor: pointer; background: var(--sand-light); margin: 8px 0;
}
.dropzone.drag-over { border-color: var(--gold); background: var(--sand); color: var(--gold); }
.photo-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 12px 0; }
.photo-preview-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; cursor: grab; border: 2px solid var(--border); background: var(--sand); }
.photo-preview-item.dragging { opacity: 0.4; }
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-badge { position: absolute; top: 6px; left: 6px; background: rgba(10, 46, 78,.85); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 10px; }
.photo-remove {
    position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: none;
    background: rgba(168,50,50,0.9); color: #fff; font-size: 12px; cursor: pointer;
}
.photo-delete-check {
    position: absolute; bottom: 0; left: 0; right: 0; background: rgba(168,50,50,0.88); color: #fff;
    font-size: 11px; padding: 4px 6px; display: flex; align-items: center; gap: 4px; cursor: pointer;
}
.photo-delete-check input { width: auto; }

/* ===== Категоризированные удобства (форма ввода) ===== */
.amenity-group { margin: 16px 0; }
.amenity-group h4 { font-size: 14px; color: var(--navy-text); margin-bottom: 8px; font-family: 'Manrope', sans-serif; font-weight: 700; }
.amenity-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.amenity-checkbox {
    display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; text-transform: none !important;
    background: var(--sand-light); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer;
}
.amenity-checkbox input { width: auto; }
.amenity-checkbox:has(input:checked) { background: var(--sand); border-color: var(--gold); }

/* ===== Категоризированные удобства (отображение на карточке) ===== */
.amenities-full { margin: 16px 0; }
.amenity-group-display { margin-bottom: 14px; }
.amenity-group-display h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }

/* ===== Шаблоны описания ===== */
.template-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

/* ===== Редактор описания (Quill) - подгоняем под палитру сайта ===== */
.rich-editor { background: var(--white); border-radius: 0 0 10px 10px; }
.rich-editor .ql-editor { min-height: 180px; font-size: 15px; font-family: inherit; color: var(--ink); }
.rich-editor .ql-toolbar { border-radius: 10px 10px 0 0; background: var(--sand-light); border-color: var(--border) !important; }
.rich-editor .ql-container { border-color: var(--border) !important; border-radius: 0 0 10px 10px; font-family: inherit; }
.rich-editor .ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
.template-btn { background: var(--sand); border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px; font-size: 12px; font-weight: 600; color: var(--navy-text); cursor: pointer; }
.template-btn:hover { background: var(--teal); color: var(--white); }

/* ===== Видео на карточке объекта ===== */
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 18px 0; border-radius: 12px; overflow: hidden; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ===== Блог ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 20px 0; }
.blog-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform .18s ease; color: inherit; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.blog-card-img { aspect-ratio: 16/9; background: var(--sand); overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 16px; }
.blog-card-date { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.blog-card-body h3 { font-size: 16px; margin-bottom: 8px; }
.blog-card-body p { font-size: 13px; color: var(--muted); line-height: 1.5; }

.article-page { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--border); margin: 16px 0; flex: 1; min-width: 0; max-width: 780px; }
.article-cover { width: 100%; border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; margin-bottom: 20px; }
.article-page h1 { font-size: 28px; margin-bottom: 8px; }
.article-meta { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.article-content { font-size: 15.5px; line-height: 1.75; color: var(--ink); }
.article-content p { margin: 0 0 14px; }
.article-content p:last-child { margin-bottom: 0; }
.article-content ul, .article-content ol { margin: 0 0 14px 22px; }
.article-content h2 { font-size: 22px; margin: 28px 0 12px; }
.article-content h3 { font-size: 18px; margin: 22px 0 10px; }
.article-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 14px 0; display: block; }
.article-content blockquote { border-left: 3px solid var(--gold); padding-left: 16px; margin: 16px 0; color: var(--muted); font-style: italic; }

/* ===== Блог: layout с оглавлением сбоку ===== */
.article-layout { display: flex; gap: 32px; align-items: flex-start; max-width: 1100px; margin: 0 auto; }
.article-page a { color: var(--teal); }
.article-toc-sidebar { width: 220px; flex-shrink: 0; position: sticky; top: 90px; display: none; }
@media (min-width: 900px) { .article-toc-sidebar { display: block; } }
.article-toc-sidebar-inner { background: var(--white); border-radius: var(--radius); padding: 16px; border: 1px solid var(--border); font-size: 13px; }
.article-toc-sidebar-inner ul, .article-toc ul { list-style: none; margin: 10px 0 0; }
.article-toc-sidebar-inner li, .article-toc li { margin: 7px 0; }
.article-toc-level-3 { margin-left: 14px !important; font-size: 12px; }
.article-toc-sidebar-inner a, .article-toc a { color: var(--ink); }
.article-toc-sidebar-inner a:hover, .article-toc a:hover { color: var(--gold); }
/* оглавление внутри самой статьи - только на узком экране, где сайдбара нет */
.article-toc { display: block; background: var(--sand-light); border-radius: 10px; padding: 14px 18px; margin: 18px 0; font-size: 14px; }
@media (min-width: 900px) { .article-toc { display: none; } }

.article-category-tag {
    display: inline-block; background: var(--sand); color: var(--teal); font-size: 12px; font-weight: 700;
    padding: 4px 12px; border-radius: 20px; margin-bottom: 10px;
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.article-tag-pill { background: var(--sand-light); color: var(--muted); font-size: 12px; padding: 5px 12px; border-radius: 20px; }
.article-tag-pill:hover { background: var(--sand); color: var(--teal); }

/* ===== Блог: фильтр поиска/категорий ===== */
.blog-filter-bar { display: flex; gap: 10px; margin: 18px 0 14px; max-width: 480px; }
.blog-filter-bar input { flex: 1; }

/* ===== Страница "Контакты" ===== */
.contacts-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; margin: 20px 0; }
@media (max-width: 800px) { .contacts-layout { grid-template-columns: 1fr; } }
.contacts-info-card, .contacts-map-card {
    background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.contacts-map-card { padding: 12px; }
.contacts-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.contacts-icon { font-size: 20px; line-height: 1.3; }
.contacts-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.contacts-value { font-size: 15px; font-weight: 600; color: var(--ink); }
a.contacts-value:hover { color: var(--gold); }
.contacts-messengers { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.contacts-messengers .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.contacts-messengers svg { width: 18px; height: 18px; }
.contacts-legal { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; }

/* ===== Блок отзывов на главной ===== */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px; }
.testimonial-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.testimonial-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.testimonial-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.testimonial-avatar-placeholder {
    display: flex; align-items: center; justify-content: center; background: var(--sand); color: var(--teal);
    font-weight: 700; font-size: 18px;
}
.testimonial-name { font-weight: 700; }
.testimonial-stars { font-size: 12px; }
.testimonial-text { font-size: 14px; line-height: 1.6; color: var(--ink); }

/* ===== Виджет Turnstile - небольшой отступ, чтобы не липнул к кнопке ===== */
.cf-turnstile { margin: 12px 0; }

/* ===== Футер - расширенное меню сверху копирайта ===== */
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-bottom: 14px; }
.footer-nav a { color: var(--white); opacity: .85; font-size: 14px; }
.footer-nav a:hover { opacity: 1; }

/* ===== Маскированный телефон с раскрытием по клику ===== */
.masked-phone-wrap { display: inline-flex; align-items: center; gap: 8px; }
.reveal-phone-trigger {
    background: none; border: 1px dashed var(--muted); color: var(--muted); font-size: 12px;
    padding: 2px 9px; border-radius: 12px; cursor: pointer;
}
.reveal-phone-trigger:hover { border-color: var(--gold); color: var(--gold); }
.reveal-phone-btn { color: inherit; text-decoration: none; }
.header-phone .masked-phone-wrap, .header-phone .reveal-phone-btn { color: inherit; }
.blog-category-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.blog-category-pill { background: var(--white); border: 1px solid var(--border); padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--ink); }
.blog-category-pill.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ===== Комментарии к статье ===== */
.article-comments { max-width: 780px; margin: 30px auto 0; }
.comment-card { background: var(--white); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; border: 1px solid var(--border); }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.comment-date { font-size: 12px; color: var(--muted); }

/* ===== Доступность / адаптация ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
@media (max-width: 768px) {
    .property-info, .reviews-section { padding: 18px; }
    .hero h1 { font-size: 26px; }
    .hero { border-radius: 0 0 28px 28px; padding: 40px 16px 32px; }

    /* Мобильное меню - сворачиваем в гамбургер, чтобы не отвлекать от подборки объектов */
    .menu-toggle { display: block; }
    .topnav {
        display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 82%; max-width: 320px;
        background: var(--white); flex-direction: column; align-items: flex-start; gap: 4px;
        padding: 70px 20px 20px; box-shadow: -8px 0 24px rgba(0,0,0,0.12); z-index: 200; overflow-y: auto;
    }
    .topnav.open { display: flex; }
    .topnav > a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }
    .switch-group { flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; margin-top: 10px; }
    .menu-backdrop { display: none; position: fixed; inset: 0; background: rgba(10, 46, 78,0.4); z-index: 150; }
    .menu-backdrop.open { display: block; }

    /* Более компактная сетка карточек на телефоне - 2 колонки, как в мобильных приложениях недвижимости */
    .property-grid, .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .property-card-body { padding: 10px; }
    .property-price { font-size: 15px; }
    .property-title { font-size: 12.5px; }
    .property-loc, .property-meta { font-size: 11px; }
}

@media (max-width: 400px) {
    .property-grid, .catalog-grid { grid-template-columns: 1fr; }
}
