/* Original desktop identity for "Сниму сам". Mobile headers are unchanged. */
@media (min-width:1025px){
  html body>header:first-of-type,
  html body>.search-desktop-header,
  html body>.listing-desktop-header{
    position:sticky!important;
    top:0!important;
    z-index:100!important;
    display:grid!important;
    grid-template-columns:auto minmax(420px,1fr) auto!important;
    grid-template-rows:64px 50px!important;
    width:100%!important;
    height:114px!important;
    padding:0 max(24px,calc((100% - 1440px)/2))!important;
    align-items:center!important;
    column-gap:24px!important;
    border:0!important;
    border-bottom:0!important;
    border-radius:0 0 18px 18px!important;
    background:#faf8f4!important;
    box-shadow:0 9px 28px rgba(37,41,50,.1)!important;
    font-family:"Segoe UI Variable Text","Segoe UI",Arial,sans-serif!important;
    transform:none!important;
  }

  html body>header:first-of-type>.logo,
  .search-desktop-header>.brand,
  .listing-desktop-header>.brand{
    grid-column:1!important;
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    gap:11px!important;
    margin:0!important;
    color:#315f94!important;
    font-size:22px!important;
    font-weight:750!important;
    letter-spacing:-.02em!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    transform:none!important;
  }
  html body>header:first-of-type .logo-icon,
  .search-desktop-header .brand-icon,
  .listing-desktop-header .brand-icon{
    display:grid!important;
    place-items:center!important;
    width:38px!important;
    height:38px!important;
    flex:0 0 38px!important;
    border:0!important;
    border-radius:8px!important;
    background:#315f94!important;
    color:#fff!important;
    box-shadow:none!important;
  }
  html body>header:first-of-type .logo-icon svg,
  .search-desktop-header .brand-icon svg,
  .listing-desktop-header .brand-icon svg{width:23px!important;height:23px!important;stroke:#fff!important;stroke-width:1.9!important}

  html body>header:first-of-type>.desktop-nav,
  .search-desktop-header>.desktop-nav-v2,
  .listing-desktop-header>.desktop-nav-v2{
    grid-column:1 / -1!important;
    grid-row:2!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:3px!important;
    min-width:0!important;
    width:max-content!important;
    max-width:100%!important;
    height:44px!important;
    margin:0!important;
    padding:5px!important;
    border:1px solid #d1e1f5!important;
    border-radius:6px 6px 0 0!important;
    background:#e5f0ff!important;
    transform:none!important;
  }
  html body>header:first-of-type>.desktop-nav>a,
  .search-desktop-header .desktop-nav-v2>a,
  .listing-desktop-header .desktop-nav-v2>a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0 10px!important;
    border:0!important;
    border-radius:4px!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#34404c!important;
    font-size:13px!important;
    font-family:Arial,sans-serif!important;
    font-weight:500!important;
    letter-spacing:.01em!important;
    line-height:1!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    transition:background .18s,color .18s,transform .18s!important;
  }
  html body>header:first-of-type>.desktop-nav>a:hover,
  .search-desktop-header .desktop-nav-v2>a:hover,
  .listing-desktop-header .desktop-nav-v2>a:hover{
    background:#fff!important;
    color:#252932!important;
    transform:translateY(-1px)!important;
  }
  html body>header:first-of-type>.desktop-nav>.add-listing-nav{display:none!important}
  html body>header:first-of-type>.desktop-nav>a:nth-child(1),.desktop-nav-v2>a:nth-child(1){order:2}
  html body>header:first-of-type>.desktop-nav>a:nth-child(2),.desktop-nav-v2>a:nth-child(2){order:1}
  html body>header:first-of-type>.desktop-nav>a:nth-child(3),.desktop-nav-v2>a:nth-child(3){order:4}
  html body>header:first-of-type>.desktop-nav>a:nth-child(4),.desktop-nav-v2>a:nth-child(4){order:3}
  html body>header:first-of-type>.desktop-nav>a:nth-child(5),.desktop-nav-v2>a:nth-child(5){order:6}
  html body>header:first-of-type>.desktop-nav>a:nth-child(6),.desktop-nav-v2>a:nth-child(6){order:5}
  html body>header:first-of-type>.desktop-nav>a:nth-child(7),.desktop-nav-v2>a:nth-child(7){order:8}
  html body>header:first-of-type>.desktop-nav>a:nth-child(8),.desktop-nav-v2>a:nth-child(8){order:7}

  html body>header:first-of-type>.header-actions,
  .search-desktop-header>.desktop-actions-v2,
  .listing-desktop-header>.desktop-actions-v2{
    grid-column:3!important;
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:7px!important;
    margin:0!important;
    transform:none!important;
  }
  html body>header:first-of-type>.header-actions>*,
  .search-desktop-header>.desktop-actions-v2>*,
  .listing-desktop-header>.desktop-actions-v2>*{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0 12px!important;
    border:1px solid #dde1e6!important;
    border-radius:5px!important;
    background:#fff!important;
    box-shadow:none!important;
    color:#34404c!important;
    font-size:13px!important;
    font-family:Arial,sans-serif!important;
    font-weight:600!important;
    letter-spacing:0!important;
    line-height:1!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }
  html body>header:first-of-type .desktop-header-assistant,
  .search-desktop-header .desktop-assistant-v2,
  .listing-desktop-header .desktop-assistant-v2{border-color:#bedaf3!important;background:#dceeff!important;color:#34404c!important}
  .assistant-spark{display:inline-grid!important;place-items:center!important;margin-right:7px!important;color:#397cb8!important;font-size:15px!important;line-height:1!important}
  html body>header:first-of-type .header-favorite-button,
  html body>header:first-of-type .panel-style-theme,
  .search-desktop-header .desktop-actions-v2>a[aria-label="Избранное"],
  .search-desktop-header .desktop-actions-v2>button,
  .listing-desktop-header .desktop-actions-v2>button:not(.desktop-assistant-v2){width:40px!important;min-width:40px!important;padding:0!important;font-size:19px!important}
  html body>header:first-of-type .desktop-header-add,
  .search-desktop-header .desktop-add-v2,
  .listing-desktop-header .desktop-add-v2{
    border-color:#aebbd2!important;
    background:#c7d2e3!important;
    color:#252932!important;
    font-size:0!important;
    font-weight:700!important;
  }
  html body>header:first-of-type .desktop-header-add::after,
  .search-desktop-header .desktop-add-v2::after,
  .listing-desktop-header .desktop-add-v2::after{content:'Подать объявление'!important;font-size:13px!important}
  html body>header:first-of-type .login,
  .search-desktop-header .desktop-login-v2,
  .listing-desktop-header .desktop-login-v2{border-color:#d9dee5!important;background:#e9edf2!important;color:#252932!important}

  html body.dark>header:first-of-type,
  html body.dark>.search-desktop-header,
  html body.dark>.listing-desktop-header{border-bottom:0!important;background:#171a20!important;box-shadow:0 9px 28px rgba(0,0,0,.3)!important}
  html body.dark>header:first-of-type>.logo,
  html body.dark>.search-desktop-header>.brand,
  html body.dark>.listing-desktop-header>.brand{color:#8fb8ee!important}
  html body.dark>header:first-of-type>.desktop-nav,
  html body.dark>.search-desktop-header>.desktop-nav-v2,
  html body.dark>.listing-desktop-header>.desktop-nav-v2{border-color:#363b45!important;background:#22262e!important}
  html body.dark>header:first-of-type>.desktop-nav>a,
  html body.dark>.search-desktop-header .desktop-nav-v2>a,
  html body.dark>.listing-desktop-header .desktop-nav-v2>a{color:#edf0f4!important}
  html body.dark>header:first-of-type>.header-actions>*,
  html body.dark>.search-desktop-header>.desktop-actions-v2>*,
  html body.dark>.listing-desktop-header>.desktop-actions-v2>*{border-color:#3d424d!important;background:#252a33!important;color:#f3f4f6!important}

  @media (max-width:1320px){
    html body>header:first-of-type,
    html body>.search-desktop-header,
    html body>.listing-desktop-header{grid-template-columns:auto minmax(390px,1fr) auto!important;column-gap:14px!important;padding-left:18px!important;padding-right:18px!important}
    html body>header:first-of-type>.desktop-nav>a,
    .search-desktop-header .desktop-nav-v2>a,
    .listing-desktop-header .desktop-nav-v2>a{padding:0 7px!important;font-size:12px!important}
    html body>header:first-of-type .desktop-header-assistant,
    .search-desktop-header .desktop-assistant-v2,
    .listing-desktop-header .desktop-assistant-v2{display:none!important}
  }
  @media (max-width:1150px){
    html body>header:first-of-type{grid-template-columns:42px minmax(0,1fr) auto!important}
    html body>header:first-of-type .logo-text,
    .search-desktop-header>.brand>span:last-child,
    .listing-desktop-header>.brand>span:last-child{display:none!important}
    html body>header:first-of-type>.desktop-nav>a,
    .search-desktop-header .desktop-nav-v2>a,
    .listing-desktop-header .desktop-nav-v2>a{padding:0 5px!important;font-size:11px!important}
    html body>header:first-of-type .desktop-header-add::after,
    .search-desktop-header .desktop-add-v2::after,
    .listing-desktop-header .desktop-add-v2::after{content:'Объявление'!important}
  }

  html body .hero{
    background-image:linear-gradient(90deg,rgba(56,72,94,.42) 0%,rgba(78,94,115,.30) 55%,rgba(104,118,136,.20) 100%),url('assets/hero-living-room.jpg')!important;
    background-size:cover!important;
    background-position:center!important;
    background-repeat:no-repeat!important;
  }
  html body.dark .hero{
    background-image:linear-gradient(90deg,rgba(24,35,52,.68) 0%,rgba(43,57,76,.50) 55%,rgba(62,76,94,.34) 100%),url('assets/hero-living-room.jpg')!important;
  }
}
/* The compact header already supplies tablet and phone controls. */
@media (max-width:1024px){
  html body>header.listing-desktop-header,
  html body>header.search-desktop-header,
  html.nexus-tablet-layout body>header.listing-desktop-header,
  html.nexus-tablet-layout body>header.search-desktop-header{display:none!important}
}
