/* ==========================================================================
   Гиды Питера — дизайн-система публичного сайта
   --------------------------------------------------------------------------
   Мотив: сдержанный Петербург. Кремовая бумага, графитовые «тёмные полосы»
   между светлыми секциями, винный акцент вместо привычного туристического
   красного, золото — только на звёздах рейтинга.

   Типографика: Playfair Display (заголовки, есть кириллица) + Inter (текст).
   Засечный крупный заголовок на кремовом фоне — главный приём всей вёрстки.

   Правки цвета делаются только в блоке токенов ниже: остальной файл
   ссылается на переменные и ничего не знает про конкретные оттенки.
   ========================================================================== */

:root {
  /* --- палитра (HSL без обёртки, чтобы можно было подмешивать прозрачность) */
  --cream: 40 33% 96%;        /* фон страницы, «бумага» */
  --cream-deep: 40 24% 92%;   /* чуть тёмнее — чередование секций */
  --graphite: 220 13% 12%;    /* тёмные секции, основной текст */
  --wine: 350 45% 32%;        /* акцент: кнопки, ссылки, активные состояния */
  --wine-dark: 350 50% 25%;   /* ховер акцента */
  --wine-light: 350 50% 65%;  /* акцент на тёмном фоне */
  --stone: 40 10% 88%;        /* границы карточек */
  --gold: 43 74% 58%;         /* звёзды рейтинга */
  --blue: 205 30% 50%;        /* редкий второй акцент */
  --white: 0 0% 100%;

  /* --- семантические псевдонимы */
  --bg: hsl(var(--cream));
  --bg-alt: hsl(var(--cream-deep));
  --bg-dark: hsl(var(--graphite));
  --surface: hsl(var(--white));
  --ink: hsl(var(--graphite));
  --ink-soft: hsl(var(--graphite) / 0.6);
  --ink-faint: hsl(var(--graphite) / 0.42);
  --line: hsl(var(--stone));
  --accent: hsl(var(--wine));
  --accent-dark: hsl(var(--wine-dark));
  --accent-light: hsl(var(--wine-light));

  /* --- типографика */
  --font-serif: "Playfair Display", "PT Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* --- геометрия */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px hsl(var(--graphite) / 0.06), 0 1px 2px hsl(var(--graphite) / 0.04);
  --shadow-md: 0 4px 16px hsl(var(--graphite) / 0.08);
  --shadow-lg: 0 12px 32px hsl(var(--graphite) / 0.12);
  --shadow-xl: 0 24px 64px hsl(var(--graphite) / 0.18);

  --container: 1200px;
  --header-h: 76px;
  --section-y: clamp(56px, 8vw, 96px);
}

/* --------------------------------------------------------------------------
   База
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

::selection {
  background: hsl(var(--wine) / 0.15);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Раскладка
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

main > section {
  padding: var(--section-y) 0;
}

/* Первая секция страницы без «шапочного» героя должна отступить от хедера */
body:not(.has-hero) main > section:first-child {
  padding-top: calc(var(--header-h) + 40px);
}

.section-dark {
  background: var(--bg-dark);
  color: hsl(var(--white));
}
.section-dark h1,
.section-dark h2,
.section-dark h3 { color: hsl(var(--white)); }
.section-dark p { color: hsl(var(--white) / 0.65); }
.section-dark a { color: var(--accent-light); }

.section-alt { background: var(--bg-alt); }

