@media (max-width: 1020px) {
  * {
    -webkit-tap-highlight-color: rgba(20, 87, 217, 0.18);
  }

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  img {
    height: auto;
    max-width: 100%;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  a,
  button,
  input[type="button"],
  input[type="submit"],
  .ui-button {
    min-height: 44px;
  }

  #header,
  .container,
  .breadcrumb,
  #footer-inner,
  .realestate-hero-wrap {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }

  #header,
  .container,
  .breadcrumb,
  #footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  #header {
    min-height: 120px;
  }

  #logo,
  #logo-footer {
    max-width: 55%;
  }

  #logo img,
  #logo-footer img {
    height: auto;
    max-width: 100%;
  }

  #user_menu {
    right: 20px;
  }

  .realestate-hero-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  #main {
    min-height: 0;
  }

  #home-search {
    box-sizing: border-box;
    width: 50%;
  }

  #home-search .input-text {
    box-sizing: border-box;
    max-width: calc(100% - 145px);
    width: calc(100% - 145px);
  }

  #premium-stage {
    right: 20px;
  }

  #right-side,
  .content-item #left-side {
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    width: calc(100% - 255px);
  }

  #sidebar,
  .content-item #right-side {
    box-sizing: border-box;
  }

  .ui-content-box table,
  .ui-content-box tbody,
  .ui-content-box tr,
  .ui-content-box td {
    box-sizing: border-box;
    max-width: 100%;
  }

  .ad-gallery .ad-image-wrapper {
    height: 320px;
  }

  .reviews-list-item .message,
  #comment_form {
    box-sizing: border-box;
    width: calc(100% - 90px);
  }
}

@media (max-width: 820px) {
  body {
    font-size: 16px;
    line-height: 1.45;
  }

  #header {
    height: auto;
    min-height: 0;
    padding-bottom: 20px;
    padding-top: 22px;
    text-align: center;
  }

  #logo,
  #logo-footer {
    display: inline-block;
    float: none;
    max-width: 100%;
  }

  .logo-text {
    top: auto;
  }

  #user_menu {
    clear: both;
    margin-top: 18px;
    position: static;
    right: auto;
    text-align: center;
  }

  #user_menu ul li {
    clear: none;
    float: none;
    line-height: 30px;
    width: auto;
  }

  #user_menu a {
    display: inline-block;
    padding: 4px 6px;
  }

  #form_publish {
    box-sizing: border-box;
    display: inline-block;
    height: auto;
    max-width: 100%;
    padding: 12px 18px;
  }

  #hero-carousel,
  #hero-carousel .hero-slide,
  #hero-carousel .hero-slide img {
    height: 240px;
  }

  #hero-carousel .hero-caption {
    padding: 18px 20px;
  }

  #hero-carousel .hero-caption h2 {
    font-size: 25px;
    line-height: 30px;
  }

  #main {
    display: flex;
    flex-direction: column;
  }

  #home-search {
    order: 1;
    padding-top: 20px;
    width: 100%;
  }

  #home-search h2 {
    font-size: 34px;
    line-height: 40px;
    margin-bottom: 28px;
  }

  #home-search .has-placeholder {
    display: flex;
    gap: 10px;
  }

  #home-search .input-text {
    flex: 1 1 auto;
    max-width: none;
    width: auto;
  }

  #home-search .js-submit {
    flex: 0 0 auto;
  }

  #home-search .categories h2 {
    width: 50%;
  }

  #premium-stage {
    height: auto;
    min-height: 0;
    order: 2;
    padding-top: 20px;
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
  }

  #premium-stage .ui-item {
    left: auto;
    margin: 0 auto;
    position: relative;
    top: auto;
  }

  .content.home,
  .content-item {
    width: 100%;
  }

  #right-side,
  #sidebar,
  .content-item #left-side,
  .content-item #right-side {
    float: none;
    margin: 0 0 24px;
    width: 100%;
  }

  #sidebar {
    clear: both;
  }

  #sidebar .ui-input-text,
  #sidebar input[type="text"],
  #sidebar select,
  .ui-input-text {
    box-sizing: border-box;
    min-height: 44px;
    width: 100%;
  }

  #list_head {
    height: auto;
    text-align: left;
  }

  #list_head .ui-actionbox,
  .paginate .ui-actionbox {
    float: none;
    margin: 10px 0 0;
  }

  #latest-ads {
    box-sizing: border-box;
  }

  .ui-item-list {
    box-sizing: border-box;
    height: auto;
    margin: 12px 1%;
    width: 48%;
  }

  .ui-item-list .frame,
  .ui-item-list .frame img,
  .ui-item-list .info {
    box-sizing: border-box;
    width: 100%;
  }

  .ui-item-list .frame img {
    object-fit: cover;
  }

  .ui-item-list .frame .type {
    box-sizing: border-box;
    width: 100%;
  }

  .ui-content-box table,
  .ui-content-box tbody,
  .ui-content-box tr,
  .ui-content-box td,
  .ui-content-box table .left-side,
  .ui-content-box table .right-side {
    border-left: 0;
    display: block;
    padding: 0;
    width: 100%;
  }

  .ui-content-box table .right-side {
    border-top: 1px solid #d9dde2;
    margin-top: 18px;
    padding-top: 18px;
  }

  .ad-gallery .ad-image-wrapper {
    height: 280px;
  }

  #footer-inner {
    text-align: center;
  }

  #logo-footer {
    display: block;
    margin: 0 auto 20px;
  }

  #footer-nav {
    float: none;
    margin: 0 0 16px;
    width: 100%;
  }

  #footer-nav li {
    display: inline-block;
    float: none;
    margin-bottom: 8px;
  }

  #footer-nav a {
    display: inline-block;
    padding: 6px 2px;
  }
}

