/* ==========================================================================
   NR Apartments — Design System 2026
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --bg-soft: #111318;
  --bg-card: #16181f;
  --bg-elev: #1c1f27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f3f7;
  --text-dim: #9ba1ad;
  --text-mute: #6b7180;
  --accent: #ff5a3c;
  --accent-soft: rgba(255, 90, 60, 0.12);
  --accent-2: #ffb08a;
  --success: #4ade80;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow-1: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 20px 60px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-main: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Unbounded', 'Manrope', sans-serif;
}

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

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
select, option { color-scheme: dark; }
option { background-color: #111318; color: #f2f4f8; }

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2e39; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a3f4d; }

.container { width: min(1240px, 92vw); margin: 0 auto; }
.container--narrow { width: min(860px, 92vw); }

/* Progress bar */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 1000; transition: width 0.1s linear;
}

/* ==========================================================================
   Buttons / chips
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; font-weight: 700; font-size: 15px;
  padding: 16px 32px; transition: all 0.3s var(--ease); white-space: nowrap;
}
.btn--accent {
  background: var(--accent); color: #fff;
  box-shadow: 0 8px 24px rgba(255, 90, 60, 0.35);
}
.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(255, 90, 60, 0.45);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  border: 1px solid var(--line-strong); backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.btn--sm { padding: 11px 22px; font-size: 14px; }
.btn--full { width: 100%; }

.chip {
  border: 1px solid var(--line-strong); background: transparent; color: var(--text-dim);
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: all 0.25s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.chip.is-active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 6px 18px rgba(255, 90, 60, 0.3);
}
.chip-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; transition: all 0.35s var(--ease);
}
.header.is-scrolled {
  padding: 10px 0;
  background: rgba(11, 12, 16, 0.78);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  overflow: visible;
}
.header__inner > .logo { flex-shrink: 0; }
.header__inner > .nav { flex-shrink: 1; min-width: 0; }
.header__inner > .header__actions { flex-shrink: 0; }

.logo { display: flex; align-items: center; gap: 12px; }
.logo__mark {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; letter-spacing: 0.5px;
}
.logo__text {
  font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  white-space: nowrap;
}
.logo__text span { color: var(--text-mute); font-weight: 400; }

.nav { display: flex; gap: 24px; white-space: nowrap; }
.nav__link {
  font-size: 14.5px; font-weight: 600; color: var(--text-dim);
  position: relative; transition: color 0.25s;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); border-radius: 2px; transition: width 0.3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }
.nav__link--admin { color: var(--text-mute); font-size: 13px; display: inline-flex; align-items: center; }
.nav__link--admin:hover { color: var(--text); }

.header__actions { display: flex; align-items: center; gap: 14px; }
.header__phone {
  font-size: 14.5px; font-weight: 600; color: var(--text-dim); transition: color 0.25s;
  white-space: nowrap;
}
.header__phone:hover { color: var(--text); }

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
}
.burger span {
  width: 24px; height: 2px; background: var(--text); border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 140px 0 90px;
}
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease;
  animation: heroZoom 18s var(--ease) infinite alternate;
}
.hero__bg img.is-loaded { opacity: 1; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,12,16,0.75) 0%, rgba(11,12,16,0.55) 40%, rgba(11,12,16,0.92) 100%);
}
.hero__grain {
  position: absolute; inset: 0; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__inner { position: relative; z-index: 2; }

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6.5vw, 84px);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent) 20%, var(--accent-2) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__subtitle {
  font-size: clamp(16px, 2vw, 19px); color: #c6cad3;
  max-width: 560px; margin-bottom: 40px;
}

/* Search widget */
.hero__search {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 2px; background: var(--line-strong);
  border-radius: var(--radius-md); overflow: hidden;
  backdrop-filter: blur(20px); margin-bottom: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-2);
}
.search-field {
  background: rgba(17, 19, 24, 0.92);
  padding: 14px 20px; display: flex; flex-direction: column; gap: 4px;
  transition: background 0.25s;
}
.search-field:hover { background: rgba(28, 31, 39, 0.95); }
.search-field label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-mute);
}
.search-field__value, .search-field input, .search-field select {
  font-size: 15px; font-weight: 600; color: var(--text);
  background: transparent; border: none; outline: none; cursor: pointer;
  color-scheme: dark; width: 100%;
}

/* ============================================================
   Кастомные выпадающие списки (Квартира / Гости — hero и форма)
   ============================================================ */
