/*
 * Страница места: город /{country}/{city}, страна /{country}.
 *
 * Дополняет redesign/css/base.css: общие токены, кнопки, карусели и сетки
 * берутся оттуда (страница обёрнута в .ti-page), здесь — только блоки,
 * которых там нет. Классы с префиксом .tc-.
 */

/* ---------------------------------------------------------------- обложка */

.tc-hero {
  position: relative;
  display: flex;
  /* Заголовок и подводка у верхнего края, как на главной (.ti-hero: 64px сверху);
     низ блока остаётся свободным под наезжающую панель ссылок. */
  align-items: flex-start;
  min-height: 300px;
  padding: 64px 0 34px;
  background-color: #2a2745;
  background-position: center;
  background-size: cover;
  color: var(--ti-white);
}

.tc-hero > .ti-container {
  width: 100%;
}

.ti-page .tc-hero__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--ti-white);
}

.ti-page .tc-hero__fav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ti-white);
  background: rgba(255, 255, 255, .2);
}

.tc-hero__fav:hover {
  background: rgba(255, 255, 255, .32);
}

.tc-hero__lead {
  max-width: 520px;
  margin-top: 10px;
  font-size: 15px;
  color: rgba(255, 255, 255, .88);
}

/* ------------------------------------------------- панель быстрых ссылок */

/* Панель наезжает на обложку — так на макете. */
.tc-quicknav {
  position: relative;
  z-index: 2;
  margin-top: -28px;
}

.tc-quicknav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  padding: 10px 14px;
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius);
  background: var(--ti-white);
  box-shadow: 0 6px 22px rgba(16, 14, 40, .12);
}

.ti-page .tc-quicknav__list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ti-text);
  white-space: nowrap;
}

.ti-page .tc-quicknav__list a:hover {
  color: var(--ti-primary);
  background: var(--ti-primary-soft);
}

.tc-quicknav__list svg {
  flex: 0 0 auto;
  color: var(--ti-muted);
}

.ti-page .tc-quicknav__list a:hover svg {
  color: var(--ti-primary);
}

/* --------------------------------------------- карточка экскурсии и тура

   Разметка и оформление — общие с текущей главной (.excursion-item из
   new_frontend/all.css). Здесь только то, чего там нет: ширина под карусель
   и скругления. */

.tc-page .ti-carousel__track > .excursion-item {
  flex: 0 0 300px;
  width: 300px;
  overflow: hidden;
  padding-bottom: 14px;
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius);
  background: var(--ti-white);
  transition: box-shadow .15s;
}

.tc-page .ti-carousel__track > .excursion-item:hover {
  box-shadow: var(--ti-shadow-hover);
}

/* Картинка прижата к верхним углам карточки. */
.tc-page .excursion-item .block-image-list {
  display: block;
  overflow: hidden;
  border-radius: var(--ti-radius) var(--ti-radius) 0 0;
}

.tc-page .excursion-item .block-image-list img {
  display: block;
  width: 100%;
  height: 190px;
  margin-bottom: 12px;
  object-fit: cover;
}

/* Сердечко: в общей вёрстке оно позиционируется от края списка, внутри
   скруглённой карточки его нужно отодвинуть от угла, иначе наезжает на текст. */
.tc-page .excursion-item .fav-link {
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 3;
}

/* ---------------------------------------------------------- карточка гида

   Разметка и оформление — общие с текущей главной (.guide-item из
   new_frontend/all.css), там уже есть скругление. Здесь только ширина
   под карусель. */

.tc-page .ti-carousel__track > .guide-item {
  flex: 0 0 300px;
  width: 300px;
}

/* ------------------------------------------------------------ услуги */

/* Плиток от двух до пяти (пустые рубрики прячутся) — сетка подстраивается. */
.tc-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tc-service {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius);
  background: var(--ti-white);
  transition: box-shadow .15s, transform .15s;
}

.tc-service:hover {
  transform: translateY(-2px);
  box-shadow: var(--ti-shadow-hover);
}

.tc-service__name {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.tc-service__text {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ti-muted);
}

.tc-service__action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ti-primary);
}

.tc-service__action::after {
  content: "›";
  font-size: 15px;
  line-height: 1;
}

/* ------------------------------------------------------ описание города */

.tc-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

/* Заголовок и ссылка «Читать полностью» в одной строке. */
.tc-about__head {
  margin-bottom: 0;
}

.tc-about__body {
  position: relative;
  max-height: 210px;
  overflow: hidden;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ti-muted);
}

