/* ===== ГородЛюдей — прототип главной ===== */
:root {
  --blue: #2f7df6;
  --blue-dark: #1e63d6;
  --ink: #17233b;
  --gray: #8a93a3;
  --gray-light: #b6bfcc;
  --line: #e8edf3;
  --bg-accent: #e9f4fd;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(23, 35, 59, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  line-height: 1.45;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.chevron { flex: none; }

/* Базовая SVG-иконка (спрайт): размер и цвет наследуются от контекста */
.i {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
}
.i--pinfill { fill: #2f7df6; stroke: none; width: 16px; height: 16px; }

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 2px 14px rgba(23, 35, 59, .07);
}

.header__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo { display: flex; align-items: center; gap: 8px; flex: none; }
.logo__pin { display: grid; place-items: center; }
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__name { font-weight: 800; font-size: 21px; letter-spacing: -.3px; }
.logo__tagline { font-size: 11px; color: var(--gray); font-weight: 500; }

.city-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 10px;
  flex: none;
  transition: background .15s;
}
.city-chip:hover { background: #f1f5fa; }

.header-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  background: #f1f4f9;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 6px 0 16px;
  transition: border-color .15s, background .15s;
}
.header-search:focus-within { border-color: var(--blue); background: #fff; }
.header-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 11px 0;
  font-size: 14px;
  color: var(--ink);
}
.header-search input::placeholder { color: var(--gray); }
.header-search button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  transition: background .15s;
}
.header-search button:hover { background: #e4e9f1; }

.post-ad { display: flex; align-items: center; gap: 9px; flex: none; }
.post-ad__btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  transition: background .15s, transform .15s;
}
.post-ad:hover .post-ad__btn { background: var(--blue-dark); transform: scale(1.06); }
.post-ad__label { font-size: 12.5px; font-weight: 700; line-height: 1.25; }

.login { display: flex; align-items: center; gap: 8px; flex: none; font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.login:hover { color: var(--blue); }

.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 22px; height: 2.5px; border-radius: 2px; background: var(--ink); display: block; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #bfe3f7 0%, #d8ecf9 30%, #fbd9a6 68%, #f7b98a 100%);
}

.hero__skyline {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  pointer-events: none;
}
.hero__skyline svg { width: 100%; height: 100%; display: block; }

.hero__inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 88px;
}

.hero__content { max-width: 640px; }

.hero__title {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -.5px;
  color: #14284e;
  line-height: 1.14;
}

.hero__subtitle {
  margin-top: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #223a63;
}

.hero__note {
  margin-top: 26px;
  font-family: 'Caveat', cursive;
  font-size: 27px;
  line-height: 1.05;
  font-weight: 700;
  color: var(--blue);
  transform: rotate(-6deg);
  width: max-content;
  max-width: 100%;
}
.hero__arrow { display: inline-block; vertical-align: bottom; transform: translateY(10px); }

.hero-search {
  margin-top: 30px;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 14px 40px rgba(20, 40, 78, .18);
  max-width: 640px;
}
.hero-search__city {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  flex: none;
}
.hero-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 15.5px;
  color: var(--ink);
  background: transparent;
}
.hero-search input::placeholder { color: var(--gray); }
.hero-search__submit {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
  transition: background .15s, transform .15s;
}
.hero-search__submit:hover { background: var(--blue-dark); transform: scale(1.04); }