.cselect-native {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
}
.search-field, .form-field { position: relative; }

.cselect-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; font-size: 15px; font-weight: 600; color: var(--text);
  background: transparent; border: none; outline: none; cursor: pointer;
  padding: 0; text-align: left;
  font-family: inherit; line-height: 1.4;
}
.cselect-btn__value {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cselect-btn svg { color: var(--text-mute); flex: none; transition: transform 0.25s ease, color 0.2s; }
.cselect-btn:hover svg { color: var(--accent); }
.cselect-btn.is-open svg { transform: rotate(180deg); color: var(--accent); }

.cselect-list {
  position: fixed; z-index: 120; max-height: 264px; overflow-y: auto;
  background: rgba(17, 19, 24, 0.97);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  padding: 6px;
  animation: cselectIn 0.18s ease;
}
@keyframes cselectIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cselect-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 10px 12px; border: none; border-radius: 10px;
  background: transparent; color: var(--text-dim, #b9bdc9);
  font-size: 14px; font-weight: 500; font-family: inherit;
  text-align: left; cursor: pointer; line-height: 1.35;
  transition: background 0.15s, color 0.15s;
}
.cselect-opt span {
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cselect-opt:hover { background: rgba(255, 90, 60, 0.14); color: var(--text); }
.cselect-opt.is-selected { color: var(--accent); font-weight: 700; }
.cselect-opt.is-selected svg { flex: none; }

.cselect-list::-webkit-scrollbar { width: 8px; }
.cselect-list::-webkit-scrollbar-track { background: transparent; }
.cselect-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14); border-radius: 4px;
}
.cselect-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

@media (prefers-reduced-motion: reduce) {
  .cselect-list { animation: none; }
}

/* ============================================================
   Кастомный календарь полей «Заезд/Выезд»
   ============================================================ */
.cdate-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; font-size: 15px; font-weight: 600; color: var(--text);
  background: transparent; border: none; outline: none; cursor: pointer;
  padding: 0; text-align: left;
  font-family: inherit; line-height: 1.4;
}
.cdate-btn.is-empty .cdate-btn__value { color: var(--text-mute); font-weight: 500; }
.cdate-btn__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdate-btn svg { color: var(--text-mute); flex: none; transition: color 0.2s; }
.cdate-btn:hover svg { color: var(--accent); }

.form-field .cdate-btn {
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 13px 16px;
  font-size: 14.5px; transition: border-color 0.25s;
}
.form-field .cdate-btn:hover { border-color: var(--accent); }