/* Секция сразу под липкой панелью фильтров — полный отступ там избыточен */
.section-tight { padding-top: 36px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* --------------------------------------------------------------------------
   Типографические элементы
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-dark .eyebrow { color: var(--accent-light); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.section-head > div { max-width: 62ch; }
.section-head h2 { margin-bottom: 0; }
.section-head .section-lede {
  margin-top: 18px;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.section-dark .section-head .section-lede { color: hsl(var(--white) / 0.6); }

.section-head-center {
  display: block;
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head-center > div { max-width: none; }

.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--ink-faint); }

/* Курсивная «вторая строка» заголовка — фирменный приём макета */
.accent-italic {
  font-style: italic;
  color: var(--accent-light);
}

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: hsl(var(--white));
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: hsl(var(--white));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  border-color: hsl(var(--graphite) / 0.2);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: hsl(var(--white));
}

.section-dark .btn-ghost,
.btn-ghost-light {
  border-color: hsl(var(--white) / 0.3);
  color: hsl(var(--white));
  background: transparent;
}
.section-dark .btn-ghost:hover,
.btn-ghost-light:hover {
  background: hsl(var(--white) / 0.12);
  border-color: hsl(var(--white) / 0.5);
  color: hsl(var(--white));
}

.btn-gold {
  background: hsl(var(--gold));
  color: hsl(var(--graphite));
}
.btn-gold:hover {
  background: hsl(var(--gold) / 0.85);
  color: hsl(var(--graphite));
  transform: translateY(-1px);
}

.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.84rem; }
.btn-lg { padding: 16px 34px; font-size: 1rem; }

/* Текстовая ссылка со стрелкой, разъезжающейся на ховере */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  transition: gap 0.25s ease;
}
.link-arrow:hover { gap: 14px; }
.link-arrow svg { width: 16px; height: 16px; }
.section-dark .link-arrow { color: var(--accent-light); }

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.site-header > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* По умолчанию шапка непрозрачная: на светлых страницах белый текст был бы
   не виден. Прозрачной она становится только поверх тёмного героя. */
.site-header {
  background: hsl(var(--cream) / 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 hsl(var(--graphite) / 0.07);
}

body.has-hero .site-header {
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  padding: 26px 0;
}
body.has-hero .site-header.scrolled {
  background: hsl(var(--cream) / 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 hsl(var(--graphite) / 0.07);
  padding: 14px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.logo svg { width: 26px; height: 26px; color: var(--accent); transition: color 0.3s ease; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.main-nav a {
  position: relative;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  padding: 4px 0;
  transition: color 0.2s ease;
}

/* Пункты, которые нужны только в выдвижной панели на мобильном:
   на десктопе те же действия уже есть в .header-actions. */
.main-nav .nav-cta,
.main-nav .nav-guide-login { display: none; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.phone-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.phone-link:hover { color: var(--accent); }

/* Прозрачное состояние поверх тёмного героя — всё белым */
body.has-hero .site-header:not(.scrolled) .logo,
body.has-hero .site-header:not(.scrolled) .logo svg,
body.has-hero .site-header:not(.scrolled) .main-nav a,
body.has-hero .site-header:not(.scrolled) .phone-link,
body.has-hero .site-header:not(.scrolled) .nav-toggle {
  color: hsl(var(--white));
}
body.has-hero .site-header:not(.scrolled) .main-nav a { color: hsl(var(--white) / 0.82); }
body.has-hero .site-header:not(.scrolled) .main-nav a:hover,
body.has-hero .site-header:not(.scrolled) .main-nav a.active { color: hsl(var(--white)); }
body.has-hero .site-header:not(.scrolled) .main-nav a::after { background: hsl(var(--white)); }
body.has-hero .site-header:not(.scrolled) .btn-ghost {
  border-color: hsl(var(--white) / 0.35);
  color: hsl(var(--white));
}
body.has-hero .site-header:not(.scrolled) .btn-ghost:hover {
  background: hsl(var(--white) / 0.14);
  border-color: hsl(var(--white) / 0.6);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

.nav-guide-login { display: none; }

/* --------------------------------------------------------------------------
   Мобильное меню (выдвижная панель справа)
   -------------------------------------------------------------------------- */

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: hsl(var(--graphite) / 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.nav-backdrop.open { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------------------
   Герой
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 48px) 0 64px;
  text-align: center;
  color: hsl(var(--white));
}

/* Подложка: фото, если оно есть, иначе — графитовый градиент.
   Ссылка на фото приходит инлайном: style="--hero-image:url(...)" */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: hsl(var(--graphite));
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    hsl(var(--graphite) / 0.55),
    hsl(var(--graphite) / 0.35) 45%,
    hsl(var(--graphite) / 0.75)
  );
}

.hero > .container { position: relative; z-index: 2; }

.hero .eyebrow { color: hsl(var(--white) / 0.7); }

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  line-height: 1.08;
  color: hsl(var(--white));
  margin: 0 auto 24px;
  max-width: 16ch;
}

.hero-lede {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: hsl(var(--white) / 0.8);
  max-width: 60ch;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Компактный герой для внутренних страниц: тёмная полоса под шапкой */
.page-hero {
  background: var(--bg-dark);
  color: hsl(var(--white));
  padding: calc(var(--header-h) + 48px) 0 56px;
}
.page-hero h1 { color: hsl(var(--white)); max-width: 20ch; }
.page-hero .eyebrow { color: var(--accent-light); }
.page-hero .lede { color: hsl(var(--white) / 0.62); }
.page-hero .breadcrumbs,
.page-hero .breadcrumbs .sep { color: hsl(var(--white) / 0.45); }
.page-hero .breadcrumbs a { color: hsl(var(--white) / 0.62); }
.page-hero .breadcrumbs a:hover { color: hsl(var(--white)); }

/* --------------------------------------------------------------------------
   Быстрый поиск под героем
   -------------------------------------------------------------------------- */

.quick-search {
  position: relative;
  z-index: 3;
  margin: -56px auto 0;
  max-width: 1040px;
  background: hsl(var(--white) / 0.97);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px;
}
.quick-search-title {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--ink);
}
.quick-search-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 12px;
}
.quick-search select,
.quick-search input {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2354565c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}
.quick-search input {
  background-image: none;
  padding-right: 14px;
  cursor: text;
}
.quick-search select:focus,
.quick-search input:focus {
  outline: none;
  border-color: hsl(var(--wine) / 0.5);
  box-shadow: 0 0 0 3px hsl(var(--wine) / 0.12);
}

/* --------------------------------------------------------------------------
   Плитки направлений
   -------------------------------------------------------------------------- */

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

.tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-dark);
  color: hsl(var(--white));
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.tile:hover img { transform: scale(1.08); }
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsl(var(--graphite) / 0.8), hsl(var(--graphite) / 0.15) 55%, transparent);
}
.tile-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 20px;
}
.tile-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.25;
  color: hsl(var(--white));
  margin: 0;
}
.tile-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: hsl(var(--white) / 0.7);
  transition: color 0.2s ease;
}
.tile:hover .tile-more { color: hsl(var(--white)); }
.tile-more svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.tile:hover .tile-more svg { transform: translateX(4px); }

