/* =============================================================================
   СТРАНИЦА ОБЪЕКТА, НОВОСТИ И СОБЫТИЯ, ИЗБРАННОЕ, АВТОРЫ ФОТО
   ============================================================================= */

/* --- Хлебные крошки --- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 4px 18px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.crumbs a:hover {
  color: var(--terra);
}

/* --- Заголовок объекта --- */
.place-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}

.place-head .label {
  color: var(--terra);
}

.place-head h1 {
  margin: 10px 0 10px;
  font-size: clamp(40px, 6vw, 72px);
}

.place-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 0;
  color: var(--ink-2);
}

/* Сердечко рядом с заголовком — без абсолютного позиционирования */
.place-head__fav .fav {
  position: static;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--card);
}

/* --- Большое фото с подписью автора --- */
.place-photo {
  position: relative;
  margin: 0 0 32px;
}

.place-photo__img {
  aspect-ratio: 21 / 9;
  max-width: 100%;
  border-radius: var(--r-l);
}

.place-photo figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.place-photo figcaption a {
  text-decoration: underline;
}

/* --- Две колонки: описание + бронь --- */
.place-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}

/* Правая колонка тянется на всю высоту описания — иначе блоку брони
   (position: sticky) некуда «ехать» вниз и он не прилипает. */
.place-layout > aside {
  align-self: stretch;
}

.place-section {
  padding-block: 4px 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.place-section h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.place-section p {
  margin: 0 0 12px;
  max-width: 65ch;
}

.place-lead {
  font-size: 19px;
  line-height: 1.45;
}

.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.highlights li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-s);
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
}

.highlights .icon {
  color: var(--terra);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  position: relative;
  padding-left: 22px;
}

/* Маркер — маленький ромб из орнамента */
.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border: 1.5px solid var(--gold);
}

/* --- Блок брони --- */
.booking {
  position: sticky;
  top: calc(var(--header-h, 0px) + 20px); /* на 20px ниже закреплённой шапки */
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--r-l);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -32px rgb(20 25 25 / 0.45);
}

.booking p {
  margin: 0;
}

.booking .label {
  color: var(--terra);
}

.booking__price {
  color: var(--ink-2);
}

.booking__price b {
  font-size: 30px;
  color: var(--ink);
  font-weight: 800;
}

.booking__phone {
  font-size: 24px;
  font-weight: 800;
}

.booking__hint {
  font-size: 12.5px;
  color: var(--ink-2);
}

.booking__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
}

.booking__form .btn {
  grid-column: 1 / -1;
  border-radius: 0;
  padding-block: 15px;
}

.field-box {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.field-box:first-child {
  border-right: 1px solid var(--line);
}

.field-box--wide {
  grid-column: 1 / -1;
}

.field-box span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
}

.field-box input:focus {
  outline: none;
}

.field-box:focus-within {
  background: var(--paper);
}

/* --- Галерея жилья: большое фото + 4 маленьких --- */
.gallery {
  position: relative;
  margin: 0 0 32px;
}

.gallery__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 210px 210px;
  gap: 8px;
  border-radius: var(--r-l);
  overflow: hidden;
}

.gallery__item {
  padding: 0;
  border: 0;
  background: var(--tone, var(--paper-2));
  cursor: zoom-in;
  overflow: hidden;
}

.gallery__item--main {
  grid-row: span 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery__item:hover img {
  transform: scale(1.03);
}

/* Кнопка «Все фото» поверх галереи, справа снизу */
.gallery__all {
  position: absolute;
  right: 14px;
  bottom: 40px;
}

.gallery figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.gallery figcaption a {
  text-decoration: underline;
}

/* Окно со всеми фото */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0 16px 40px;
  border: 0;
  background: var(--night);
  color: #fff;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto 8px;
  padding-block: 14px;
  background: var(--night);
  font-weight: 600;
}