.cal {
  position: fixed; z-index: 120;
  background: rgba(17, 19, 24, 0.97);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  padding: 14px;
  animation: cselectIn 0.18s ease;
  user-select: none;
}
.cal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.cal__title {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
}
.cal__nav {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 9px;
  color: var(--text-dim); cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.cal__nav:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cal__nav:disabled { opacity: 0.3; cursor: default; }

.cal__wd {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  margin-bottom: 4px;
}
.cal__wd span {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-mute); text-align: center; padding: 4px 0;
}
.cal__grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.cal-day {
  aspect-ratio: 1 / 1; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 10px;
  color: var(--text-dim); font-size: 13.5px; font-weight: 500;
  font-family: inherit; cursor: pointer; position: relative;
  transition: background 0.15s, color 0.15s;
}
.cal-day:hover:not(:disabled) { background: rgba(255, 90, 60, 0.16); color: var(--text); }
.cal-day:disabled { cursor: default; }
.cal-day.is-past { opacity: 0.25; }
.cal-day.is-today { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.cal-day.is-busy:not(.is-past) { color: #ff8073; }
.cal-day.is-busy:not(.is-past)::after {
  content: ''; position: absolute; left: 50%; bottom: 5px;
  width: 4px; height: 4px; border-radius: 50%;
  background: #ff5a3c; transform: translateX(-50%);
}
.cal-day.is-edge {
  background: var(--accent); color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 90, 60, 0.4);
}
.cal-day.is-edge::after { display: none; }
.cal-day.in-range {
  background: rgba(255, 90, 60, 0.16); color: var(--text);
}
.cal-day.in-range:hover { background: rgba(255, 90, 60, 0.26); }

.cal__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.cal__legend {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-mute);
}
.cal__dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.cal__dot--busy { background: #ff5a3c; }
.cal__hint { font-size: 11.5px; color: var(--accent); font-weight: 600; }

@media (max-width: 480px) {
  .cal { width: calc(100vw - 20px) !important; left: 10px !important; }
  .cal-day { border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .cal { animation: none; }
}

/* Клик в любое место поля даты открывает календарь */
.search-field input[type="date"] { position: relative; }
.search-field input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.search-field input[type="date"]::-webkit-datetime-edit { cursor: pointer; }
.search-field input[type="date"]::-webkit-inner-spin-button,
.search-field input[type="date"]::-webkit-clear-button { display: none; }
@supports (-moz-appearance: none) {
  .search-field input[type="date"] { cursor: text; }
  .search-field input[type="date"]::-webkit-calendar-picker-indicator { position: static; inset: auto; width: auto; height: auto; }
}

/* Читаемая иконка календаря справа в поле даты */
.search-field { position: relative; }
.search-field[data-field="checkin"]::after,
.search-field[data-field="checkout"]::after {
  content: '';
  position: absolute; right: 18px; bottom: 15px;
  width: 22px; height: 22px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  border-radius: 8px;
  pointer-events: none;
}
.search-btn { border-radius: 0; padding: 0 34px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, auto);
  justify-content: start; gap: clamp(28px, 5vw, 72px);
}
.stat__num {
  font-family: var(--font-display); font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700; line-height: 1;
  background: linear-gradient(120deg, var(--text) 30%, var(--text-dim));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { font-size: 13px; color: var(--text-mute); margin-top: 8px; }

/* Ticker */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-soft); overflow: hidden; padding: 18px 0;
}
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker__group { display: flex; align-items: center; gap: 48px; padding-right: 48px; }
.ticker__group span {
  font-family: var(--font-display); font-size: 15px; font-weight: 500;
  color: var(--text-mute); white-space: nowrap;
}
.ticker__group span::after {
  content: '✦'; margin-left: 48px; color: var(--accent);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section--alt { background: var(--bg-soft); }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 48px; flex-wrap: wrap;
}
.section__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--accent); margin-bottom: 14px;
}
.section__tag::before { content: ''; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 52px); font-weight: 700;
  line-height: 1.12; letter-spacing: -0.01em;
}
.section__desc { max-width: 380px; color: var(--text-dim); font-size: 15.5px; }

/* Apartments */
.apartment-controls { margin-bottom: 36px; }

/* Баннер результата подбора по датам */
.search-results {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 18px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: var(--radius-md); padding: 16px 20px;
  margin-bottom: 28px;
}
.search-results--empty {
  background: rgba(255, 90, 60, 0.08);
  border-color: rgba(255, 90, 60, 0.35);
}
.search-results__text { font-size: 15px; font-weight: 500; color: var(--text); }
.search-results__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.search-results[hidden] { display: none; }

/* Расписание занятости после подбора по датам (кнопка «Показать расписание») */
.search-schedule {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 28px;
}
.search-schedule[hidden] { display: none; }
.sc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.sc-head strong { font-size: 14px; color: var(--text); }
.sc-head span { font-size: 12px; color: var(--text-dim); }
.sc-list { display: flex; flex-direction: column; gap: 6px; }
.sc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sc-group__cell {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-mute);
  margin: 8px 4px 2px;
}
.sc-group__cell:first-child { margin-top: 0; }
.sc-name { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; flex: 1; }
.sc-num {
  align-self: flex-start;
  font-size: 10px; font-weight: 800; color: #fff;
  background: var(--accent); border-radius: 6px; padding: 2px 7px;
  letter-spacing: 0.04em;
}
.sc-name-title {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--text);
  line-height: 1.3; white-space: normal; margin-top: 6px;
}
.sc-name-meta {
  display: block; font-size: 10.5px; line-height: 1.35;
  color: var(--text-mute); margin-top: 2px;
}

