/* css/m2-direction.css — стили SEO-страницы направления (cities/route-m2.php).
   Дополняет modern.css (использует его токены --brand/--ink/--muted/--line/--card…).
   Скоуп .m2-dir-page. Мобайл-фёрст, график — во всю ширину. */

.m2-dir-page .m2-section { padding: 9px 0; }
.m2-dir-page .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Хлебные крошки */
.m2-dir-page .m2-top { padding-bottom: 8px; }   /* компактный отступ до крошек */
.m2-breadcrumbs { font-size: 13px; color: var(--muted); padding: 2px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m2-breadcrumbs a { color: var(--muted); text-decoration: none; }
.m2-breadcrumbs a:hover { color: var(--brand); }
.m2-breadcrumbs span { color: #aeb4bd; }
.m2-breadcrumbs .cur { color: var(--muted); font-weight: 600; }

/* Карточка «Общая информация о перелёте» + плитки */
.m2-info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.m2-info-card > h2 { margin: 0 0 16px; font-size: 24px; }
.m2-info-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.m2-info-t { background: var(--bg); border-radius: 14px; padding: 18px 16px; text-align: center; }
.m2-info-t .v { font-size: 24px; font-weight: 800; color: var(--ink); }
.m2-info-t .l { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ── Большие блоки-распорки: «Расстояние» и «Авиакомпании» ──────────────────── */
.m2-info-wide { display: flex; align-items: center; gap: 20px; margin-top: 12px; padding: 18px 22px; border-radius: 16px; background: var(--bg); }
.m2-info-wide .m2-iw-txt { flex: none; }
.m2-iw-l { font-size: 14px; color: var(--muted); }
.m2-iw-v { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1.1; margin-bottom: 2px; }
.m2-iw-v span { font-size: 18px; font-weight: 700; color: var(--muted); }
.m2-iw-v.small { font-size: 21px; font-weight: 700; margin-bottom: 4px; }
.m2-iw-v.small b { color: #ff5a3c; }

/* Расстояние: пунктирная линия маршрута с точками-городами и самолётиком */
.m2-info-dist { background: linear-gradient(120deg, #fff4f0 0%, #eef3ff 100%); }
.m2-route { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.m2-route-city { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.m2-route-line { position: relative; flex: 1; min-width: 60px; height: 2px; background: repeating-linear-gradient(90deg, #ffa48f 0 6px, transparent 6px 12px); }
.m2-route-dot { position: absolute; top: 50%; left: 0; width: 9px; height: 9px; border-radius: 50%; background: #ff5a3c; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(255, 90, 60, .18); }
.m2-route-dot.end { left: 100%; }

/* Авиакомпании: ряд круглых логотипов внахлёст + «+N» */
/* .m2-dir-page — специфичнее глобального .m2 a, иначе ссылка тянет подчёркивание на весь блок и логотипы */
.m2-dir-page a.m2-info-air, .m2-dir-page a.m2-info-air:hover { text-decoration: none; color: inherit; cursor: pointer; transition: background .15s; }
.m2-dir-page a.m2-info-air:hover { background: #e6eaf2; }
.m2-air-logos { flex: 1; display: flex; align-items: center; justify-content: flex-end; padding-left: 10px; }
.m2-air-logo { flex: none; width: 42px; height: 42px; margin-left: -12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(16, 24, 40, .14); overflow: hidden; position: relative; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; }
.m2-air-logo:first-child { margin-left: 0; }
.m2-air-logo .l { line-height: 1; }
.m2-air-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m2-air-more { background: #ff5a3c; color: #fff; font-size: 13px; }

@media (max-width: 640px) {
   .m2-info-wide { flex-direction: column; align-items: flex-start; gap: 14px; }
   .m2-route { width: 100%; }
   .m2-air-logos { justify-content: flex-start; padding-left: 0; }
   .m2-iw-v { font-size: 26px; }
}

.m2-info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.m2-vcard { background: rgba(255, 90, 60, .07); border-radius: 16px; padding: 16px 18px; }
.m2-vcard-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 16px; font-weight: 700; color: var(--ink); }
.m2-badge { flex: none; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.m2-verdict { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.m2-verdict.good { color: #2f9e44; }
.m2-verdict.mid { color: var(--ink); }
.m2-verdict.bad { color: var(--brand-dark); }
.m2-slider { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #8bcf5f, #f2c766, #e8977a); }
.m2-slider-dot { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #2f9e44; transform: translate(-50%, -50%); }
.m2-slider-l { display: flex; justify-content: space-between; margin-top: 7px; font-size: 13px; color: var(--muted); }
.m2-when { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; color: var(--brand-dark); line-height: 1.4; }
.m2-when b { color: var(--brand-dark); }
.m2-when-ic { flex: none; color: var(--brand); margin-top: 2px; }

.m2-monthcard { margin-top: 12px; }
.m2-months { display: flex; align-items: flex-end; gap: 8px; height: 150px; margin: 8px 0 4px; }
.m2-mcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.m2-mbar { width: 100%; max-width: 60px; border-radius: 8px 8px 4px 4px; }
.m2-mbar.lo { background: #8bcf5f; }
.m2-mbar.mid { background: #e8977a; }
.m2-mbar.hi { background: #eaa93f; }
.m2-mx { margin-top: 8px; font-size: 13px; color: var(--muted); }
.m2-month-note { margin: 6px 0 0; color: var(--brand-dark); line-height: 1.5; }
.m2-month-note b { color: var(--brand-dark); }
@media (max-width: 640px) { .m2-info-cards { grid-template-columns: 1fr; } .m2-months { height: 120px; gap: 4px; } }

/* Вводный текст + плашка «самый дешёвый билет» */
.m2-intro { color: var(--ink); font-size: 16px; line-height: 1.6; max-width: 860px; margin: 0; }
.m2-intro.m2-accent { border-left: 3px solid var(--brand); padding: 2px 0 2px 16px; }
.m2-otherlinks { color: var(--ink); font-size: 15px; line-height: 1.6; margin: 0; border-left: 3px solid var(--brand); padding: 2px 0 2px 16px; }
.m2-otherlinks a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.m2-lifehack { color: var(--ink); font-size: 16px; }
.m2-lh { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.m2-lh:last-child { margin-bottom: 0; }
.m2-lh-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #fbe6df; color: var(--brand); }
.m2-lh-ic svg { width: 20px; height: 20px; display: block; }
.m2-lh > span:last-child { line-height: 1.5; }
.m2-lifehack a { color: var(--brand); }

/* Блок с левой оранжевой полосой-акцентом (заголовок + контент на одной линии) */
.m2-accent-block { border-left: 3px solid var(--brand); padding-left: 16px; }
.m2-dir-main .wrap.m2-accent-block { padding-left: 16px; }   /* перебиваем .m2-dir-main .wrap{padding:0} */
.m2-accent-block .m2-dir-head { margin-bottom: 10px; }
/* То же выравнивание, но без полосы (только отступ, вровень с остальными блоками) */
.m2-dir-main .wrap.m2-indent-block { padding-left: 19px; }
/* Чекбокс «Сравнить с поиском Aviasales» — прижать вправо, уменьшить отступ сверху */
.m2-dir-page .m2-check { display: flex; width: fit-content; margin: 8px 0 0 auto; }

/* Плашка «Лучшая цена за неделю» (лучший билет) */
.m2-bestprice { display: flex; flex-direction: column; background: #eef1f6 url(/img/grey-bg-pattern-m2.png); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin: 0 0 14px; }
.m2-bp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.m2-bp-frost { display: flex; align-items: center; gap: 20px; background: rgba(255,255,255,.82); border-radius: 12px; padding: 14px 18px; }
.m2-bp-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 18px; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.m2-bp-toggle svg { width: 17px; height: 17px; color: var(--brand); }
.m2-bp-toggle:hover { border-color: var(--brand); }
.m2-bp-row2 { flex: 1 1 auto; display: flex; align-items: center; gap: 22px; }
.m2-bestprice-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: #b23a1f; background: #ffe6df; border-radius: 999px; padding: 5px 14px; white-space: nowrap; }
.m2-bestprice-badge svg { width: 16px; height: 16px; }
.m2-bp-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 12px; }
.m2-bp-price { flex: none; }
.m2-bp-find { flex: none; align-self: center; margin-left: auto; }
.m2-bp-from { font-size: 13px; font-weight: 500; color: var(--muted); }
.m2-bp-val { font-size: 27px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.m2-bp-date { font-size: 12px; color: #2f7d32; font-weight: 600; margin-top: 3px; }
.m2-bp-tx { flex: 1; min-width: 160px; font-size: 14px; color: var(--ink); line-height: 1.5; }
.m2-bestprice-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 13px; }
.m2-bestprice-tx { font-size: 16px; color: var(--ink); }
.m2-bestprice-tx b { color: var(--brand-dark); font-weight: 700; white-space: nowrap; }
.m2-dir-page .m2-bestprice-btn { flex: none; text-decoration: none; font-weight: 600; color: var(--brand); background: var(--card); border: 1px solid var(--brand); border-radius: 12px; padding: 12px 26px; white-space: nowrap; }
.m2-dir-page .m2-bestprice-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }
@media (max-width: 640px) {
  .m2-bp-frost { flex-direction: column; align-items: stretch; gap: 12px; }
  .m2-bp-row2 { flex-direction: column; align-items: flex-start; gap: 8px; }
  .m2-bp-find { margin-left: 0; text-align: center; }
}

.m2-callout { margin: 0 0 14px; background: #fbfbe9; border: 1px solid #ecebc7; border-radius: 12px; padding: 14px 18px; color: var(--ink); line-height: 1.6; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.m2-callout-tx { flex: 1; min-width: 240px; }
.m2-dir-page .m2-callout-btn { flex: none; text-decoration: none; font-weight: 700; font-size: 15px; color: #fff; background: var(--brand); border-radius: 10px; padding: 10px 26px; white-space: nowrap; }
.m2-dir-page .m2-callout-btn:hover { background: var(--brand-dark); color: #fff; }

/* Блок «Дешёвые билеты» (новый) */
.m2-card-sub { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.m2-deal-checked { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #2f7d32; background: #e3f2e1; border-radius: 999px; padding: 6px 14px; }
.m2-deal-checked .ic { display: inline-flex; color: #2f7d32; }
.m2-deal-checked .m2-badge { color: var(--brand-dark); background: rgba(255, 90, 60, .14); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.m2-deals2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.m2-d2 { background: var(--bg); border-radius: 14px; padding: 18px; }
.m2-d2-tag { display: inline-block; font-size: 14px; font-weight: 600; padding: 5px 14px; border-radius: 999px; }
.m2-d2-tag.good { color: #2f7d32; background: #e3f2e1; }
.m2-d2-tag.mut { color: #6b7280; background: #eef1f6; }
.m2-d2-price { font-size: 34px; font-weight: 800; color: var(--ink); margin: 12px 0; }
.m2-d2-verdict { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.m2-d2-verdict i { font-style: normal; font-weight: 700; }
.m2-d2-verdict.good { color: #2f7d32; background: #e3f2e1; }
.m2-d2-verdict.mid { color: #8a6d1a; background: #f6ecd3; }
.m2-d2-flight { display: flex; align-items: center; gap: 11px; margin-top: 16px; font-size: 15px; color: var(--ink); }
.m2-d2-ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #fbe6df; color: var(--brand); flex: none; }
.m2-deal-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 12px; background: rgba(255, 90, 60, .07); border-radius: 14px; padding: 14px 18px; }
.m2-deal-foot-tx { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--brand-dark); font-weight: 600; }
.m2-deal-foot-ic { display: inline-flex; color: var(--brand); }
.m2-deal-foot .m2-badge { color: var(--brand-dark); background: rgba(255, 90, 60, .14); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.m2-dir-page .m2-deal-foot-btn { flex: none; text-decoration: none; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 22px; white-space: nowrap; }
.m2-dir-page .m2-deal-foot-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }
@media (max-width: 640px) { .m2-deals2 { grid-template-columns: 1fr; } .m2-deal-checked { margin-top: 8px; } }

@media (max-width: 640px) { .m2-info-card > h2 { font-size: 19px; } }

/* Двухколоночная раскладка: контент + правое меню */
.m2-dir-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 44px; }
.m2-dir-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: stretch; }
.m2-dir-main { min-width: 0; }
.m2-dir-main .wrap { max-width: none; padding: 0; }        /* секции внутри занимают всю ширину колонки */
.m2-dir-main > section:first-child { padding-top: 0; }     /* верх первого блока вровень с карточкой меню */
.m2-dir-main [id^="s-"] { scroll-margin-top: 16px; }

/* Правое меню — наш стиль: чистая карточка, один оранжевый акцент, скругл. иконки */
.m2-dir-nav { position: sticky; top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 10px 14px 12px; }
.m2-dir-nav-t { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.2; margin: 0 0 8px; padding: 0 6px; }
.m2-dir-nav-i { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 7px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 14px; }
.m2-dir-nav-i:last-child { margin-bottom: 0; }
.m2-dir-nav-i .ic { display: inline-flex; align-items: center; color: var(--brand); flex: none; }
.m2-dir-nav-i .tx { flex: 1; min-width: 0; line-height: 1.25; }
.m2-dir-nav-i .val { color: var(--brand); font-weight: 700; white-space: nowrap; }
.m2-dir-nav-i:hover { border-color: var(--brand); }
.m2-dir-nav-i.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.m2-dir-nav-i.active .ic, .m2-dir-nav-i.active .val { color: #fff; }
/* перебиваем глобальный .m2 a (специфичность): без подчёркивания, название — чёрное */
.m2-dir-page .m2-dir-nav-i, .m2-dir-page .m2-dir-nav-i:hover,
.m2-dir-page .m2-dir-nav-i .tx, .m2-dir-page .m2-dir-nav-i .val { text-decoration: none; }
.m2-dir-page .m2-dir-nav-i .tx { color: var(--ink); }
.m2-dir-page .m2-dir-nav-i.active .tx { color: #fff; }

@media (max-width: 900px) {
   .m2-dir-layout { grid-template-columns: 1fr; gap: 0; }
   .m2-dir-aside { display: none; }
}

/* Заголовок с ценой */
.m2-dir-hero h1 { line-height: 1.15; }
.m2-dir-price { color: inherit; white-space: nowrap; }

/* Заголовки блоков */
.m2-dir-head { margin-bottom: 14px; }
.m2-dir-head h2 { margin: 0 0 2px; font-size: 22px; }
.m2-dir-head .sub { margin: 0; color: var(--muted); font-size: 14px; }

/* Карточка-обёртка (график) */
.m2-dir-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.m2-dir-page .m2-dir-card:hover { background: var(--card); }   /* гасим глобальный ховер .m2-dir-card из modern.css */

/* Сводка — плитки фактов */
.m2-dir-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.m2-fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.m2-fact-v { font-size: 20px; font-weight: 800; color: var(--ink); }
.m2-fact-l { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* График цен */
.m2-chart { position: relative; }
.m2-chart svg { display: block; width: 100%; height: 240px; }
.m2-chart-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; font-weight: 700; }
.m2-chart-legend .lo { color: #1ea672; }
.m2-chart-legend .hi { color: var(--brand); }

/* Бар-календарь «Динамика цен» */
.m2-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.m2-cal-head h2 { margin: 0; font-size: 24px; }
.m2-cal-toggle { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 3px; gap: 2px; }
.m2-cal-toggle button { border: 0; background: transparent; border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; }
.m2-cal-toggle button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 31, 51, .1); }
.m2-cal-bars { display: flex; align-items: flex-end; gap: 6px; height: 230px; }
/* «За 60 дней»: баров много — не жмём в ширину, а даём фикс-ширину и горизонтальный скролл. */
.m2-cal-bars.scroll { position: relative; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: #cfd4db transparent; }
.m2-cal-bars.scroll::-webkit-scrollbar { height: 8px; }
.m2-cal-bars.scroll::-webkit-scrollbar-thumb { background: #cfd4db; border-radius: 8px; }
.m2-cal-bars.scroll .m2-bar-col { flex: 0 0 40px; }
.m2-bar-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.m2-bar { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; transition: filter .12s ease, box-shadow .12s ease; }
/* Мало столбцов — делаем их толще, чтобы карточка не выглядела полупустой. */
.m2-cal-bars.few .m2-bar { max-width: 88px; }
.m2-cal-bars.few2 .m2-bar { max-width: 140px; }
.m2-bar-col.clk { cursor: pointer; }
.m2-bar-col:hover .m2-bar { filter: brightness(1.05); box-shadow: 0 0 0 2px rgba(20,24,32,.18); }
.m2-cal-tip { position: fixed; z-index: 60; transform: translate(-50%, -100%); background: #20242b; color: #fff; padding: 8px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.4; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.20); }
.m2-cal-tip[hidden] { display: none; }
.m2-cal-tip b { display: block; font-weight: 800; margin-bottom: 2px; }
.m2-cal-tip .pr { color: #8bcf5f; font-weight: 800; }
.m2-cal-tip .mt { color: #c9ced6; }
.m2-cal-tip::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #20242b; }
.m2-bar.lo { background: #8bcf5f; }
.m2-bar.mid { background: #f2c766; }
.m2-bar.hi { background: #e8977a; }
.m2-bar-col.min .m2-bar { outline: none; }
.m2-bar-lbl { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.m2-bar-x { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.2; }
.m2-bar-x b { display: block; color: var(--ink); font-weight: 700; font-size: 13px; }
.m2-bar-col.min .m2-bar-x b, .m2-bar-col.min .m2-bar-x span { color: #3b8a1e; }
.m2-cal-note { margin-top: 16px; background: rgba(255, 90, 60, .07); border-radius: 12px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.m2-cal-note-tx, .m2-cal-note-tx b { color: var(--brand-dark); font-weight: 600; }
.m2-dir-page .m2-cal-note-btn { flex: none; text-decoration: none; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 20px; white-space: nowrap; }
.m2-dir-page .m2-cal-note-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }
@media (max-width: 640px) { .m2-cal-head h2 { font-size: 19px; } .m2-cal-bars { height: 180px; gap: 3px; } .m2-bar-x span { display: none; } .m2-cal-bars.scroll .m2-bar-col { flex-basis: 34px; } }

/* Дешёвые билеты / витрины */
.m2-dir-deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.m2-deal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.m2-deal-tag { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--brand); background: rgba(255, 90, 60, .08); border-radius: 999px; padding: 2px 10px; }
.m2-deal-price { font-size: 22px; font-weight: 800; color: var(--ink); }
.m2-deal-air { font-size: 14px; color: var(--ink); font-weight: 600; }
.m2-deal-meta { font-size: 13px; color: var(--muted); }
.m2-dir-page .m2-deal-btn { margin-top: 8px; text-align: center; text-decoration: none; font-weight: 700; font-size: 14px; color: #fff; background: var(--brand); border-radius: var(--radius-sm); padding: 9px 12px; cursor: pointer; }
.m2-dir-page .m2-deal-btn:hover { background: var(--brand-dark); color: #fff; }

/* Авиакомпании — строки */
.m2-dir-airlines { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.m2-al-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.m2-al-row:first-child { border-top: 0; }
.m2-al-name { font-weight: 700; color: var(--ink); }
.m2-al-direct { font-size: 11px; font-weight: 700; color: #1ea672; background: rgba(30, 166, 114, .1); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: middle; }
.m2-al-days { font-size: 13px; color: var(--muted); }
.m2-al-price { font-weight: 800; color: var(--brand); white-space: nowrap; }

/* Расписание прямых рейсов */
.m2-sched { display: flex; flex-direction: column; gap: 10px; }
.m2-sched-row { display: flex; align-items: center; gap: 14px; background: var(--bg); border-radius: 14px; padding: 13px 18px; }
.m2-sched-row.min { background: #eaf4e0; }
.m2-sched-av { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.m2-sched-mid { flex: 1; min-width: 0; }
.m2-sched-name { font-size: 17px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m2-sched-tag { font-size: 12px; font-weight: 600; color: #2f7d32; background: #cfe8bf; border-radius: 999px; padding: 3px 11px; }
.m2-sched-tag.freq { color: #1c5fa8; background: #d5e6f7; }
.m2-sched-dots { display: flex; gap: 6px; margin-top: 8px; }
.m2-sched-dots span { width: 8px; height: 8px; border-radius: 50%; background: #d3dae4; }
.m2-sched-price { font-weight: 800; font-size: 17px; color: var(--ink); white-space: nowrap; }
.m2-sched-row.min .m2-sched-price { color: #2f7d32; }
.m2-sched-hidden { display: none; }
.m2-sched-more { margin-top: 12px; width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px; font-weight: 600; font-size: 15px; color: var(--ink); cursor: pointer; font-family: inherit; }
.m2-sched-more:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Таблица «Стоимость по месяцам» */
.m2-motbl-h, .m2-motbl-r { display: grid; grid-template-columns: 1fr 1.4fr 1.7fr; gap: 12px; align-items: center; }
.m2-motbl-h { color: #8a6f66; font-size: 15px; font-weight: 600; background: #fbeeeb; border-radius: 10px; padding: 14px 18px; }
.m2-motbl-r { padding: 15px 18px; border-bottom: 1px solid var(--line); }
.m2-motbl-r:last-child { border-bottom: 0; }
.m2-motbl-r:hover { background: #f6f7f9; }
.m2-motbl-r.min { background: #eaf4e0; }
.m2-motbl-r.min:hover { background: #e3efd7; }
.m2-motbl .m-mo { font-weight: 700; font-size: 17px; color: var(--ink); }
.m2-motbl .m-cell { color: var(--ink); font-size: 16px; }
.m2-dir-page .m2-motbl .m-cell .pr { color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.m2-dir-page .m2-motbl .m-cell .nf { color: var(--brand); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.m2-motbl .minlbl { display: inline-block; font-size: 11px; font-weight: 700; color: #2f7d32; background: #cfe8bf; border-radius: 999px; padding: 1px 9px; vertical-align: middle; margin-left: 4px; }
.m2-motbl-note { margin: 14px 0 0; color: var(--muted); }
@media (max-width: 640px) { .m2-motbl-h, .m2-motbl-r { grid-template-columns: 1fr; gap: 4px; } .m2-motbl-h span:first-child { display: none; } }

/* Чипы авиакомпаний (фильтры расписания + прямые рейсы) */
.m2-alchips { display: flex; flex-wrap: wrap; gap: 12px; }
.m2-alchip { display: inline-flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 999px; padding: 9px 22px 9px 9px; }
.m2-alchip.min { background: #eaf4e0; }
.m2-alchip-av { width: 44px; height: 44px; font-size: 15px; }
.m2-alchip-nm { font-weight: 700; font-size: 17px; color: var(--ink); }
.m2-alchip-pr { color: var(--brand); font-weight: 700; white-space: nowrap; }
.m2-alchip.min .m2-alchip-pr { color: #2f7d32; }
.m2-alchip-hidden { display: none; }

/* Авиакомпании — таблица (десктоп) / карточки (мобила) */
.m2-altable { display: flex; flex-direction: column; }
.m2-alt-row { display: grid; grid-template-columns: 2.2fr 1.4fr 1.1fr 1fr 1.4fr 1.5fr; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; }
.m2-alt-row:not(.m2-alt-head):hover { background: var(--bg); }
.m2-alt-row.min { background: #eaf4e0; }
.m2-alt-head { font-size: 13px; color: var(--muted); font-weight: 600; padding-top: 4px; padding-bottom: 6px; }
.m2-alt-air { display: flex; align-items: center; gap: 12px; min-width: 0; }
.m2-alt-av { width: 40px; height: 40px; font-size: 14px; }
.m2-alt-nm { font-weight: 700; font-size: 16px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.m2-alt-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #2f7d32; background: #d6ecc4; border-radius: 6px; padding: 1px 6px; vertical-align: middle; white-space: nowrap; }
.m2-alt-pr { color: var(--brand); font-weight: 700; white-space: nowrap; }
.m2-alt-row.min .m2-alt-pr { color: #2f7d32; }
.m2-alt-seen { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.m2-alt-tr, .m2-alt-dur, .m2-alt-bag, .m2-alt-wd { font-size: 14px; color: var(--ink); }
.m2-alt-dash { color: var(--muted); }
.m2-alt-hidden { display: none; }
.m2-alt-more { margin-top: 12px; width: 100%; color: var(--muted); font-weight: 600; font-size: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; font-family: inherit; }
.m2-alt-more:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 720px) {
   .m2-alt-head { display: none; }
   .m2-alt-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
   .m2-alt-row.min { border-color: #bcdfa0; }
   .m2-alt-air { grid-column: 1 / -1; margin-bottom: 4px; }
   .m2-alt-price, .m2-alt-tr, .m2-alt-dur, .m2-alt-bag, .m2-alt-wd { display: flex; flex-direction: column; }
   .m2-alt-price::before, .m2-alt-tr::before, .m2-alt-dur::before, .m2-alt-bag::before, .m2-alt-wd::before { content: attr(data-l); font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 1px; }
   .m2-alt-wd { grid-column: 1 / -1; }
}

/* Аватар авиакомпании: цветной кружок с буквами + реальный логотип поверх */
.m2-alchip-av, .m2-sched-av, .m2-alt-av { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.m2-alchip-av .l, .m2-sched-av .l, .m2-alt-av .l { position: relative; z-index: 1; }
.m2-alchip-av img, .m2-sched-av img, .m2-alt-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }

/* Чипы (аэропорты / пересадки) */
.m2-dir-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.m2-chip2 { display: inline-flex; align-items: baseline; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.m2-chip2 .c { font-weight: 700; color: var(--ink); }
.m2-chip2 .p { font-size: 13px; color: var(--brand); font-weight: 700; }

/* Перелинковка */
.m2-dir-links { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.m2-dir-links a { text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.m2-dir-links a { cursor: pointer; }
.m2-dir-links a:hover { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }
/* Ссылки с ценой: «Из Казани в Осаку от 3 333 ₽» */
.m2-dir-links-pr a .pr { color: var(--brand); font-weight: 700; white-space: nowrap; margin-left: 4px; }
.m2-dir-links-pr a:hover .pr { color: #fff; }

@media (max-width: 640px) {
   .m2-dir-head h2 { font-size: 19px; }
   .m2-chart svg { height: 200px; }
   .m2-al-row { grid-template-columns: 1fr auto; }
   .m2-al-days { display: none; }
}
