/* Мемориал НН — оформление сайта (версия 2: структура «шапка + мега-меню + короткая главная»).
   Мобильная вёрстка — базовая, крупные экраны — через min-width. */

:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --band: #ececee;
  --ink: #232328;
  --ink-2: #44444c;
  --muted: #6c6c74;
  --line: #e3e3e7;
  --accent: #b3191c;
  --accent-hover: #951419;
  --accent-soft: #fbecec;
  --chip: #f1f1f3;
  --dark: #1f1f24;
  --dark-2: #2b2b31;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 12px 32px rgba(20, 20, 30, .07);
  --shadow-hover: 0 2px 4px rgba(20, 20, 30, .05), 0 18px 40px rgba(20, 20, 30, .12);

  --container: 1240px;
  --gutter: 16px;
  --bar-h: 60px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --bar-h: 56px; } }

/* ---------- Основа ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.015em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid rgba(179, 25, 28, .45); outline-offset: 2px; border-radius: 6px; }

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

/* Разный текст для телефона и компьютера (граница — 900px) */
@media (max-width: 899px) { .d-only { display: none !important; } }
@media (min-width: 900px) { .m-only { display: none !important; } }

.ico { width: 24px; height: 24px; stroke-width: 1.9; flex: none; }
.ico--xs { width: 16px; height: 16px; stroke-width: 2.2; }
.ico--sm { width: 18px; height: 18px; stroke-width: 2.1; }
.ico--lg { width: 30px; height: 30px; stroke-width: 1.7; }
.ico--xl { width: 38px; height: 38px; stroke-width: 1.6; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font: 700 16px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(179, 25, 28, .22); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--outline { border-color: #c9c9cf; color: var(--ink); background: rgba(255, 255, 255, .75); }
.btn--outline:hover { border-color: var(--ink); background: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--chip); }
.btn--block { width: 100%; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* ---------- Шапка: верхняя строка ---------- */

.topbar { background: var(--surface); }
.topbar__inner { display: flex; align-items: center; gap: 16px; height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__logo { width: 46px; height: 46px; flex: none; }
.brand__name { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.brand__tagline { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; margin-top: 2px; }

.topbar__info, .topbar__phones, .topbar__cta { display: none; }
.topbar__mobile { margin-left: auto; display: flex; gap: 8px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; border: 0; background: var(--chip); color: var(--ink); cursor: pointer;
}
.icon-btn--accent { background: var(--accent); color: #fff; }

@media (min-width: 1100px) {
  .topbar__inner { height: 96px; gap: 28px; }
  .brand__logo { width: 70px; height: 70px; }
  .brand__name { font-size: 24px; }
  .brand__tagline { font-size: 13px; }
  .topbar__mobile { display: none; }

  .topbar__info { display: flex; flex-direction: column; gap: 6px; margin-left: 12px; padding-left: 28px; border-left: 1px solid var(--line); }
  .topbar__line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
  .topbar__line .ico { color: var(--accent); }
  .topbar__line a:hover { color: var(--accent); }

  .topbar__phones { display: flex; align-items: center; gap: 14px; margin-left: auto; }
  .topbar__phones > .ico { color: var(--accent); width: 30px; height: 30px; }
  .topbar__phone { display: block; font-size: 19px; font-weight: 800; line-height: 1.25; white-space: nowrap; }
  .topbar__phone:hover { color: var(--accent); }
  .topbar__hours { display: block; font-size: 13px; color: var(--muted); }
  .topbar__cta { display: inline-flex; }
}

/* ---------- Шапка: полоса меню (липкая) ---------- */

.navbar { position: sticky; top: 0; z-index: 50; background: var(--dark); color: #fff; }
.navbar__inner { display: flex; align-items: center; height: var(--bar-h); }

@media (max-width: 1099px) {
  /* На телефоне меню открывается кнопкой, а липкой делаем строку с логотипом и звонком */
  .navbar { display: none; }
  .topbar { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--line); }
}

@media (min-width: 1100px) {
  .nav { display: block; height: 100%; }
  .nav__list { display: flex; height: 100%; }
  .nav__item { height: 100%; }
  .nav__link {
    display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 18px;
    font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .88);
    background: none; border: 0; cursor: pointer; position: relative;
  }
  .nav__link::after {
    content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--accent); transform: scaleX(0); transition: transform .2s;
  }
  .nav__item:first-child .nav__link { padding-left: 0; }
  .nav__item:first-child .nav__link::after { left: 0; }
  .nav__link:hover, .nav__item:focus-within > .nav__link, .nav__item.is-open > .nav__link { color: #fff; }
  .nav__item:hover > .nav__link::after, .nav__item:focus-within > .nav__link::after, .nav__item.is-open > .nav__link::after { transform: scaleX(1); }
  .nav__link .ico { width: 16px; height: 16px; opacity: .7; transition: transform .2s; }
  .nav__item:hover > .nav__link .ico, .nav__item.is-open > .nav__link .ico { transform: rotate(180deg); }

  .navbar__right { display: flex; align-items: center; gap: 16px; margin-left: auto; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
  .navbar.is-stuck .navbar__right { opacity: 1; visibility: visible; }
  .navbar__phone { font-weight: 800; font-size: 17px; white-space: nowrap; }
  .navbar__phone:hover { color: #ffd2d3; }
}

/* ---------- Мега-меню ---------- */

.mega { display: none; }

@media (min-width: 1100px) {
  .mega {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; color: var(--ink); box-shadow: 0 24px 48px rgba(20, 20, 30, .16);
    border-top: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility .18s;
  }
  .nav__item:hover > .mega, .nav__item:focus-within > .mega, .nav__item.is-open > .mega { opacity: 1; visibility: visible; transform: none; }
  .mega__inner { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding-top: 28px; padding-bottom: 32px; }
  .mega__inner--wide { grid-template-columns: 1fr; }
  .mega__label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
  .mega__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; }
  .mega__grid--3 { grid-template-columns: repeat(3, 1fr); }
  .mega__grid--4 { grid-template-columns: repeat(4, 1fr); }

  .mega__item { display: flex; align-items: flex-start; gap: 14px; padding: 12px; border-radius: 12px; transition: background .15s; }
  .mega__item:hover { background: var(--chip); }
  .mega__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
  .mega__title { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; }
  .mega__item:hover .mega__title { color: var(--accent); }
  .mega__desc { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

  .mega__group-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
  .mega__group-title .ico { color: var(--accent); }
  .mega__links a { display: block; padding: 6px 0; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--chip); }
  .mega__links a:hover { color: var(--accent); }

  .mega__side { border-radius: var(--radius); background: var(--bg); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
  .mega__side-title { font-weight: 800; font-size: 18px; line-height: 1.25; }
  .mega__side-text { font-size: 14px; color: var(--muted); }
  .mega__side-phone { font-size: 21px; font-weight: 800; margin-top: 4px; }
  .mega__side-phone:hover { color: var(--accent); }
  .mega__side .btn { margin-top: 6px; }
}

/* ---------- Мобильное меню ---------- */

.mnav {
  position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end;
  background: rgba(20, 20, 25, .4); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.mnav.is-open { opacity: 1; visibility: visible; }
.mnav__panel {
  width: min(420px, 100%); height: 100%; overflow-y: auto; background: #fff;
  padding: 16px var(--gutter) 32px; transform: translateX(24px); transition: transform .25s;
  display: flex; flex-direction: column;
}
.mnav.is-open .mnav__panel { transform: none; }
.mnav__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mnav__group { border-bottom: 1px solid var(--line); }
.mnav__toggle, .mnav__link {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 16px 4px; background: none; border: 0; font: 700 18px/1.2 var(--font); color: var(--ink); cursor: pointer;
}
.mnav__toggle .ico { transition: transform .2s; }
.mnav__toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
.mnav__sub { display: none; padding: 0 0 12px; }
.mnav__sub.is-open { display: block; }
.mnav__sub a { display: block; padding: 9px 4px; font-size: 16px; color: var(--ink-2); }
.mnav__contacts { margin-top: 20px; display: grid; gap: 10px; }
.mnav__phone { font-size: 22px; font-weight: 800; }
.mnav__note { color: var(--muted); font-size: 14px; }
body.no-scroll { overflow: hidden; }

/* ---------- Первый экран ---------- */

.hero { position: relative; overflow: hidden; }
.hero__media { position: relative; height: 210px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 28%; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(244, 244, 245, 0) 40%, var(--bg) 100%); }
.hero__content { position: relative; padding: 0 0 24px; }
.hero__title {
  position: relative; font-size: clamp(30px, 7vw, 56px); font-weight: 800; line-height: 1.07; letter-spacing: -.025em;
  padding-left: 16px; margin-bottom: 14px;
}
.hero__title::before { content: ""; position: absolute; left: 0; top: .1em; bottom: .1em; width: 4px; border-radius: 2px; background: var(--accent); }
.hero__points { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hero__points li { display: flex; align-items: center; gap: 7px; }
.hero__points .ico { color: var(--accent); }

@media (min-width: 560px) {
  .hero__media { height: 300px; }
}

@media (min-width: 900px) {
  .hero { min-height: 500px; display: flex; align-items: center; }
  .hero__media { position: absolute; inset: 0; height: auto; }
  .hero__media img { object-position: 70% 32%; }
  .hero__media::after {
    background:
      linear-gradient(90deg, rgba(244, 244, 245, .97) 0%, rgba(244, 244, 245, .9) 36%, rgba(244, 244, 245, .3) 58%, rgba(244, 244, 245, 0) 72%),
      linear-gradient(180deg, rgba(244, 244, 245, 0) 72%, var(--bg) 100%);
  }
  .hero__content { padding: 52px 0 112px; max-width: 700px; }
  .hero__title { padding-left: 26px; margin-left: -26px; margin-bottom: 26px; }
  .hero__title::before { width: 5px; }
  .hero__points { gap: 12px 26px; font-size: 17px; color: var(--ink); }
  .hero__points li { gap: 9px; }
  .hero__points .ico { width: 22px; height: 22px; }
}
/* Три пункта первого экрана — в одну строку (могут быть чуть шире заголовка) */
@media (min-width: 1200px) { .hero__points { flex-wrap: nowrap; white-space: nowrap; width: max-content; } }

/* ---------- Быстрые плитки (4) ---------- */

.quick { position: relative; z-index: 2; }
.quick__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qtile {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 118px;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.qtile:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.qtile__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.qtile__title { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; }
.qtile__desc { display: none; }
.qtile--accent { background: var(--accent); color: #fff; }
.qtile--accent .qtile__icon { background: rgba(255, 255, 255, .16); color: #fff; }
.qtile--accent:hover { background: var(--accent-hover); }

@media (min-width: 900px) {
  .quick { margin-top: -84px; }
  .quick__grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .qtile { flex-direction: row; align-items: center; gap: 16px; padding: 20px; min-height: 104px; }
  .qtile__icon { width: 56px; height: 56px; border-radius: 50%; }
  .qtile__title { font-size: 16px; }
  .qtile__desc { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 3px; line-height: 1.35; }
  .qtile--accent .qtile__desc { color: rgba(255, 255, 255, .8); }
}

/* ---------- Секции ---------- */

.section { padding: 44px 0; }
.section--white { background: var(--surface); }
.section--tight { padding-top: 32px; }
/* Продолжение предыдущего белого блока: без верхнего отступа, через линию */
.section--join { padding-top: 0; }
.section:has(+ .section--join) { padding-bottom: 36px; }
.section--join > .container > :first-child { border-top: 1px solid var(--line); padding-top: 28px; }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.section__eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 1px; }
.section__title { font-size: clamp(24px, 4.2vw, 34px); }
.section__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); }

@media (min-width: 900px) { .section { padding: 64px 0; } .section__head { margin-bottom: 28px; } }

/* ---------- Услуги (компактные плитки) ---------- */

.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stile {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px;
  background: var(--surface); border-radius: 14px; border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.stile:hover { border-color: transparent; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stile__icon { color: var(--accent); }
.stile__title { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; }
.stile__desc { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 3px; }
.stile__arrow { display: none; }

@media (min-width: 900px) {
  .services { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .stile { flex-direction: row; align-items: center; gap: 14px; padding: 18px 18px 18px 16px; }
  .stile__icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); }
  .stile__title { font-size: 16px; }
  .stile__arrow { display: block; margin-left: auto; color: #b7b7bf; transition: color .2s, transform .2s; }
  .stile:hover .stile__arrow { color: var(--accent); transform: translateX(2px); }
}

/* ---------- Вкладки ---------- */

.tabs__list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); font: 700 15px/1 var(--font); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.tabs__tab:hover { border-color: #c9c9cf; color: var(--ink); }
.tabs__tab[aria-selected="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.tabs__tab .ico { width: 18px; height: 18px; }
.tabs__panel[hidden] { display: none; }

/* ---------- Что делать (по ситуации) ---------- */

.help { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.help > * { min-width: 0; } /* иначе прокручиваемая строка вкладок распирает колонку шире экрана */
.help__steps { display: grid; gap: 10px; counter-reset: s; }
.hstep { display: flex; gap: 14px; padding: 16px 18px; background: var(--bg); border-radius: 14px; }
.hstep__num { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 15px; }
.hstep__title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.hstep__text { font-size: 14px; color: var(--muted); margin-top: 2px; }
.hstep__hint { font-size: 13px; color: var(--ink-2); margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d6d6db; }
.hstep__hint a { color: var(--accent); font-weight: 700; white-space: nowrap; }
.hstep__hint a:hover { text-decoration: underline; }
.help__links { display: grid; gap: 2px; margin-top: 16px; }
.help__links a {
  display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 15px; color: var(--ink-2);
}
.help__links a::after { content: "→"; margin-left: auto; color: #b7b7bf; transition: transform .2s, color .2s; }
.help__links a:hover { color: var(--accent); }
.help__links a:hover::after { color: var(--accent); transform: translateX(3px); }
.help__links .ico { color: var(--accent); }
@media (min-width: 900px) { .help__links { grid-template-columns: repeat(2, 1fr); column-gap: 28px; margin-top: 20px; } }

.help__aside { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--radius); background: var(--dark); color: #fff; }
.help__aside-title { font-size: 20px; font-weight: 800; line-height: 1.25; }
.help__aside-text { color: rgba(255, 255, 255, .72); font-size: 15px; }
.help__aside-phone { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.help__aside-phone .ico { color: #ff6b6e; }
.help__aside-phone:hover { color: #ffd2d3; }
.help__warn { display: flex; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: rgba(255, 255, 255, .72); }
.help__warn .ico { color: #ff6b6e; }

@media (min-width: 900px) {
  .help { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
  .help__steps { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .hstep { flex-direction: column; padding: 20px; min-height: 100%; }
}

/* ---------- Доверие ---------- */

.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
.trust__item { display: flex; gap: 12px; align-items: flex-start; }
.trust__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); color: var(--accent); border: 1px solid var(--line); }
.trust__title { font-weight: 800; font-size: 15px; line-height: 1.25; }
.trust__text { font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

@media (min-width: 900px) { .trust { grid-template-columns: repeat(5, 1fr); gap: 20px; } }

/* ---------- Товары (лента) ---------- */

.goods { display: grid; grid-auto-flow: column; grid-auto-columns: 140px; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gtile {
  scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 18px 10px 16px; background: var(--surface); border-radius: 14px; border: 1px solid var(--line);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.gtile:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: transparent; }
.gtile__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--chip); color: var(--accent); }
.gtile__title { font-weight: 700; font-size: 15px; line-height: 1.25; }

@media (min-width: 900px) { .goods { grid-auto-flow: row; grid-template-columns: repeat(7, 1fr); grid-auto-columns: auto; overflow: visible; gap: 14px; } }

/* ---------- Контакты ---------- */

.contacts { display: grid; gap: 14px; }
.callcard { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--radius); background: var(--dark); color: #fff; position: relative; overflow: hidden; }
.callcard::after { content: ""; position: absolute; right: -80px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(179, 25, 28, .5), rgba(179, 25, 28, 0) 70%); }
.callcard__title { position: relative; font-size: 22px; font-weight: 800; }
.callcard__text { position: relative; color: rgba(255, 255, 255, .72); font-size: 15px; }
.callcard__phone { position: relative; display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; }
.callcard__phone .ico { color: #ff6b6e; }
.callcard__phone:hover { color: #ffd2d3; }

.offices { display: grid; gap: 10px; }
.office { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface); border-radius: 14px; border: 1px solid var(--line); }
.office__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.office__address { font-weight: 800; font-size: 17px; line-height: 1.25; }
.office__city { font-size: 13px; color: var(--muted); }
.office__route { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--accent); white-space: nowrap; }

@media (min-width: 900px) {
  .contacts { grid-template-columns: 380px 1fr; gap: 20px; }
  .callcard { padding: 32px; }
  .offices { grid-template-columns: 1fr; align-content: start; }
}

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

.footer { background: var(--dark); color: rgba(255, 255, 255, .72); padding: 40px 0 calc(24px + 80px); font-size: 15px; }
.footer__grid { display: grid; gap: 28px; }
.footer__brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.footer__brand img { width: 52px; height: 52px; }
.footer__name { font-size: 20px; font-weight: 800; }
.footer__about { margin-top: 12px; max-width: 320px; font-size: 14px; }
.footer__title { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.footer__list li { margin-bottom: 7px; }
.footer__list a:hover { color: #fff; }
.footer__phone { display: block; color: #fff; font-size: 18px; font-weight: 800; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: rgba(255, 255, 255, .5); }
.footer__bottom a:hover { color: #fff; }

@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
@media (min-width: 1100px) { .footer { padding-bottom: 24px; } .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1.1fr; gap: 32px; } }

/* ---------- Нижняя панель звонка (телефон) ---------- */

.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); box-shadow: 0 -6px 24px rgba(20, 20, 30, .1);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.callbar .btn { min-height: 54px; font-size: 17px; }
.callbar__sub { display: block; font-size: 12px; font-weight: 500; opacity: .85; margin-top: 3px; }
@media (min-width: 1100px) { .callbar { display: none; } }

/* ---------- О компании (текст на главной) ---------- */

.about { display: grid; gap: 20px; }
.about__text { max-width: 820px; }
@media (min-width: 900px) { .about { grid-template-columns: 280px minmax(0, 1fr); gap: 48px; } }

/* ---------- Внутренняя страница ---------- */

.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 0 22px; }
.page-head__title { font-size: clamp(26px, 4.6vw, 40px); font-weight: 800; letter-spacing: -.02em; margin-top: 10px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs__sep { color: #c3c3ca; }
.crumbs [aria-current] { color: var(--ink-2); }

.page { padding: 28px 0 48px; }
.page__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.page__main { min-width: 0; background: var(--surface); border-radius: var(--radius); padding: 22px 18px; }
.page__aside { display: flex; flex-direction: column; gap: 16px; }

@media (min-width: 1100px) {
  .page { padding: 36px 0 64px; }
  .page__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
  .page__main { padding: 36px 40px; }
  .page__aside { position: sticky; top: calc(var(--bar-h) + 20px); }
}

/* Текст страниц из админки (абзацы, заголовки, списки, таблицы, галереи) */
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: 24px; color: var(--ink); margin-top: 32px; }
.prose h3 { font-size: 20px; color: var(--ink); margin-top: 26px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { text-decoration: none; }
.prose strong, .prose b { color: var(--ink); }
.prose ul, .prose ol { padding-left: 4px; }
.prose ul li { position: relative; padding-left: 22px; margin-top: 6px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose ol { list-style: decimal; padding-left: 24px; }
.prose ol li { margin-top: 6px; }
.prose img { border-radius: 12px; display: inline-block; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose tr:nth-child(odd) td { background: #fafafb; }
.prose th { background: var(--chip); color: var(--ink); }
.prose pre { white-space: pre-wrap; font: inherit; background: none; padding: 0; margin: 0; }

/* Подсказка «позвоните нам» внутри текста страницы: <p class="call-hint"> */
.prose .call-hint {
  padding: 12px 16px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0;
  background: var(--accent-soft); color: var(--ink); font-size: 16px;
}
.prose .call-hint a { font-weight: 700; white-space: nowrap; text-decoration: none; }
.prose .call-hint a:hover { text-decoration: underline; }

/* Галереи товаров (компонент Gallery) */
.prose ul.galleries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0; margin-top: 16px; }
.prose ul.galleries li { padding: 0; margin: 0; }
.prose ul.galleries li::before { display: none; }
.prose ul.galleries a { display: block; border-radius: 12px; overflow: hidden; background: var(--chip); }
.prose ul.galleries img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0; transition: transform .3s; }
.prose ul.galleries a:hover img { transform: scale(1.04); }
.prose .imghover_gallery { display: none; }
.prose .clear { clear: both; }
@media (min-width: 640px) { .prose ul.galleries { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .prose ul.galleries { grid-template-columns: repeat(4, 1fr); gap: 12px; } }

/* Плитки товаров старой страницы каталога */
.prose .catalog { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; width: calc(50% - 8px); margin: 0 4px 12px; text-align: center; vertical-align: top; }
.prose .catalog a { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; }
.prose .catalog img { margin: 0 auto 6px; max-height: 150px; width: auto; }
@media (min-width: 900px) { .prose .catalog { width: calc(33.33% - 12px); } }
/* Где браузер умеет :has — раскладываем плитки сеткой (пробелы между ними в тексте не мешают) */
.prose:has(> .catalog) { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
.prose:has(> .catalog) > * + * { margin-top: 0; }
.prose:has(> .catalog) > .catalog { width: auto; margin: 0; display: flex; }
@media (min-width: 900px) { .prose:has(> .catalog) { grid-template-columns: repeat(3, 1fr); } }

/* Дочерние страницы раздела */
.ctiles { display: grid; gap: 10px; margin-top: 20px; }
.ctile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px;
  border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; text-decoration: none !important;
  transition: border-color .2s, box-shadow .2s;
}
.ctile:hover { border-color: transparent; box-shadow: var(--shadow-hover); color: var(--accent); }
.ctile .ico { color: var(--accent); }
@media (min-width: 640px) { .ctiles { grid-template-columns: repeat(2, 1fr); } }

/* Боковое меню раздела */
.snav { background: var(--surface); border-radius: var(--radius); padding: 18px; }
.snav__title { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.snav__list a { display: block; padding: 9px 10px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.snav__list a:hover { background: var(--chip); color: var(--accent); }
.snav__list a.is-active { background: var(--accent-soft); color: var(--accent); }

.callcard--aside { padding: 22px; }
.callcard--aside .callcard__title { font-size: 19px; }
.callcard--aside .callcard__phone { font-size: 21px; }
.callcard--aside .btn { position: relative; margin-top: 4px; }

/* ---------- Телефон: меньше дублей телефона (звонок — нижняя кнопка «Вызвать агента») ---------- */

@media (max-width: 899px) {
  /* Плитка «Вызвать агента бесплатно» на телефоне — светлая, как соседние */
  .qtile--accent, .qtile--accent:hover { background: var(--surface); color: var(--ink); }
  .qtile--accent .qtile__icon { background: var(--accent-soft); color: var(--accent); }
  .help__aside { display: none; }
  #contacts .callcard, .page__aside .callcard--aside { display: none; }
}

/* Шапка ПК: «Мемориал НН» и адреса — в одну строку */
@media (min-width: 1100px) {
  .brand__name { white-space: nowrap; }
  .topbar__inner { gap: 20px; }
  .topbar__info { margin-left: 4px; padding-left: 20px; }
  .topbar__line { white-space: nowrap; }
}
@media (min-width: 1100px) and (max-width: 1299px) {
  .topbar__hours { display: none; }
  .topbar__info .topbar__line:last-child { display: none; }
}

.brand__suffix { display: inline; }
.topbar__search { display: none; }
@media (min-width: 1100px) {
  .brand__suffix { display: none; }
  .topbar__search { display: inline-flex; margin-left: -8px; }
}

/* ---------- Поиск по сайту ---------- */

.search { position: fixed; inset: 0; z-index: 70; background: rgba(20, 20, 25, .45); }
.search[hidden] { display: none; }
.search__panel { background: #fff; box-shadow: 0 20px 48px rgba(20, 20, 30, .2); padding: 14px 0 18px; max-height: 100%; overflow-y: auto; }
.search__form { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 14px; padding: 4px 4px 4px 14px; transition: border-color .15s; }
.search__form:focus-within { border-color: var(--accent); }
.search__icon { color: var(--muted); }
.search__input { flex: 1; min-width: 0; border: 0; outline: 0; font: 600 17px/1.2 var(--font); color: var(--ink); padding: 10px 0; background: none; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.search__chips button {
  border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 7px 14px;
  font: 600 14px/1 var(--font); color: var(--ink-2); cursor: pointer;
}
.search__chips button:hover { border-color: var(--accent); color: var(--accent); }
.search__results { margin-top: 12px; display: grid; gap: 4px; }
.search__results:empty { display: none; }
.search__result a {
  display: flex; align-items: center; gap: 14px; padding: 12px 12px; border-radius: 12px; color: var(--ink);
}
.search__result a:hover, .search__result[aria-selected="true"] a { background: var(--accent-soft); }
.search__result-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--chip); color: var(--accent); }
.search__result-title { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; }
.search__result-title mark { background: none; color: var(--accent); }
.search__result-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.search__result .ico--arrow { margin-left: auto; color: #b7b7bf; }
.search__more { margin-top: 6px; padding: 10px 12px; font-size: 14px; }
.search__more a, .search__all { color: var(--accent); font-weight: 700; }
.search__empty { margin-top: 14px; padding: 16px; border-radius: 12px; background: var(--bg); font-size: 15px; color: var(--ink-2); display: grid; gap: 6px; }
.search__empty[hidden] { display: none; }
.search__empty a { color: var(--accent); font-weight: 700; }
body.search-open { overflow: hidden; }
@media (min-width: 900px) {
  .search__panel { padding: 24px 0 28px; }
  .search .container { max-width: 820px; }
  .search__input { font-size: 19px; }
}

/* ---------- Страница результатов поиска (SimpleSearch) ---------- */

.prose .simplesearch-search-form fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.prose .simplesearch-search-form label { display: none; }
.prose .simplesearch-search-form input[type="text"] {
  flex: 1; min-width: 200px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; font: 600 16px var(--font); color: var(--ink);
}
.prose .simplesearch-search-form input[type="text"]:focus { outline: 0; border-color: var(--accent); }
.prose .simplesearch-search-form input[type="submit"] {
  border: 0; border-radius: 12px; padding: 0 22px; min-height: 48px; background: var(--accent); color: #fff; font: 700 16px var(--font); cursor: pointer;
}
.prose .simplesearch-results { font-weight: 700; color: var(--ink); }
.prose .simplesearch-result { padding: 14px 0; border-bottom: 1px solid var(--line); }
.prose .simplesearch-result h3 { font-size: 18px; margin: 0; }
.prose .simplesearch-result h3 a { text-decoration: none; }
.prose .simplesearch-result .extract p { font-size: 15px; color: var(--muted); margin-top: 4px; }
.prose .simplesearch-paging { font-size: 14px; color: var(--muted); }
.prose .simplesearch-page a, .prose .simplesearch-current-page { display: inline-block; padding: 2px 8px; }

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