/* ============================================================
   Каталог святых мест России — стиль «старинный атлас»
   Пергамент, охра, бордо, тонкие рамки, винтажная типографика
   ============================================================ */

:root {
  --paper: #f6efe0;
  --paper-2: #efe5cf;
  --paper-3: #e9dcc0;
  --ink: #33281e;
  --ink-soft: #5c4f3e;
  --muted: #8a7a63;
  --accent: #7c2d34;      /* бордо */
  --accent-dark: #5f2127;
  --gold: #a9803a;        /* охра/золото */
  --olive: #66713f;
  --line: #cbb98e;
  --line-soft: #ddd0ac;
  --shadow: 0 2px 14px rgba(51, 40, 30, .08);
  --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --display: 'Playfair Display', Georgia, serif;
  --sans: 'PT Sans', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 500px at 50% -10%, rgba(169, 128, 58, .10), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
code { background: var(--paper-2); padding: 1px 6px; border-radius: 3px; font-size: .9em; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--paper);
  padding: 8px 14px; z-index: 100; border: 1px solid var(--ink);
}
.skip-link:focus { left: 8px; top: 8px; }

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

.site-header {
  background: linear-gradient(180deg, #f8f2e4, var(--paper-2));
  border-bottom: 3px double var(--line);
}

.header-bar {
  display: flex; align-items: center; gap: 22px;
  padding-top: 14px; padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { color: var(--accent); flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.15;
  letter-spacing: .2px;
}
.brand-tag { font-family: var(--sans); font-size: 11.5px; color: var(--muted); letter-spacing: .4px; }

.header-search { position: relative; margin-left: auto; display: flex; flex: 0 1 380px; }
.header-search input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-right: 0; border-radius: 4px 0 0 4px;
  background: #fbf7ec; padding: 9px 12px; font: inherit; font-size: 15px; color: var(--ink);
}
.header-search input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.header-search button {
  border: 1px solid var(--accent); background: var(--accent); color: #f8f2e4;
  font-family: var(--sans); font-weight: 700; letter-spacing: .6px; text-transform: uppercase; font-size: 12.5px;
  padding: 0 16px; cursor: pointer; border-radius: 0 4px 4px 0;
}
.header-search button:hover { background: var(--accent-dark); }

.suggest-box {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow); overflow: hidden;
}
.suggest-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover { background: var(--paper-3); }
.suggest-item span { color: var(--muted); font-family: var(--sans); font-size: 13px; }

.nav-toggle { display: none; }

.main-nav { border-top: 1px solid var(--line-soft); background: rgba(255,252,243,.55); }
.main-nav ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap;
}
.main-nav a {
  display: block; padding: 9px 14px; text-decoration: none; color: var(--ink-soft);
  font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: .5px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--accent); border-bottom-color: var(--gold); }

/* ---------------- Хлебные крошки ---------------- */