/* мини-календарь месяца справа от названия квартиры в расписании */
.sc-mini {
  display: grid; grid-template-columns: repeat(7, 19px);
  gap: 2px; width: max-content; flex-shrink: 0;
  padding: 8px; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(255, 255, 255, 0.02);
}
.sc-mini__month {
  grid-column: 1 / -1; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 3px;
}
.sc-mini__dow {
  font-size: 8.5px; text-align: center; color: var(--text-mute);
  text-transform: uppercase; font-weight: 600;
}
.sc-mini b {
  display: inline-flex; align-items: center; justify-content: center;
  height: 17px; border-radius: 5px; font-size: 9.5px; font-weight: 600;
  color: var(--text-dim); font-variant-numeric: tabular-nums;
  background: rgba(74, 222, 128, 0.10);
  border: 1px solid rgba(74, 222, 128, 0.28);
  cursor: default;
}
.sc-mini b.is-busy {
  background: rgba(255, 90, 60, 0.18);
  border-color: rgba(255, 90, 60, 0.5); color: #ffb4a3;
}
.sc-mini b.is-past { opacity: 0.38; }
.sc-mini b.is-today { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.5); }
.sc-mini i { height: 17px; }
.sc-name-status {
  display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; margin-top: 3px; align-self: flex-start;
}
.sc-row--free .sc-name-status { color: #4ade80; }
.sc-row--busy .sc-name-status { color: var(--accent); }
/* на узких экранах календарь переносится под название */
@media (max-width: 720px) {
  .sc-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}
/* таблица + карта рядом */
.sc-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: stretch; }
.sc-map-col { display: flex; flex-direction: column; gap: 8px; }
.sc-map-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); }
.sc-map {
  width: 100%; height: 300px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); overflow: hidden; display: block;
  z-index: 1;
}
.sc-map-legend { display: grid; gap: 5px; }
.sc-map-legend span { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-dim); }
.sc-map-dot {
  display: inline-grid; place-items: center; flex-shrink: 0;
  min-width: 24px; height: 18px; padding: 0 5px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-2);
  font-size: 10.5px; font-weight: 800; font-style: normal;
}
@media (max-width: 900px) {
  .sc-body { grid-template-columns: 1fr; }
  .sc-map { height: 240px; }
}

/* Блок «Если вам нужна помощь» под расписанием */
.help { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.help__title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.help__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.help__btn {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 9px 16px;
  color: var(--text-dim); font-weight: 600; font-size: 13px;
  font-family: inherit; cursor: pointer; transition: all 0.2s var(--ease);
}
.help__btn:hover { color: var(--text); border-color: var(--accent); }
.help__btn.is-active {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2);
}
.help__panel { margin-top: 12px; }
.help__phone {
  display: inline-block; font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: var(--text);
  text-decoration: none; border-bottom: 2px solid var(--accent);
  transition: color 0.2s;
}
.help__phone:hover { color: var(--accent-2); }
.help__note { font-size: 12px; color: var(--text-mute); margin-top: 7px; }
.help__chips { display: flex; flex-wrap: wrap; gap: 9px; }
.help__chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 9px 15px;
  font-weight: 700; font-size: 13px; color: var(--text);
  text-decoration: none; transition: all 0.25s var(--ease);
}
.help__chip:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); color: var(--text); }
.help__chip svg { color: var(--accent); }
.help__chip-mark {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-2);
  font-size: 10px; font-weight: 800; letter-spacing: 0.03em;
}
.help__call-form { display: flex; gap: 10px; flex-wrap: wrap; }
.help__call-form input {
  flex: 1; min-width: 220px;
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 11px 15px;
  color: var(--text); font-family: inherit; font-size: 14px;
  outline: none; color-scheme: dark; transition: border-color 0.25s;
}
.help__call-form input:focus { border-color: var(--accent); }
.help__call-form .btn { flex-shrink: 0; }

/* Меню «Связаться с оператором» в баннере подбора (когда все заняты) */
.search-results .oper {
  width: 100%; margin-top: 4px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid; gap: 8px;
}
.oper__item {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 11px 16px;
  color: var(--text-dim); font-family: inherit;
  transition: all 0.2s var(--ease);
}
.oper__item:hover { color: var(--text); border-color: var(--accent); }
.oper__item.is-active {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2);
}
.oper__label { font-size: 13.5px; font-weight: 700; }
.oper__value { font-size: 12.5px; color: var(--text-mute); }
.oper__item.is-active .oper__value { color: inherit; }
.oper__panel { padding: 4px 2px 6px; }

.apartments-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}

.apartment-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.apartment-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
}
.apartment-card__media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer;
}
.apartment-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.apartment-card:hover .apartment-card__media img { transform: scale(1.06); }
.apartment-card__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11,12,16,0.55) 100%);
}
.apartment-card__badges { position: absolute; top: 16px; left: 16px; display: flex; gap: 8px; z-index: 2; }
.badge {
  font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: rgba(11, 12, 16, 0.65); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18); color: #fff;
}
.badge--accent { background: var(--accent); border-color: var(--accent); }
.badge--rating {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  background: rgba(11, 12, 16, 0.65); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18); color: #fff;
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
}
.badge--rating svg { color: var(--accent-2); }