/* Плитка без фото — не «дырка», а типографский блок */
.tile-plain {
  display: flex;
  align-items: flex-end;
  background: linear-gradient(150deg, hsl(var(--graphite)), hsl(var(--wine) / 0.55));
}
.tile-plain::after { display: none; }

/* Ряд «облака» ссылок-направлений (компактная альтернатива плиткам) */
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.88rem;
  color: var(--ink);
  transition: all 0.2s ease;
}
.chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: hsl(var(--white));
}

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
  color: hsl(var(--graphite) / 0.18);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.card:hover .card-media img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: hsl(var(--white) / 0.92);
  backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
}

.card-rating {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: hsl(var(--graphite) / 0.8);
  backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 500;
  color: hsl(var(--white));
}
.card-rating svg { width: 13px; height: 13px; color: hsl(var(--gold)); }

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  line-height: 1.3;
  margin: 0 0 10px;
}
.card-title a { color: var(--ink); }
.card:hover .card-title a { color: var(--accent); }

.card-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-meta svg { width: 15px; height: 15px; }

.card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.price {
  display: block;
  line-height: 1.25;
}
.price small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-weight: 400;
}
.price-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-faint);
}
.price-value {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--ink);
}

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

.guide-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.guide-portrait {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(150deg, hsl(var(--cream-deep)), hsl(var(--stone)));
}
.guide-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.guide-card:hover .guide-portrait img { transform: scale(1.05); }

/* Инициал вместо фото */
.guide-portrait-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 4.5rem);
  color: hsl(var(--graphite) / 0.25);
}

.guide-card-body { padding: 24px; }

.guide-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0 0 4px;
}
.guide-name a { color: var(--ink); }
.guide-card:hover .guide-name a { color: var(--accent); }

.guide-position {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 12px;
}