.breadcrumbs { padding-top: 14px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.breadcrumbs li + li::before { content: '→'; margin-right: 6px; color: var(--gold); }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ---------------- Общие блоки ---------------- */

main { padding-bottom: 56px; min-height: 52vh; }

.section { margin-top: 46px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.section-head h2, .place-block h2 {
  font-family: var(--display); font-size: 27px; font-weight: 600; margin: 0 0 4px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line); position: relative;
}
.section-head h2::after, .place-block h2::after {
  content: ''; position: absolute; left: 0; bottom: -1px; width: 84px; height: 3px; background: var(--gold);
}
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.section-link { font-family: var(--sans); font-size: 14px; font-weight: 700; white-space: nowrap; }

.page-head { margin: 26px 0 22px; }
.page-head h1 {
  font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.2; margin: 0 0 8px;
}
.page-lead { color: var(--ink-soft); font-size: 17px; max-width: 820px; margin: 0 0 6px; }
.page-count { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.page-count b { color: var(--accent); }
.place-kicker { font-family: var(--sans); font-size: 13.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
.place-kicker a { color: var(--gold); text-decoration: none; }
.place-kicker a:hover { text-decoration: underline; }

.badge {
  display: inline-block; border: 1px solid var(--olive); color: var(--olive);
  font-family: var(--sans); font-size: 12px; padding: 1px 8px; border-radius: 20px;
}

.muted { color: var(--muted); font-size: 14px; }
.empty {
  background: var(--paper-2); border: 1px dashed var(--line); padding: 18px 20px;
  color: var(--ink-soft); border-radius: 4px;
}

.flash { padding: 12px 16px; border-radius: 4px; margin-top: 14px; font-family: var(--sans); font-size: 15px; border: 1px solid; }
.flash--ok { background: #eef3e2; border-color: var(--olive); color: #3f4a24; }
.flash--error { background: #f7e6e4; border-color: var(--accent); color: var(--accent-dark); }
.flash--info { background: #f3ecd8; border-color: var(--gold); color: #6b521d; }

/* ---------------- Кнопки, чипы ---------------- */

.btn {
  display: inline-block; padding: 9px 18px; border-radius: 4px; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: .4px;
  text-decoration: none; text-align: center; border: 1px solid var(--accent);
  transition: background .15s ease, color .15s ease;
}
.btn--primary { background: var(--accent); color: #f8f2e4; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: rgba(124, 45, 52, .07); }

.chip-list { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 20px;
  background: #fbf7ec; color: var(--ink-soft); text-decoration: none;
  font-family: var(--sans); font-size: 13.5px;
}
.chip b { color: var(--accent); }
.chip:hover { border-color: var(--gold); color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #f8f2e4; }
.chip.is-active b, .chip.is-active:hover { color: #fff; }
.chip--static { cursor: default; }

/* ---------------- Главная ---------------- */

.hero {
  margin-top: 30px; padding: 54px 40px 46px; text-align: center; position: relative;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(169,128,58,.14), transparent 70%),
    #f8f2e4;
  border: 1px solid var(--line);
  outline: 4px double var(--line-soft); outline-offset: 5px;
}
.hero-over { font-family: var(--sans); letter-spacing: 2.5px; text-transform: uppercase; font-size: 12.5px; color: var(--gold); margin: 0 0 10px; }
.hero-title {
  font-family: var(--display); font-weight: 700; font-size: clamp(34px, 6vw, 56px);
  margin: 0 0 14px; line-height: 1.08;
}
.hero-lead { max-width: 760px; margin: 0 auto 22px; color: var(--ink-soft); font-size: 18px; }
.hero-search { display: flex; max-width: 640px; margin: 0 auto 16px; }
.hero-search input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-right: 0; border-radius: 4px 0 0 4px;
  padding: 12px 16px; font: inherit; background: #fffdf6;
}
.hero-search input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.hero-search--inline { max-width: 680px; margin: 0 0 22px; }
.hero-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-stats { margin: 20px 0 0; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.hero-stats b { color: var(--accent); }

.map-frame { border: 1px solid var(--line); outline: 1px solid var(--line-soft); outline-offset: 3px; background: var(--paper-2); }
.map-frame--small { margin-bottom: 22px; }
.map-frame--big { margin-top: 8px; }
.js-map { min-height: 220px; }
.js-map:not(.is-ready) { display: flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--sans); font-size: 14px; }
.js-map:not(.is-ready)::after { content: 'Карта загружается…'; }
.js-map.is-ready::after { content: none; }
.map-error { padding: 24px; }
.map-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.map-popup b a { text-decoration: none; }
.map-popup span { display: block; color: #6b6b6b; font-size: 12px; font-family: var(--sans); }

.map-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.map-filters-sep { width: 1px; height: 22px; background: var(--line); }
.map-select { font-family: var(--sans); font-size: 14px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.map-select select { border: 1px solid var(--line); background: #fbf7ec; padding: 5px 8px; border-radius: 4px; font: inherit; font-size: 14px; }
.map-count { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin-left: auto; }

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

.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 20px; margin-top: 20px;
}
.cards-grid--small { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.card {
  background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px;
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { position: relative; display: block; aspect-ratio: 20 / 13; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-noimg {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #efe5cf, #e2d3ac);
  font-family: var(--display); font-size: 56px; color: var(--gold);
}
.card-noimg--big { aspect-ratio: 20/9; font-size: 90px; }
.card-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(51,40,30,.82); color: #f6efe0;
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .8px; padding: 3px 9px; border-radius: 3px;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { margin: 0; font-family: var(--display); font-size: 18.5px; font-weight: 600; line-height: 1.28; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-meta { margin: 0; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.card-type { color: var(--gold); font-weight: 700; }
.card-desc { margin: 0; font-size: 14.5px; color: var(--ink-soft); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-more { font-family: var(--sans); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }

/* ---------------- Звёзды ---------------- */

.stars { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 13.5px; color: var(--muted); }
.stars b { color: var(--ink); }
.stars-row { position: relative; display: inline-block; width: 86px; height: 15px; font-size: 15px; line-height: 15px; }
.stars-row::before { content: '★★★★★'; letter-spacing: 2px; color: var(--line); }
.stars-row i { position: absolute; left: 0; top: 0; height: 100%; overflow: hidden; font-style: normal; }
.stars-row i::before { content: '★★★★★'; letter-spacing: 2px; color: var(--gold); }
.stars--empty { color: var(--muted); }

/* ---------------- Списки с сайдбаром ---------------- */

.list-layout { display: grid; grid-template-columns: 280px 1fr; gap: 34px; margin-top: 10px; }
.list-side { align-self: start; position: sticky; top: 12px; }

.filters {
  background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px; padding: 16px;
}
.filters::before {
  content: 'ФИЛЬТРЫ'; display: block; font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; color: var(--gold); margin-bottom: 10px; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px;
}
.filters-grid { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.form-row input, .form-row select, .form-row textarea {
  border: 1px solid var(--line); border-radius: 4px; background: #fffdf6; padding: 8px 10px;
  font: inherit; font-size: 15px; color: var(--ink); width: 100%;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.req { color: var(--accent); }
.filters-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.filters-note { font-family: var(--sans); font-size: 12px; color: var(--muted); }

.seo-block { margin-top: 40px; padding-top: 18px; border-top: 3px double var(--line); }
.seo-block h2 { font-family: var(--display); font-size: 21px; margin: 0 0 6px; }

/* ---------------- Типы ---------------- */

.types-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 20px; }
.type-card {
  position: relative; display: block; background: #fbf7ec; border: 1px solid var(--line);
  border-radius: 4px; padding: 20px 20px 16px; text-decoration: none; color: var(--ink);
  transition: box-shadow .18s ease, transform .18s ease;
}
.type-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--gold); }
.type-card h2 { font-family: var(--display); font-size: 20px; margin: 6px 0 6px; }
.type-card p { margin: 0 0 8px; font-size: 14px; color: var(--ink-soft); }
.type-count {
  position: absolute; top: 14px; right: 16px; font-family: var(--display);
  font-size: 26px; color: var(--line); font-weight: 700;
}
.type-cat { font-family: var(--sans); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); }

/* ---------------- Регионы ---------------- */

.region-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px; }
.region-card {
  display: block; background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px;
  padding: 16px 18px; text-decoration: none; color: var(--ink);
}
.region-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.region-card h2 { font-family: var(--display); font-size: 18px; margin: 4px 0; }
.region-card p { margin: 0; font-size: 13.5px; color: var(--muted); }
.region-count { font-family: var(--sans); font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }

/* ---------------- Люди / праздники ---------------- */

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 20px; }
.person-card {
  position: relative; display: block; background: #fbf7ec; border: 1px solid var(--line);
  border-radius: 4px; padding: 18px; text-decoration: none; color: var(--ink);
}
.person-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.person-card h2 { font-family: var(--display); font-size: 19px; margin: 8px 0 2px; }
.person-mark { font-size: 20px; color: var(--gold); }
.person-years { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.person-note { font-size: 14px; color: var(--ink-soft); margin: 0 0 8px; }
.person-count { font-family: var(--sans); font-size: 12.5px; color: var(--accent); font-weight: 700; }

.saint-bio { background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px; padding: 22px 26px; }

/* ---------------- Детальная страница объекта ---------------- */

.place-head h1 { font-family: var(--display); font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px; }
.place-geo { color: var(--ink-soft); margin: 0 0 10px; }
.place-quickfacts {
  display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 12px 0;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  font-family: var(--sans); font-size: 14px; color: var(--ink-soft);
}

.place-layout { display: grid; grid-template-columns: 1fr 320px; gap: 36px; margin-top: 22px; }
.place-main { min-width: 0; }

.place-photo { margin: 0 0 20px; }
.place-photo img, .place-photo .card-noimg--big { width: 100%; border: 1px solid var(--line); border-radius: 4px; }
.place-photo figcaption { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.place-intro { font-size: 18px; }
.place-block { margin-top: 34px; }
.place-block h2 {
  font-family: var(--display); font-size: 24px; font-weight: 600; margin: 0 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line); position: relative;
}
.place-block h2::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 84px; height: 3px; background: var(--gold); }

.prose p { margin: 0 0 14px; text-align: justify; hyphens: auto; }
.prose h2, .prose h3 { font-family: var(--display); }
.prose-wide { max-width: 860px; }

.fact-list { margin: 0; }
.fact-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); }
.fact-list dt { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.fact-list dd { margin: 0; text-align: right; font-size: 14.5px; }

.side-box {
  background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px;
  padding: 18px; margin-bottom: 18px;
}
.side-box h2 { font-family: var(--display); font-size: 18.5px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }

.vote-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 12px; }
.vote-stars input { position: absolute; opacity: 0; width: 30px; height: 30px; cursor: pointer; }
.vote-stars label { font-size: 27px; color: var(--line); cursor: pointer; transition: color .12s ease; }
.vote-stars input:checked ~ label, .vote-stars label:hover, .vote-stars label:hover ~ label { color: var(--gold); }

.stack-form .form-row { margin-bottom: 12px; }
.stack-form .btn { margin-top: 4px; }

/* FAQ */
.faq-item { border: 1px solid var(--line); border-radius: 4px; margin-bottom: 10px; background: #fbf7ec; }
.faq-item summary {
  cursor: pointer; padding: 12px 16px; font-family: var(--sans); font-weight: 700; font-size: 15px;
  list-style-position: inside;
}
.faq-item summary:hover { color: var(--accent); }
.faq-answer { padding: 0 16px 12px; color: var(--ink-soft); }
.faq-answer p { margin: 0; }

/* Фото */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo-item { margin: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.photo-item img { width: 100%; height: 140px; object-fit: cover; display: block; }

/* Отзывы */
.reviews { margin-bottom: 22px; }
.review { background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px; margin-bottom: 12px; }
.review header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.review time { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-left: auto; }
.review p { margin: 0; font-size: 15px; }
.review-form { background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 20px; max-width: 640px; }
.review-form h3 { font-family: var(--display); margin: 0 0 14px; }

/* ---------------- Блог ---------------- */

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.blog-teaser, .blog-card {
  background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px;
}
.blog-teaser h3 { font-family: var(--display); font-size: 18px; margin: 0 0 8px; }
.blog-teaser h3 a { color: var(--ink); text-decoration: none; }
.blog-teaser h3 a:hover { color: var(--accent); }
.blog-teaser p { margin: 0 0 10px; font-size: 14.5px; color: var(--ink-soft); }
.blog-teaser time { font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.blog-card h2 { font-family: var(--display); font-size: 21px; margin: 0 0 8px; }
.blog-card h2 a { color: var(--ink); text-decoration: none; }
.blog-card h2 a:hover { color: var(--accent); }
.blog-card footer { display: flex; gap: 8px; font-family: var(--sans); font-size: 13px; color: var(--muted); }

.post { max-width: 860px; }

/* ---------------- Пагинация ---------------- */

.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 30px 0 6px; font-family: var(--sans); }
.pagination a, .pagination .page-cur {
  min-width: 38px; padding: 7px 11px; text-align: center; border: 1px solid var(--line);
  border-radius: 4px; text-decoration: none; color: var(--ink-soft); background: #fbf7ec; font-size: 14px;
}
.pagination a:hover { border-color: var(--gold); color: var(--accent); }
.pagination .page-cur { background: var(--accent); border-color: var(--accent); color: #f8f2e4; font-weight: 700; }
.pagination .page-gap { align-self: center; color: var(--muted); padding: 0 2px; }
.pagination .page-nav { min-width: auto; }

/* ---------------- Футер ---------------- */

.site-footer {
  border-top: 3px double var(--line); background: linear-gradient(180deg, var(--paper-2), #eee2c6);
  padding: 34px 0 18px; margin-top: 30px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.footer-col h3 { font-family: var(--sans); font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }
.footer-about p, .footer-note p { font-size: 14px; color: var(--ink-soft); margin: 8px 0 0; }
.footer-admin { margin-top: 10px !important; }
.footer-admin a { font-family: var(--sans); font-size: 12.5px; color: var(--muted) !important; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-family: var(--sans); font-size: 13px; color: var(--muted);
}

/* ---------------- Ошибки ---------------- */

.error-page { text-align: center; padding: 70px 0 40px; }
.error-code { font-family: var(--display); font-size: 90px; color: var(--line); margin: 0; line-height: 1; }
.error-page h1 { font-family: var(--display); font-size: 30px; margin: 8px 0 10px; }
.error-text { color: var(--ink-soft); }

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

@media (max-width: 1020px) {
  .place-layout { grid-template-columns: 1fr; }
  .place-side { order: -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
  .side-box { margin-bottom: 0; }
  .region-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .header-bar { flex-wrap: wrap; }
  .header-search { flex: 1 1 100%; order: 3; margin-left: 0; }
  .nav-toggle {
    display: block; margin-left: auto; background: transparent; border: 1px solid var(--line);
    border-radius: 4px; padding: 8px 14px; font-family: var(--sans); font-weight: 700;
    font-size: 13px; color: var(--ink-soft); cursor: pointer;
  }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .list-layout { grid-template-columns: 1fr; }
  .list-side { position: static; }
  .page-head h1 { font-size: 27px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding: 36px 18px 32px; }
  .region-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ---------------- Доступность ---------------- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ============================================================
   Админ-панель
   ============================================================ */

.admin-body { background: #f2ead8; }

.admin-topbar { background: #33281e; color: #f6efe0; }
.admin-topbar-in { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 10px 20px; }
.admin-brand { color: #f6efe0; font-family: var(--display); font-weight: 700; font-size: 17px; text-decoration: none; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.admin-nav a {
  color: #d8cbae; text-decoration: none; font-family: var(--sans); font-size: 13.5px;
  padding: 6px 9px; border-radius: 3px;
}
.admin-nav a:hover { background: rgba(246,239,224,.12); color: #fff; }
.badge-n { background: var(--gold); color: #33281e; border-radius: 10px; padding: 0 6px; font-size: 11.5px; }
.admin-user { margin-left: auto; display: flex; gap: 12px; align-items: center; font-family: var(--sans); font-size: 13px; color: #d8cbae; }
.admin-user a { color: #f6efe0; text-decoration: none; }

.admin-main { padding: 26px 20px 60px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-head h1 { font-family: var(--display); font-size: 26px; margin: 0; }
.admin-head h2, .admin-main h1, .admin-main h2 { font-family: var(--display); }
.admin-main h2 { font-size: 21px; margin: 26px 0 10px; }

.admin-table { width: 100%; border-collapse: collapse; background: #fbf7ec; border: 1px solid var(--line); }
.admin-table th {
  text-align: left; font: 700 12px/1.4 var(--sans); letter-spacing: .8px; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line);
}
.admin-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; vertical-align: top; }
.admin-row-actions { white-space: nowrap; }
.admin-row-actions a, .admin-row-actions button {
  font-family: var(--sans); font-size: 13px; background: none; border: none; cursor: pointer; padding: 0;
}
.link-danger { color: var(--accent) !important; }
.admin-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-filters input, .admin-filters select {
  border: 1px solid var(--line); border-radius: 4px; background: #fbf7ec; padding: 8px 10px; font: 14px var(--sans);
}

.admin-form { max-width: 880px; background: #fbf7ec; border: 1px solid var(--line); padding: 22px; border-radius: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.admin-form .form-row { margin-bottom: 14px; }
.admin-form textarea { font-family: var(--serif); }
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.admin-thumb img { width: 90px; height: 60px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; margin-top: 8px; }
.actions { display: flex; gap: 12px; margin-top: 18px; }

.btn--sm { padding: 5px 12px; font-size: 12.5px; }
.inline-form { display: inline-block; margin-right: 8px; }

.admin-footer {
  position: fixed; bottom: 0; left: 0; right: 0; background: rgba(51,40,30,.96);
  padding: 10px 0; z-index: 50;
}
.admin-footer .wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-footer .btn--ghost { color: #d8cbae; border-color: #5c4f3e; }
.admin-footer .btn--ghost:hover { color: #fff; background: rgba(246,239,224,.1); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0; }
.stat-box { background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px; padding: 16px 18px; }
.stat-box b { display: block; font-family: var(--display); font-size: 28px; color: var(--accent); }
.stat-box span { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.stat-box--warn { border-color: var(--gold); background: #f7efdc; }

.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.action-card {
  display: block; background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px;
  padding: 16px; text-decoration: none; color: var(--ink); font-family: var(--sans); font-weight: 700; font-size: 14.5px;
}
.action-card:hover { border-color: var(--gold); color: var(--accent); }

.admin-review { border: 1px solid var(--line); border-radius: 4px; background: #fbf7ec; padding: 14px 18px; margin-bottom: 14px; }
.review-actions { display: flex; gap: 8px; margin-top: 10px; }

.admin-photo-grid .photo-card { background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
.photo-pending { outline: 2px dashed var(--gold); }

.admin-login { max-width: 420px; margin: 60px auto; background: #fbf7ec; border: 1px solid var(--line); border-radius: 4px; padding: 30px 34px; }
.admin-login h1 { font-family: var(--display); font-size: 23px; margin: 0 0 18px; }

@media (max-width: 720px) {
  .form-grid, .check-grid { grid-template-columns: 1fr; }
  .admin-user { margin-left: 0; }
  .admin-footer { position: static; }
}

/* === Leaflet attribution: убираем флаг и логотип Leaflet === */
.leaflet-control-attribution svg.leaflet-attribution-flag { display: none !important; }
.leaflet-control-attribution a[href*="leafletjs.com"] { display: none !important; }
.leaflet-control-attribution { background: rgba(255,255,255,0.7) !important; padding: 2px 6px !important; font-size: 10px !important; color: #555 !important; }
.leaflet-control-attribution a { color: #555 !important; }