.apartment-card__body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.apartment-card__district {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent);
}
.apartment-card__title {
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  line-height: 1.3;
}
.apartment-card__specs {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.spec-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px;
}
.apartment-card__amenities {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 13px; color: var(--text-mute);
}
.apartment-card__amenities span::before { content: '·'; margin-right: 6px; color: var(--accent); }
.apartment-card__footer {
  margin-top: auto; padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.apartment-card__price { display: flex; flex-direction: column; }
.apartment-card__price .price { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.apartment-card__price .per-night { font-size: 12px; color: var(--text-mute); }
.apartment-card__actions { display: flex; gap: 10px; }

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(210px, auto);
  gap: 20px;
}
.bento__item {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 32px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
  position: relative; overflow: hidden;
}
.bento__item::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 90, 60, 0.08), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
}
.bento__item:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.bento__item:hover::before { opacity: 1; }
.bento__item--wide { grid-column: span 2; }
.bento__icon {
  width: 54px; height: 54px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; flex-shrink: 0;
}
.bento__item h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.bento__item p { color: var(--text-dim); font-size: 14.5px; }

/* Reviews */
.rating-pill {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 24px;
}
.rating-pill__num {
  font-family: var(--font-display); font-size: 34px; font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rating-pill__label { font-weight: 700; font-size: 15px; }
.rating-pill__sub { font-size: 12.5px; color: var(--text-mute); }

.reviews-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.review-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.review-card__head { display: flex; align-items: center; gap: 14px; }
.review-card__avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 16px;
  display: grid; place-items: center; flex-shrink: 0;
}
.review-card__name { font-weight: 700; font-size: 15px; }
.review-card__meta { font-size: 12.5px; color: var(--text-mute); }
.review-card__score {
  margin-left: auto; font-family: var(--font-display); font-weight: 700;
  color: var(--success); font-size: 17px;
}
.review-card__text { color: var(--text-dim); font-size: 14.5px; flex: 1; }
.review-card__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.review-card__tags span {
  font-size: 11.5px; font-weight: 700; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
}

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 14px; }
.faq__item {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.3s;
}
.faq__item.is-open { border-color: var(--line-strong); }
.faq__q {
  width: 100%; background: none; border: none; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 28px; text-align: left;
  font-size: 16.5px; font-weight: 700; font-family: var(--font-main);
}
.faq__q svg { flex-shrink: 0; transition: transform 0.35s var(--ease); color: var(--text-mute); }
.faq__item.is-open .faq__q svg { transform: rotate(45deg); color: var(--accent); }
.faq__a {
  max-height: 0; overflow: hidden; transition: max-height 0.45s var(--ease);
}
.faq__a-inner {
  padding: 0 28px 26px; color: var(--text-dim); font-size: 15px;
}

/* CTA */
.cta { padding: clamp(72px, 9vw, 120px) 0; }
.cta__card {
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 64px);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px);
  position: relative; overflow: hidden;
}
.cta__card::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 60, 0.14), transparent 65%);
  pointer-events: none;
}
.cta__title {
  font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700; line-height: 1.14; margin-bottom: 18px;
}
.cta__text { color: var(--text-dim); font-size: 16px; max-width: 440px; margin-bottom: 32px; }
.cta__contacts { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 13px 22px;
  font-weight: 700; font-size: 14.5px; color: var(--text);
  transition: all 0.25s var(--ease);
}
.contact-chip:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.contact-chip svg { color: var(--accent); }
[data-max-phone] { cursor: pointer; }

.cta__form {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative; z-index: 1;
}
.cta__form h3 {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-field label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-mute);
}
.form-field input, .form-field select {
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 13px 16px;
  color: var(--text); font-size: 14.5px; outline: none;
  transition: border-color 0.25s; color-scheme: dark; width: 100%;
}
.form-field input:focus, .form-field select:focus { border-color: var(--accent); }

/* кнопка кастомного списка в форме — как остальные поля формы */
.form-field .cselect-btn {
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 13px 16px;
  font-size: 14.5px; transition: border-color 0.25s;
}
.form-field .cselect-btn:hover,
.form-field .cselect-btn.is-open { border-color: var(--accent); }

