/* ==========================================================================
   Десктопная главная по согласованному макету (только ≥861px).
   Мобильная версия не затрагивается: правила живут в media (min-width:861px).
   ========================================================================== */

@media (min-width: 861px) {

  /* ---------- Общая сетка ---------- */
  .dh-wrap { max-width: 1440px; margin: 0 auto; padding: 0 40px; }

  /* Старый hero на десктопе скрыт — вместо него новый блок */
  body .hero { display: none !important; }

  /* ---------- HERO ---------- */
  .dh-hero {
    position: relative;
    overflow: hidden;
    background:
      radial-gradient(900px 460px at 88% 6%, rgba(255, 214, 170, .55), transparent 62%),
      radial-gradient(680px 420px at 52% 100%, rgba(253, 207, 219, .45), transparent 60%),
      #FFFCF8;
    border-bottom: 1px solid #F3E7DF;
  }

  .dh-hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(430px, 560px) 1fr;
    gap: 40px;
    align-items: center;
    padding: 44px 40px 46px;
  }

  .dh-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #D21447;
    margin-bottom: 22px;
  }
  .dh-eyebrow .ico { width: 20px; height: 20px; color: #D21447; }

  .dh-hero__title {
    margin: 0;
    font-size: 64px;
    line-height: 1.03;
    letter-spacing: -.035em;
    font-weight: 800;
    color: #1E120D;
  }
  .dh-hero__title mark {
    display: inline;
    background: none;
    color: #E3124C;
    padding: 0;
  }

  .dh-hero__lead {
    margin: 22px 0 0;
    max-width: 520px;
    font-size: 17px;
    line-height: 1.55;
    color: #4E3A33;
  }

  .dh-hero__actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
  .dh-hero__actions .btn { min-width: 0; }

  /* ---------- Визуал ---------- */
  .dh-hero__visual {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dh-hero__photo {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 760px;
    height: 430px;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 30px 70px -30px rgba(66, 32, 18, .45);
  }

  /* мягкое «пятно» под фото — как в макете */
  .dh-hero__blob {
    position: absolute;
    inset: 18px -18px 8px 40px;
    border-radius: 50% 46% 52% 48%;
    background:
      radial-gradient(closest-side, rgba(255, 236, 214, .95), rgba(255, 236, 214, 0) 72%);
    filter: blur(6px);
    z-index: 1;
  }

  .dh-hero__note {
    position: absolute;
    z-index: 4;
    top: -6px;
    right: 72px;
    transform: rotate(-5deg);
    font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
    font-size: 26px;
    line-height: .95;
    color: #D21447;
    text-align: center;
    max-width: 210px;
    pointer-events: none;
    text-shadow: 0 1px 0 rgba(255,255,255,.85), 0 0 14px rgba(255,255,255,.7);
  }

  .dh-ava {
    position: absolute;
    z-index: 3;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 14px 26px -10px rgba(66, 32, 18, .4);
    background: #fff;
  }
  .dh-ava--1 { left: -14px; top: 24px; }
  .dh-ava--2 { left: 26px; bottom: 46px; }
  .dh-ava--3 { right: 18px; top: 92px; width: 66px; height: 66px; }
  .dh-ava--4 { right: 44px; bottom: 30px; width: 62px; height: 62px; }
  .dh-ava--5 { left: 44%; top: -12px; width: 58px; height: 58px; }

  /* ---------- Плитки разделов ---------- */
  .dh-tiles {
    background: #FFF9F3;
    border-bottom: 1px solid #F3E7DF;
    padding: 26px 0 30px;
  }

  .dh-tiles__inner {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
  }

  .dh-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    text-decoration: none;
    border-radius: 16px;
    padding: 6px 4px;
    transition: transform .18s ease;
  }
  .dh-tile:hover { transform: translateY(-3px); }

  .dh-tile__art {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 12px 24px -12px rgba(66, 32, 18, .38);
    background: #fff;
  }
  .dh-tile__art img { width: 100%; height: 100%; object-fit: cover; }
  .dh-tile__art .ico { width: 42px; height: 42px; }

  .dh-tile__art--vet { background: linear-gradient(160deg, #35C67D, #0F9E5A); color: #fff; }
  .dh-tile__art--priyut { background: linear-gradient(160deg, #A855F7, #7E22CE); color: #fff; }

  .dh-tile b {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #1E120D;
  }
  .dh-tile span {
    font-size: 12.5px;
    line-height: 1.3;
    color: #7D6860;
  }

  /* ---------- Карточка «Требуется внимание» ---------- */
  .dh-attention {
    background: linear-gradient(180deg, #FDEDF1 0%, #FCE8EE 100%);
    border: 1px solid #F7D3DF;
    border-radius: 20px;
    padding: 22px 24px;
    box-shadow: 0 14px 30px -22px rgba(66, 32, 18, .35);
  }
  .dh-attention__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #C40B3E;
    line-height: 1.25;
  }
  .dh-attention__head .ico { width: 20px; height: 20px; color: #C40B3E; flex: 0 0 auto; }
  .dh-attention p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #4E3A33;
  }
  .dh-attention a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #C40B3E;
    text-decoration: none;
  }
  .dh-attention a:hover { text-decoration: underline; }
  .dh-attention a .ico { width: 16px; height: 16px; }
}

  /* ---------- Блок поиска с картой и приложением ---------- */
  /* Поиск скрываем только на десктопе: на телефоне это единственное
   поле поиска на главной. Правило стояло вне медиа-запроса и
   выключало поиск на всех ширинах. */
@media (min-width: 861px) { body .mp-search { display: none !important; } }

  .dh-search { background: #FFFCF8; padding: 44px 0 8px; }

  .dh-search__grid {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr) minmax(250px, .72fr);
    gap: 26px;
    align-items: stretch;
  }

  .dh-search__title {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -.03em;
    font-weight: 800;
    color: #1E120D;
  }

  .dh-search__note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 18px;
    font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
    font-size: 17px;
    color: #C40B3E;
  }
  .dh-search__note .ico { width: 18px; height: 18px; color: #E3124C; }

  .dh-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #EFE4DD;
    border-radius: 16px;
    padding: 8px 10px 8px 16px;
    box-shadow: 0 12px 30px -22px rgba(66, 32, 18, .4);
  }
  .dh-form__field { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
  .dh-form__field .ico { width: 20px; height: 20px; color: #9A857B; flex: 0 0 auto; }
  .dh-form__field input {
    border: 0; outline: 0; background: transparent;
    font-size: 15px; color: #1E120D; width: 100%; padding: 8px 0;
  }
  .dh-form__field input::placeholder { color: #9A857B; }
  .dh-form__filter {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid #F3DCE3; background: #FDE9F0; color: #C40B3E;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .dh-form__filter .ico { width: 20px; height: 20px; }
  .dh-form__filter:hover { background: #FADCE7; }

  .dh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
  .dh-chip {
    display: inline-flex; align-items: center;
    height: 38px; padding: 0 18px; border-radius: 999px;
    border: 1px solid #EFE4DD; background: #fff;
    font-size: 14px; font-weight: 600; color: #4E3A33; text-decoration: none;
  }
  .dh-chip:hover { border-color: #F3C6D3; color: #C40B3E; }
  .dh-chip.is-on {
    background: #E3124C; border-color: #E3124C; color: #fff;
    box-shadow: 0 10px 20px -12px rgba(227, 18, 76, .8);
  }

  .dh-search__maplink {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 16px; font-size: 14px; font-weight: 600;
    color: #4E3A33; text-decoration: none;
  }
  .dh-search__maplink .ico { width: 18px; height: 18px; color: #7D6860; }
  .dh-search__maplink:hover { color: #C40B3E; }

  /* карта-превью */
  .dh-mapcard {
    position: relative; border-radius: 22px; overflow: hidden;
    min-height: 300px; border: 1px solid #E7EFDF;
    box-shadow: 0 18px 40px -30px rgba(66, 32, 18, .45);
  }
  .dh-map {
    position: absolute; inset: 0;
    background-color: #EFF4E9;
    background-image:
      linear-gradient(90deg, rgba(255,255,255,.85) 0 6px, transparent 6px),
      linear-gradient(0deg, rgba(255,255,255,.85) 0 5px, transparent 5px),
      linear-gradient(90deg, transparent 0 31%, rgba(255,255,255,.9) 31% 33%, transparent 33%),
      linear-gradient(0deg, transparent 0 61%, rgba(255,255,255,.9) 61% 63%, transparent 63%);
    background-size: 96px 96px, 96px 96px, 100% 100%, 100% 100%;
  }
  .dh-map__water {
    position: absolute; left: -8%; bottom: -26%; width: 62%; height: 62%;
    background: #CFE6F2; border-radius: 46% 54% 40% 60%; transform: rotate(-12deg);
  }
  .dh-map__road {
    position: absolute; background: #fff; border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(198, 214, 188, .5);
  }
  .dh-map__road--1 { left: 8%;  top: 0;    width: 9px; height: 120%; transform: rotate(8deg); }
  .dh-map__road--2 { left: 0;   top: 44%;  width: 120%; height: 8px; transform: rotate(-3deg); }
  .dh-map__road--3 { right: 18%; top: -10%; width: 7px; height: 130%; transform: rotate(-14deg); }

  .dh-map__pin {
    position: absolute; z-index: 2; width: 26px; height: 26px; border-radius: 50% 50% 50% 0;
    background: #E3124C; transform: rotate(-45deg);
    box-shadow: 0 6px 12px -4px rgba(66, 32, 18, .5), inset 0 0 0 5px rgba(255,255,255,.92);
  }

  .dh-mapcard__cta {
    position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 22px; border-radius: 999px;
    background: #E3124C; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none;
    box-shadow: 0 14px 26px -12px rgba(227, 18, 76, .8);
  }
  .dh-mapcard__cta .ico { width: 16px; height: 16px; }
  .dh-mapcard__cta:hover { background: #C40B3E; }

  /* приложение */
  .dh-appcard {
    position: relative; display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end; gap: 14px;
    border-radius: 22px; padding: 22px 20px 20px;
    background: linear-gradient(180deg, #FDEDF1 0%, #FCE3EA 100%);
    border: 1px solid #F7D3DF;
    box-shadow: 0 18px 40px -30px rgba(66, 32, 18, .45);
  }
  .dh-phone {
    position: relative; width: 168px; min-height: 250px;
    background: #14121A; border-radius: 26px; padding: 26px 16px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    box-shadow: 0 18px 30px -18px rgba(20, 18, 26, .7);
  }
  .dh-phone__notch {
    position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
    width: 54px; height: 6px; border-radius: 999px; background: #2A2633;
  }
  .dh-phone__logo { width: 46px; height: 46px; object-fit: contain; }
  .dh-phone__title {
    font-size: 15px; line-height: 1.2; text-align: center; color: #fff; font-weight: 700;
  }
  .dh-phone__text {
    font-size: 10.5px; line-height: 1.35; text-align: center; color: rgba(255,255,255,.66);
  }
  .dh-appcard__btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 999px;
    background: #fff; color: #1E120D; font-size: 13.5px; font-weight: 700;
    text-decoration: none; border: 1px solid #EFE4DD;
    box-shadow: 0 12px 22px -16px rgba(66, 32, 18, .5);
  }
  .dh-appcard__btn .ico { width: 18px; height: 18px; color: #1E120D; }
  .dh-appcard__btn:hover { border-color: #F3C6D3; color: #C40B3E; }

  /* «Последние объявления» */
  .dh-last {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; margin: 34px 0 14px; padding-top: 22px; border-top: 1px solid #F3E7DF;
  }
  .dh-last__title { margin: 0; font-size: 22px; font-weight: 800; color: #1E120D; letter-spacing: -.02em; }
  .dh-last__all {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 700; color: #C40B3E; text-decoration: none;
  }
  .dh-last__all .ico { width: 16px; height: 16px; }
  .dh-last__all:hover { text-decoration: underline; }


  /* ---------- Баннер в шапке: во всю ширину, пропорции сохранены ---------- */
  .dh-hero__inner {
    display: block !important;
    padding: 34px 40px 10px !important;
  }
  .dh-hero__copy { max-width: 720px; }
  .dh-hero__title { font-size: 46px; }
  .dh-hero__lead { max-width: 620px; }

  .dh-hero__visual {
    margin-top: 26px !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    background: none !important;
    border: 0 !important;
  }
  .dh-hero__visual .dh-hero__blob,
  .dh-hero__visual .dh-ava,
  .dh-hero__visual .dh-hero__note { display: none !important; }

  .dh-hero__photo {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 26px !important;
    box-shadow: 0 30px 60px -40px rgba(66, 32, 18, .55) !important;
    display: block;
  }

  /* Баннер должен занимать всю ширину контейнера */
  body .dh-hero .dh-hero__inner {
    display: block !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 34px 40px 10px !important;
  }
  body .dh-hero .dh-hero__visual {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 26px 0 0 !important;
  }
  body .dh-hero .dh-hero__photo {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    border-radius: 26px !important;
    object-fit: contain !important;
  }

/* На мобильных новые блоки не показываем — там своя вёрстка */
@media (max-width: 860px) {
  .dh-hero,
  .dh-tiles,
  .dh-search { display: none !important; }
}

/* Баннер справа от текста: две равные колонки */
@media (min-width: 861px) {
  body .dh-hero .dh-hero__inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 48px !important;
    align-items: center !important;
    padding: 46px 40px 46px !important;
  }
  body .dh-hero .dh-hero__copy { max-width: none !important; }
  body .dh-hero .dh-hero__title { font-size: 48px !important; }
  body .dh-hero .dh-hero__lead { max-width: 520px !important; }
  body .dh-hero .dh-hero__visual {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }
  body .dh-hero .dh-hero__photo {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 24px !important;
    object-fit: contain !important;
    box-shadow: 0 26px 54px -34px rgba(66, 32, 18, .55) !important;
  }
}

/* Панель под баннером: убирает пустоту справа и выравнивает колонки */
@media (min-width: 861px) {
  body .dh-hero .dh-hero__visual {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch !important;
    min-height: 100% !important;
    padding: 20px !important;
    border-radius: 26px !important;
    background: linear-gradient(135deg, #FFF4EF 0%, #FDE9F0 100%) !important;
    border: 1px solid #F7E2DA !important;
    box-shadow: 0 26px 54px -38px rgba(66, 32, 18, .5) !important;
  }
  body .dh-hero .dh-hero__photo {
    border-radius: 16px !important;
    box-shadow: 0 14px 28px -20px rgba(66, 32, 18, .55) !important;
  }
}

/* Промежуточные ширины: текст мельче, отступы плотнее */
@media (min-width: 861px) and (max-width: 1280px) {
  body .dh-hero .dh-hero__inner { gap: 30px !important; padding: 34px 28px 34px !important; }
  body .dh-hero .dh-hero__title { font-size: 38px !important; }
  body .dh-hero .dh-hero__lead { font-size: 15px !important; }
  body .dh-hero .dh-hero__visual { padding: 14px !important; border-radius: 22px !important; }
}

/* Иконки плиток: одинаковый размер, без белой полосы под картинкой */
@media (min-width: 861px) {
  body .dh-tile__art {
    display: block !important;
    width: 92px !important;
    height: 92px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    line-height: 0 !important;
    font-size: 0 !important;
    background: transparent !important;
  }
  body .dh-tile__art img,
  body .dh-tile__art svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 22px !important;
    margin: 0 !important;
  }
}

@media (min-width: 861px) {
  body .dh-appcard {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 20px 20px 18px !important;
    background: linear-gradient(160deg, #FDECF3 0%, #FDE3EC 100%) !important;
    border: 1px solid #F7D8E4 !important;
    border-radius: 24px !important;
    height: auto !important;
    overflow: hidden !important;
  }
  body .dh-appcard__title {
    font-family: Manrope, system-ui, sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #1E120D !important;
    line-height: 1.25 !important;
  }
  body .dh-appcard__sub {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    color: #7D6860 !important;
    margin-bottom: 4px !important;
  }
  body .dh-appcard__btn { width: 100% !important; justify-content: center !important; }
  body .dh-appcard__promo {
    display: block !important;
    width: calc(100% + 40px) !important;
    margin: 12px -20px -18px !important;
    height: 190px !important;
    object-fit: cover !important;
    object-position: center 42% !important;
  }
  body .dh-phone { display: none !important; }
}
/* кнопка под картинкой */

@media (min-width: 861px) {
  body .dh-appcard__promo {
    margin: 12px -20px 0 !important;
    height: 200px !important;
    border-radius: 0 !important;
  }
  body .dh-appcard__btn {
    margin-top: 12px !important;
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (min-width: 861px) {
  /* Картинка целиком, без обрезки сверху — логотип на экране телефона виден */
  body .dh-appcard__promo {
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    object-position: center top !important;
    background: #FDE3EC !important;
  }
}

@media (min-width: 861px) {
  /* Картинка меньше, без белой рамки вокруг */
  body .dh-appcard__promo {
    width: 86% !important;
    margin: 8px auto 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 14px !important;
  }
}
/* Слова «Потеряли» и «Помогли» — фирменным розовым */

@media (min-width: 861px) {
  body .dh-search__title mark {
    background: none !important;
    color: #E3124C !important;
    -webkit-text-fill-color: #E3124C !important;
    padding: 0 !important;
  }
}

@media (min-width: 861px) {
  /* Четыре сервисные карточки убраны: их роль выполняет полоса из шести плиток */
  body .quick.quick--after-urgent,
  body .quick--after-urgent { display: none !important; }
}

@media (min-width: 861px) {
  /* Живая карта с настоящими маркерами внутри карточки */
  body .dh-map--live {
    position: relative !important;
    padding: 0 !important;
    background: #EFF3EA !important;
    overflow: hidden !important;
    border-radius: 24px !important;
    min-height: 402px !important;
  }
  body .dh-map__frame {
    display: block !important;
    width: 100% !important;
    height: 402px !important;
    border: 0 !important;
    border-radius: 24px !important;
    filter: saturate(1.02);
  }
  body .dh-map--live .dh-map__water,
  body .dh-map--live .dh-map__road,
  body .dh-map--live .dh-map__pin { display: none !important; }
  body .dh-mapcard__cta {
    position: absolute !important; right: 14px !important; left: auto !important;
    bottom: 14px !important; transform: none !important; z-index: 600 !important;
    padding: 9px 16px !important; font-size: 13px !important;
  }
  body .dh-map__canvas::after {
    content: "© Яндекс Карты"; position: absolute; left: 10px; bottom: 6px; z-index: 500;
    font-size: 9.5px; color: rgba(40,30,20,.45); pointer-events: none;
  }
}

@media (min-width: 861px) {
  body .dh-map__frame { background: #EFF3EA !important; }
}

@media (min-width: 861px) {
  /* Настоящая карта Leaflet внутри карточки */
  body .dh-map__canvas { position: absolute !important; inset: 0 !important; border-radius: 24px !important; overflow: hidden !important; z-index: 1; }
  body .dh-map__canvas .leaflet-container { width: 100% !important; height: 100% !important; background: #EFF3EA !important; font: inherit !important; }
  body .dh-map--live { min-height: 402px !important; height: 402px !important; }
  body .dh-mapcard__cta { z-index: 600 !important; }
  body .phx-pin-wrap { background: none !important; border: 0 !important; cursor: pointer; }
  body .phx-pin-wrap .phx-pin-svg {
    display: block;
    width: 30px;
    height: 38px;
    filter: drop-shadow(0 4px 10px rgba(43,24,19,.28));
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: 50% 100%;
  }
  body .phx-pin-wrap:hover .phx-pin-svg,
  body .phx-pin-wrap.is-active .phx-pin-svg {
    transform: scale(1.18);
    filter: drop-shadow(0 7px 14px rgba(43,24,19,.36));
  }
  body .phx-pop { width: 190px; font-family: Manrope, system-ui, sans-serif; }
  body .phx-pop img { width: 100%; height: 104px; object-fit: cover; border-radius: 10px; margin-bottom: 6px; }
  body .phx-pop b { display: block; font-size: 14px; color: #1E120D; }
  body .phx-pop__meta { display: block; font-size: 11.5px; color: #7D6860; margin: 2px 0 6px; }
  body .phx-pop a { font-size: 12px; font-weight: 700; color: #E3124C; text-decoration: none; }
  body .dh-map__canvas .leaflet-control-zoom { display: none; }
}

@media (min-width: 861px) {
  /* Карта тянется на всю высоту карточки — без белой полосы снизу */
  body .dh-search__grid { align-items: stretch !important; }
  body .dh-search__grid > * { align-self: stretch !important; }
  body .dh-map--live {
    height: 100% !important;
    min-height: 402px !important;
    align-self: stretch !important;
    background: #EFF3EA !important;
  }
  body .dh-map__canvas, body .dh-map__canvas .leaflet-container {
    height: 100% !important;
  }
}


@media (min-width: 861px) and (max-width: 1500px) {
  /* Отступ между меню и кнопкой «Разместить объявление» */
  html body .header__cta { margin-left: 18px !important; padding-left: 0 !important; }
  html body nav.nav { margin-right: 0 !important; }
}

@media (min-width: 861px) {
  /* Профиль в шапке — только аватар: имя дублируется в выпадающем меню,
     а в строке оно вытесняло пункты меню под кнопку «Разместить объявление». */
  html body .user-menu__name, html body .user-menu__chev { display: none !important; }
  html body .user-menu__btn { padding: 3px !important; gap: 0 !important; }
  html body .user-menu__avatar, html body .user-menu__btn img { width: 34px !important; height: 34px !important; }
  /* Ширину меню задаёт содержимое, а не расчёт: иначе контейнер сжимался до 105 px
     и пункты вылезали под кнопку. */
  html body nav.nav { flex: 0 1 auto !important; min-width: max-content !important; }
}

@media (min-width: 861px) and (max-width: 1280px) {
  /* Узкий десктоп: освобождаем строку, чтобы меню не уезжало под кнопку */
  body .header__cta .icon-btn,
  body .alert-btn { display: none !important; }
  body .header__lost-main span { display: none !important; }
  body .header__lost-main { padding: 10px 14px !important; }
  body .header__lost-main::after { content: "Разместить"; font: inherit; letter-spacing: inherit; }
  body .header__cta { gap: 8px !important; }
}


/* PHX: сетка «Последние объявления»
   Заголовок раньше стоял без содержимого — теперь под ним реальная
   подборка, поэтому задаём ритм: отступ от заголовка и плотная сетка
   из четырёх карточек в ряд, как у остальных блоков объявлений. */
@media (min-width: 861px) {
  .dh-last__grid {
    margin-top: 18px;
    padding-bottom: 6px;
  }
  .dh-last__grid:empty { display: none; }
  .dh-last__grid.pets-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}


/* PHX: секция «Последние объявления»
   Раньше лента жила внутри блока с поиском и картой — заголовок относился
   к одной секции, а карточки визуально принадлежали другой. Теперь это
   самостоятельный блок с тем же ритмом, что и остальные секции главной. */
@media (min-width: 861px) {
  .dh-latest {
    padding: 4px 0 44px;
    background: #FFFCF8;
  }
  .dh-latest .dh-last {
    margin: 0 0 0;
  }
  .dh-latest .dh-last__grid {
    margin-top: 18px;
  }
}

/* h2 с классом .eyebrow должен выглядеть как прежний span:
   без браузерных отступов заголовка и без наследования крупного кегля. */
html body #main h2.eyebrow {
  margin: 0 0 16px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* PHX: финальная фиксация цвета заголовка hero.
   Мобильный hero использует h2 (на странице один h1), визуально он должен
   совпадать с прежним h1. Правило последнее в каскаде и с максимальной
   специфичностью, чтобы никакие мобильные оверрайды его не перекрашивали. */
html body.page-home #main .hero__intro :is(h1, h2) {
  color: #1A0F0B !important;
  -webkit-text-fill-color: #1A0F0B !important;
}


/* PHX: мобильная логика главной
   1) «Последние объявления» — десктопная подборка. На телефоне её роль
      выполняет срочная лента в .home-feed, поэтому блок скрываем: иначе
      одни и те же карточки идут дважды и страница удлиняется на ~1700px.
   2) .home-feed теперь лежит прямо в main, а не внутри .container hero,
      поэтому возвращаем ему горизонтальные поля — иначе сетка с отрицательным
      margin вылезает за экран. */
@media (max-width: 860px) {
  .dh-latest { display: none !important; }

  html body .home-feed {
    padding-left: 20px;
    padding-right: 20px;
    margin-top: 18px;
  }
}

@media (max-width: 600px) {
  html body .home-feed {
    padding-left: 15px;
    padding-right: 15px;
    margin-top: 14px;
  }
  /* сетка карточек внутри ленты остаётся с теми же полями, что и была */
  html body .home-feed #urgent-grid {
    margin-left: -15px !important;
    margin-right: -15px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}


/* PHX: поиск в мобильной ленте
   Поиск — главное действие на главной, поэтому стоит первым в ленте,
   до иконок разделов и подборки объявлений. */
@media (max-width: 860px) {
  html body .home-feed > .mp-search {
    display: block !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }
  html body .home-feed > .mp-search .mp-search__row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
  }
  html body .home-feed > .mp-search input {
    flex: 1 1 auto !important;
    width: auto !important;
    height: 50px !important;
    border-radius: 16px !important;
    border: 1px solid #EFE4DD !important;
    background-color: #FFFFFF !important;
    padding: 0 16px 0 46px !important;
    font-size: 15px !important;
    color: #1E120D !important;
    -webkit-text-fill-color: #1E120D !important;
  }
  html body .home-feed > .mp-search button[type="submit"] {
    flex: 0 0 50px !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 16px !important;
    border: 1px solid #EFE4DD !important;
    background-color: #F7ECE4 !important;
    font-size: 0 !important;
    padding: 0 !important;
  }
}

/* PHX: горизонтальный Overflow на телефоне.
   .hero__intro растянут на 100vw — при видимом скроллбаре это даёт
   лишние 8px и страница «гуляет» вбок. clip обрезает выступ, не создавая
   скролл-контейнер (в отличие от hidden) и не ломая sticky-шапку. */
@media (max-width: 860px) {
  html body.page-home .hero { overflow-x: clip; }
}


/* Седьмая плитка «Зоомагазины»: тот же размер и оптический вес,
   что у остальных иконок; на узком десктопе чуть плотнее сетка. */
@media (min-width: 861px) and (max-width: 1180px) {
  body .dh-tiles__inner { gap: 14px; }
}
