/* ==========================================================================
   Страница ЖК (герой, описание, территория, чередующиеся блоки, планировки,
   локация). Подключается после style.css только на страницах /zhk/{slug}/.
   Токены — из style.css.
   ========================================================================== */

/* --- Герой ЖК ------------------------------------------------------------ */
.jk { padding-bottom: var(--section-gap); }
.jk__container { display: grid; gap: 55px; }
.jk__image { position: relative; display: flex; border-radius: var(--r-image); overflow: hidden; min-height: 500px; }
.jk__image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,67,43,.15) 0%, rgba(23,67,43,.7) 100%); z-index: 1; }
.jk__image-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jk__image-block {
  position: relative; z-index: 2; margin-top: auto; padding: 70px; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start;
}
.jk__title { color: #fff; font-size: 40px; font-weight: 700; line-height: 1.12; letter-spacing: normal; margin: 0 0 6px; text-wrap: balance; }
.jk__subtitle { color: #fff; font-size: 22px; font-weight: 700; letter-spacing: normal; margin: 0 0 20px; }
.jk__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip {
  background: rgba(255, 255, 255, .88); color: var(--ink);
  font-size: 14px; letter-spacing: normal; padding: 8px 14px; border-radius: var(--r-btn);
  backdrop-filter: blur(4px);
}
.chip--price { background: var(--accent); color: #fff; font-weight: 600; }

.jk__params { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.param { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.param__value { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: normal; font-variant-numeric: tabular-nums; }
.param:first-child .param__value { font-size: 18px; }
.param__label { font-size: 14px; color: var(--muted); letter-spacing: normal; }

/* --- Описание ------------------------------------------------------------ */
.desc { padding-bottom: var(--section-gap); }
.desc__block {
  display: grid; grid-template-columns: 1fr 1fr; gap: 45px;
  background: var(--surface); border-radius: var(--r-card); padding: 40px; align-items: center;
}
.desc__lead { font-size: 22px; color: var(--ink); font-weight: 500; margin: 0 0 16px; }
.desc__text { margin: 0 0 16px; }
.specs { margin: 28px 0; display: grid; gap: 12px; }
.specs__item { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 16px; letter-spacing: normal; }
.specs__item b { color: var(--ink); font-weight: 500; text-align: right; }
.desc__image { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-image); }

.mix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }
.mix__item { background: var(--surface); border-radius: var(--r-card); padding: 24px; display: grid; gap: 4px; }
.mix__item--total { background: var(--gradient); }
.mix__count { font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: normal; }
.mix__label { font-size: 15px; color: var(--muted); letter-spacing: normal; }
.mix__item--total .mix__count { color: #fff; }
.mix__item--total .mix__label { color: rgba(255, 255, 255, .75); }

/* --- Территория ---------------------------------------------------------- */
.territory { padding-bottom: var(--section-gap); }
.territory__image { position: relative; border-radius: var(--r-image); overflow: hidden; }
.territory__image img { width: 100%; height: 450px; object-fit: cover; }
.territory__btn { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); height: 52px; }

/* --- Чередующиеся блоки -------------------------------------------------- */
.depic { padding-bottom: var(--section-gap); }
.depic__container { display: flex; flex-direction: column; gap: 30px; }
.depic__item { display: flex; background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.depic__item--reverse { flex-direction: row-reverse; }
.depic__info { flex: 1 1 45%; padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.depic__title { color: var(--ink); font-size: 28px; font-weight: 700; margin: 0 0 16px; letter-spacing: normal; }
.depic__text { margin: 0 0 24px; font-size: 16px; }
.features { display: flex; flex-wrap: wrap; gap: 10px; }
.feature { background: var(--brand-soft); color: var(--ink); font-size: 14px; letter-spacing: normal; padding: 8px 14px; border-radius: var(--r-btn); }
.depic__media { flex: 1 1 55%; position: relative; min-height: 450px; }
.depic__media img { width: 100%; height: 100%; min-height: 450px; object-fit: cover; }

.gallery { overflow: hidden; height: 100%; }
.gallery__track { display: flex; height: 100%; transition: transform .5s ease-in-out; will-change: transform; }
.gallery__item { flex: 0 0 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .gallery__track { transition: none; } }

.slider-nav { position: absolute; right: 20px; bottom: 20px; z-index: 5; display: flex; align-items: center; gap: 10px; }
.slider-nav__counter {
  background: rgba(255, 255, 255, .9); color: var(--ink); border-radius: 22px; padding: 0 14px; height: 44px;
  display: flex; align-items: center; font-size: 14px; font-weight: 500; letter-spacing: normal; font-variant-numeric: tabular-nums;
}
.slider-nav__btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 18px; transition: var(--t-btn); touch-action: manipulation; }
.slider-nav__btn:hover { background: #fff; color: var(--accent); }

.near { background: var(--surface); border-radius: var(--r-card); padding: 40px; }
.near .title { margin-bottom: 24px; }
.near__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.poi { display: flex; flex-direction: column; background: var(--ground); border-radius: var(--r-card); overflow: hidden; }
.poi__img { width: 100%; height: 180px; object-fit: cover; }
.poi__body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.poi__title { overflow-wrap: anywhere; color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.35; letter-spacing: normal; }
.poi__dist { color: var(--brand); font-size: 14px; font-weight: 500; letter-spacing: normal; }

/* --- Планировки ---------------------------------------------------------- */
.plans { padding-bottom: var(--section-gap); }
.plans__tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.plans__filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.plans__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.plan-card {
  background: var(--surface); border-radius: var(--r-card); overflow: hidden;
  display: flex; flex-direction: column; border: 0; padding: 0; text-align: left;
  transition: box-shadow .2s ease-in-out, transform .2s ease-in-out; touch-action: manipulation;
}
.plan-card:hover { box-shadow: 0 12px 30px rgba(23, 67, 43, .10); transform: translateY(-3px); }
.plan-card__img { width: 100%; height: 280px; object-fit: contain; background: #fff; padding: 20px; }
.plan-card__body { padding: 20px 24px 24px; display: grid; gap: 6px; }
.plan-card__rooms { font-size: 14px; color: var(--muted); letter-spacing: normal; }
.plan-card__area { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: normal; font-variant-numeric: tabular-nums; }
.plan-card__total { font-size: 18px; color: var(--ink); font-weight: 500; letter-spacing: normal; font-variant-numeric: tabular-nums; }
.plan-card__price { font-size: 14px; color: var(--muted); letter-spacing: normal; font-variant-numeric: tabular-nums; }
.plans__more { display: flex; justify-content: center; margin-top: 30px; }
.plans__empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; }

/* --- Локация ------------------------------------------------------------- */
.loca { padding-bottom: var(--section-gap); }
.loca__header { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.loca__header .title { margin-bottom: 30px; }
.loca__address { font-size: 16px; letter-spacing: normal; }
.loca__link { font-size: 15px; font-weight: 500; color: var(--brand); letter-spacing: normal; margin-left: auto; transition: var(--t-color); border-bottom: 1px solid rgba(46, 125, 78, .35); padding-bottom: 1px; }
.loca__link:hover { color: var(--accent); border-color: var(--accent); }
.loca__map { height: 403px; border-radius: var(--r-image); overflow: hidden; background: var(--surface); }
.loca__map iframe { width: 100%; height: 100%; border: 0; }

/* --- Адаптив ------------------------------------------------------------- */
@media (max-width: 1200px) { .depic__info { padding: 40px; } }
@media (max-width: 992px) {
  .jk__image-block { padding: 30px 24px; }
  .jk__title { font-size: 28px; }
  .jk__subtitle { font-size: 18px; }
  .jk__params { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .desc__block { display: flex; flex-direction: column-reverse; gap: 30px; padding: 24px; }
  .desc__image { height: 320px; }
  .depic__item, .depic__item--reverse { flex-direction: column; }
  .depic__info { padding: 30px 24px; }
  .depic__media { min-height: 320px; width: 100%; }
  .depic__media img { min-height: 320px; }
  .near { padding: 24px; }
  .near__grid { grid-template-columns: repeat(2, 1fr); }
  .mix { grid-template-columns: repeat(2, 1fr); }
  .plans__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 768px) {
  .depic__info { align-items: center; text-align: center; }
  .features { justify-content: center; }
}
@media (max-width: 576px) {
  .plans__tabs { flex-wrap: wrap; }
  .jk__image { min-height: 420px; }
  .jk__image-block { padding: 24px 20px; }
  .jk__title { font-size: 24px; }
  .chip { font-size: 13px; padding: 7px 12px; }
  .jk__params { grid-template-columns: 1fr; }
  .param { text-align: left; }
  .plans__grid { grid-template-columns: 1fr; }
  .near__grid { grid-template-columns: 1fr; }
  .mix { grid-template-columns: 1fr; }
}
