/* Главная Xamar — макет «новый 25» */

body.site-body,
body.home-body {
  /* Literals only — self-referential var(--x, …) invalidates the custom property
     and breaks base.css `.btn-primary { background: var(--home-primary) }` (white text, no fill). */
  --home-primary: #2d3e50;
  --home-primary-deep: #1f2d3d;
  --home-primary-hover: #253545;
  --home-primary-light: #e8eef4;
  --home-primary-soft: #d4dde6;
  --home-accent: #5c7a64;
  --home-accent-deep: #4a6351;
  --home-accent-light: #e7efe9;
  --home-bg: #f4f6f8;
  --home-surface: #ffffff;
  --home-text: #212529;
  --home-text-secondary: #5f6b75;
  --home-text-muted: #8a949b;
  --home-border: #e2e6ea;
  --home-shadow-sm: 0 1px 2px 0 rgba(33, 37, 41, 0.04);
  --home-shadow: 0 4px 20px -2px rgba(33, 37, 41, 0.06);
  --home-shadow-lg: 0 20px 40px -8px rgba(33, 37, 41, 0.08);
  --home-radius: 16px;
  --home-radius-sm: 12px;
  --color-background: var(--home-bg);
  --color-text: var(--home-text);
  --color-border: var(--home-border);
  --color-primary: var(--home-primary);
  --color-primary-deep: var(--home-primary-deep);
  --color-primary-light: var(--home-primary-light);
  background: var(--home-bg);
  color: var(--home-text);
  min-height: 100vh;
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (min-width: 768px) {
  body.site-body,
  body.home-body {
    padding-bottom: 0;
  }
}

body.site-body > .site-footer,
body.home-body > .site-footer,
body.site-body > footer,
body.home-body > footer {
  margin-top: 0;
  background: var(--home-surface);
}

/* Верхняя служебная полоска */
.home-utility-bar {
  background: var(--home-bg);
  border-bottom: 1px solid var(--home-border);
  font-size: 0.8125rem;
}

.home-utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  min-height: 2.25rem;
}