.guide-bio {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* Круглый аватар (используется в блоках отзывов и на странице гида) */
.guide-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(150deg, hsl(var(--cream-deep)), hsl(var(--stone)));
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: hsl(var(--graphite) / 0.4);
  flex-shrink: 0;
}
.guide-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* --------------------------------------------------------------------------
   Рейтинг звёздами
   -------------------------------------------------------------------------- */

.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: hsl(var(--gold));
  line-height: 1;
}
.stars svg { width: 15px; height: 15px; }
.stars .star-empty { color: hsl(var(--graphite) / 0.18); }
.stars-sm svg { width: 13px; height: 13px; }
.stars-lg svg { width: 19px; height: 19px; }

.review-stars {
  color: hsl(var(--gold));
  letter-spacing: 2px;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Страница экскурсии
   -------------------------------------------------------------------------- */

.tour-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: start;
}

.tour-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: hsl(var(--cream-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}
.tour-gallery img { width: 100%; height: 100%; object-fit: cover; }

/* Заглушка вместо фото: силуэт Петербурга, а не серый прямоугольник.
   Рисунок ставим фоном, а не <img>: одно правило обслуживает и карточку 4:3,
   и галерею 16:10, и экранный диктор не объявляет подложку «фотографией
   экскурсии» — для него блок остаётся пустым. Высота задана в процентах,
   поэтому силуэт не растягивается ни в одной из пропорций. */
.card-media-empty,
.tour-gallery--empty {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-color: hsl(var(--cream-deep));
  background-image: url("/static/img/tour-placeholder.svg"),
                    linear-gradient(150deg, hsl(var(--cream-deep)), hsl(var(--stone)));
  background-repeat: no-repeat;
  background-position: center 76%;
  background-size: auto 58%, cover;
}
/* Подпись под силуэтом — только на странице экскурсии: в каталоге карточки
   мелкие, там лишняя строка превратилась бы в шум. */
.placeholder-note {
  max-width: calc(100% - 32px);
  margin-bottom: 20px;
  padding: 6px 16px;
  text-align: center;
  border-radius: 999px;
  background: hsl(var(--cream) / 0.7);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: hsl(var(--graphite) / 0.5);
}

.tour-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: hsl(var(--wine) / 0.1);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent);
}
.pill-muted {
  background: transparent;
  color: var(--ink-faint);
  padding-left: 0;
}

.tour-facts {
  display: grid;
  /* auto-fit, а не фиксированное число колонок: фактов бывает от одного до
     четырёх, и на узком экране они должны сами перестроиться в столбик. */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 32px 0 48px;
  text-align: center;
}
/* Разделители рисуем фоном ячеек, а не бордерами соседей: при переносе
   на вторую строку бордер оказывался в начале ряда. */
.tour-facts > div {
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  background: hsl(var(--cream) / 0.6);
}
.tour-facts svg { width: 20px; height: 20px; color: var(--accent); margin: 0 auto 8px; }
.tour-fact-label {
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.tour-fact-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}

.tour-block { margin-bottom: 48px; }
.tour-block > h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: hsl(var(--graphite) / 0.82);
}
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
}