.weather-card {
  flex: none;
  width: 250px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-top: 12px;
}
.weather-card__city { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; }
.weather-card__main { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.weather-card__icon { color: #f5a623; display: grid; place-items: center; }
.weather-card__icon .i { width: 36px; height: 36px; stroke-width: 1.6; }
.weather-card__temp { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.weather-card__desc { color: var(--gray); font-size: 13.5px; margin-top: 2px; }
.weather-card__hr { border: none; border-top: 1px solid var(--line); margin: 14px 0 12px; }
.weather-card__date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: #3c4a63;
}

/* ===== Каркас: контент + сайдбар ===== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  padding-top: 36px;
  padding-bottom: 48px;
  align-items: start;
}

.section-title { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
}
.section-link:hover { color: var(--blue-dark); }
.section-link--sm { font-size: 12.5px; }
.section-head--tight { margin-bottom: 4px; }

/* ===== Категории ===== */
.categories__grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.cat {
  background: var(--cat-bg, #f1f4f9);
  border-radius: var(--radius);
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 148px;
  transition: transform .15s, box-shadow .15s;
}
.cat:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23, 35, 59, .1); }
.cat__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--icon-bg, #fff);
  color: var(--icon-c, var(--blue));
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.cat__icon .i { width: 24px; height: 24px; }
.cat__name { font-weight: 800; font-size: 14.5px; letter-spacing: -.2px; }
.cat__sub { font-size: 11.5px; color: #5f6b7e; line-height: 1.35; }

.categories__note {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--blue);
  align-self: center;
  justify-self: center;
  transform: rotate(-7deg);
  text-align: left;
}
.categories__note svg { display: inline-block; vertical-align: bottom; transform: translateY(8px); }

/* ===== Объявления ===== */
.listings { margin-top: 44px; }

.listings__grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.ad-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform .15s, box-shadow .15s;
}
.ad-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.ad-card__cover {
  position: relative;
  aspect-ratio: 5 / 3.4;
  background: var(--cover-bg, linear-gradient(135deg, #c7d2e0, #97a5b8));
  display: grid;
  place-items: center;
}
.ad-card__art { color: #fff; opacity: .95; display: grid; place-items: center; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .2)); }
.ad-card__art .i { width: 62px; height: 62px; stroke-width: 1.5; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--badge-bg, var(--blue));
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #7c8798;
  display: grid;
  place-items: center;
  transition: transform .15s, color .15s;
}
.fav:hover { transform: scale(1.12); }
.fav .i { width: 15px; height: 15px; grid-area: 1 / 1; }
.fav__on { display: none; color: #e84393; }
.fav.is-active .fav__on { display: block; }
.fav.is-active .fav__off { display: none; }

.ad-card__title {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.3;
  padding: 12px 14px 6px;
  letter-spacing: -.2px;
}
.ad-card__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 14px 12px;
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
}
.ad-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.ad-card__meta .i { width: 12px; height: 12px; stroke-width: 2; }
.ad-card__price { padding: 0 14px 14px; font-size: 15.5px; font-weight: 800; }

/* ===== Сайдбар ===== */
.sidebar { display: grid; gap: 18px; position: sticky; top: 76px; }

.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.side-card--accent { background: var(--bg-accent); border-color: #d5e8fa; }

.side-card__title { font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; }
.side-card__title--pin { display: flex; align-items: center; gap: 7px; }
.side-card__text { margin: 8px 0 14px; font-size: 13px; color: #45536b; font-weight: 500; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  transition: background .15s, transform .15s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost { background: #fff; color: var(--blue); border: 1.5px solid #cfe2fb; margin-top: 12px; padding: 9px 16px; font-size: 13px; }
.btn--ghost:hover { background: #f2f8ff; }

.quick li + li { border-top: 1px solid #f0f3f8; }
.quick a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 2px;
  font-size: 13.5px;
  font-weight: 700;
}
.quick a:hover { color: var(--blue); }
.quick a .chevron { margin-left: auto; }
.quick__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--qi-bg, #eef1f5);
  color: var(--qi-c, var(--blue));
  display: grid;
  place-items: center;
  flex: none;
}
.quick__icon .i { width: 18px; height: 18px; }

.cities li + li { border-top: 1px solid #f0f3f8; }
.cities a { display: flex; align-items: center; gap: 11px; padding: 9px 2px; font-size: 14px; font-weight: 700; }
.cities a:hover { color: var(--blue); }
.cities a .chevron { margin-left: auto; }
.cities__thumb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--thumb-bg, linear-gradient(135deg, #c7d2e0, #97a5b8));
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.cities__thumb .i { width: 19px; height: 19px; stroke-width: 1.6; }

/* ===== Плашка доверия ===== */
.trust { background: var(--bg-accent); }
.trust__inner {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-top: 26px;
  padding-bottom: 26px;
  flex-wrap: wrap;
}
.trust__item { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #3c4a63; }
.trust__item b { color: var(--ink); font-size: 13.5px; }
.trust__item p { line-height: 1.35; }
.trust__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(47, 125, 246, .12);
  flex: none;
}
.trust__icon .i { width: 21px; height: 21px; }
.trust__icon--heart { color: #e84393; }
.trust__smile { flex: none; }
.trust__note {
  margin-left: auto;
  font-family: 'Caveat', cursive;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.02;
  color: var(--blue);
  transform: rotate(-4deg);
  text-align: right;
}
.trust__note span { font-family: 'Manrope', sans-serif; font-size: 20px; }

/* ===== Подвал ===== */
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 22px;
  padding-bottom: 22px;
  flex-wrap: wrap;
}
.logo--footer .logo__name { font-size: 18px; }
.footer__nav { display: flex; gap: 22px; flex-wrap: wrap; margin: 0 auto; }
.footer__nav a { font-size: 13.5px; color: #45536b; font-weight: 600; }
.footer__nav a:hover { color: var(--blue); }

.footer__social { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--gray); font-weight: 600; }
.soc {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  transition: transform .15s, filter .15s;
}
.soc:hover { transform: scale(1.1); filter: brightness(1.08); }
.soc--tg { background: #2ba3e0; }
.soc--vk { background: #4c75a3; }
.soc--ok { background: #f7931e; }
.soc--yt { background: #ff0000; }

/* ===== Тост и выпадашка городов ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  max-width: min(92vw, 480px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.city-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 190px;
  z-index: 60;
  display: none;
}
.city-menu.is-open { display: block; }
.city-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.city-menu button:hover { background: #f1f5fa; color: var(--blue); }

/* ===== Адаптив ===== */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(3, 1fr); }
  .categories__grid { grid-template-columns: repeat(4, 1fr); }
  .listings__grid { grid-template-columns: repeat(3, 1fr); }
  .header-search { max-width: none; }
  .login span { display: none; }
  .trust__note { margin-left: 0; }
}

@media (max-width: 860px) {
  .header-search { display: none; }
  .post-ad__label, .login { display: none; }
  .burger { display: flex; margin-left: auto; }
  .city-chip { margin-left: auto; }
  .burger ~ .city-chip { margin-left: 0; }
  .hero__inner { flex-direction: column; padding-bottom: 70px; }
  .weather-card { width: 100%; max-width: 320px; margin-top: 0; }
  .hero-search { max-width: none; }
  .categories__grid { grid-template-columns: repeat(3, 1fr); }
  .listings__grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { grid-template-columns: 1fr; }
  .trust__inner { gap: 18px; }
  .footer__nav { margin: 0; }
}

@media (max-width: 560px) {
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
  .cat { min-height: 128px; }
  .listings__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-search__city span { display: none; }
  .footer__inner { justify-content: center; text-align: center; }
}