.form-field input[type="date"] { position: relative; cursor: pointer; }
.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.form-field input[type="date"]::-webkit-datetime-edit { cursor: pointer; }
.form-field input[type="date"]::-webkit-inner-spin-button,
.form-field input[type="date"]::-webkit-clear-button { display: none; }
@supports (-moz-appearance: none) {
  .form-field input[type="date"] { cursor: text; }
  .form-field input[type="date"]::-webkit-calendar-picker-indicator { position: static; inset: auto; width: auto; height: auto; }
}
.form-note { font-size: 12px; color: var(--text-mute); text-align: center; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 56px 0 32px; }
.footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid var(--line);
}
.footer__brand p { color: var(--text-mute); font-size: 14px; max-width: 320px; margin-top: 16px; }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col h4 {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-mute); margin-bottom: 6px;
}
.footer__col a { color: var(--text-dim); font-size: 14.5px; transition: color 0.25s; }
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 26px; font-size: 13px; color: var(--text-mute);
}

/* ==========================================================================
   Modal (apartment detail)
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px;
  visibility: hidden; opacity: 0; transition: opacity 0.35s, visibility 0.35s;
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5, 6, 9, 0.75); backdrop-filter: blur(10px); }
.modal__panel {
  position: relative; width: min(1400px, 96vw); max-height: 94vh;
  background: var(--bg-soft); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); overflow-y: auto;
  box-shadow: var(--shadow-2);
  transform: translateY(24px) scale(0.98); transition: transform 0.4s var(--ease);
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); }
.modal__close {
  position: sticky; top: 16px; margin-left: calc(100% - 56px); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(11, 12, 16, 0.7); backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong); color: var(--text);
  display: grid; place-items: center; transition: all 0.25s;
}
.modal__close:hover { background: var(--accent); border-color: var(--accent); }
.modal__body { padding: 0 36px 40px; margin-top: -44px; }

.detail__gallery {
  display: grid; grid-template-columns: 2.2fr 1fr; grid-template-rows: repeat(2, 1fr);
  gap: 10px; height: clamp(420px, 52vh, 640px); border-radius: var(--radius-md); overflow: hidden;
  margin-bottom: 28px;
}
.detail__gallery .g-item { overflow: hidden; cursor: zoom-in; position: relative; }
.detail__gallery .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.detail__gallery .g-item:hover img { transform: scale(1.05); }
.detail__gallery .g-item--main { grid-row: span 2; }
.detail__gallery .g-item--single { grid-column: span 2; grid-row: span 2; }
.g-more {
  position: absolute; inset: 0; background: rgba(11, 12, 16, 0.55);
  display: grid; place-items: center; color: #fff;
  font-weight: 700; font-size: 15px; backdrop-filter: blur(2px);
}
.detail__thumbs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px;
  margin-bottom: 22px; scrollbar-width: thin;
}
.detail__thumbs .g-thumb {
  flex-shrink: 0; width: 76px; height: 56px; border-radius: 10px;
  overflow: hidden; border: 2px solid transparent; padding: 0;
  background: var(--bg-card); cursor: pointer;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.detail__thumbs .g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail__thumbs .g-thumb:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.detail__thumbs .g-thumb.is-active { border-color: var(--accent); }
.detail__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 8px; flex-wrap: wrap; }
.detail__title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.2; }
.detail__district { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 10px; }
.detail__rating {
  display: flex; align-items: center; gap: 8px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-2);
  padding: 8px 16px; border-radius: 999px; font-size: 14.5px; flex-shrink: 0;
}
.detail__address { color: var(--text-dim); font-size: 14.5px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.detail__specs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 28px;
}
.detail__spec {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px;
}
.detail__spec .v { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.detail__spec .l { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.detail__section { margin-bottom: 26px; }
.detail__section h4 {
  font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 14px;
}
.detail__text { color: var(--text-dim); font-size: 15px; }
.detail__amenities { display: flex; flex-wrap: wrap; gap: 8px; }
.detail__amenities span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  background: var(--bg-card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px;
}
.detail__amenities svg { color: var(--accent); width: 15px; height: 15px; }
.detail__rules { display: flex; flex-direction: column; gap: 10px; }
.detail__rules li {
  list-style: none; display: flex; align-items: center; gap: 10px;
  color: var(--text-dim); font-size: 14.5px;
}
.detail__rules svg { color: var(--success); flex-shrink: 0; }
.detail__rules li.is-no svg { color: var(--accent); }
.detail__footer {
  position: sticky; bottom: 0; margin-top: 8px;
  background: rgba(17, 19, 24, 0.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-strong);
  padding: 18px 36px 22px; display: flex; align-items: center; gap: 18px;
  margin-left: -36px; margin-right: -36px;
}
.detail__footer .price { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.detail__footer .per { font-size: 12.5px; color: var(--text-mute); }
.detail__footer .btn { margin-left: auto; }
.detail__footer-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.detail__footer-actions .btn { margin-left: 0; }

.detail__sutochno {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 0 4px; padding: 12px;
  border: 1px dashed var(--line-strong); border-radius: 12px;
  color: var(--text-dim); font-size: 13.5px; text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.detail__sutochno:hover { border-color: var(--accent); color: var(--text); }

/* ==========================================================================
   QR-блок приложения
   ========================================================================== */