/* Липкий виджет заявки сбоку */
.booking-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.booking-aside-price { margin-bottom: 22px; }
.booking-aside-price .price-label { margin-bottom: 2px; }
.booking-aside-price .price-value { font-size: 1.85rem; }
.booking-aside-note {
  margin-top: 14px;
  font-size: 0.76rem;
  color: var(--ink-faint);
  text-align: center;
}
.booking-aside-meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.booking-aside-meta div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.booking-aside-meta div + div { margin-top: 10px; }
.booking-aside-meta svg {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

/* Карточка гида внутри страницы экскурсии */
.guide-inline {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.guide-inline:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.guide-inline .guide-avatar { width: 72px; height: 72px; font-size: 1.8rem; }
.guide-inline-name,
.guide-inline-role,
.guide-inline-desc { display: block; }
.guide-inline-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 2px;
}
.guide-inline-role {
  font-size: 0.84rem;
  color: var(--accent);
  margin: 0 0 6px;
}
.guide-inline-desc {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0;
}
.guide-inline-chevron {
  width: 20px;
  height: 20px;
  color: var(--ink-faint);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.guide-inline:hover .guide-inline-chevron { transform: translateX(4px); }

/* Список «что увидим» */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.feature-list svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Фильтры каталога
   -------------------------------------------------------------------------- */

.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: hsl(var(--cream) / 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-row::-webkit-scrollbar { display: none; }

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.filters select,
.filters input[type="search"] {
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ink);
  min-width: 180px;
}
.filters select { cursor: pointer; }
.filters select:focus,
.filters input:focus {
  outline: none;
  border-color: hsl(var(--wine) / 0.45);
  box-shadow: 0 0 0 3px hsl(var(--wine) / 0.1);
}

.tag-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Лента меток в одну строку с горизонтальной прокруткой: их несколько десятков,
   и в виде «облака» они занимали бы пол-экрана до первой карточки. */
.tag-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 26px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.tag-scroll::-webkit-scrollbar { display: none; }
.tag-scroll .tag-chip { flex: 0 0 auto; }
.tag-chip {
  padding: 8px 17px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.tag-chip:hover { color: var(--ink); }
.tag-chip.active {
  background: var(--accent);
  color: hsl(var(--white));
}

/* Вариант с рамкой — для фильтра, где чипы стоят плотной сеткой */
.tag-chip-outline {
  border-color: var(--line);
  background: var(--surface);
}
.tag-chip-outline:hover { border-color: hsl(var(--graphite) / 0.28); }
.tag-chip-outline.active { border-color: var(--accent); }

/* Раскрывающийся фильтр по темам */
.tag-filter {
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.tag-filter > summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
}
.tag-filter > summary::-webkit-details-marker { display: none; }
.tag-filter > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.tag-filter[open] > summary::before { transform: rotate(90deg); }
.tag-filter[open] > summary { margin-bottom: 16px; }

.result-count {
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin-bottom: 28px;
}

/* --------------------------------------------------------------------------
   Отзывы
   -------------------------------------------------------------------------- */

.review {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 16px;
}
.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.review-author {
  font-weight: 500;
  color: var(--ink);
}
.review-date {
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.review-text {
  font-size: 0.95rem;
  color: hsl(var(--graphite) / 0.78);
  margin: 0;
}
.review-hidden { display: none; }

.review-quote {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 48px);
}
.review-quote-mark {
  width: 38px;
  height: 38px;
  color: hsl(var(--wine) / 0.2);
  margin-bottom: 20px;
}
.review-quote-text {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
  margin: 18px 0 26px;
}

/* Реальные отзывы бывают на полтора экрана. Крупный засечный кегль такой
   текст не держит, поэтому длинные переводим в обычный наборный шрифт
   и сворачиваем до восьми строк — остальное по кнопке. */
.review-quote-text--long {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  line-height: 1.7;
  color: hsl(var(--graphite) / 0.8);
}
.review-quote-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-more {
  display: inline-block;
  margin: -14px 0 22px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
}
.review-more:hover { color: var(--accent-dark); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Блоки страницы гида
   -------------------------------------------------------------------------- */

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.guide-hero-portrait {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(150deg, hsl(var(--cream-deep)), hsl(var(--stone)));
}
.guide-hero-portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Флекс, а не грид: у гида без отзывов остаётся одна плашка, и она не должна
   растягиваться на всю ширину колонки. */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0;
}
.stat-card {
  flex: 0 1 140px;
  padding: 18px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.stat-card svg { width: 19px; height: 19px; color: var(--accent); margin: 0 auto 8px; }
.stat-card .stat-value {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
}
.stat-card .stat-label {
  font-size: 0.74rem;
  color: var(--ink-faint);
}

.guide-section { margin-top: 64px; }
.guide-section > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  margin-bottom: 22px;
}
.guide-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: hsl(var(--wine) / 0.1);
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.guide-section-icon svg { width: 17px; height: 17px; }

/* Крупный значок статуса на страницах «спасибо» и результата оплаты */
.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: hsl(var(--wine) / 0.1);
  color: var(--accent);
}
.status-icon svg { width: 30px; height: 30px; }
.status-icon-ok {
  background: hsl(150 45% 32% / 0.12);
  color: hsl(150 45% 30%);
}
.guide-section-body { font-size: 0.98rem; line-height: 1.7; }
.guide-section-wide { max-width: none; }

.trait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.trait-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.trait-card h4 {
  font-family: var(--font-serif);
  margin: 0 0 8px;
  color: var(--ink);
}
.trait-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.trait-card-gold { border-left: 3px solid hsl(var(--gold)); }

/* Карточка-ссылка (контакты): цвет наследуется, ховер как у остальных карточек */
a.trait-card {
  display: block;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
a.trait-card:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: hsl(var(--wine) / 0.3);
}

.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding-bottom: 28px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px hsl(var(--wine) / 0.15);
}
.timeline-year {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.timeline-body h4 { margin: 0 0 6px; }
.timeline-body p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

.document-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.document-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--ink); }
.document-card img { border-radius: var(--radius-sm); aspect-ratio: 3/4; object-fit: cover; }
.document-card-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  background: hsl(var(--wine) / 0.08);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Панели, формы, состояния
   -------------------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
}

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: hsl(var(--wine) / 0.5);
  box-shadow: 0 0 0 3px hsl(var(--wine) / 0.12);
}
.form-field .hint {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.form-status {
  margin: 12px 0 0;
  font-size: 0.88rem;
  min-height: 1.2em;
}
.form-status.ok { color: hsl(150 45% 32%); }
.form-status.error { color: var(--accent); }

/* Анкета гида: повторяющийся блок «ещё одна экскурсия» */
.tour-offer-row {
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.tour-offer-row .form-field:last-child { margin-bottom: 0; }

.empty-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
}
.empty-state h3 { margin-bottom: 8px; }

.notice {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: hsl(var(--wine) / 0.07);
  border-left: 3px solid var(--accent);
  font-size: 0.92rem;
}
.notice-ok {
  background: hsl(150 45% 32% / 0.08);
  border-left-color: hsl(150 45% 32%);
}

/* --------------------------------------------------------------------------
   Модалка заявки
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: hsl(var(--graphite) / 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow-xl);
  transform: translateY(16px);
  transition: transform 0.3s ease;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal h3 { font-size: 1.5rem; margin-bottom: 8px; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-alt);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.modal-close:hover { background: var(--line); color: var(--ink); }

/* --------------------------------------------------------------------------
   Выбор даты и времени
   -------------------------------------------------------------------------- */

.slot-picker { margin-top: 24px; }
.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.slot-loading { color: var(--ink-faint); font-size: 0.9rem; }
.slot-option {
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}
.slot-option:hover { border-color: hsl(var(--graphite) / 0.3); }
.slot-option.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: hsl(var(--white));
}