/* Мягкое затухание вместо резкого обрыва текста. */
.tc-about__body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--ti-white));
}

.tc-about__body.is-open {
  max-height: none;
}

.tc-about__body.is-open::after {
  display: none;
}

.ti-page .tc-about__body p {
  margin-bottom: 12px;
}

/* Вид ссылок «Все …» из ti-section__more: те правила заданы через тег a,
   поэтому для кнопки повторяем их здесь. */
.ti-page .tc-about__more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ti-primary);
}

.tc-about__more::after {
  content: "›";
  font-size: 16px;
  line-height: 1;
}

.ti-page .tc-about__more:hover {
  color: var(--ti-primary-dark);
}

.tc-facts {
  padding: 20px 22px;
  border-radius: var(--ti-radius);
  background: var(--ti-bg);
}

.tc-facts__title {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.tc-facts ul {
  display: grid;
  gap: 10px;
}

.tc-facts li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ti-muted);
}

.tc-facts li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ti-primary);
}

/* --------------------------------------------------- исследуйте город */

.tc-explore {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.tc-explore__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius);
  background: var(--ti-white);
  transition: box-shadow .15s;
}

.tc-explore__item:hover {
  box-shadow: var(--ti-shadow-hover);
}

.tc-explore__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.tc-explore__text {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ti-muted);
}

/* -------------------------------------------------------- нижний призыв

   Фон, вуаль и текст — от .ti-cta главной страницы (redesign/css/base.css).
   Здесь только то, чем плашка города отличается: кнопка справа вместо
   формы поиска и подпись пошире, чтобы уложилась в две строки. */

.tc-cta__inner {
  justify-content: space-between;
}

.tc-cta .ti-cta__text p {
  max-width: 440px;
}

.ti-page .tc-cta__button {
  gap: 9px;
  color: var(--ti-primary);
  background: var(--ti-white);
}

.ti-page .tc-cta__button:hover {
  color: var(--ti-primary-dark);
  background: #f2f0ff;
}

/* ---------------------------------------------------------------- адаптив */

@media (max-width: 1100px) {
  .tc-services {
    grid-template-columns: repeat(2, 1fr);
  }

  .tc-explore {
    grid-template-columns: repeat(3, 1fr);
  }

  .tc-about {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 760px) {
  .tc-hero {
    min-height: 240px;
    padding-top: 44px;
  }

  .ti-page .tc-hero__title {
    font-size: 28px;
  }

  /* Все пункты видны сразу: панель переносит их на несколько строк, а не
     прячет в горизонтальную прокрутку — обрезанные «…еть» и «Транс» на краях
     читались как ошибка вёрстки. Пункты чуть компактнее, чтобы влезало по 2–3 в ряд. */
  .tc-quicknav__list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 4px;
    padding: 8px 10px;
  }

  .ti-page .tc-quicknav__list a {
    padding: 7px 10px;
    font-size: 13px;
  }

  .tc-services,
  .tc-explore {
    grid-template-columns: 1fr;
  }

  .tc-page .ti-carousel__track > .guide-item {
    flex-basis: 260px;
    width: 260px;
  }

  /* На узком экране карточка почти во всю ширину — так видно следующую. */
  .tc-page .ti-carousel__track > .excursion-item {
    flex-basis: 260px;
    width: 260px;
  }

  .tc-page .excursion-item .block-image-list img {
    height: 165px;
  }

  .tc-cta__inner {
    align-items: flex-start;
  }
}

/* --------------------------------------------------- города страны */

.tc-cities {
  display: grid;
  gap: 12px;
}

.tc-cities__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ti-border);
}

.tc-cities__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tc-cities__letter {
  font-size: 16px;
  font-weight: 700;
  color: var(--ti-primary);
}

.tc-cities__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.ti-page .tc-cities__list a {
  font-size: 14px;
  color: var(--ti-text);
}

.ti-page .tc-cities__list a:hover {
  color: var(--ti-primary);
}

/* ------------------------------------------------ карты внутри «О городе» */

/* Карты лежат внутри раскрывающегося описания (.tc-about__body) следом
   за текстом; подзаголовок возвращаем в основной цвет — тело приглушённое. */
.tc-about__maps {
  margin-top: 28px;
}

.ti-page .tc-about__subtitle {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ti-text);
}

.tc-maps__text {
  margin: 6px 0 14px;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ti-muted);
}

.tc-maps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Рекламные зоны перед нижней плашкой: отступ снизу, если баннер есть;
   пустой контейнер (баннеров нет) места не занимает. */
.tc-ads:not(:empty) {
  padding-bottom: 24px;
}