.app-qr {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--line-strong);
  border-radius: var(--radius-md); padding: 16px;
  margin-top: 26px; max-width: 420px;
}
.app-qr__img {
  flex-shrink: 0; width: 104px; height: 104px;
  background: #fff; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; padding: 6px;
}
.app-qr__img img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.app-qr__text { display: flex; flex-direction: column; gap: 4px; }
.app-qr__text strong { font-family: var(--font-display); font-size: 15px; }
.app-qr__text span { font-size: 13px; color: var(--text-mute); line-height: 1.45; }
.app-qr__link {
  font-size: 13px; font-weight: 700; color: var(--accent-2);
  text-decoration: underline; text-underline-offset: 3px;
  align-self: flex-start; margin-top: 2px;
}
.app-qr__link:hover { color: var(--accent); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(4, 5, 8, 0.94);
  display: grid; place-items: center;
  visibility: hidden; opacity: 0; transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.is-open { visibility: visible; opacity: 1; }
.lightbox__img {
  max-width: 92vw; max-height: 86vh; object-fit: contain;
  border-radius: 12px; box-shadow: var(--shadow-2);
}
.lightbox__close {
  position: absolute; top: 24px; right: 28px;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong);
  color: var(--text); display: grid; place-items: center;
}
.lightbox__close:hover { background: var(--accent); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong);
  color: var(--text); display: grid; place-items: center;
}
.lightbox__nav:hover { background: var(--accent); }
.lightbox__nav--prev { left: 28px; }
.lightbox__nav--next { right: 28px; }
.lightbox__counter {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 13.5px; font-weight: 700; color: var(--text-dim);
  background: rgba(11, 12, 16, 0.7); padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line);
}

/* Toast */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translate(-50%, calc(100% + 40px));
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  color: var(--text); border-radius: 999px; padding: 15px 28px;
  font-weight: 600; font-size: 14.5px; z-index: 400;
  box-shadow: var(--shadow-2); transition: transform 0.45s var(--ease);
  display: flex; align-items: center; gap: 10px; max-width: 90vw; text-align: center;
  visibility: hidden;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; }
.toast::before { content: '✓'; color: var(--success); font-weight: 800; }

/* Reveal animation */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-revealed { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .apartments-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
}