/* --------------------------------------------------------------------------
   Разделитель-«решётка» (мотив петербургских оград)
   -------------------------------------------------------------------------- */

.lattice-divider {
  height: 14px;
  background-image:
    linear-gradient(90deg, hsl(var(--wine) / 0.25) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--gold) / 0.35) 1px, transparent 1px);
  background-size: 28px 100%, 28px 100%;
  background-position: 0 0, 14px 0;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-dark);
  color: hsl(var(--white) / 0.7);
  font-size: 0.9rem;
}
.site-footer .container { padding-top: 64px; padding-bottom: 40px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 44px;
  padding-bottom: 44px;
}
.footer-grid h4 {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--white) / 0.4);
  margin-bottom: 18px;
}
.footer-grid a { color: hsl(var(--white) / 0.7); }
.footer-grid a:hover { color: hsl(var(--white)); }
.footer-grid p { line-height: 2; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: hsl(var(--white));
  margin-bottom: 14px;
}
.footer-brand svg { width: 24px; height: 24px; color: var(--accent-light); }

.footer-tagline {
  max-width: 34ch;
  line-height: 1.65;
  color: hsl(var(--white) / 0.6);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid hsl(var(--white) / 0.15);
  color: hsl(var(--white) / 0.7);
  transition: all 0.2s ease;
}
.footer-social a:hover {
  background: hsl(var(--white) / 0.1);
  border-color: hsl(var(--white) / 0.3);
  color: hsl(var(--white));
}
.footer-social svg { width: 17px; height: 17px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid hsl(var(--white) / 0.1);
  font-size: 0.78rem;
  color: hsl(var(--white) / 0.4);
}
.footer-bottom a { color: hsl(var(--white) / 0.4); }
.footer-bottom a:hover { color: hsl(var(--white) / 0.75); }
.footer-bottom-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-disclaimer {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid hsl(var(--white) / 0.07);
  font-size: 0.72rem;
  line-height: 1.6;
  color: hsl(var(--white) / 0.32);
}
.footer-disclaimer a { color: hsl(var(--white) / 0.5); }