@media (max-width: 560px) {
  #header,
  .container,
  .breadcrumb,
  #footer-inner,
  .realestate-hero-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  #user_menu ul li {
    line-height: 32px;
  }

  #user_menu ul li.first {
    display: block;
  }

  #user_menu ul li.first a {
    margin: 0 4px;
  }

  #form_publish {
    display: block;
    margin-top: 10px;
    width: 100%;
  }

  #hero-carousel,
  #hero-carousel .hero-slide,
  #hero-carousel .hero-slide img {
    height: 190px;
  }

  #hero-carousel .hero-caption {
    padding: 14px 16px;
  }

  #hero-carousel .hero-caption h2 {
    font-size: 21px;
    line-height: 25px;
  }

  #hero-carousel .hero-caption p {
    font-size: 13px;
    line-height: 18px;
  }

  #hero-carousel .hero-button {
    padding: 7px 10px;
  }

  #home-search h2,
  h1,
  .home h2 {
    font-size: 30px;
    line-height: 36px;
  }

  #home-search .has-placeholder {
    display: block;
  }

  #home-search .input-text,
  #home-search .js-submit {
    box-sizing: border-box;
    display: block;
    height: auto;
    margin: 0 0 10px;
    min-height: 48px;
    padding: 10px 12px;
    text-align: center;
    width: 100%;
  }

  #home-search .js-submit,
  .ui-button,
  .ui-button-big {
    line-height: 24px;
  }

  #search-placeholder {
    box-sizing: border-box;
    left: 0;
    overflow: hidden;
    right: 0;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #home-search .categories h2 {
    float: none;
    width: 100%;
  }

  #premium-stage .ui-item,
  .ui-item {
    box-sizing: border-box;
    height: auto;
    width: 100%;
  }

  #premium-stage .ui-item .frame,
  #premium-stage .ui-item .frame img,
  #premium-stage .ui-item .info,
  .ui-item .frame,
  .ui-item .frame img,
  .ui-item .info {
    box-sizing: border-box;
    width: 100%;
  }

  #premium-stage .ui-item .frame,
  .ui-item .frame {
    height: auto;
    margin: 0;
  }

  #premium-stage .ui-item .frame img,
  .ui-item .frame img {
    height: auto;
  }

  #premium-stage .ui-item .frame .type,
  .ui-item .frame .type {
    box-sizing: border-box;
    width: 100%;
  }

  #premium-stage .ui-item .info,
  .ui-item .info {
    height: auto;
    min-height: 70px;
    position: relative;
  }

  .ui-item .info .data,
  .ui-item .info .author {
    float: none;
    text-align: left;
    width: 100%;
  }

  .ui-item-list {
    float: none;
    margin: 12px 0;
    width: 100%;
  }

  .ad-gallery .ad-image-wrapper {
    height: 220px;
  }

  .reviews-list-item .profile_pic {
    float: none;
    margin-bottom: 10px;
  }

  .reviews-list-item .message,
  #comment_form {
    float: none;
    margin-left: 0;
    width: 100%;
  }

  .ui-generic-form-content label,
  .ui-generic-form .actions {
    box-sizing: border-box;
    float: none;
    padding-left: 0;
    width: 100%;
  }

  .ui-generic-form-content input,
  .ui-generic-form-content textarea,
  #comment_form .ui-generic-form-content input,
  #comment_form .ui-generic-form-content textarea,
  .single-form,
  .tabbertab input,
  .tabbertab textarea {
    box-sizing: border-box;
    min-height: 44px;
    width: 100%;
  }

  textarea,
  #comment_form .ui-generic-form-content textarea,
  .tabbertab textarea {
    min-height: 120px;
  }
}