.lightbox__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.lightbox__list {
  display: grid;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Одинаковая высота у всех фото, даже пока они не загрузились, —
   чтобы прокрутка к нужному фото попадала точно */
.lightbox__list img {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: calc(100dvh - 100px);
  object-fit: contain;
  background: rgb(0 0 0 / 0.25);
  border-radius: var(--r-m);
  scroll-margin-top: 72px;
}

/* Окно меню: страницы меню вертикальные, показываем их узкой колонкой
   в натуральных пропорциях (без обрезки, как у фото выше) */
.lightbox__list--menu {
  max-width: 620px;
}

.lightbox__list--menu img {
  aspect-ratio: auto;
  max-height: none;
  background: #fff;
}

/* --- Номера --- */
.rooms-note {
  color: var(--ink-2);
}

.rooms {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

/* Карточка номера — у всех одинаковой высоты: фото обрезается по центру,
   особенности — в одну строку, под «Доп. место» место есть всегда, низ прижат к низу. */
.room {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 196px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--card);
  overflow: hidden;
}

.room__photo {
  height: 100%;
  min-height: 0;
  background: var(--tone, var(--paper-2));
}

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

.room__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 16px 18px;
}

.room__body h3 {
  margin: 0;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room__body p {
  margin: 0;
}

.room__meta {
  font-weight: 600;
  color: var(--ink-2);
}

/* Одна строка; не поместилось — «…». Пустая строка тоже занимает место. */
.room__features,
.room__extra {
  min-height: 1.45em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room__features {
  font-size: 14px;
  color: var(--ink-2);
}

.room__extra {
  font-size: 13.5px;
  color: var(--green);
  font-weight: 600;
}

.room__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;           /* прижать к низу карточки */
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.room__price {
  color: var(--ink-2);
}

.room__price b {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

/* Фото номера — кнопка, открывает окно номера */
button.room__photo {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.room__count {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(18 32 30 / 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.room__actions {
  display: flex;
  gap: 8px;
}

/* --- Окно номера: на весь экран, слева описание, справа фото (как на сайте отеля) --- */
.room-dialog {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--card);
  color: var(--ink);
}

/* display: grid — только у открытого окна, иначе закрытое было бы видно */
.room-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Пока открыто любое окно, сама страница под ним не прокручивается */
body:has(dialog[open]) {
  overflow: hidden;
}

/* Левая половина: прокручивается сама, если текст длинный */
.room-dialog__info {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: clamp(28px, 6vh, 72px) clamp(20px, 5vw, 72px) 40px;
}

.room-dialog__info p {
  margin: 0;
}

.room-dialog__title {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
}

/* Короткая золотая черта под названием */
.room-dialog__title::after {
  content: "";
  display: block;
  width: 90px;
  height: 3px;
  margin-top: 18px;
  background: var(--gold);
}

.room-dialog__facts {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  color: var(--ink-2);
}

.room-dialog__info h3 {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Оборудование — в две колонки */
.room-dialog__list {
  columns: 2 220px;
  column-gap: 28px;
  margin: 0;
  padding-left: 18px;
}

.room-dialog__list li {
  break-inside: avoid;
  margin-bottom: 6px;
}

.room-dialog__note {
  font-size: 14px;
  color: var(--ink-2);
}

/* Рамка с ценой и кнопкой */
.room-dialog__book {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 20px 24px;
  border: 1.5px solid var(--gold);
}

.room-dialog__credit {
  font-size: 12px;
  color: var(--ink-3);
}

/* Правая половина: фото на всю высоту */
.room-dialog__gallery {
  position: relative;
  min-height: 0;
  background: var(--night);
}

/* Лента фото: каждое фото во всю ширину, листается вбок с «защёлкиванием» */
.room-dialog__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.room-dialog__track::-webkit-scrollbar {
  display: none;
}

.room-dialog__track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}

/* Стрелки и счётчик — внизу слева на фото */
.room-dialog__controls {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border-radius: 999px;
  background: rgb(18 32 30 / 0.6);
  color: #fff;
  font-size: 14px;
}

.room-dialog__controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

/* «Вернуться» — сверху справа, поверх фото (форма вынута из сетки окна) */
.room-dialog__return {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

.room-dialog__return .btn {
  background: var(--gold);
  color: #fff;
}

.room-dialog__return .btn:hover {
  background: #B3842F;
}

/* Телефон и узкий экран: сверху фото, под ним описание; прокручивается всё окно */
@media (max-width: 900px) {
  .room-dialog[open] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 46dvh auto;
    overflow-y: auto;
  }

  .room-dialog__gallery {
    order: -1;
  }

  .room-dialog__info {
    overflow: visible;
  }

  .room-dialog__return {
    position: fixed;
    top: 12px;
    right: 12px;
  }

  .room-dialog__controls {
    left: 12px;
    bottom: 12px;
  }
}

/* --- Условия проживания --- */
.rules {
  display: grid;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--card);
}

.rules div {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.rules div:last-child {
  border-bottom: 0;
}

.rules dt {
  color: var(--ink-2);
}

.rules dd {
  margin: 0;
  font-weight: 600;
}

/* --- Питание: ссылки на меню --- */
.menus {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Карта --- */
.map {
  margin: 4px 0 14px;
  border-radius: var(--r-m);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.map iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}

/* Поле «Номер» в форме брони */
.field-box select {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
}

.field-box select:focus {
  outline: none;
}

/* --- Похожие / Рядом --- */
.similar {
  margin-top: 56px;
}

.similar h2 {
  margin: 22px 0 22px;
  font-size: clamp(32px, 4vw, 44px);
}

/* --- Окно после брони --- */
.dialog {
  max-width: 400px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  color: var(--ink);
}

.dialog::backdrop {
  background: rgb(18 32 30 / 0.55);
}

.dialog h2 {
  margin: 0 0 8px;
  font-size: 36px;
}

.dialog p {
  margin: 0 0 18px;
  color: var(--ink-2);
}

/* --- Новость и событие --- */
.region-main--text {
  padding-top: 8px;
}

.text-page {
  max-width: 720px;
}

.text-page .label {
  color: var(--terra);
}

.text-page h1 {
  margin: 10px 0 14px;
  font-size: clamp(38px, 5vw, 60px);
}

.text-page__date {
  margin: 0 0 12px;
  color: var(--ink-2);
}

.text-page__lead {
  margin: 0 0 24px;
  font-size: 19px;
  line-height: 1.45;
}

.text-page > p {
  font-size: 16.5px;
  line-height: 1.7;
}

.text-page .place-photo__img {
  aspect-ratio: 16 / 9;
}

.event-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--card);
}

.event-facts div {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.event-facts div:last-child {
  border-right: 0;
}

.event-facts small {
  font-size: 12px;
  color: var(--ink-2);
}

/* --- Простые страницы: избранное, авторы фото --- */
.simple-page {
  padding-top: 16px;
}

.simple-page h1 {
  margin: 8px 0 0;
  font-size: clamp(40px, 5vw, 60px);
}

.credits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.credits li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--r-m);
  background: var(--card);
  border: 1px solid var(--line);
}

.credits img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--paper-2);
}

.credits div {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.credits a {
  font-weight: 700;
  text-decoration: underline;
}

.credits span {
  color: var(--ink-2);
}

/* --- Адаптив --- */
@media (max-width: 960px) {
  .place-layout {
    grid-template-columns: 1fr;
  }

  .booking {
    position: static;
  }
}

@media (max-width: 640px) {
  .place-photo__img {
    aspect-ratio: 4 / 3;
  }

  /* На телефоне в галерее только главное фото, остальные — по кнопке «Все фото» */
  .gallery__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .gallery__item--main {
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .gallery__item:not(.gallery__item--main) {
    display: none;
  }

  /* Телефон: фото сверху одной высоты, под ним текст; цена и кнопки — в две строки у всех */
  .room {
    grid-template-columns: 1fr;
    grid-template-rows: 180px auto;
    height: auto;
  }

  .room__foot {
    display: grid;
    justify-content: stretch;
  }

  .room__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .rules div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .map iframe {
    height: 260px;
  }

  .event-facts {
    grid-template-columns: 1fr;
  }

  .event-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .event-facts div:last-child {
    border-bottom: 0;
  }
}