/* --------------------------------------------------------------------------
   Плавающая кнопка звонка
   -------------------------------------------------------------------------- */

.tel-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: hsl(var(--white));
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.tel-fab:hover { background: var(--accent-dark); color: hsl(var(--white)); transform: scale(1.06); }
.tel-fab svg { width: 24px; height: 24px; }

/* --------------------------------------------------------------------------
   Юридические страницы
   -------------------------------------------------------------------------- */

.legal-content {
  max-width: 76ch;
  font-size: 0.95rem;
  line-height: 1.75;
  color: hsl(var(--graphite) / 0.8);
}
.legal-content h2 { font-size: 1.4rem; margin-top: 1.8em; }
.legal-content h3 { font-size: 1.1rem; margin-top: 1.5em; }

/* --------------------------------------------------------------------------
   Появление блоков при прокрутке (замена framer-motion)
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

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

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

@media (max-width: 1080px) {
  .tour-layout { grid-template-columns: 1fr; gap: 40px; }
  .booking-aside { position: static; }
  .guide-hero { grid-template-columns: 1fr; gap: 32px; }
  .guide-hero-portrait { max-width: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  .quick-search-row { grid-template-columns: 1fr 1fr; }
  .quick-search-row .btn { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 66px; }

  .nav-toggle { display: inline-flex; }
  .header-guide-login,
  .header-actions .btn-primary { display: none; }
  .phone-link { display: none; }

  /* Меню — выдвижная панель справа */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(320px, 85vw);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 84px 20px 28px;
    background: var(--bg);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .main-nav.nav-open { transform: translateX(0); }
  .main-nav a {
    padding: 13px 16px;
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--ink) !important;
  }
  .main-nav a::after { display: none; }
  .main-nav a:hover { background: hsl(var(--stone) / 0.5); }
  .main-nav a.active {
    background: hsl(var(--wine) / 0.1);
    color: var(--accent) !important;
  }
  .main-nav .nav-guide-login {
    display: block;
    margin-top: 8px;
    border-top: 1px solid var(--line);
    padding-top: 20px !important;
    border-radius: 0;
  }
  .main-nav .nav-cta {
    display: block;
    margin-top: 20px;
    text-align: center;
    background: var(--accent);
    color: hsl(var(--white)) !important;
    border-radius: var(--radius-pill);
  }
  .main-nav .nav-cta:hover { background: var(--accent-dark); }

  /* На мобильном герой ниже, а быстрый поиск идёт под ним, а не поверх */
  .hero { min-height: auto; padding: calc(var(--header-h) + 56px) 0 48px; }
  .quick-search { margin-top: 24px; padding: 20px; }
  .quick-search-row { grid-template-columns: 1fr; }

  .section-head { margin-bottom: 32px; }
  .tour-facts { grid-template-columns: 1fr; }

  .grid { grid-template-columns: 1fr; gap: 20px; }
  .tile-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  .timeline { padding-left: 22px; }
  .timeline-item::before { left: -22px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .tel-fab { right: 16px; bottom: 16px; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .card-foot .btn { width: 100%; }
  .modal { padding: 26px 20px; }
}

/* --------------------------------------------------------------------------
   Теги
   --------------------------------------------------------------------------
   Цвет задаёт администратор, выбирая ключ из палитры (app/tag_colors.py).
   Здесь ключ превращается в пару «фон + текст», подобранную под кремовый фон.
   -------------------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  background: hsl(var(--stone) / 0.75);
  color: hsl(var(--graphite) / 0.7);
  transition: background-color 0.18s ease, color 0.18s ease;
}
a.tag:hover { background: hsl(var(--stone)); color: hsl(var(--graphite)); }

.tag--neutral  { background: hsl(var(--stone) / 0.75); color: hsl(var(--graphite) / 0.7); }
.tag--wine     { background: hsl(350 45% 32% / 0.12); color: hsl(350 45% 32%); }
.tag--blue     { background: hsl(205 40% 42% / 0.12); color: hsl(205 45% 36%); }
.tag--teal     { background: hsl(185 40% 32% / 0.12); color: hsl(185 45% 27%); }
.tag--green    { background: hsl(152 40% 30% / 0.12); color: hsl(152 40% 28%); }
.tag--gold     { background: hsl(38 60% 38% / 0.14); color: hsl(38 62% 32%); }
.tag--plum     { background: hsl(295 30% 38% / 0.12); color: hsl(295 32% 35%); }
.tag--graphite { background: hsl(var(--graphite) / 0.08); color: hsl(var(--graphite) / 0.75); }

a.tag--wine:hover     { background: hsl(350 45% 32% / 0.2); color: hsl(350 45% 26%); }
a.tag--blue:hover     { background: hsl(205 40% 42% / 0.2); }
a.tag--teal:hover     { background: hsl(185 40% 32% / 0.2); }
a.tag--green:hover    { background: hsl(152 40% 30% / 0.2); }
a.tag--gold:hover     { background: hsl(38 60% 38% / 0.22); }
a.tag--plum:hover     { background: hsl(295 30% 38% / 0.2); }
a.tag--graphite:hover { background: hsl(var(--graphite) / 0.14); }

/* Ряд тегов */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Выбор тегов в формах: чекбокс спрятан, кликается «таблетка» */
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
/* Селектор с двумя классами намеренно: правило `.form-field label` задаёт
   подписям полей заглавные буквы и разрядку, и по специфичности оно
   перебивало одиночный `.tag-pick` — теги выходили КАПСОМ. */
.tag-picker .tag-pick {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body, var(--font-sans));
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  margin: 0;
}
.tag-picker .tag-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.tag-picker .tag-pick:hover { opacity: 0.85; }
.tag-picker .tag-pick:has(input:checked) {
  opacity: 1;
  border-color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}
