/*
Theme Name: AsiaRoutes
Theme URI: https://example.com/asiaroutes
Author: AsiaRoutes
Author URI: https://example.com
Description: Премиальная travel-тема для самостоятельных путешествий по Азии (Китай, Япония, Таиланд, Вьетнам). Точное воспроизведение дизайн-системы AsiaRoutes: терракотовая палитра, шрифты Lora / Manrope / JetBrains Mono, карточки отелей и маршрутов, сравнение цен агрегаторов, AI-генератор маршрутов. Требует плагин Travel Core.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: travel-theme
*/

/* =====================================================================
   ASIAROUTE — ДИЗАЙН-СИСТЕМА (перенесено из макета)
   ===================================================================== */
:root {
  --accent:        #C2410C;  /* терракота — CTA */
  --accent-hover:  #9A3412;
  --ink:           #1C1A17;
  --text-2:        #6E675C;
  --muted:         #A39B8E;
  --border:        #E9E3D9;
  --bg:            #FBFAF8;
  --surface:       #FFFFFF;
  --sand:          #F4EEE5;
  --blue:          #1E3A5F;
  --booking:       #1671E5;
  --agoda:         #5C3CCB;
  --tripcom:       #287DFA;
  --positive:      #1F8A5B;

  --serif: 'Lora', Georgia, serif;
  --sans:  'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --radius-card: 20px;
  --radius-btn:  12px;
  --shadow-card: 0 12px 36px rgba(28,26,23,.07);
  --shadow-hover: 0 22px 44px rgba(28,26,23,.16);
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); font-family: var(--sans); color: var(--ink);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
::selection { background: #F4D9CC; color: #7C2D12; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.5px; line-height: 1.08; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  border: none; border-radius: var(--radius-btn); padding: 14px 26px;
  cursor: pointer; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; line-height: 1;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(194,65,12,.22); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid #D9D2C6; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-link { background: transparent; color: var(--accent); padding: 0; box-shadow: none; }
.btn-block { width: 100%; }

.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--sand); color: var(--text-2); border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600; }
.chip-accent { background: #FBEDE6; color: #9A3412; }
.chip-outline { background: #fff; border: 1px solid #D9D2C6; color: #3A352E; }

/* ---------------- Header ---------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251,250,248,.9); backdrop-filter: blur(12px); border-bottom: 1px solid #ECE6DC; }
.site-header.is-dark { position: absolute; left: 0; right: 0; background: transparent; border: none; backdrop-filter: none; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; max-width: 1280px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* Знак «тории» + вордмарк рендерит хелпер asiaroute_logo_html() со своими инлайн-стилями (см. functions.php). */
/* Skip-link: спрятан, пока не получит фокус с клавиатуры (первый Tab → «к содержимому»). */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 4000;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
  font-weight: 700; font-size: 14px; text-decoration: none; }
.skip-link:focus { left: 0; outline: 2px solid #fff; outline-offset: -4px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul, .site-nav li { list-style: none; margin: 0; padding: 0; }
.site-nav li { display: inline-flex; }
.site-nav a { color: #3A352E; text-decoration: none; font-weight: 600; font-size: 15px; transition: color .2s; }
.site-nav a:hover, .site-nav a.is-active { color: var(--accent); }
.is-dark .site-nav a { color: #F3EFE8; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.is-dark .site-nav a:hover { color: #fff; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; font-size: 24px; color: var(--ink); }
.is-dark .nav-burger { color: #fff; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: #E8E2D8; margin-top: 60px; }
.site-footer__grid { max-width: var(--maxw); margin: 0 auto; padding: 64px 40px 44px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer p { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 280px; }
.site-footer h4 { font-family: var(--sans); font-weight: 700; color: #fff; margin-bottom: 14px; font-size: 14px; }
.site-footer__col a, .site-footer__col span { display: block; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.site-footer__col a:hover { color: #fff; }
.site-footer__legal { max-width: var(--maxw); margin: 0 auto; padding: 20px 40px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid #34302A; }
.site-footer__legal a { font-size: 13px; color: #9A938A; text-decoration: none; transition: color .2s; }
.site-footer__legal a:hover { color: #fff; }
.site-footer__legal-sep { color: #4A453E; font-size: 12px; }
.site-footer__bar { border-top: 1px solid #34302A; padding: 18px 40px 26px; max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #7C766C; }
.site-footer__legal + .site-footer__bar { border-top: none; padding-top: 14px; }
@media (max-width: 680px) {
  .site-footer__legal, .site-footer__bar { padding-left: 18px; padding-right: 18px; }
  /* Комфортный тап на мобильном: увеличиваем область нажатия ссылок футера и юр-строки
     (по умолчанию ~21px — тесно пальцу), десктоп не трогаем. */
  .site-footer__col a, .site-footer__col span { padding: 6px 0; margin-bottom: 2px; }
  .site-footer__legal { gap: 2px 12px; }
  .site-footer__legal a { padding: 6px 2px; }
}

/* Фильтр поиска маршрутов */
.route-filter { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 22px 24px; box-shadow: 0 8px 24px rgba(28,26,23,.06); }
.route-filter__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 18px; align-items: end; }
.rf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rf-field > span { font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .4px; }
.rf-field select, .rf-field input { width: 100%; border: 1px solid #E0D9CD; border-radius: 11px; padding: 10px 12px; font-family: inherit; font-size: 14px; color: var(--ink); background: #FCFAF6; outline: none; transition: border-color .2s, box-shadow .2s; }
.rf-field select:focus, .rf-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194,65,12,.1); }
.rf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; align-self: center; padding-top: 18px; white-space: nowrap; }
.rf-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.route-filter__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid #F0EAE0; }
.route-filter__count { font-size: 14px; color: var(--text-2); }
.route-filter__count b { color: var(--ink); font-size: 18px; }
.route-filter__btns { display: flex; gap: 10px; }
.btn-ghost { background: #fff; color: var(--text-2); border: 1px solid #E0D9CD; }
.btn-ghost:hover { border-color: #D8CFBE; color: var(--ink); }
.chip-kids { background: #E8F3EC; color: #176B47; }
/* Частный маршрут в публичных списках — видит только его автор */
.chip-priv { background: #EFE7DB; color: #7A6A55; }
.card__priv { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(28,26,23,.82); color: #F3EEE5; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(2px); }
.route-filter__empty { text-align: center; padding: 60px 20px; background: #fff; border: 1px dashed #DDD4C6; border-radius: 22px; margin-top: 28px; }
@media (max-width: 900px) { .route-filter__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .route-filter__grid { grid-template-columns: 1fr; } .rf-check { padding-top: 4px; } }

/* Пагинация (the_posts_pagination) */
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 15px; border-radius: 12px; background: #fff; border: 1px solid var(--border); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s; }
.pagination a.page-numbers:hover { background: #FBEDE6; border-color: #E9C7B6; color: #9A3412; transform: translateY(-1px); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(194,65,12,.28); }
.pagination .page-numbers.dots { border: none; background: transparent; min-width: 20px; padding: 0 2px; color: var(--muted); }
.pagination .page-numbers.prev, .pagination .page-numbers.next { padding: 0 18px; font-size: 14px; }
.pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Баннер согласия на cookie */
.ar-cookiebar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #1C1A17; color: #E8E2D8; border: 1px solid #34302A; border-radius: 16px; padding: 16px 20px; box-shadow: 0 18px 44px rgba(0,0,0,.34); transform: translateY(140%); opacity: 0; transition: transform .34s cubic-bezier(.2,.7,.3,1), opacity .3s; }
.ar-cookiebar.is-shown { transform: none; opacity: 1; }
.ar-cookiebar[hidden] { display: none; }
.ar-cookiebar__txt { flex: 1; min-width: 220px; font-size: 13.5px; line-height: 1.55; color: #C9C0B2; }
.ar-cookiebar__txt a { color: #F4C9B4; text-decoration: underline; }
.ar-cookiebar__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ar-cookiebar__btn { border: 1px solid #4A453E; background: transparent; color: #C9C0B2; border-radius: 10px; padding: 10px 16px; font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.ar-cookiebar__btn:hover { border-color: #6E675C; color: #fff; }
.ar-cookiebar__btn--ok { background: #C2410C; border-color: #C2410C; color: #fff; box-shadow: 0 6px 16px rgba(194,65,12,.3); }
.ar-cookiebar__btn--ok:hover { background: #9A3412; border-color: #9A3412; }
@media (max-width: 560px) { .ar-cookiebar { flex-direction: column; align-items: stretch; text-align: left; } .ar-cookiebar__btns { justify-content: flex-end; } }

/* ---------------- Generic cards / grids ---------------- */
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.section { padding: 60px 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; gap: 24px; }
.section__head h2 { font-size: 42px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; text-decoration: none; color: inherit; display: block; transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s, border-color .35s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: #E3D8C6; }
.card__media { position: relative; overflow: hidden; }
.card__img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .6s ease; }
.card:hover .card__img { transform: scale(1.06); }
.card__body { padding: 16px 18px; }
.price-lg { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.rating-pill { background: rgba(255,255,255,.92); border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 700; }

/* ---------------- Sound button ---------------- */
.sound-btn { position: fixed; bottom: 28px; right: 28px; z-index: 300; width: 58px; height: 58px; border-radius: 50%; background: rgba(28,26,23,.82); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.18); color: #fff; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* =====================================================================
   ГЛАВНАЯ
   ===================================================================== */
.heroB { position: relative; min-height: 760px; display: grid; grid-template-columns: 1fr 1fr; background: #13202b; }
.heroB__text { display: flex; flex-direction: column; justify-content: center; padding: 0 64px; position: relative; z-index: 2; }
.heroB__eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 4px; color: #F4C9B4; text-transform: uppercase; margin-bottom: 22px; }
.heroB__text h1 { font-size: 66px; letter-spacing: -1.5px; color: #fff; line-height: 1.04; }
.heroB__text h1 em { font-style: italic; color: #F4C9B4; }
.heroB__text p { font-size: 18px; color: #CDD6DE; margin-top: 24px; line-height: 1.6; max-width: 440px; }
.heroB__cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.heroB__stats { display: flex; gap: 36px; margin-top: 48px; }
.heroB__stats b { font-family: var(--serif); font-size: 30px; font-weight: 600; color: #fff; display: block; }
.heroB__stats span { font-size: 13px; color: #9FB0BC; }
.heroB__media { position: relative; background-size: cover; background-position: center; }
.heroB__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #13202b, transparent 38%); }

.country-card { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 16/10; display: block; text-decoration: none; box-shadow: 0 12px 30px rgba(28,26,23,.12); cursor: pointer; transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .45s; }
.country-card:hover { transform: translateY(-8px) scale(1.015); box-shadow: 0 28px 60px rgba(28,26,23,.22); }
.country-card__img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .6s ease; }
.country-card:hover .country-card__img { transform: scale(1.07); }
.country-card__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.1) 55%, rgba(0,0,0,.25) 100%); }
.country-card__cap { position: absolute; bottom: 0; left: 0; right: 0; padding: 26px; }
.country-card__title { display: flex; align-items: center; gap: 12px; color: #fff; font-family: var(--serif); font-size: 34px; font-weight: 600; }
.country-card__title span { font-size: 36px; }
.country-card__tag { color: #E2DCD2; font-size: 15px; margin-top: 6px; font-weight: 500; }
.country-card__btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.82); opacity: 0; background: rgba(255,255,255,.16); backdrop-filter: blur(10px); border: 1.5px solid rgba(255,255,255,.4); color: #fff; padding: 14px 32px; border-radius: 40px; font-weight: 700; font-size: 16px; transition: all .35s cubic-bezier(.34,1.56,.64,1); pointer-events: none; }
.country-card:hover .country-card__btn { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.value-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 26px 24px; }
.value-card__icon { font-size: 26px; margin-bottom: 14px; }
.value-card h3 { font-family: var(--sans); font-weight: 700; font-size: 16px; margin-bottom: 8px; letter-spacing: 0; }
.value-card p { font-size: 14px; color: var(--text-2); line-height: 1.5; }

/* =====================================================================
   БАННЕР (страна / маршрут / статья)
   ===================================================================== */
.page-banner { position: relative; height: 380px; background-size: cover; background-position: center; overflow: hidden; }
.page-banner__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,14,16,.35), rgba(20,14,16,.72)); }
.page-banner__inner { position: absolute; bottom: 0; left: 0; right: 0; padding: 0 40px 36px; }
.page-banner__inner > div { max-width: var(--maxw); margin: 0 auto; }
.page-banner__eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: #F4C9B4; text-transform: uppercase; margin-bottom: 14px; }
.page-banner h1 { color: #fff; font-size: 60px; letter-spacing: -1px; }
.page-banner p { color: #E2DCD2; font-size: 17px; margin-top: 10px; max-width: 560px; line-height: 1.5; }
.page-banner__flagrow { display: flex; align-items: center; gap: 16px; }
.page-banner__flag { font-size: 54px; }

/* tabs (country) */
.tabs-bar { position: sticky; top: 63px; z-index: 90; background: rgba(251,250,248,.92); backdrop-filter: blur(12px); border-bottom: 1px solid #ECE6DC; }
.tabs-bar__inner { max-width: var(--maxw); margin: 0 auto; padding: 8px 40px 0; display: flex; gap: 6px; overflow-x: auto; }
.tab-btn { background: transparent; color: var(--text-2); border: none; border-bottom: 2.5px solid transparent; padding: 14px 18px; font-family: var(--sans); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.tab-btn.is-active { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.search-bar { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px 10px 20px; box-shadow: 0 6px 20px rgba(28,26,23,.05); margin-bottom: 32px; }
.search-bar input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 16px; color: var(--ink); background: transparent; }

/* hotel card */
.hotel-card__media { height: 172px; }
.hotel-card__rating { position: absolute; top: 12px; right: 12px; }
.hotel-card h3 { font-family: var(--sans); font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.hotel-card__area { font-size: 13px; color: var(--muted); margin-top: 4px; }
.hotel-card__amen { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.hotel-card__amen span { background: var(--sand); color: var(--text-2); border-radius: 7px; padding: 4px 9px; font-size: 11px; font-weight: 600; }
.hotel-card__foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid #F0EAE0; }
.link-accent { color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; }

/* route card (horizontal) */
.route-card { display: grid; grid-template-columns: 300px 1fr; }
.route-card__media { background-size: cover; background-position: center; min-height: 180px; }
.route-card__body { padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; }
.route-card h3 { font-size: 26px; letter-spacing: -.4px; }

/* flight row */
.flight-row { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; display: grid; grid-template-columns: 1.3fr 2.2fr 1fr auto; gap: 24px; align-items: center; transition: transform .25s, box-shadow .25s, border-color .25s; }
.flight-row:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(28,26,23,.1); border-color: #E3D8C6; }
.flight-row__time { font-weight: 700; font-size: 20px; }
.flight-row__price { font-family: var(--serif); font-size: 26px; font-weight: 600; }

/* =====================================================================
   ОТЕЛЬ
   ===================================================================== */
.hotel-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: 420px; border-radius: 22px; overflow: hidden; margin-bottom: 36px; }
.hotel-gallery a { background-size: cover; background-position: center; cursor: pointer; transition: opacity .25s; }
.hotel-gallery a:hover { opacity: .9; }
.hotel-gallery a:first-child { grid-row: 1/3; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 30px; box-shadow: var(--shadow-card); }
.guests-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; background: #FCFAF6; border: 1px solid #EFE8DC; border-radius: 16px; padding: 14px 16px; margin: 20px 0 24px; position: relative; }
.field-label { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .5px; margin-bottom: 5px; }
.field-box { border: 1px solid #E0D9CD; border-radius: 10px; padding: 11px 16px; font-weight: 700; background: #fff; }
.guests-pop { position: absolute; top: 100%; left: 0; margin-top: 8px; width: 320px; background: #fff; border: 1px solid #E0D9CD; border-radius: 16px; box-shadow: 0 18px 44px rgba(28,26,23,.16); padding: 18px; z-index: 40; }
.guests-pop.is-hidden { display: none; }
.counter-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.counter { display: flex; align-items: center; gap: 14px; }
.counter button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #D9D2C6; background: #fff; font-size: 18px; cursor: pointer; color: #3A352E; }
/* Мобильный виджет бронирования: даты/гости в столбик на всю ширину, стрелка «→» (только
   для строки) скрыта, поповер гостей — по ширине поля (не вылезает за карточку). */
@media (max-width: 560px) {
  .guests-bar { flex-direction: column; align-items: stretch; gap: 14px; }
  .guests-bar__sep { display: none; }
  .guests-bar .field-box { width: 100%; box-sizing: border-box; }
  #guests-toggle { min-width: 0; }
  .guests-pop { left: 0; right: 0; width: auto; }
}

.agg-row { display: flex; align-items: center; gap: 18px; border: 1px solid var(--border); border-radius: 14px; padding: 14px 20px; background: #fff; transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s, border-color .3s; }
.agg-row:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(28,26,23,.14); }
.agg-row.is-best { border: 2px solid var(--accent); background: #FFFBF8; }
.agg-badge { color: #fff; border-radius: 8px; padding: 8px 13px; font-weight: 800; font-size: 13px; min-width: 88px; text-align: center; }
.agg-total { font-family: var(--serif); font-size: 26px; font-weight: 600; }

.amen-item { display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; transition: border-color .25s; }
.amen-item:hover { border-color: #D9CdB9; }
.amen-item span { font-weight: 600; font-size: 15px; }

.reviews-summary { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; margin-bottom: 18px; display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.reviews-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.review-col-pos { background: #F4F8F4; border: 1px solid #DCE9DC; border-radius: 18px; padding: 20px; }
.review-col-neg { background: #FBF4F0; border: 1px solid #EEDDD2; border-radius: 18px; padding: 20px; }
.review-item { background: #fff; border: 1px solid #E4EEE4; border-radius: 13px; padding: 15px; margin-bottom: 12px; }
.review-col-neg .review-item { border-color: #F0E2D8; }
.review-av { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; }

.hotel-layout { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }
.sticky-book { position: sticky; top: 88px; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 12px 36px rgba(28,26,23,.09); }
.map-box { position: relative; height: 300px; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }

/* =====================================================================
   МАРШРУТ
   ===================================================================== */
.route-map-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; margin-bottom: 14px; }
.route-map { position: relative; height: 520px; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); }
.route-day { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.route-day__head { display: flex; align-items: center; gap: 18px; padding: 20px 24px; cursor: pointer; }
.route-day__num { width: 42px; height: 42px; border-radius: 11px; background: #FBEDE6; color: #9A3412; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.route-day__body { padding: 0 24px 22px 84px; font-size: 15px; color: #3A352E; line-height: 1.7; display: none; }
.route-day.is-open .route-day__body { display: block; }
.route-day__text { margin-bottom: 16px; }
/* Фотогалерея дня: крупное фото + ряд миниатюр */
.day-gallery { max-width: 640px; }
.day-gallery__feature { position: relative; height: 300px; border-radius: 13px; overflow: hidden; border: 1px solid #ECE6DC; cursor: zoom-in; }
.day-gallery__feat-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.day-gallery__counter { position: absolute; top: 12px; right: 12px; padding: 5px 10px; border-radius: 8px; font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 11px; color: #fff; background: rgba(20,14,16,.55); }
.day-gallery__cap { position: absolute; inset: auto 0 0 0; padding: 34px 16px 14px; color: #fff; font-weight: 700; font-size: 15px; background: linear-gradient(transparent, rgba(20,14,16,.75)); }
.day-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.day-gallery__thumb { flex: 0 0 auto; width: 88px; height: 64px; border-radius: 9px; overflow: hidden; cursor: pointer; padding: 2px; background: none; border: none; box-shadow: 0 0 0 1px #ECE6DC; opacity: .7; transition: box-shadow .2s, opacity .2s; }
.day-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; display: block; }
.day-gallery__thumb:hover { opacity: 1; }
.day-gallery__thumb.is-active { box-shadow: 0 0 0 2px #C2410C; opacity: 1; }
@media (max-width: 680px) {
  .route-day__body { padding-left: 24px; }
  .day-gallery__feature { height: 220px; }
}
/* Кнопка «Поблагодарить автора» + выпадающий список сервисов */
.ar-tip{position:relative;display:inline-block}
.ar-tip--block{display:block}
.ar-tip-btn{display:inline-flex;align-items:center;gap:8px;background:#FBEDE6;color:#9A3412;border:1px solid #F1D5C4;border-radius:12px;padding:11px 18px;font-weight:700;font-size:14px;text-decoration:none;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s}
.ar-tip-btn:hover{background:#F7E0D2;transform:translateY(-1px)}
.ar-tip-btn--block{display:flex;justify-content:center;width:100%}
.ar-tip-btn__i{color:#C2410C}
.ar-tip-caret{font-size:10px;opacity:.7;transition:transform .2s}
.ar-tip.is-open .ar-tip-caret{transform:rotate(180deg)}
.ar-tip{z-index:1}
.ar-tip.is-open{z-index:2001}
.ar-tip-menu{position:absolute;z-index:2001;top:calc(100% + 8px);left:0;min-width:240px;background:#fff;border:1px solid var(--border,#E9E3D9);border-radius:14px;box-shadow:0 18px 44px rgba(28,26,23,.16);padding:8px;opacity:0;visibility:hidden;transform:translateY(-6px);pointer-events:none;transition:opacity .18s,transform .18s,visibility .18s}
.ar-tip--block .ar-tip-menu{left:0;right:0;min-width:0}
.ar-tip.is-open .ar-tip-menu{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}
.ar-tip-item{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:10px;text-decoration:none;color:var(--ink,#1C1A17);font-weight:600;font-size:14px;transition:background .15s}
.ar-tip-item:hover{background:#FBEDE6}
.ar-tip-item__ic{width:20px;height:20px;border-radius:5px;object-fit:contain;flex-shrink:0;background:#F3EEE5}
.ar-tip-item__l{flex:1}
.ar-tip-item__go{color:#C9C0B2;font-size:13px}

/* Кнопка кабинета в шапке */
.site-header__cab{background:var(--accent);color:#fff;border:none;border-radius:10px;padding:9px 18px;font-weight:700;font-size:14px;text-decoration:none;white-space:nowrap;box-shadow:0 4px 14px rgba(194,65,12,.22);transition:background .2s,box-shadow .2s,transform .15s}
.site-header__cab:hover{background:#9A3412;box-shadow:0 6px 18px rgba(194,65,12,.3);transform:translateY(-1px)}
.site-header__cab:focus{outline:none}
.site-header__cab:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(194,65,12,.4)}
.site-header.is-dark .site-header__cab{background:var(--accent);backdrop-filter:none}
.site-header.is-dark .site-header__cab:hover{background:#9A3412}
@media(max-width:880px){.site-header__cab{display:none}}

/* Лайтбокс фотогалереи дня */
.ar-lb { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(20,14,16,.9); padding: 40px; }
.ar-lb.is-open { display: flex; }
.ar-lb__fig { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ar-lb__img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.ar-lb__cap { color: #fff; font-weight: 600; font-size: 15px; text-align: center; }
.ar-lb__close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer; }
.ar-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: none; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; cursor: pointer; }
.ar-lb__nav:hover, .ar-lb__close:hover { background: rgba(255,255,255,.28); }
.ar-lb__prev { left: 22px; } .ar-lb__next { right: 22px; }
@media (max-width: 680px) { .ar-lb { padding: 16px; } .ar-lb__nav { width: 42px; height: 42px; } }
/* Кастомные маркеры/ярлыки на карте Leaflet — убираем стандартную белую подложку */
.route-map .route-pin, .route-map .route-leg, .route-map .route-plwrap, .route-map .route-charwrap, .route-map .ar-vehwrap { background: transparent !important; border: none !important; }
.leaflet-tooltip.route-pin-label { background: #fff; color: #1C1A17; border: 1px solid var(--border); border-radius: 8px; padding: 3px 9px; font-weight: 700; font-size: 12px; box-shadow: 0 2px 8px rgba(28,26,23,.15); }
.leaflet-tooltip.route-pin-label::before { border-top-color: #fff; }

/* Лид маршрута (краткое описание под автором) */
.route-lead { font-family: var(--serif, 'Lora', Georgia, serif); font-size: 19px; line-height: 1.6; color: #3A352E; max-width: 820px; margin: -8px 0 30px; }

/* Точки-места дня на карте маршрута */
.route-plwrap { overflow: visible; }
.route-plmk { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid #C2410C; display: flex; align-items: center; justify-content: center; font-size: 12px; box-shadow: 0 3px 10px rgba(28,26,23,.2); cursor: pointer; }
.route-pltag { position: absolute; top: 27px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 170px; font-size: 11px; font-weight: 800; color: #1C1A17; background: rgba(255,255,255,.96); padding: 2px 8px; border-radius: 6px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.14); overflow: hidden; text-overflow: ellipsis; text-align: center; pointer-events: none; }
.route-pldot { width: 7px; height: 7px; border-radius: 50%; background: #C2410C; border: 1.5px solid rgba(255,255,255,.85); box-shadow: 0 1px 4px rgba(28,26,23,.14); }
/* Кликабельные «Точки посещения» в панели активного дня (фокусируют карту на месте) */
.route-place { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 6px 10px; background: #FBFAF8; border: 1px solid #EEE7DB; border-radius: 9px; cursor: pointer; font-family: inherit; color: #1C1A17; transition: background .15s, border-color .15s, transform .12s; }
.route-place:hover { background: #fff; border-color: #C2410C; transform: translateX(2px); }
.route-place:focus-visible { outline: 2px solid #C2410C; outline-offset: 2px; }
.route-place__emoji { font-size: 15px; line-height: 1; flex-shrink: 0; }
.route-place__name { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; }
.route-place__go { color: #C2410C; font-weight: 800; opacity: 0; transform: translateX(-3px); transition: opacity .15s, transform .15s; }
.route-place:hover .route-place__go, .route-place:focus-visible .route-place__go { opacity: 1; transform: none; }
/* Пульс маркера места при фокусе (масштабируем внутренний кружок, позицию маркера держит Leaflet-обёртка) */
.route-plmk.is-pulse { animation: route-plpulse .55s ease; }
@keyframes route-plpulse { 0% { transform: scale(1); } 30% { transform: scale(1.4); } 100% { transform: scale(1); } }
/* Кнопка «Трек для GPS» под картой маршрута (компактная) */
.route-gpx { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 40px; }
.route-gpx__btn { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 8px 14px; font-size: 13px; }
.route-gpx__btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.route-gpx__hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; flex: 1; min-width: 200px; }

/* ===== Сравнительная таблица (витрина стран, статьи) =====
   Таблиц на сайте не было вовсе, а ИИ-движки извлекают их в первую очередь. */
.ar-table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; border: 1px solid #ECE6DC; border-radius: 14px; overflow: hidden; }
.ar-table th, .ar-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #F0EAE0; }
.ar-table th { background: #FBFAF8; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ar-table td { color: var(--text-2); }
.ar-table td:first-child { font-weight: 700; color: var(--ink); }
.ar-table tbody tr:last-child td { border-bottom: 0; }
.ar-table tbody tr:hover { background: #FCFAF6; }
.ar-table a { color: var(--accent); text-decoration: none; }
.ar-table a:hover { text-decoration: underline; }
@media (max-width: 700px) { .ar-table { font-size: 14px; } .ar-table th, .ar-table td { padding: 10px 12px; } }

/* ===== Отели и маршруты из статьи (блок под текстом + ссылки в тексте) ===== */
.ar-refs { background: #fff; border-top: 1px solid #ECE6DC; }
.ar-refs__inner { max-width: 1140px; margin: 0 auto; padding: 52px 40px 8px; }
.ar-refs__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.ar-refs__head h2 { font-size: 30px; margin: 0; }
.ar-refs__head span { font-size: 14px; color: var(--text-2); }
@media (max-width: 700px) { .ar-refs__inner { padding: 36px 20px 4px; } .ar-refs__head h2 { font-size: 24px; } }

/* Инлайн-ссылка на отель/маршрут внутри текста статьи */
.article-body .ar-ref { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.article-body .ar-ref:hover { text-decoration-style: solid; }

/* Плашка «частный маршрут» — видит только автор */
.route-privnote { background: #F7F1E7; border: 1px solid #E4D9C6; border-left: 3px solid #8A7A66; border-radius: 0 10px 10px 0; padding: 11px 16px; font-size: 13.5px; color: #4A4238; line-height: 1.5; margin: 0 0 22px; }
.route-privnote b { color: #1C1A17; }

/* Анимация транспорта между днями (3D-стиль) */
.route-char { position: absolute; left: 0; top: 0; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; opacity: 0; transition: opacity .2s; }
.route-char__v { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff, #F3ECE2); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 10px 22px rgba(28,26,23,.32), 0 2px 5px rgba(28,26,23,.2), inset 0 1px 2px rgba(255,255,255,.9); border: 2.5px solid #C2410C; will-change: transform; }

/* Отрисованная анимированная иконка транспорта, движущаяся между днями */
.ar-veh { position: absolute; left: 0; top: 0; transform: translate(-50%,-50%); pointer-events: none; opacity: 0; transition: opacity .2s; will-change: opacity; }
.ar-veh__in { will-change: transform; line-height: 0; }
.ar-veh__in svg.ar-ic { width: 56px; height: 56px; display: block; overflow: visible; filter: drop-shadow(0 6px 8px rgba(28,26,23,.28)); }

/* =====================================================================
   СТАТЬЯ
   ===================================================================== */
.article-grid { max-width: 1140px; margin: 0 auto; padding: 44px 40px 90px; display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
.article-body { max-width: 680px; }
.article-body p { font-size: 17px; color: #3A352E; line-height: 1.75; margin-bottom: 16px; }
.article-body h2 { font-size: 30px; margin: 32px 0 14px; letter-spacing: -.4px; }
.article-body h3 { font-size: 19px; font-weight: 700; margin: 20px 0 8px; font-family: var(--sans); }
.article-body img { border-radius: 16px; margin: 20px 0; }
.article-body blockquote { border-left: 3px solid var(--accent); padding: 6px 0 6px 22px; margin: 28px 0; }
.article-body blockquote p { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.5; }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; }
.article-body li { font-size: 16px; color: #3A352E; line-height: 1.7; }

/* Таблицы в тексте статьи. Голый <table> из импорта не имел стилей вовсе —
   ячейки слипались. Обёртка со скроллом нужна, чтобы широкая таблица не
   ломала вёрстку на телефоне (сама страница горизонтально не едет). */
.article-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px;
  background: #fff; border: 1px solid #ECE6DC; border-radius: 14px; overflow: hidden;
  display: table; table-layout: auto; }
.article-body table th, .article-body table td { padding: 12px 16px; text-align: left;
  border-bottom: 1px solid #F0EAE0; border-right: 1px solid #F6F1E9; vertical-align: top;
  line-height: 1.55; }
.article-body table th:last-child, .article-body table td:last-child { border-right: 0; }
.article-body table th { background: #FBFAF8; font-size: 12.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.article-body table td { color: #3A352E; }
.article-body table td:first-child { font-weight: 600; color: var(--ink); }
.article-body table tbody tr:last-child td { border-bottom: 0; }
.article-body table tbody tr:hover { background: #FCFAF6; }
.article-body table a { color: var(--accent); }
.article-body .table-scroll { overflow-x: auto; margin: 22px 0; -webkit-overflow-scrolling: touch; }
.article-body .table-scroll table { margin: 0; min-width: 520px; }
@media (max-width: 700px) {
  /* На телефоне таблица прокручивается сама, а не растягивает страницу. */
  .article-body table { display: block; overflow-x: auto; font-size: 14px; }
  .article-body table th, .article-body table td { padding: 10px 12px; }
  .article-body table th { white-space: nowrap; }
}
.article-lead { font-size: 20px; color: #3A352E; line-height: 1.6; font-weight: 500; margin-bottom: 28px; }
.article-sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 18px; }
.sidebar-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px; }

/* =====================================================================
   ФОРМЫ (front-end submit + generator)
   ===================================================================== */
.ar-form { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 34px; max-width: 760px; margin: 0 auto; }
.ar-form label { display: block; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .5px; margin: 16px 0 6px; text-transform: uppercase; }
.ar-form input[type=text], .ar-form input[type=email], .ar-form input[type=number], .ar-form input[type=date], .ar-form select, .ar-form textarea {
  width: 100%; border: 1px solid #E0D9CD; border-radius: 11px; padding: 12px 14px; font-family: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.ar-form textarea { min-height: 160px; resize: vertical; }
.ar-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ar-notice { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; }
.ar-notice-ok { background: #E4F3EA; color: #176B47; }
.ar-notice-err { background: #FBE6DC; color: #9A3412; }

/* Форма подписки на цену (плагин travel-core) */
.price-alert-form { display: flex; flex-direction: column; gap: 12px; }
.price-alert-form label { font-size: 13px; font-weight: 600; display: block; }
.price-alert-form input { width: 100%; border: 1px solid #E0D9CD; border-radius: 11px; padding: 11px 14px; font-family: inherit; font-size: 15px; margin-top: 5px; color: var(--ink); background: #fff; }
.price-alert-form button, .price-alert-form .btn { margin-top: 6px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-btn); padding: 13px 26px; font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.price-alert-form button:hover { background: var(--accent-hover); }

/* =====================================================================
   Адаптивность
   ===================================================================== */
@media (max-width: 1024px) {
  .wrap, .site-header__inner, .site-footer__grid, .site-footer__bar, .tabs-bar__inner, .page-banner__inner { padding-left: 24px; padding-right: 24px; }
  .g4, .g3 { grid-template-columns: repeat(2, 1fr); }
  .section__head h2 { font-size: 34px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .heroB { grid-template-columns: 1fr; }
  .heroB__media { min-height: 320px; }
  .heroB__text { padding: 96px 40px 56px; }
  .route-map-grid, .hotel-layout, .article-grid { grid-template-columns: 1fr; }
  .hotel-gallery { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .hotel-gallery a { height: 180px; }
  .hotel-gallery a:first-child { grid-row: auto; height: 260px; }
}
@media (max-width: 680px) {
  .wrap, .site-header__inner, .site-footer__grid, .site-footer__bar, .tabs-bar__inner, .page-banner__inner { padding-left: 18px; padding-right: 18px; }
  /* Старое всплывающее меню удалено — новый drawer описан в конце файла. */
  .nav-burger { display: block; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .section__head { flex-direction: column; align-items: flex-start; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .heroB__text h1 { font-size: 44px; }
  .page-banner h1 { font-size: 38px; }
  .route-card, .reviews-cols, .agg-row { grid-template-columns: 1fr; }
  .hotel-gallery { grid-template-columns: 1fr; }
  .ar-form .row2 { grid-template-columns: 1fr; }
}

/* ===== Оценка (палец вверх/вниз) — статьи и маршруты ===== */
.ar-rating { background:#fff; border:1px solid #E9E3D9; border-radius:18px; padding:20px; }
.ar-rating__head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:14px; }
.ar-rating__title { font-weight:700; font-size:15px; }
.ar-rating__pct { font-family:'JetBrains Mono',monospace; font-size:13px; color:#9A938A; }
.ar-rating__btns { display:flex; gap:10px; }
.ar-vote { flex:1; display:flex; align-items:center; justify-content:center; gap:8px; border-radius:12px; padding:12px;
  font-family:inherit; font-weight:700; font-size:14px; cursor:pointer; transition:all .2s;
  background:#fff; color:#3A352E; border:1px solid #D9D2C6; }
.ar-vote:hover { border-color:#C2410C; }
.ar-vote.is-up { background:#1F8A5B; color:#fff; border-color:#1F8A5B; }
.ar-vote.is-down { background:#C2410C; color:#fff; border-color:#C2410C; }
.ar-rating__login { display:block; text-align:center; margin-top:12px; font-size:13px; color:#C2410C; font-weight:600; text-decoration:none; }
/* компактный вариант — строка автора на странице маршрута */
.ar-rating--compact { background:transparent; border:none; padding:0; display:flex; align-items:center; gap:12px; }
.ar-rating--compact .ar-rating__head { margin:0; }
.ar-rating--compact .ar-rating__title { font-weight:500; font-size:13px; color:#6E675C; }
.ar-rating--compact .ar-rating__btns { gap:8px; }
.ar-rating--compact .ar-vote { flex:0 0 auto; padding:9px 14px; }
.ar-rating--compact .ar-rating__login { margin:0; }

/* ===== Бар автора на странице маршрута ===== */
.route-authorbar { display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding-bottom:22px; margin-bottom:30px; border-bottom:1px solid #ECE6DC; flex-wrap:wrap; }
.route-authorbar__who { display:flex; align-items:center; gap:12px; }
.route-authorbar__ava { width:40px; height:40px; border-radius:50%; background:#1E3A5F; display:flex;
  align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:16px; flex-shrink:0; }

/* ===== Страница страны: лендинг ===== */
.tabs-bar { display: none !important; } /* навигация по разделам страны — через меню в шапке */
.country-hero { height: 480px; }
.country-hero__cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.country-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; margin-bottom: 56px; }
.country-stats { display: flex; gap: 30px; margin-top: 26px; }
.country-stats__v { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--accent); }
.country-stats__l { font-size: 13px; color: var(--muted); margin-top: 2px; }
.country-gallery { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; gap: 12px; }
.country-gallery__item { border-radius: 16px; background-size: cover; background-position: center; border: 1px solid var(--border); }
.country-gallery__item.is-lead { grid-column: 1 / -1; grid-row: span 2; }

.country-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 64px; }
.country-why__card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px; }
.country-why__ico { font-size: 30px; margin-bottom: 12px; }
.country-why__t { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.country-why__card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }

.country-section { margin-bottom: 64px; scroll-margin-top: 84px; }
.country-section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

.country-cta { background: var(--ink); border-radius: 24px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }

@media (max-width: 1024px) {
  .country-intro { grid-template-columns: 1fr; gap: 28px; }
  .country-why { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .country-hero { height: 420px; }
  .country-stats { gap: 20px; flex-wrap: wrap; }
  .country-cta { padding: 28px; }
}

/* =====================================================================
   Иконки, мета-строка баннера и мобильное меню.
   Блок намеренно в КОНЦЕ файла: перебивает ранние правила
   (.country-hero{height:420px} объявлен ниже базового медиазапроса).
   ===================================================================== */

/* ---- SVG-иконки (заменили эмодзи) ---- */
.ar-ico { flex: none; display: block; }
.chip-ico { display: inline-flex; align-items: center; gap: 6px; }
.route-card__line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* ---- Мета-строка на баннере: стеклянные пилюли поверх фото ---- */
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-meta__i {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; font-size: 14px; font-weight: 600; line-height: 1.2;
  padding: 9px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-meta__i--wide { white-space: normal; }
.hero-meta__i--price { background: rgba(194,65,12,.55); border-color: rgba(255,255,255,.3); }
.hero-meta__i--price b { font-family: var(--serif); font-size: 18px; font-weight: 600; }
/* Мета над заголовком статьи (рубрика + дата) */
.hero-meta--post { margin-top: 0; margin-bottom: 16px; align-items: center; }
.hero-meta__date { display: inline-flex; align-items: center; gap: 7px; color: #F4C9B4; font-size: 14px; font-weight: 600; }

/* ---- Баннеры: высота классом, а не инлайном, иначе медиазапросы бессильны ---- */
.page-banner--post  { height: 440px; }
.page-banner--route { height: 420px; }
.page-banner--post h1  { font-size: 48px; line-height: 1.08; }
.page-banner--route h1 { font-size: 52px; }

/* ---- Бургер: нормальная зона нажатия ---- */
.nav-burger { padding: 8px; margin-right: -8px; border-radius: 10px; line-height: 0; }
.nav-burger:active { background: rgba(28,26,23,.06); }
.is-dark .nav-burger { color: #fff; }
.site-nav__close, .site-nav__cab { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 680px) {
  /* Выезжающее моб-меню .site-nav — position:fixed + translateX(100%). Если у предка
     есть transform/filter/backdrop-filter (карта Leaflet, стеклянные панели), fixed
     превращается в absolute и off-canvas панель РАСТЯГИВАЕТ горизонтальный скролл
     (проявлялось на /routes/ +323px и странице маршрута +118px). overflow-x:clip
     обрезает вылет, НЕ создавая scroll-контейнер, поэтому sticky-шапка не ломается. */
  html, body { overflow-x: clip; }

  /* Баннер: тянется по контенту и НЕ уезжает под абсолютную шапку.
     .page-banner__inner прижат к bottom, поэтому длинный заголовок рос вверх. */
  .page-banner--post, .page-banner--route, .country-hero {
    height: auto !important; min-height: 380px;
    display: flex; align-items: flex-end;
  }
  .page-banner--post .page-banner__inner,
  .page-banner--route .page-banner__inner,
  .country-hero .page-banner__inner {
    position: static; width: 100%;
    padding-top: calc(92px + env(safe-area-inset-top));
    padding-bottom: 26px;
  }
  .page-banner--post h1, .page-banner--route h1, .page-banner h1 { font-size: 30px; line-height: 1.16; }
  .page-banner__eyebrow { font-size: 11px; letter-spacing: 2px; }
  .page-banner__flag { font-size: 38px; }
  .hero-meta { gap: 8px; margin-top: 16px; }
  .hero-meta__i { font-size: 13px; padding: 7px 11px; gap: 6px; }
  .hero-meta__i--price b { font-size: 16px; }

  /* ---- Мобильное меню: выезжающая панель со стеклом ---- */
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1100;
    background: rgba(20,14,16,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .3s ease; pointer-events: none;
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .nav-backdrop[hidden] { display: none; }

  .site-nav {
    display: flex !important; flex-direction: column; align-items: stretch; gap: 4px;
    position: fixed; top: 0; right: 0; bottom: 0; left: auto;
    width: min(86vw, 340px); z-index: 1200;
    background: rgba(251,250,248,.94);
    backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
    border-left: 1px solid rgba(28,26,23,.08);
    box-shadow: -26px 0 64px rgba(28,26,23,.24);
    padding: calc(14px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
    transform: translateX(100%); visibility: hidden; opacity: 0;
    transition: transform .38s cubic-bezier(.22,1,.36,1), opacity .24s ease, visibility .38s;
    overflow-y: auto; overscroll-behavior: contain;
  }
  .site-nav.is-open { transform: none; visibility: visible; opacity: 1; }
  .site-nav li { display: block; }
  .site-nav li > a { width: 100%; }

  .site-nav__close {
    display: inline-flex; align-items: center; justify-content: center;
    align-self: flex-end; width: 44px; height: 44px; margin-bottom: 6px;
    background: rgba(28,26,23,.05); border: none; border-radius: 12px;
    color: var(--ink); cursor: pointer;
  }
  .site-nav__close:active { background: rgba(28,26,23,.1); }

  .site-nav a {
    display: flex; align-items: center; justify-content: space-between;
    color: var(--ink) !important; text-shadow: none !important;
    font-size: 19px; font-weight: 700; padding: 15px 14px; border-radius: 14px;
    transition: background .18s ease;
  }
  .site-nav a::after {
    content: ''; width: 7px; height: 7px; flex: none;
    border-right: 2px solid var(--accent); border-top: 2px solid var(--accent);
    transform: rotate(45deg); opacity: .45;
  }
  .site-nav a:active { background: rgba(194,65,12,.08); }

  /* Кабинет: в шапке он скрыт при ≤880px — с телефона иначе не попасть */
  .site-nav__cab {
    display: flex !important; justify-content: center; margin-top: auto; padding-top: 15px;
    background: var(--accent); color: #fff !important; border-radius: 14px;
    font-weight: 800; box-shadow: 0 8px 22px rgba(194,65,12,.28);
  }
  .site-nav__cab::after { display: none; }

  /* Пункты появляются каскадом */
  .site-nav.is-open a { animation: navItemIn .4s cubic-bezier(.22,1,.36,1) backwards; }
  .site-nav.is-open a:nth-of-type(1) { animation-delay: .05s; }
  .site-nav.is-open a:nth-of-type(2) { animation-delay: .1s; }
  .site-nav.is-open a:nth-of-type(3) { animation-delay: .15s; }
  .site-nav.is-open a:nth-of-type(4) { animation-delay: .2s; }
  .site-nav.is-open a:nth-of-type(5) { animation-delay: .25s; }

  html.nav-lock, body.nav-lock { overflow: hidden; }
}

@keyframes navItemIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .site-nav, .nav-backdrop { transition: none; }
  .site-nav.is-open a { animation: none; }
}

/* КРИТИЧНО. Панель меню лежит внутри .site-header. Пока меню открыто, снимаем у
   шапки backdrop-filter (иначе он делает шапку «containing block» и панель
   position:fixed схлопывается в высоту шапки) и поднимаем шапку над подложкой
   (иначе её stacking-context c z-index:100 прячет панель под backdrop z-index:1100). */
@media (max-width: 680px) {
  html.nav-lock .site-header,
  body.nav-lock .site-header {
    position: fixed !important; top: 0; left: 0; right: 0;
    z-index: 1300 !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  .site-nav { z-index: 1310; }   /* поверх поднятой шапки, чтобы перекрыть бренд/бургер */
}

/* Картинки карточек стали настоящими <img> (нужно для индексации в Google Images):
   раньше это были div с background-size:cover. Ведём себя так же — cover + zoom. */
img.card__img, img.country-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
  }
  .site-nav { z-index: 1310; }   /* поверх поднятой шапки, чтобы перекрыть бренд/бургер */
}

/* =====================================================================
 * Карточка достопримечательности — блок «Что посмотреть» на лендинге
 * страны (inc/landmarks-block.php). Живёт в style.css, а не в
 * map-explore.css: тот подключается только на странице карты, а блок
 * выводится на обычном лендинге страны.
 * =================================================================== */

.lm-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line, #E5E0D8);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.lm-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(28, 26, 23, .12); }

.lm-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--sand, #FAF7F2); }
.lm-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lm-card__cat {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.lm-card__body { padding: 14px 16px 16px; }
.lm-card__title {
  font-family: 'Lora', Georgia, serif;
  font-size: 19px;
  line-height: 1.25;
  margin: 0;
}
.lm-card__city { margin-top: 5px; font-size: 13px; color: var(--muted, #6E675C); }