.home-utility-bar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.home-utility-bar__links a {
  color: var(--home-text-secondary, #5f6b75);
  text-decoration: none;
  border-radius: 0.375rem;
  transition:
    color var(--motion-fast, 150ms) var(--ease-out, ease),
    background var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-utility-bar__links a:hover {
  color: var(--home-primary);
}

.home-utility-bar__links a:active {
  color: var(--home-primary-deep, #1f2d3d);
}

.home-utility-bar__links a:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
  color: var(--home-primary, #2d3e50);
}

.home-utility-bar__account {
  gap: 0.5rem 0.75rem;
}

.home-utility-bar__user {
  color: var(--home-text-secondary, #5f6b75);
}

.home-utility-bar__cabinet {
  color: var(--home-text-secondary, #5f6b75);
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-utility-bar__cabinet:hover {
  color: var(--color-primary, var(--home-primary));
}

.home-cabinet-menu {
  position: relative;
  display: block;
}

.home-cabinet-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--home-border);
  border-radius: 100px;
  background: var(--home-surface);
  color: var(--home-text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color var(--motion-fast, 150ms) var(--ease-out, ease),
    color var(--motion-fast, 150ms) var(--ease-out, ease),
    background var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cabinet-menu__toggle:hover,
.home-cabinet-menu__toggle[aria-expanded="true"] {
  border-color: var(--home-primary-soft, #d4dde6);
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary);
}

.home-cabinet-menu__toggle:active {
  background: var(--home-primary-soft, #d4dde6);
}

.home-cabinet-menu__toggle:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
}

.home-cabinet-menu__chevron {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform var(--motion-base, 200ms) var(--ease-out, ease);
}

.home-cabinet-menu__toggle[aria-expanded="true"] .home-cabinet-menu__chevron {
  transform: rotate(180deg);
}

.home-cabinet-menu__dropdown {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 160;
  min-width: 12.5rem;
  padding: 0.35rem;
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: 0.75rem;
  box-shadow: var(--home-shadow-lg);
}

.home-cabinet-menu__dropdown[hidden] {
  display: none;
}

.home-cabinet-menu__user {
  padding: 0.375rem 0.625rem 0.3125rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--home-text-muted, #8a949b);
  border-bottom: 1px solid var(--home-border);
  margin-bottom: 0.125rem;
}

.home-cabinet-menu__logout {
  margin: 0;
}

.home-cabinet-menu__logout .home-cabinet-menu__link {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.home-cabinet-menu__link {
  display: block;
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--home-text, #212529);
  text-decoration: none;
  transition:
    background var(--motion-fast, 150ms) var(--ease-out, ease),
    color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cabinet-menu__link:hover {
  background: var(--home-bg);
  color: var(--home-text, #212529);
}

.home-cabinet-menu__link:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: -2px;
}

.home-cabinet-menu__link--primary {
  color: var(--home-primary, #2d3e50);
  font-weight: 600;
  background: var(--home-primary-light, #e8eef4);
}

.home-cabinet-menu__link--primary:hover {
  background: var(--home-primary-soft, #d4dde6);
}

.home-cabinet-menu__link--muted {
  color: var(--home-text-muted, #8a949b);
  border-top: 1px solid var(--home-border);
  margin-top: 0.2rem;
  padding-top: 0.5rem;
}

.home-cabinet-menu__balance {
  color: var(--home-primary-deep, #1f2d3d) !important;
  font-weight: 600 !important;
  background: var(--home-primary-light, #e8eef4);
  margin-bottom: 0.15rem;
}

.home-cabinet-menu__balance:hover {
  background: var(--home-primary-soft, #d4dde6);
  color: var(--home-primary-deep, #1f2d3d) !important;
}

/* Sticky-обёртка шапки — спокойный белый фон */
.home-sticky-head {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--home-surface, #ffffff);
  box-shadow: 0 1px 0 var(--home-border, #e2e6ea);
  transition: box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  isolation: isolate;
}

.home-sticky-head.is-scrolled {
  box-shadow:
    0 1px 0 var(--home-border, #e2e6ea),
    0 10px 28px -16px rgba(45, 62, 80, 0.28);
}

.home-sticky-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--home-surface, #ffffff);
  pointer-events: none;
}

.home-sticky-head .home-utility-bar {
  background: var(--home-surface, #ffffff);
}

.home-sticky-head .home-top-bar {
  background: var(--home-surface, #ffffff);
}

/* Шапка */
.home-top-bar {
  position: relative;
  z-index: 1;
  background: var(--home-surface, #ffffff);
  border-bottom: 1px solid var(--home-border, #e2e6ea);
}

.home-top-bar__inner {
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 0.875rem 1rem;
  max-width: 80rem;
  margin: 0 auto;
}

.home-top-bar__inner--no-search .home-city-chip {
  margin-left: auto;
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.18s ease;
}

.home-logo:hover {
  opacity: 0.88;
}

.home-logo:active {
  opacity: 0.76;
}

.home-logo__img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  object-fit: contain;
}

.home-logo__text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--home-text, #212529);
  letter-spacing: -0.02em;
}

.home-logo__accent {
  font-weight: 600;
  color: var(--home-primary, #2d3e50);
}

.home-all-cats-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--home-surface, #ffffff);
  color: var(--home-text, #212529);
  border: 1px solid var(--home-border, #e2e6ea);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--motion-fast, 150ms) var(--ease-out, ease),
    border-color var(--motion-fast, 150ms) var(--ease-out, ease),
    color var(--motion-fast, 150ms) var(--ease-out, ease),
    box-shadow var(--motion-fast, 150ms) var(--ease-out, ease);
  flex-shrink: 0;
}

.home-all-cats-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--home-text-muted, #8a949b);
  transition: color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-all-cats-btn:hover {
  background: var(--home-primary-light, #e8eef4);
  border-color: var(--home-primary-soft, #d4dde6);
  color: var(--home-primary, #2d3e50);
}

.home-all-cats-btn:hover svg {
  color: var(--home-primary, #2d3e50);
}

.home-all-cats-btn:active {
  background: var(--home-primary-soft, #d4dde6);
}

.home-all-cats-btn:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
}

.home-all-cats-btn[aria-expanded="true"] {
  background: var(--home-primary, #2d3e50);
  border-color: var(--home-primary, #2d3e50);
  color: #fff;
  box-shadow: 0 6px 16px -10px rgba(45, 62, 80, 0.55);
}

.home-all-cats-btn[aria-expanded="true"] svg {
  color: #fff;
}

.home-search {
  position: relative;
  flex: 1;
  max-width: 35rem;
  min-width: 0;
}

.home-search__icon {
  position: absolute;
  left: 1.125rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--home-text-muted, #8a949b);
  pointer-events: none;
  z-index: 1;
}

.home-search__input {
  width: 100%;
  padding: 0.75rem 6.5rem 0.75rem 3rem;
  border: 1px solid var(--home-border, #e2e6ea);
  border-radius: 100px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--home-text, #212529);
  background: var(--home-surface, #ffffff);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-search__input:focus {
  outline: none;
  border-color: var(--home-primary-soft, #d4dde6);
  box-shadow: var(--home-focus-ring, 0 0 0 3px rgba(45, 62, 80, 0.14));
}

.home-search__submit {
  position: absolute;
  right: 0.375rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--home-primary-deep, #1f2d3d);
  border-radius: 100px;
  background: var(--home-primary, #2d3e50);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.home-search__submit:hover {
  background: var(--home-primary-deep, #1f2d3d);
  transform: translateY(-50%);
}

.home-search__submit:active {
  background: var(--home-primary-deep, #1f2d3d);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.16);
  transform: translateY(-50%);
}

.home-city-chip {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--home-radius-sm, 12px);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--home-text, #212529);
  transition: background 0.15s ease;
  flex-shrink: 0;
  max-width: 10rem;
}

.home-city-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-city-chip:hover {
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary, #2d3e50);
}

.home-city-chip:active {
  background: var(--home-primary-soft, #d4dde6);
}

.home-city-chip__icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: var(--home-text-muted, #8a949b);
}

.home-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.home-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--home-tap-min, 2.75rem);
  height: var(--home-tap-min, 2.75rem);
  min-width: var(--home-tap-min, 2.75rem);
  min-height: var(--home-tap-min, 2.75rem);
  color: var(--home-text-muted, #8a949b);
  text-decoration: none;
  border-radius: 50%;
  transition: background 0.18s ease, color 0.18s ease;
}

.home-icon-btn__badge {
  position: absolute;
  top: 0.15rem;
  right: 0.1rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 9999px;
  background: #b94a4a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  border: 2px solid #fff;
  pointer-events: none;
}

.home-icon-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.home-icon-btn:hover {
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary, #2d3e50);
}

.home-icon-btn:active {
  background: var(--home-primary-soft, #d4dde6);
  color: var(--home-primary-deep, #1f2d3d);
}

.home-post-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  background: var(--home-primary, #2d3e50);
  color: #fff;
  border: 1px solid var(--home-primary-deep, #1f2d3d);
  box-shadow:
    0 1px 2px rgba(33, 37, 41, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition:
    background 0.18s ease,
    box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.18s ease;
}

.home-post-btn:hover {
  background: var(--home-primary-deep, #1f2d3d);
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px -4px rgba(45, 62, 80, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.home-post-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 1px rgba(33, 37, 41, 0.12);
}

/* Сетка категорий */
.home-cats-section {
  background: var(--home-bg);
  padding: 2rem 0;
}

.home-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 0.9fr));
  gap: 0.6rem;
}

.home-cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.625rem;
  padding: 0.5rem 0.25rem;
  background: #f0f0f0;
  border: none;
  border-radius: 20px;
  text-decoration: none;
  text-align: center;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-cat-tile::before {
  display: none;
}

.home-cat-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--home-shadow-sm, 0 1px 2px 0 rgba(33, 37, 41, 0.04));
}

.home-cat-tile:active {
  transform: translateY(0);
}

.home-cat-tile__icon {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 0;
}

.home-cat-tile__img {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  object-fit: contain;
}

.home-cat-tile__emoji {
  font-size: 3rem;
  line-height: 1;
}

.home-cat-tile__name {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--home-text);
  line-height: 1.3;
}

/* Манифест «Местные» */
.locals-manifesto {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.locals-manifesto.is-hidden {
  display: none;
}

.locals-manifesto__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.45);
}

.locals-manifesto__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(45, 62, 80, 0.08), transparent 50%),
    linear-gradient(180deg, #fffaf7 0%, #fff 70%);
  border: 1px solid var(--home-border, #e2e6ea);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.locals-manifesto__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  color: #555;
}

.locals-manifesto__close svg {
  width: 1rem;
  height: 1rem;
}

.locals-manifesto__close:hover {
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary-deep, #1f2d3d);
}

.locals-manifesto__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.locals-manifesto__logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.85rem;
  object-fit: cover;
  flex-shrink: 0;
}

.locals-manifesto__brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--home-text, #212529);
  letter-spacing: -0.02em;
}

.locals-manifesto__brand-accent {
  color: var(--home-primary, #2d3e50);
}

.locals-manifesto__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--home-text-muted, #8a949b);
}

.locals-manifesto__title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--home-text, #212529);
}

.locals-manifesto__text {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--home-text-secondary, #5f6b75);
}

.locals-manifesto__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.locals-manifesto__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.85rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.locals-manifesto__btn--primary {
  background: var(--home-primary, #2d3e50);
  color: #fff;
}

.locals-manifesto__btn--primary:hover {
  background: var(--home-primary-deep, #1f2d3d);
}

.locals-manifesto__btn--ghost {
  background: #fff;
  color: var(--home-text, #212529);
  border: 1px solid var(--home-border, #e2e6ea);
}

.locals-manifesto__btn--ghost:hover {
  background: var(--home-primary-light, #e8eef4);
}

body.locals-manifesto-open {
  overflow: hidden;
}

/* Модальное окно города */
.home-city-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 1rem;
}

.home-city-modal.is-hidden {
  display: none;
}

.home-city-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.35);
}

.home-city-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: min(70vh, 32rem);
  overflow: auto;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--home-border);
}

.home-city-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--home-border);
  position: sticky;
  top: 0;
  background: #fff;
}

.home-city-modal__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--home-text);
}

.home-city-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--home-tap-min, 2.75rem);
  height: var(--home-tap-min, 2.75rem);
  min-width: var(--home-tap-min, 2.75rem);
  min-height: var(--home-tap-min, 2.75rem);
  border: none;
  background: var(--home-border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--home-text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.home-city-modal__close svg {
  width: 1rem;
  height: 1rem;
}

.home-city-modal__close:hover {
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-text);
}

.home-city-modal__body {
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

body.home-city-modal-open {
  overflow: hidden;
}

@media (min-width: 769px) {
  .home-city-modal {
    justify-content: flex-end;
    padding: 4.5rem 1.5rem 1rem;
  }

  .home-city-modal__panel {
    margin-right: max(0px, calc((100vw - 80rem) / 2));
  }
}

/* Search-first hero — один composition в первом viewport */
.home-hero {
  position: relative;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 1.75rem;
  border-bottom: 1px solid var(--home-border, #e2e6ea);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(45, 62, 80, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, #eef2f5 0%, var(--home-bg, #f4f6f8) 70%);
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(45, 62, 80, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  animation: home-hero-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes home-hero-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero__eyebrow {
  margin: 0 0 0.65rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--home-primary, #2d3e50);
}

.home-hero__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3.8vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--home-text, #212529);
}

.home-hero__lead {
  margin: 0 auto 1.35rem;
  font-size: 1.025rem;
  line-height: 1.5;
  color: var(--home-text-secondary, #5f6b75);
  max-width: 26rem;
}

.home-hero__search {
  display: flex;
  gap: 0.5rem;
  max-width: 36rem;
  margin: 0 auto 1rem;
  padding: 0.4rem;
  background: var(--home-surface, #ffffff);
  border: 1px solid var(--home-border, #e2e6ea);
  border-radius: var(--home-radius, 16px);
  box-shadow: var(--home-shadow, 0 4px 20px -2px rgba(33, 37, 41, 0.06));
  transition: border-color 0.18s ease, box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-hero__search:focus-within {
  border-color: var(--home-primary-soft, #d4dde6);
  box-shadow:
    var(--home-focus-ring, 0 0 0 3px rgba(45, 62, 80, 0.14)),
    var(--home-shadow, 0 4px 20px -2px rgba(33, 37, 41, 0.06));
}

.home-hero__search-input {
  flex: 1 1 auto;
  min-height: var(--home-tap-min, 2.75rem);
  padding: 0 0.9rem;
  border: none;
  background: transparent;
  color: var(--home-text, #212529);
  font-size: 1rem;
  font-family: inherit;
}

.home-hero__search-input:focus {
  outline: none;
  box-shadow: none;
}

.home-hero__search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--home-tap-min, 2.75rem);
  padding: 0 1.25rem;
  border: 1px solid var(--home-primary-deep, #1f2d3d);
  border-radius: var(--home-radius-sm, 12px);
  background: var(--home-primary, #2d3e50);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
}

.home-hero__search-btn:hover {
  background: var(--home-primary-deep, #1f2d3d);
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px -4px rgba(45, 62, 80, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.home-hero__search-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.16);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
}

.home-hero__post-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: 100px;
  background: var(--home-surface, #ffffff);
  border: 1px solid var(--home-border, #e2e6ea);
  color: var(--home-primary, #2d3e50);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s ease;
}

.home-hero__post-btn:hover {
  background: var(--home-primary-light, #e8eef4);
  border-color: var(--home-primary-soft, #d4dde6);
  color: var(--home-primary-deep, #1f2d3d);
  transform: translateY(-1px);
  box-shadow: var(--home-shadow-sm, 0 1px 2px 0 rgba(33, 37, 41, 0.04));
}

.home-hero__post-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.home-hero__post-hint {
  font-size: 0.8125rem;
  color: var(--home-text-muted, #8a949b);
}

.home-lanes {
  padding: 0.85rem 0 0.35rem;
  background: var(--home-bg, #f4f6f8);
}

.home-lanes__inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.home-lane {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.35rem 0.9rem 0.35rem 0.55rem;
  border-radius: 100px;
  border: 1px solid var(--home-border, #e2e6ea);
  background: var(--home-surface, #ffffff);
  text-decoration: none;
  color: var(--home-text-secondary, #5f6b75);
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s ease;
}

.home-lane:hover {
  border-color: var(--home-primary-soft, #d4dde6);
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary, #2d3e50);
  transform: translateY(-1px);
  box-shadow: var(--home-shadow-sm, 0 1px 2px 0 rgba(33, 37, 41, 0.04));
}

.home-lane:active {
  transform: translateY(1px);
  box-shadow: none;
}

.home-lane__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--home-text-muted, #8a949b);
  transition: color 0.18s ease;
}

.home-lane:hover .home-lane__icon {
  color: var(--home-primary, #2d3e50);
}

.home-lane__label {
  white-space: nowrap;
}

/* Контент */
.home-page {
  background: var(--home-bg);
  padding: 0 0 3rem;
}

@media (min-width: 768px) {
  .home-page {
    padding-bottom: 3rem;
  }
}

.home-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.home-location-banner {
  background: var(--home-primary-light, #e8eef4);
  border: 1px solid var(--home-primary-soft, #d4dde6);
  border-radius: var(--home-radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.home-location-banner.is-hidden {
  display: none;
}

.home-location-banner__text {
  font-size: 0.875rem;
  margin: 0;
}

.home-location-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-btn-small {
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  background: #fff;
  border: 1px solid var(--home-border);
  cursor: pointer;
  text-decoration: none;
  color: var(--home-text);
}

.home-btn-small--primary {
  background: var(--home-primary);
  color: #fff;
  border-color: var(--home-primary);
}

.home-btn-small--primary:hover {
  background: var(--home-primary-deep);
  color: #fff;
}

/* Двухколоночный layout */
.home-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .home-layout {
    grid-template-columns: 1fr 20rem;
    gap: 2rem;
  }
}

.home-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.home-feed-header--sub {
  margin-top: 2rem;
}

.home-feed-header__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--home-text, #212529);
  letter-spacing: -0.02em;
}

.home-feed-header__title--sm {
  font-size: 1.05rem;
}

.home-section-link {
  color: var(--home-text-secondary, #5f6b75);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease;
}

.home-section-link:hover {
  gap: 0.45rem;
  color: var(--home-primary, #2d3e50);
}

.home-section-link:active {
  color: var(--home-primary-deep, #1f2d3d);
}

/* Сетка карточек */
.home-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
}

.home-cards-grid--sub {
  margin-top: 0;
}

/* Карточка объявления */
.home-ad-card {
  background: var(--home-surface);
  border-radius: var(--home-radius);
  overflow: hidden;
  border: 1px solid var(--home-border);
  box-shadow: var(--home-shadow-sm, 0 1px 2px 0 rgba(33, 37, 41, 0.04));
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease;
  cursor: pointer;
}

.home-ad-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--home-shadow, 0 4px 20px -2px rgba(33, 37, 41, 0.06));
  border-color: var(--home-primary-soft, #d4dde6);
}

.home-ad-card:active {
  transform: translateY(-1px);
  box-shadow: var(--home-shadow-sm, 0 1px 2px 0 rgba(33, 37, 41, 0.04));
}

.home-ad-card__img-wrap {
  position: relative;
  height: 11.25rem;
  background: linear-gradient(135deg, var(--home-primary-light, #e8eef4), var(--home-bg, #f4f6f8));
  overflow: hidden;
}

.home-ad-card__img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.home-ad-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-ad-card__fav {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  box-shadow: var(--home-shadow-sm);
  color: var(--home-text);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.home-ad-card__fav:hover {
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary, #2d3e50);
  box-shadow: var(--home-shadow, 0 4px 20px -2px rgba(33, 37, 41, 0.06));
}

.home-ad-card__fav:active {
  background: var(--home-primary-soft, #d4dde6);
}

.home-ad-card__fav .heart-icon {
  width: 1rem;
  height: 1rem;
  color: var(--home-text-muted, #8a949b);
}

.home-ad-card__fav .heart-icon.is-active,
.home-ad-card__fav .heart-icon.text-red-500 {
  color: var(--home-primary, #2d3e50);
}

.home-ad-card__badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary, #2d3e50);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
}

.home-ad-card__badge--top {
  background: var(--home-accent-light, #e7efe9);
  color: var(--home-accent-deep, #4a6351);
}

.home-ad-card__body {
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.home-ad-card__title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--home-text, #212529);
  line-height: 1.4;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-ad-card__price {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--home-text, #212529);
  margin-bottom: 0;
}

.home-ad-card__price-note {
  font-size: 0.8125rem;
  color: var(--home-text-muted, #8a949b);
}

.home-ad-card__location {
  font-size: 0.8125rem;
  color: var(--home-text-muted, #8a949b);
  line-height: 1.3;
}

.home-ad-card__badge--verified {
  top: auto;
  bottom: 0.5rem;
  left: 0.5rem;
  background: var(--home-accent-light, #e7efe9);
  color: var(--home-accent-deep, #4a6351);
}

.home-ad-card__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--home-text-muted, #8a949b);
}

.home-ad-card__avatar {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary, #2d3e50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5625rem;
  font-weight: 600;
}

.home-ad-card__author {
  font-weight: 500;
  color: var(--home-text-secondary, #5f6b75);
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-ad-card__rating {
  color: var(--home-text-secondary, #5f6b75);
  font-weight: 500;
}

.home-ad-card__since {
  font-size: 0.6875rem;
  color: var(--home-text-muted, #8a949b);
}

.home-ad-card__time {
  margin-left: auto;
}

/* Сайдбар */
.home-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: var(--site-sticky-offset);
  }
}

.home-sidebar-card {
  background: var(--home-surface);
  border-radius: var(--home-radius);
  padding: 1.5rem;
  border: 1px solid var(--home-border);
  transition: box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
}

.home-sidebar-card:hover {
  box-shadow: var(--home-shadow);
  border-color: var(--home-primary-soft, #d4dde6);
}

.home-sidebar-card--map {
  background: linear-gradient(135deg, var(--home-primary-light, #e8eef4), #eef4f8);
  border-color: var(--home-primary-soft, #d4dde6);
}

.home-sidebar-card__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--home-text);
}

.home-sidebar-card__text {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--home-text, #212529);
  line-height: 1.6;
}

.home-sidebar-card__btn {
  display: block;
  text-align: center;
  padding: 0.875rem 1rem;
  border-radius: var(--home-radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  background: var(--home-primary, #2d3e50);
  color: #fff;
  border: 1px solid var(--home-primary-deep, #1f2d3d);
  box-shadow:
    0 1px 2px rgba(33, 37, 41, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition:
    background 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.home-sidebar-card__btn:hover {
  background: var(--home-primary-deep, #1f2d3d);
  transform: translateY(-1px);
  color: #fff;
  box-shadow:
    0 4px 12px -4px rgba(45, 62, 80, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.home-sidebar-card__btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 1px rgba(33, 37, 41, 0.12);
}

.home-sidebar-card__link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--home-primary);
  text-decoration: none;
  transition: color 0.18s ease;
}

.home-sidebar-card__link:hover {
  color: var(--home-primary-deep, #1f2d3d);
  text-decoration: none;
}

.home-sidebar-services {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.5rem;
  background: var(--home-surface);
  border-radius: var(--home-radius);
  border: 1px solid var(--home-border);
  overflow: hidden;
}

.home-sidebar-service {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  text-decoration: none;
  color: var(--home-text);
  border-bottom: 1px solid var(--home-border);
  transition: color 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-sidebar-services li:last-child .home-sidebar-service {
  border-bottom: none;
}

.home-sidebar-service:hover {
  color: var(--home-primary);
  transform: translateX(3px);
}

.home-sidebar-service:active {
  color: var(--home-primary-deep, #1f2d3d);
}

.home-sidebar-service__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  color: var(--home-primary-deep, #1f2d3d);
  background: var(--home-primary-light, #e8eef4);
}

.home-sidebar-service__icon--img img,
.home-sidebar-service__icon--img svg {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.home-sidebar-service__text {
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 600;
}

/* Пустое состояние */
.home-empty {
  background: var(--home-card);
  border-radius: var(--home-radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1px solid var(--home-border);
}

.home-empty__text {
  margin: 0 0 0.75rem;
  color: var(--home-text, #212529);
  font-size: 1rem;
}

.home-empty__link {
  color: var(--home-primary, #2d3e50);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease;
}

.home-empty__link:hover {
  color: var(--home-primary-deep, #1f2d3d);
}

.home-empty__link:active {
  color: var(--home-primary-deep, #1f2d3d);
}

.home-empty-note {
  font-size: 0.875rem;
  color: var(--home-text, #212529);
}

/* City picker в модалке */
.home-city-picker__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.home-city-picker__input {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--home-surface, #ffffff);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-city-picker__input:focus {
  outline: none;
  border-color: var(--home-primary);
}

.home-city-picker__tags {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-city-picker__districts {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .home-city-picker__districts {
    grid-template-columns: repeat(2, 1fr);
  }
}

.home-city-picker__hint {
  font-size: 0.875rem;
  color: var(--home-text, #212529);
}

.home-city-tag {
  padding: 0.375rem 0.75rem;
  border-radius: var(--home-radius-sm);
  font-size: 0.875rem;
  text-decoration: none;
  background: var(--home-surface);
  color: var(--home-text);
}

.home-district-tag {
  padding: 0.5rem 0.75rem;
  border-radius: var(--home-radius-sm);
  font-size: 0.875rem;
  text-decoration: none;
  background: var(--home-surface, #ffffff);
  border: 1px solid var(--home-border);
  color: var(--home-text);
  transition: background 0.15s ease, border-color 0.15s ease;
}

/* Адаптив шапки */
@media (max-width: 1023px) {
  .home-top-bar__inner {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
  }

  .home-header-actions {
    margin-left: auto;
  }

  .home-all-cats-btn span {
    display: none;
  }

  .home-all-cats-btn {
    padding: 0.5rem 0.625rem;
    order: 3;
  }

  .home-city-chip {
    order: 4;
    max-width: none;
  }

  .home-search {
    order: 5;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .home-cats-grid {
    grid-template-columns: repeat(auto-fill, minmax(7rem, 0.9fr));
    gap: 0.6rem;
  }

  .home-cat-tile {
    padding: 0.375rem 0.25rem;
  }

  .home-cat-tile__icon {
    width: 4.25rem;
    height: 4.25rem;
  }

  .home-cat-tile__img {
    width: 4rem;
    height: 4rem;
  }

  .home-cat-tile__emoji {
    font-size: 2.5rem;
  }

  .home-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.75rem;
  }

  .home-header-actions .home-icon-btn,
  .home-header-actions .home-post-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .home-post-btn__text {
    display: none;
  }

  .home-post-btn {
    padding: 0.625rem 0.75rem;
  }
}

@media (min-width: 1024px) {
  .home-post-btn__text {
    display: inline;
  }
}

/* Мега-меню «Все категории» — flat / grouped (NEW_TAXONOMY) */
.home-cats-mega {
  position: fixed;
  inset: 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--motion-base, 200ms) var(--ease-out, ease),
    visibility var(--motion-base, 200ms) var(--ease-out, ease);
}

.home-cats-mega.is-hidden {
  display: none;
}

.home-cats-mega.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-cats-mega__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 37, 41, 0.42);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--motion-enter, 300ms) var(--ease-out, ease);
}

.home-cats-mega.is-open .home-cats-mega__backdrop {
  opacity: 1;
}

.home-cats-mega__panel {
  position: relative;
  z-index: 1;
  margin-top: var(--site-sticky-offset);
  max-height: calc(100vh - var(--site-sticky-offset));
  overflow: hidden;
  background: #fff;
  border-top: 1px solid var(--home-border);
  box-shadow: 0 18px 48px -18px rgba(45, 62, 80, 0.35);
  transform: translateY(-0.5rem);
  opacity: 0;
  transition:
    transform var(--motion-enter, 300ms) var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity var(--motion-enter, 300ms) var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.home-cats-mega.is-open .home-cats-mega__panel {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 769px) {
  .home-cats-mega__panel {
    margin-top: var(--site-sticky-offset);
    max-height: calc(100vh - var(--site-sticky-offset));
  }
}

.home-cats-mega__inner {
  position: relative;
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 0;
  min-height: 22rem;
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 769px) {
  .home-cats-mega__inner {
    height: min(31rem, calc(100vh - 8.5rem));
    min-height: min(31rem, calc(100vh - 8.5rem));
  }
}

.home-cats-mega__close {
  position: absolute;
  top: 0.75rem;
  right: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid transparent;
  border-radius: 0.625rem;
  background: var(--home-bg, #f4f6f8);
  color: var(--home-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition:
    background var(--motion-fast, 150ms) var(--ease-out, ease),
    color var(--motion-fast, 150ms) var(--ease-out, ease),
    border-color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cats-mega__close svg {
  width: 1.125rem;
  height: 1.125rem;
}

.home-cats-mega__close:hover {
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary, #2d3e50);
  border-color: var(--home-primary-soft, #d4dde6);
}

.home-cats-mega__close:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
}

.home-cats-mega__sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.25rem 0.75rem 0.5rem 0;
  border-right: 1px solid var(--home-border);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.home-cats-mega__parent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--home-text, #212529);
  text-align: left;
  cursor: pointer;
  transition:
    background var(--motion-fast, 150ms) var(--ease-out, ease),
    color var(--motion-fast, 150ms) var(--ease-out, ease),
    border-color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cats-mega__parent:hover {
  background: var(--home-bg, #f4f6f8);
  color: var(--home-primary-deep, #1f2d3d);
}

.home-cats-mega__parent.is-active {
  background: var(--home-primary-light, #e8eef4);
  border-color: var(--home-primary-soft, #d4dde6);
  color: var(--home-primary-deep, #1f2d3d);
  font-weight: 600;
}

.home-cats-mega__parent:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
}

.home-cats-mega__parent-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-cats-mega__parent-icon img {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.home-cats-mega__parent-name {
  flex: 1;
  min-width: 0;
}

.home-cats-mega__parent-chevron {
  width: 1rem;
  height: 1rem;
  color: var(--home-text-muted, #8a949b);
  flex-shrink: 0;
  transition: color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cats-mega__parent.is-active .home-cats-mega__parent-chevron,
.home-cats-mega__parent:hover .home-cats-mega__parent-chevron {
  color: var(--home-primary, #2d3e50);
}

.home-cats-mega__meetups-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.625rem 0.5rem;
  margin-top: 0.375rem;
  border-top: 1px solid var(--home-border, #e2e6ea);
  border-radius: 0.75rem;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--home-primary, #2d3e50);
  text-decoration: none;
  transition:
    background var(--motion-fast, 150ms) var(--ease-out, ease),
    color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cats-mega__meetups-link:hover {
  background: var(--home-primary-light, #e8eef4);
}

.home-cats-mega__meetups-link:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
}

.home-cats-mega__content {
  position: relative;
  min-height: 14rem;
  padding: 0.375rem 2.5rem 0.375rem 1.25rem;
}

@media (min-width: 769px) {
  .home-cats-mega__content {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
}

.home-cats-mega__pane {
  display: none;
}

@media (min-width: 769px) {
  .home-cats-mega__pane {
    position: absolute;
    top: 0.375rem;
    right: 2.5rem;
    bottom: 0.375rem;
    left: 1.25rem;
    overflow: hidden;
  }
}

.home-cats-mega__pane.is-active {
  display: block;
  animation: home-cats-pane-in var(--motion-base, 200ms) var(--ease-out, ease);
}

@media (min-width: 769px) {
  .home-cats-mega__pane.is-active {
    display: flex !important;
    flex-direction: column;
    min-height: 0;
  }
}

@keyframes home-cats-pane-in {
  from {
    opacity: 0;
    transform: translateY(0.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-cats-mega__pane-head {
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.home-cats-mega__pane-title {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--home-text, #212529);
  text-decoration: none;
  letter-spacing: -0.02em;
  border-radius: 0.375rem;
  transition: color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cats-mega__pane-title svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--home-primary, #2d3e50);
  transition: transform var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cats-mega__pane-title:hover {
  color: var(--home-primary, #2d3e50);
}

.home-cats-mega__pane-title:hover svg {
  transform: translateX(2px);
}

.home-cats-mega__pane-title:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 3px;
}

.home-cats-mega__pane-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--home-text-muted, #8a949b);
  line-height: 1.3;
}

.home-cats-mega__pane-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12.75rem;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 769px) {
  .home-cats-mega__pane-body {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
  }
}

.home-cats-mega__links-wrap {
  min-width: 0;
}

@media (min-width: 769px) {
  .home-cats-mega__links-wrap {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
}

.home-cats-mega__columns {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.125rem 1.25rem;
}

.home-cats-mega__pane-body--wide {
  grid-template-columns: 1fr 12.75rem;
}

.home-cats-mega__pane-body--wide .home-cats-mega__services {
  margin-top: 0;
}

@media (min-width: 769px) {
  .home-cats-mega__columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-cats-mega__group-title {
  margin: 0 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--home-text-secondary, #5f6b75);
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.home-cats-mega__group-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-cats-mega__group-links li,
.home-cats-mega__group-links .home-cats-mega__link-item {
  margin-bottom: 0.125rem;
}

.home-cats-mega__group-links .home-cats-mega__link {
  font-size: 0.875rem;
  line-height: 1.3;
}

.home-cats-mega__links-block--trimmed:not(.is-expanded) > ul {
  max-height: calc(0.875rem * 1.35 * 8);
  overflow: hidden;
}

.home-cats-mega__links-block--trimmed.is-expanded > ul {
  max-height: none;
  overflow: visible;
}

.home-cats-mega__links-block--trimmed.is-expanded .home-cats-mega__more-btn {
  display: none;
}

.home-cats-mega__more-btn.is-hidden {
  display: none;
}

.home-cats-mega__more-btn {
  display: block;
  margin-top: 0.25rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.2;
  font-weight: 600;
  color: var(--home-primary, #2d3e50);
  cursor: pointer;
  text-decoration: none;
}

.home-cats-mega__more-btn:hover {
  color: var(--home-primary-deep, #1f2d3d);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-cats-mega__more-btn:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.home-cats-mega__links {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

@media (min-width: 769px) {
  .home-cats-mega__links {
    columns: 3;
  }
}

.home-cats-mega__links li,
.home-cats-mega__links .home-cats-mega__link-item,
.home-cats-mega__links .home-cats-mega__more-item {
  break-inside: avoid;
  margin-bottom: 0.2rem;
}

.home-cat-tile__name,
.home-cats-mega__parent-name,
.home-cats-mega__link {
  font-weight: 400;
}

.home-cats-mega__pane-title {
  font-weight: 700;
}

.home-cats-mega__link {
  display: inline-block;
  max-width: 100%;
  padding: 0.25rem 0.35rem;
  margin: 0 -0.35rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: var(--home-text, #212529);
  text-decoration: none;
  line-height: 1.35;
  transition:
    color var(--motion-fast, 150ms) var(--ease-out, ease),
    background var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cats-mega__link:hover {
  color: var(--home-primary, #2d3e50);
  background: var(--home-bg, #f4f6f8);
}

.home-cats-mega__link:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 1px;
  color: var(--home-primary, #2d3e50);
}

.home-cats-mega__services {
  background: var(--home-bg, #f4f6f8);
  border: 1px solid var(--home-border, #e2e6ea);
  border-radius: 0.875rem;
  padding: 0.875rem 0.875rem 0.75rem;
  align-self: start;
}

@media (min-width: 769px) {
  .home-cats-mega__services {
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.home-cats-mega__services-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--home-text-secondary, #5f6b75);
}

.home-cats-mega__services-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-cats-mega__services-list li {
  margin-bottom: 0.2rem;
}

.home-cats-mega__services-list a {
  display: block;
  padding: 0.3rem 0.4rem;
  margin: 0 -0.4rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--home-primary, #2d3e50);
  text-decoration: none;
  line-height: 1.3;
  transition:
    background var(--motion-fast, 150ms) var(--ease-out, ease),
    color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.home-cats-mega__services-list a:hover {
  background: var(--home-primary-light, #e8eef4);
  color: var(--home-primary-deep, #1f2d3d);
}

.home-cats-mega__services-list a:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 1px;
}

.home-cats-mega__empty {
  padding: 1rem;
  color: var(--home-text-secondary);
  font-size: 0.875rem;
}

body.home-cats-mega-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .home-cats-mega__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .home-cats-mega__panel {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    max-height: 100vh;
    height: 100%;
    transform: translateY(0.75rem);
  }

  .home-cats-mega.is-open .home-cats-mega__panel {
    transform: translateY(0);
  }

  .home-cats-mega__sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--home-border);
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
    gap: 0.25rem;
  }

  .home-cats-mega__parent {
    flex-shrink: 0;
    width: auto;
    white-space: nowrap;
  }

  .home-cats-mega__parent-chevron {
    display: none;
  }

  .home-cats-mega__meetups-link {
    flex-shrink: 0;
    width: auto;
    margin-top: 0;
    border-top: none;
    border-left: 1px solid var(--home-border, #e2e6ea);
    border-radius: 0.75rem;
    padding-top: 0.5rem;
  }

  .home-cats-mega__content {
    padding: 0.75rem 0.75rem 1rem;
    min-height: 0;
    flex: 1;
    overflow: visible;
  }

  .home-cats-mega__pane-body,
  .home-cats-mega__pane-body--wide {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-cats-mega__columns {
    grid-template-columns: 1fr;
  }

  .home-cats-mega__links-block--trimmed:not(.is-expanded) > ul {
    max-height: none;
    overflow: visible;
  }

  .home-cats-mega__links {
    columns: 1;
  }

  .home-cats-mega__services {
    margin-top: 0.25rem;
  }

  .home-cats-mega__close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* ── Общий chrome: футер, мобильное меню, сообщения ── */

.site-messages {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
  padding: 0;
}

.site-messages__item {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  animation: site-messages-in 0.25s ease, site-messages-out 0.4s ease 4.5s forwards;
}

@keyframes site-messages-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes site-messages-out {
  to { opacity: 0; }
}

.site-messages__item--success,
.site-messages__item--info {
  color: var(--home-accent-deep, #4a6351);
}

.site-messages__item--warning {
  color: #b45309;
}

.site-messages__item--error {
  color: #b91c1c;
}

@media (max-width: 768px) {
  .site-messages {
    left: 0.75rem;
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }
}

.site-footer {
  margin-top: 2rem;
  background: var(--home-surface);
  border-top: 1px solid var(--home-border);
}

.site-footer__inner {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-footer__title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--home-text);
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links li {
  margin-bottom: 0.375rem;
}

.site-footer__links a {
  font-size: 0.8125rem;
  color: var(--home-text-secondary, #5f6b75);
  text-decoration: none;
  border-radius: 0.25rem;
  transition: color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.site-footer__links a:hover {
  color: var(--home-primary, #2d3e50);
}

.site-footer__links a:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
  color: var(--home-primary, #2d3e50);
}

.site-footer__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--home-text, #212529);
}

.site-footer__bottom {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--home-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--home-text, #212529);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.15rem;
}

.site-footer__legal a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--home-text-secondary, #5f6b75);
  text-decoration: none;
  transition: color var(--motion-fast, 150ms) var(--ease-out, ease);
}

.site-footer__legal a:hover {
  color: var(--home-primary, #2d3e50);
}

.site-footer__legal a:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
}

.site-footer__copy {
  color: var(--home-text-muted, #8a949b);
  font-weight: 500;
}

.site-mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0.375rem 0.5rem calc(0.375rem + env(safe-area-inset-bottom, 0));
  background: var(--home-surface);
  border-top: 1px solid var(--home-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .site-mobile-nav {
    display: none;
  }
}

.site-mobile-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  padding: 0.375rem 0.5rem;
  min-width: 3.5rem;
  min-height: var(--home-tap-min, 2.75rem);
  font-size: 0.625rem;
  color: var(--home-text-secondary, #5f6b75);
  text-decoration: none;
  border-radius: 0.5rem;
  transition:
    color var(--motion-fast, 150ms) var(--ease-out, ease),
    background var(--motion-fast, 150ms) var(--ease-out, ease);
}

.site-mobile-nav__item svg {
  width: 1.375rem;
  height: 1.375rem;
}

.site-mobile-nav__item:hover {
  color: var(--home-primary, #2d3e50);
}

.site-mobile-nav__item.is-active {
  color: var(--home-primary, #2d3e50);
  font-weight: 600;
}

.site-mobile-nav__item:focus-visible {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 2px;
}

.site-mobile-nav__post {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -1.25rem;
  text-decoration: none;
}

.site-mobile-nav__post-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid var(--home-primary-deep, #1f2d3d);
  color: #fff;
  transition:
    transform var(--motion-fast, 150ms) var(--ease-out, ease),
    box-shadow var(--motion-fast, 150ms) var(--ease-out, ease),
    background var(--motion-fast, 150ms) var(--ease-out, ease);
  background: var(--home-primary, #2d3e50);
  box-shadow:
    0 1px 2px rgba(33, 37, 41, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.site-mobile-nav__post:focus-visible .site-mobile-nav__post-btn {
  outline: 2px solid var(--home-primary, #2d3e50);
  outline-offset: 3px;
}

.site-mobile-nav__post-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.site-mobile-nav__post-btn:hover {
  background: var(--home-primary-deep, #1f2d3d);
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px -4px rgba(45, 62, 80, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.site-mobile-nav__post:active .site-mobile-nav__post-btn {
  transform: translateY(1px);
  box-shadow: 0 1px 1px rgba(33, 37, 41, 0.16);
}

/* Reduced motion — без translate/анимаций появления */
@media (prefers-reduced-motion: reduce) {
  .home-sticky-head {
    transition: none;
  }

  .home-hero__inner {
    animation: none;
  }

  .home-cats-mega,
  .home-cats-mega__backdrop,
  .home-cats-mega__panel {
    transition: none !important;
  }

  .home-cats-mega__panel,
  .home-cats-mega.is-open .home-cats-mega__panel {
    transform: none !important;
  }

  .home-cats-mega__pane.is-active {
    animation: none !important;
  }

  .home-cats-mega__pane-title:hover svg {
    transform: none !important;
  }

  .home-cat-tile,
  .home-ad-card,
  .home-lane,
  .home-post-btn,
  .home-hero__search-btn,
  .home-hero__post-btn,
  .home-sidebar-card__btn,
  .home-sidebar-service,
  .site-mobile-nav__post-btn {
    transition: background var(--motion-fast, 0ms) var(--ease-out, ease), border-color var(--motion-fast, 0ms) var(--ease-out, ease), color var(--motion-fast, 0ms) var(--ease-out, ease), box-shadow var(--motion-fast, 0ms) var(--ease-out, ease) !important;
  }

  .home-cat-tile:hover,
  .home-cat-tile:active,
  .home-ad-card:hover,
  .home-ad-card:active,
  .home-lane:hover,
  .home-lane:active,
  .home-post-btn:hover,
  .home-post-btn:active,
  .home-hero__search-btn:hover,
  .home-hero__search-btn:active,
  .home-hero__post-btn:hover,
  .home-hero__post-btn:active,
  .home-sidebar-card__btn:hover,
  .home-sidebar-card__btn:active,
  .home-sidebar-service:hover,
  .site-mobile-nav__post-btn:hover,
  .site-mobile-nav__post:active .site-mobile-nav__post-btn {
    transform: none !important;
  }
}