.tag-picker .tag-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }


/* --------------------------------------------------------------------------
   Страница статьи
   -------------------------------------------------------------------------- */

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.post-author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.post-author:hover { color: var(--accent); }
.post-author-name { display: block; font-weight: 500; font-size: 0.95rem; }
.post-author-role { display: block; font-size: 0.8rem; color: var(--ink-faint); }

.post-meta-facts {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.84rem;
  color: var(--ink-faint);
}
.post-meta-facts > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.post-meta-facts svg { width: 15px; height: 15px; }

.post-cover {
  width: 100%;
  border-radius: var(--radius-lg);
  margin: 32px 0 40px;
}

/* Блок подписки на каналы */
.subscribe-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(140deg, hsl(var(--cream-deep)), hsl(var(--white)));
}
.subscribe-block h3 { margin: 0 0 6px; font-size: 1.3rem; }
.subscribe-block p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.subscribe-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-actions .btn svg { width: 17px; height: 17px; }

@media (max-width: 640px) {
  .post-meta { flex-direction: column; align-items: flex-start; gap: 14px; }
  .subscribe-actions { width: 100%; }
  .subscribe-actions .btn { flex: 1; }
}


/* --------------------------------------------------------------------------
   Лендинг «присоединиться к команде гидов»
   -------------------------------------------------------------------------- */

/* Крупные цифры на тёмной полосе */
.stat-row-lg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin: 0;
}
.big-stat { text-align: center; }
.big-stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.05;
  color: hsl(var(--white));
}
.big-stat-label {
  margin-top: 8px;
  font-size: 0.88rem;
  color: hsl(var(--white) / 0.6);
}

/* Тарифы */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}
.price-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.price-card-kind {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.price-card-note {
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--ink-faint);
}
.price-card-value {
  margin: 16px 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  line-height: 1;
  color: var(--ink);
}
.price-card-period {
  font-size: 1.1rem;
  color: var(--ink-faint);
}
.price-card-list {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
}
.price-card-list li {
  padding: 11px 14px;
  font-size: 0.88rem;
}

/* Иконка в карточке-преимуществе */
.trait-card > .guide-section-icon { margin-bottom: 14px; }