@media (max-width: 860px) {
  .header__phone { display: none; }
  .burger { display: flex; }
  .nav.is-open {
    display: flex; position: fixed; inset: 0; z-index: 99;
    background: rgba(11, 12, 16, 0.97); backdrop-filter: blur(20px);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 34px;
  }
  .nav.is-open .nav__link { font-size: 22px; }
  .hero__search { grid-template-columns: 1fr 1fr; }
  .search-btn { grid-column: span 2; padding: 16px; border-radius: 0; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .cta__card { grid-template-columns: 1fr; }
  .detail__gallery { height: 320px; }
  .detail__footer { flex-wrap: wrap; }
  .detail__footer .btn { margin-left: 0; width: 100%; }
}

@media (max-width: 620px) {
  .apartments-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento__item--wide { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .hero__search { grid-template-columns: 1fr; }
  .search-btn { grid-column: span 1; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .detail__gallery { grid-template-columns: 1fr; height: auto; }
  .detail__gallery .g-item--main { grid-row: span 1; height: 240px; }
  .detail__gallery .g-item--single { height: 240px; }
  .detail__gallery .g-item { height: 120px; }
  .modal__body { padding: 0 22px 30px; }
  .detail__footer { margin-left: -22px; margin-right: -22px; padding: 16px 22px 20px; }
  .detail__specs { grid-template-columns: repeat(2, 1fr); }
  .header__actions .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Live map (Leaflet, section #map) — кликабельные метки с попапами
   ========================================================================== */
.map-wrap {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #111318;
  box-shadow: var(--shadow-2);
}
#liveMap { height: 480px; background: #111318; }
#liveMap.is-active { background: #1a1d24; }
@media (max-width: 620px) { #liveMap { height: 360px; } }
.ym-frame { width: 100%; height: 100%; border: 0; display: block; }

/* метка-бейдж с номером квартиры */
.na-pin-wrap { background: none; border: none; }
.na-pin {
  width: 40px; height: 40px; border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(255, 90, 60, 0.45), 0 0 0 3px rgba(255, 90, 60, 0.18);
  cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.na-pin:hover {
  transform: rotate(-45deg) scale(1.12);
  box-shadow: 0 8px 24px rgba(255, 90, 60, 0.6), 0 0 0 5px rgba(255, 90, 60, 0.22);
}
.na-pin-num {
  transform: rotate(45deg);
  font-family: 'Unbounded', sans-serif; font-weight: 600;
  font-size: 13px; line-height: 1; white-space: nowrap;
}

/* попап Leaflet — тёмная тема */
.leaflet-popup-content-wrapper {
  background: #14161c; color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.leaflet-popup-content { margin: 16px; line-height: 1.45; }
.leaflet-popup-tip { background: #14161c; border: 1px solid rgba(255, 255, 255, 0.12); }
.leaflet-popup-close-button {
  color: #8b8f9a !important; padding: 8px 8px 0 0 !important; font-size: 18px;
}
.leaflet-popup-close-button:hover { color: #fff !important; }
.map-popup__photo {
  display: block; width: 260px; height: 172px; object-fit: cover;
  border-radius: 10px; margin-bottom: 10px; background: #0b0c10;
}
.map-popup__title { font-family: 'Unbounded', sans-serif; font-size: 14px; font-weight: 600; margin-bottom: 4px; max-width: 260px; }
.map-popup__meta { color: #8b8f9a; font-size: 12.5px; margin-bottom: 6px; }
.map-popup__addr { color: #b9bdc9; font-size: 12.5px; margin-bottom: 6px; }
.map-popup__price { color: var(--accent); font-weight: 700; font-size: 14px; margin-bottom: 12px; }

/* контролы Leaflet — тёмная тема */
.leaflet-bar a {
  background: #14161c !important; color: #d7dae2 !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}
.leaflet-bar a:hover { background: #1d2029 !important; color: #fff !important; }
.leaflet-bar { border: 1px solid rgba(255, 255, 255, 0.12) !important; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.leaflet-control-attribution {
  background: rgba(11, 12, 16, 0.75) !important; color: #6f7480 !important;
  font-size: 10.5px;
}
.leaflet-control-attribution a { color: #8b8f9a !important; }
/* ==========================================================================
   Modal: вход в админку
   ========================================================================== */
.modal__panel--sm { width: min(380px, 94vw); }
.login-form { padding: 36px; }
.login-form__head h3 { font-family: 'Unbounded', sans-serif; font-size: 20px; margin-bottom: 6px; }
.login-form__head p { color: #8b8f9a; font-size: 13px; line-height: 1.5; margin-bottom: 18px; }
.login-form input[type="password"] {
  width: 100%; background: #0e1014;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px;
  padding: 13px 15px; color: var(--text); font-size: 15px;
  margin-bottom: 6px; outline: none; transition: border-color 0.25s;
}
.login-form input[type="password"]:focus { border-color: var(--accent); }
.login-error { color: var(--accent); font-size: 13px; min-height: 20px; margin-bottom: 8px; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

/* ==========================================================================
   Modal: спасибо за заявку
   ========================================================================== */
.thanks-form { padding: 36px; text-align: center; }
.thanks-form__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(74, 222, 128, 0.12); color: var(--success);
  margin-bottom: 16px;
}
.thanks-form h3 { font-family: 'Unbounded', sans-serif; font-size: 20px; margin-bottom: 8px; }
.thanks-form p { color: #8b8f9a; font-size: 14px; line-height: 1.55; margin-bottom: 22px; }
.login-form.is-shake { animation: shake 0.3s; }

@media (max-width: 620px) {
  .login-form { padding: 26px 22px 30px; }
  .detail__footer-actions { flex-wrap: wrap; }
}

