/* Header v4: clean, attractive, perfectly aligned header navigation
   Left: Logo + City | Center: Main Nav tabs | Right: Search, Quick Icons, Post Property
   Bottom: Refined Emerald Category Strip with dropdowns */
:root {
  --rhx-g: #168B3D;
  --rhx-g2: #0f7132;
  --rhx-gbar: #0a4429;
  --rhx-gsoft: #eaf6ee;
  --rhx-ink: #10243B;
  --rhx-mute: #5a6a7e;
  --rhx-line: #e2e8f0;
  --rhx-bg: #ffffff;
  --rhx-field: #f8fafc;
  --rhx-or: #FF8500;
  --rhx-or-dark: #ea7a10;
}

html[data-theme="dark"] {
  --rhx-gsoft: #123524;
  --rhx-ink: #eef3f9;
  --rhx-mute: #9aa9bc;
  --rhx-line: #223046;
  --rhx-bg: #0b1424;
  --rhx-field: #121e33;
  --rhx-gbar: #072b1a;
}

header.site-header.rhx {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 0 !important;
  background: var(--rhx-bg) !important;
  border: 0 !important;
  box-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.12) !important;
  font-family: var(--font-head, Poppins, system-ui, sans-serif);
}

.rhx *, .rhx *:before, .rhx *:after {
  box-sizing: border-box;
}

.rhx a {
  text-decoration: none;
}

.rhx-in {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==================== Top Row ==================== */
.rhx-top {
  position: relative;
  background: var(--rhx-bg);
  border-bottom: 1px solid var(--rhx-line);
}

.rhx-top .rhx-in {
  min-height: 70px;
  gap: 16px;
}

.rhx-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Left Group */
.rhx-brand-group {
  flex: none;
}

.rhx-hamb {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--rhx-line);
  background: none;
  color: var(--rhx-ink);
  font-size: 22px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}

.rhx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.rhx-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.rhx-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.rhx-word b {
  font: 800 24px/1 var(--font-head, Poppins, sans-serif);
  letter-spacing: -0.03em;
}

.rhx-word .w1 { color: #10243B; }
.rhx-word .w2 { color: var(--rhx-or); }
.rhx-word .w3 { color: var(--rhx-g); }
html[data-theme="dark"] .rhx-word .w1 { color: #ffffff; }

.rhx-word small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font: 600 10px/1 var(--font-body, Inter, sans-serif);
  color: var(--rhx-mute);
  white-space: nowrap;
}

.rhx-word small i {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--rhx-or);
}

.rhx-div {
  width: 1px;
  height: 32px;
  background: var(--rhx-line);
  flex: none;
  margin: 0 4px;
}

/* Prominent City Selector next to logo */
.rhx-city {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid rgba(22,139,61, 0.25);
  border-radius: 99px;
  background: var(--rhx-gsoft);
  color: var(--rhx-g);
  cursor: pointer;
  font: 600 13.5px/1 var(--font-head, Poppins, sans-serif);
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(22,139,61, 0.06);
}

.rhx-city:hover, .rhx-city[aria-expanded="true"] {
  border-color: var(--rhx-g);
  background: var(--rhx-g);
  color: #fff;
  transform: translateY(-1px);
}

.rhx-city .ti-map-pin {
  font-size: 16px;
}

.rhx-city .ti-chevron-down {
  font-size: 13px;
  transition: transform 0.2s;
}

.rhx-city[aria-expanded="true"] .ti-chevron-down {
  transform: rotate(180deg);
}

.rhx-city b {
  font-weight: 700;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Center Group: Navigation Tabs */
.rhx-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.rhx-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: 99px;
  color: var(--rhx-ink);
  font: 600 14px/1 var(--font-head, Poppins, sans-serif);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.rhx-tabs a i {
  font-size: 18px;
  color: var(--rhx-mute);
  transition: color 0.2s;
}

.rhx-tabs a:hover {
  background: var(--rhx-field);
  color: var(--rhx-g);
}

.rhx-tabs a:hover i {
  color: var(--rhx-g);
}

.rhx-tabs a.on {
  background: var(--rhx-gsoft);
  color: var(--rhx-g);
}

.rhx-tabs a.on i {
  color: var(--rhx-g);
}

.rhx-tabs .rhx-mob {
  display: none;
}

/* Right Group: Search, Icons, Post CTA */
.rhx-action-group {
  flex: none;
}

.rhx-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  width: 220px;
  padding: 0 4px 0 12px;
  border: 1.5px solid var(--rhx-line);
  border-radius: 99px;
  background: var(--rhx-field);
  transition: all 0.2s ease;
}

.rhx-search:focus-within {
  border-color: var(--rhx-g);
  width: 260px;
  background: #fff;
  box-shadow: 0 4px 14px -4px rgba(22,139,61, 0.2);
}

.rhx-search > i {
  font-size: 16px;
  color: var(--rhx-mute);
}

.rhx-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  font: 500 13px var(--font-body, Inter, sans-serif);
  color: var(--rhx-ink);
}

.rhx-search input::placeholder {
  color: var(--rhx-mute);
}

.rhx-search button {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--rhx-g);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.rhx-search button:hover {
  background: var(--rhx-g2);
}

/* Quick Action Icons */
.rhx-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.rhx-ic {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: none;
  color: var(--rhx-ink);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rhx-ic:hover {
  background: var(--rhx-field);
  color: var(--rhx-g);
}

.rhx-me {
  border: 1.5px solid var(--rhx-line);
  background: var(--rhx-field);
}

.rhx-me:hover {
  border-color: var(--rhx-g);
}

.rhx-av {
  font: 700 15px/1 var(--font-head, Poppins, sans-serif);
}

.rhx-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rhx-or);
  border: 1.5px solid var(--rhx-bg);
}

.rhx-nb {
  position: absolute;
  top: 2px;
  right: 0px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--rhx-or);
  color: #fff;
  font: 700 9px/16px var(--font-body, Inter, sans-serif);
  text-align: center;
}

/* Post Property CTA Button */
.rhx-post {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border-radius: 99px;
  background: linear-gradient(135deg, #ff9f2e, #FF8500);
  color: #fff !important;
  font: 700 14px/1 var(--font-head, Poppins, sans-serif);
  box-shadow: 0 4px 14px -4px rgba(247, 137, 26, 0.7);
  transition: all 0.2s ease;
}

.rhx-post:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -4px rgba(247, 137, 26, 0.9);
  background: linear-gradient(135deg, #ffa73b, #ea7909);
}

.rhx-post i {
  font-size: 16px;
}

.rhx-post .s {
  display: none;
}

.rhx-free {
  position: absolute;
  top: -8px;
  right: -4px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--rhx-g);
  color: #fff;
  font: 800 9.5px/1 var(--font-body, Inter, sans-serif);
  letter-spacing: 0.04em;
  border: 2px solid var(--rhx-bg);
}

/* Account dropdown */
.rhx-acct {
  position: relative;
}

.rhx .acct-menu {
  right: 0;
  top: calc(100% + 10px);
}

.rhx-set {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px 10px;
}

.rhx .rhx-theme {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--rhx-line);
  border-radius: 8px;
  background: none;
  color: var(--rhx-ink);
  font: 600 12.5px var(--font-body, Inter, sans-serif);
  cursor: pointer;
}

.rhx-set .langsw {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--rhx-line);
  border-radius: 8px;
}

.rhx-set .langsw a {
  padding: 4px 8px;
  border-radius: 6px;
  font: 700 11.5px var(--font-body, Inter, sans-serif);
  color: var(--rhx-mute);
}

.rhx-set .langsw a.on {
  background: var(--rhx-g);
  color: #fff;
}

/* ==================== Category Bar ==================== */
.rhx-cats {
  background: linear-gradient(90deg, #093c24, #12633d 50%, #0a472a);
}

.rhx-cats .rhx-in {
  min-height: 48px;
  justify-content: space-between;
  gap: 4px;
}

.rhx-dd {
  position: relative;
}

.rhx-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: #ffffff !important;
  font: 600 13px/1 var(--font-head, Poppins, sans-serif);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 6px;
}

.rhx-cat > .ti:first-child {
  font-size: 17px;
  opacity: 0.9;
}

.rhx-chev {
  font-size: 11px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.rhx-dd:hover .rhx-cat,
.rhx-dd:focus-within .rhx-cat,
.rhx-dd.open .rhx-cat {
  background: rgba(255, 255, 255, 0.15);
}

.rhx-dd:hover .rhx-chev,
.rhx-dd:focus-within .rhx-chev,
.rhx-dd.open .rhx-chev {
  transform: rotate(180deg);
}

.rhx-pop {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 95;
  min-width: 220px;
  padding: 8px;
  border-radius: 12px;
  background: var(--rhx-bg);
  border: 1px solid var(--rhx-line);
  box-shadow: 0 20px 40px -18px rgba(15, 23, 42, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.rhx-pop-r {
  left: auto;
  right: 0;
}

.rhx-dd:hover .rhx-pop,
.rhx-dd:focus-within .rhx-pop,
.rhx-dd.open .rhx-pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(2px);
}

.rhx-pop a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--rhx-ink);
  font: 500 13.5px var(--font-body, Inter, sans-serif);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.rhx-pop a i {
  font-size: 16px;
  color: var(--rhx-g);
}

.rhx-pop a:hover {
  background: var(--rhx-gsoft);
  color: var(--rhx-g);
}

.rhx-pop .rhx-pop-post {
  margin-top: 4px;
  border-top: 1px solid var(--rhx-line);
  color: var(--rhx-g);
  font-weight: 700;
}

.rhx-xs {
  display: none !important;
}

/* ==================== Responsive ==================== */
@media (max-width: 1360px) {
  .rhx-in {
    padding: 0 16px;
  }
  .rhx-tabs a {
    padding: 0 10px;
    font-size: 13px;
  }
  .rhx-search {
    width: 180px;
  }
  .rhx-search:focus-within {
    width: 210px;
  }
  .rhx-cat {
    padding: 0 7px;
    font-size: 12.5px;
  }
}

@media (max-width: 1140px) {
  .rhx-search {
    display: none;
  }
  .rhx-word small {
    display: none;
  }
  .rhx-cats .rhx-in {
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }
  .rhx-cats .rhx-in::-webkit-scrollbar {
    display: none;
  }
  .rhx-chev, .rhx-pop, .rhx-more {
    display: none !important;
  }
  .rhx-xs {
    display: inline-flex !important;
  }
  .rhx-cat {
    flex: none;
  }
}

@media (max-width: 960px) {
  .rhx-top .rhx-in {
    flex-wrap: wrap;
    min-height: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .rhx-hamb {
    display: inline-flex;
  }
  .rhx-tabs {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 6px);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 14px;
    background: var(--rhx-bg);
    border: 1px solid var(--rhx-line);
    box-shadow: 0 20px 40px -16px rgba(15, 23, 42, 0.4);
  }
  .rhx-tabs.open {
    display: flex;
  }
  .rhx-tabs a, .rhx-tabs .rhx-mob {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
  }
  .rhx-action-group {
    margin-left: auto;
  }
}

@media (max-width: 600px) {
  .rhx-in {
    padding: 0 12px;
  }
  .rhx-brand img {
    width: 36px;
    height: 36px;
  }
  .rhx-word b {
    font-size: 20px;
  }
  .rhx-city {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }
  .rhx-city b {
    max-width: 80px;
  }
  .rhx-post {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
  .rhx-post .l {
    display: none;
  }
  .rhx-post .s {
    display: inline;
  }
  .rhx-free {
    top: -7px;
    font-size: 8.5px;
    padding: 1px 5px;
  }
}

/* ==================== Reference layout (2026-11-14) ====================
   Logo | divider | tabs with the icon above the label (active = soft green tile) |
   wide search with a green square arrow | city pill | heart, chat, bell, account | divider | orange Post Property + FREE.
   Category bar: solid deep green, icons + labels spread across the full width. */
.rhx-in { max-width: 1880px; padding: 0 32px; }
.rhx-top .rhx-in { min-height: 84px; gap: 18px; }
.rhx-brand img { width: 52px; height: 52px; }
.rhx-word b { font-size: 30px; }
.rhx-word small { font-size: 11.5px; color: var(--rhx-ink); margin-top: 5px; }
.rhx-word small i { width: 20px; }
.rhx-brand-group .rhx-div { height: 44px; margin: 0 4px 0 10px; }
.rhx-action-group { gap: 14px; }
.rhx-action-group .rhx-div { height: 34px; margin: 0; }

.rhx-tabs { flex: none; gap: 8px; justify-content: flex-start; }
.rhx-tabs a {
  flex-direction: column; justify-content: center; gap: 5px;
  height: 66px; min-width: 96px; padding: 0 14px; border-radius: 12px;
  font: 600 15px/1 var(--font-head, Poppins, sans-serif); color: var(--rhx-ink);
}
.rhx-tabs a i { font-size: 25px; color: var(--rhx-ink); }
.rhx-tabs a.on { background: var(--rhx-gsoft); color: var(--rhx-g); }
.rhx-tabs a.on i { color: var(--rhx-g); }

.rhx-search {
  flex: 1 1 auto; width: auto; min-width: 260px; max-width: 460px; height: 52px;
  padding: 0 5px 0 18px; gap: 10px; border: 1.5px solid var(--rhx-line);
  border-radius: 14px; background: var(--rhx-bg); box-shadow: 0 4px 14px -8px rgba(15, 23, 42, .18);
}
.rhx-search:focus-within { width: auto; }
.rhx-search > i { font-size: 21px; }
.rhx-search input { font-size: 15px; }
.rhx-search button { width: 52px; height: 40px; border-radius: 10px; font-size: 20px; background: #0f7132; }
.rhx-action-group { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }

.rhx-city {
  height: 46px; padding: 0 16px; gap: 8px; border-radius: 99px;
  background: var(--rhx-bg); border: 1.5px solid var(--rhx-line); color: var(--rhx-g);
  font-size: 15px; box-shadow: none;
}
.rhx-city .ti-map-pin { font-size: 20px; }
.rhx-city .ti-chevron-down { font-size: 15px; }
.rhx-city:hover, .rhx-city[aria-expanded="true"] { background: var(--rhx-gsoft); color: var(--rhx-g); border-color: var(--rhx-g); transform: none; }

.rhx-icons { gap: 10px; }
.rhx-ic { width: 44px; height: 44px; font-size: 25px; }
.rhx-me { width: 48px; height: 48px; border: 2px solid var(--rhx-ink); background: none; font-size: 24px; }
.rhx-dot { top: 6px; right: 7px; width: 11px; height: 11px; border: 0; }
.rhx-post { height: 52px; padding: 0 24px; gap: 8px; border-radius: 12px; font-size: 17px; background: #FF8500; }
.rhx-post i { font-size: 20px; }
.rhx-free { top: -11px; right: 0; padding: 4px 10px; font-size: 11px; border: 0; background: #168B3D; }

.rhx-cats { background: #075B46; }
.rhx-cats .rhx-in { min-height: 60px; }
.rhx-cat { height: 60px; gap: 9px; padding: 0 10px; font-size: 15.5px; }
.rhx-cat > .ti:first-child { font-size: 25px; opacity: 1; }
.rhx-chev { font-size: 14px; opacity: .9; }
html[data-theme="dark"] .rhx-cats { background: #0a3d2c; }
html[data-theme="dark"] .rhx-me { border-color: var(--rhx-mute); }

@media (max-width: 1700px) {
  .rhx-in { padding: 0 22px; }
  .rhx-top .rhx-in { gap: 12px; }
  .rhx-word b { font-size: 26px; }
  .rhx-tabs { gap: 4px; }
  .rhx-tabs a { min-width: 80px; padding: 0 10px; font-size: 14px; }
  .rhx-icons { gap: 4px; }
  .rhx-action-group { gap: 10px; }
  .rhx-post { padding: 0 18px; font-size: 15px; }
  .rhx-cat { font-size: 14px; padding: 0 6px; }
  .rhx-cat > .ti:first-child { font-size: 22px; }
}
@media (max-width: 1440px) {
  .rhx-brand img { width: 44px; height: 44px; }
  .rhx-word b { font-size: 23px; }
  .rhx-word small { font-size: 10px; }
  .rhx-tabs a { min-width: 0; height: 60px; padding: 0 9px; font-size: 13px; }
  .rhx-tabs a i { font-size: 22px; }
  .rhx-search { min-width: 180px; height: 46px; }
  .rhx-search button { width: 44px; height: 36px; }
  .rhx-city { height: 42px; padding: 0 12px; font-size: 14px; }
  .rhx-ic { width: 38px; height: 38px; font-size: 22px; }
  .rhx-me { width: 42px; height: 42px; font-size: 21px; }
  .rhx-post { height: 46px; padding: 0 14px; font-size: 14px; }
  .rhx-cat { font-size: 13px; gap: 6px; }
  .rhx-cat > .ti:first-child { font-size: 19px; }
}
@media (max-width: 1140px) {
  .rhx-search { display: none; }
  .rhx-action-group { flex: none; }
}
@media (max-width: 960px) {
  .rhx-tabs { flex-direction: column; }
  .rhx-tabs a, .rhx-tabs .rhx-mob { flex-direction: row; height: 44px; min-width: 0; justify-content: flex-start; font-size: 14px; }
  .rhx-tabs a i { font-size: 20px; }
  .rhx-brand-group .rhx-div { display: none; }
  .rhx-top .rhx-in { min-height: 64px; }
  .rhx-cats .rhx-in { min-height: 52px; }
  .rhx-cat { height: 52px; font-size: 13.5px; }
}
@media (max-width: 600px) {
  .rhx-in { padding: 0 12px; }
  .rhx-brand img { width: 36px; height: 36px; }
  .rhx-word b { font-size: 20px; }
  .rhx-action-group { gap: 8px; }
  .rhx-city { height: 36px; padding: 0 10px; font-size: 13px; }
  .rhx-city .ti-map-pin { font-size: 16px; }
  .rhx-me { width: 36px; height: 36px; font-size: 18px; }
  .rhx-post { height: 38px; padding: 0 12px; font-size: 13px; }
  .rhx-free { top: -8px; font-size: 8.5px; padding: 2px 6px; }
}
html[data-theme="dark"] .rhx-tabs a.on, html[data-theme="dark"] .rhx-tabs a.on i,
html[data-theme="dark"] .rhx-city { color: #5ee08f; }
@media (max-width: 1440px) and (min-width: 1141px) {
  .rhx-top .rhx-in { gap: 10px; }
  .rhx-brand-group .rhx-div { margin-left: 4px; }
  .rhx-tabs { gap: 2px; }
  .rhx-tabs a { padding: 0 8px; }
  .rhx-search { padding-left: 12px; gap: 6px; }
  .rhx-search input { font-size: 13.5px; }
  .rhx-icons { gap: 0; }
  .rhx-action-group { gap: 8px; }
  .rhx-post { padding: 0 12px; }
}
@media (max-width: 1320px) and (min-width: 1141px) {
  .rhx-search > i, .rhx-city .ti-chevron-down { display: none; }
  .rhx-search { min-width: 150px; }
  .rhx-search input::placeholder { font-size: 13px; }
  .rhx-brand-group .rhx-div { display: none; }
}
/* Laptop screens with Windows scaling (1536px = 1920 at 125%): give the search box the room */
@media (max-width: 1700px) and (min-width: 1141px) {
  .rhx-in { padding: 0 18px; }
  .rhx-top .rhx-in { gap: 10px; }
  .rhx-brand { gap: 8px; }
  .rhx-brand-group { gap: 6px; }
  .rhx-brand-group .rhx-div { margin: 0 2px 0 6px; }
  .rhx-tabs { gap: 0; }
  .rhx-tabs a { min-width: 0; padding: 0 10px; }
  .rhx-action-group { gap: 8px; }
  .rhx-search { padding-left: 12px; gap: 6px; }
  .rhx-search button { width: 42px; }
  .rhx-city { padding: 0 12px; gap: 6px; }
  .rhx-icons { gap: 0; }
  .rhx-ic { width: 38px; }
  .rhx-me { width: 42px; height: 42px; margin-left: 4px; }
  .rhx-post { padding: 0 14px; }
}
@media (max-width: 1440px) and (min-width: 1141px) {
  .rhx-post .l { display: none; }
  .rhx-post .s { display: inline; }
  .rhx-post { padding: 0 16px; }
}

/* ==================== Phone / tablet header (≤960px) ====================
   Row 1: menu, logo, bell, account, + Post.  Row 2: city chip + full-width search.
   Category bar: icon above label, scrolls sideways with a fade hint. Saved + Messages live in the menu. */
@media (max-width: 960px) {
  .rhx-top .rhx-in { flex-wrap: wrap; gap: 8px 10px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .rhx-top .rhx-in::after { content: ""; order: 4; flex-basis: 100%; height: 0; }
  .rhx-action-group { display: contents; }
  .rhx-brand-group { order: 1; flex: 1 1 auto; min-width: 0; gap: 10px; }
  .rhx-icons { order: 2; gap: 2px; }
  .rhx-action-group > .rhx-div { display: none; }
  .rhx-post { order: 3; }
  .rhx-city { order: 5; flex: none; }
  .rhx-search { order: 6; display: flex !important; flex: 1 1 0; min-width: 0; max-width: none; height: 42px; border-radius: 12px; padding: 0 4px 0 12px; }
  .rhx-search > i { display: block !important; font-size: 18px; }
  .rhx-search input { font-size: 14px; }
  .rhx-search button { width: 38px; height: 34px; border-radius: 9px; font-size: 17px; }
  .rhx-icons a[href="/favorites"], .rhx-icons a[href="/chat"] { display: none; }
  .rhx-tabs .rhx-mob { display: flex; }
  .rhx-tabs { top: calc(100% + 4px); }
  .rhx-hamb { width: 42px; height: 42px; border-radius: 12px; }

  .rhx-cats { position: relative; }
  .rhx-cats:after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; pointer-events: none; background: linear-gradient(90deg, rgba(7,91,70, 0), #075B46); }
  html[data-theme="dark"] .rhx-cats:after { background: linear-gradient(90deg, rgba(10, 61, 44, 0), #0a3d2c); }
  .rhx-cats .rhx-in { min-height: 0; gap: 2px; padding: 6px 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; justify-content: flex-start; }
  .rhx-cats .rhx-in::-webkit-scrollbar { display: none; }
  .rhx-cats .rhx-dd { flex: none; }
  .rhx-cat { flex-direction: column; justify-content: center; gap: 5px; height: 60px; min-width: 76px; padding: 0 8px; border-radius: 10px; font: 600 11.5px/1.15 var(--font-head, Poppins, sans-serif); white-space: nowrap; scroll-snap-align: start; }
  .rhx-cat > .ti:first-child { font-size: 22px; }
  .rhx-cat:active { background: rgba(255, 255, 255, .14); }
}
@media (max-width: 600px) {
  .rhx-top .rhx-in { padding: 8px 12px 10px; }
  .rhx-brand img { width: 36px; height: 36px; }
  .rhx-word b { font-size: 21px; }
  .rhx-word small { display: none; }
  .rhx-ic { width: 38px; height: 38px; font-size: 21px; }
  .rhx-me { width: 38px; height: 38px; font-size: 19px; border-width: 1.5px; }
  .rhx-post { height: 38px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
  .rhx-city { height: 42px; padding: 0 12px; border-radius: 12px; font-size: 13.5px; }
  .rhx-city b { max-width: 92px; }
  .rhx-search input::placeholder { font-size: 13.5px; }
}
@media (max-width: 380px) {
  .rhx-word b { font-size: 18px; }
  .rhx-brand img { width: 32px; height: 32px; }
  .rhx-city .ti-chevron-down { display: none; }
}
@media (max-width: 960px) {
  .rhx-cats { max-height: 80px; overflow: hidden; transition: max-height .25s ease; }
  .rhx.rhx-fold .rhx-cats { max-height: 0; }
}
@media (max-width: 960px) {
  .rhx-tabs a, .rhx-tabs a.rhx-mob { height: 46px; padding: 0 14px; gap: 12px; border-radius: 10px; font-size: 14.5px; }
  .rhx-tabs a i { font-size: 20px; width: 22px; text-align: center; }
}
/* 9 categories + More in the bar (Services moved 3rd): keep them on one line on laptops */
@media (max-width: 1440px) and (min-width: 1141px) { .rhx-cats .rhx-in { gap: 0; } .rhx-cat { padding: 0 5px; gap: 5px; } }
@media (max-width: 1300px) and (min-width: 1141px) { .rhx-chev { display: none; } .rhx-cat { font-size: 12.5px; padding: 0 4px; } .rhx-cat > .ti:first-child { font-size: 17px; } }
@media (max-width: 1440px) and (min-width: 1141px) { .rhx-cats .rhx-in { padding: 0 12px; } .rhx-cat { font-size: 12.5px; padding: 0 4px; } }
@media (max-width: 1300px) and (min-width: 1141px) { .rhx-cat { font-size: 12px; gap: 4px; padding: 0 3px; } .rhx-cat > .ti:first-child { font-size: 16px; } .rhx-more .rhx-cat span { display: none; } }
/* Narrow phones (≤480px): keep menu, logo, account and + Post on ONE row (the bell moves into the menu's Site visits / Messages) */
@media (max-width: 480px) {
  .rhx-top .rhx-in { gap: 8px 6px; }
  .rhx-brand-group { gap: 6px; flex: 1 1 0; }
  .rhx-hamb { width: 38px; height: 38px; }
  .rhx-brand { gap: 6px; min-width: 0; }
  .rhx-brand img { width: 32px; height: 32px; }
  .rhx-word b { font-size: 18px; }
  .rhx-icons a[href="/visits"] { display: none; }
  .rhx-me { width: 36px; height: 36px; }
  .rhx-post { padding: 0 10px; gap: 4px; height: 36px; }
  .rhx-post i { font-size: 16px; }
}
/* Folding category bar (≤960px): fades as it closes, so it is never seen cut in half */
@media (max-width: 960px) {
  .rhx-cats { max-height: 80px; opacity: 1; transition: max-height .18s ease, opacity .12s ease; }
  .rhx.rhx-fold .rhx-cats { max-height: 0; opacity: 0; pointer-events: none; }
}
@media (max-width: 960px) and (prefers-reduced-motion: reduce) { .rhx-cats { transition: none; } }
/* Folding without moving the page (≤960px): the category bar hangs below the top row, out of the page flow, and the
   header keeps a fixed 72px margin for it. Folding only slides/fades the bar, so the page height never changes
   (changing it made the browser shift the scroll position, which re-triggered the fold: the flicker). */
@media (max-width: 960px) {
  header.site-header.rhx { margin-bottom: 72px; }
  .rhx-top { z-index: 2; }
  .rhx-cats { position: absolute; left: 0; right: 0; top: 100%; z-index: 1; height: 72px; max-height: none; overflow: hidden;
              transform: translateY(0); opacity: 1; transition: transform .2s ease, opacity .15s ease; box-shadow: 0 6px 14px -10px rgba(15, 23, 42, .35); }
  .rhx.rhx-fold .rhx-cats { max-height: none; transform: translateY(-100%); opacity: 0; pointer-events: none; }
  .rhx-cats .rhx-in { height: 72px; }
}

/* Brand = the supplied logo image (house mark + RentHub360 + tagline in one picture, transparent background) */
.rhx-brand .rhx-logo { display: block; width: auto; height: 56px; }
html[data-theme="dark"] .rhx-brand .rhx-logo { background: #fff; padding: 4px 8px; border-radius: 10px; box-sizing: content-box; height: 46px; }
@media (max-width: 1700px) { .rhx-brand .rhx-logo { height: 50px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 42px; } }
@media (max-width: 1440px) { .rhx-brand .rhx-logo { height: 44px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 38px; padding: 3px 6px; } }
@media (max-width: 600px)  { .rhx-brand .rhx-logo { height: 38px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 32px; } }
@media (max-width: 380px)  { .rhx-brand .rhx-logo { height: 33px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 28px; } }
/* logo sizes (final): bigger on desktop so the tagline is readable */
.rhx-brand .rhx-logo { height: 64px; }
html[data-theme="dark"] .rhx-brand .rhx-logo { height: 54px; padding: 4px 8px; }
@media (max-width: 1700px) { .rhx-brand .rhx-logo { height: 60px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 50px; } }
@media (max-width: 1440px) { .rhx-brand .rhx-logo { height: 52px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 44px; padding: 3px 6px; } }
@media (max-width: 960px)  { .rhx-brand .rhx-logo { height: 46px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 38px; } }
@media (max-width: 480px)  { .rhx-brand .rhx-logo { height: 40px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 33px; } }
@media (max-width: 380px)  { .rhx-brand .rhx-logo { height: 36px; } html[data-theme="dark"] .rhx-brand .rhx-logo { height: 30px; padding: 2px 5px; } }

/* Profile menu "Dark mode / Light mode" button: older header rules force .theme-toggle to a 40px (or 28px) square,
   which wrapped the label onto two lines and pushed the icon out. Give it its natural width again. */
.rhx .acct-menu .theme-toggle.rhx-theme,
.site-header.rhx .acct-menu .theme-toggle.rhx-theme { width: auto !important; min-width: 0 !important; height: 34px !important; padding: 0 12px !important; border-radius: 10px !important; white-space: nowrap; flex: none; display: inline-flex !important; place-items: initial; transform: none !important; }
.rhx .acct-menu .theme-toggle.rhx-theme i { font-size: 16px !important; line-height: 1; }
html[data-theme="dark"] .rhx .acct-menu .theme-toggle.rhx-theme { background: rgba(255,255,255,.06) !important; color: #eef2f8 !important; border-color: rgba(255,255,255,.16) !important; }
@media (max-width: 560px) { .rhx .acct-menu .theme-toggle.rhx-theme { display: inline-flex !important; } }

/* "Dark mode" on/off switch in the profile menu: plain row, the pill on the right shows the state. */
.rhx .acct-menu .theme-toggle.rhx-theme { gap: 8px !important; padding: 0 8px 0 10px !important; border: 0 !important; background: none !important; }
html[data-theme="dark"] .rhx .acct-menu .theme-toggle.rhx-theme { background: none !important; border: 0 !important; }
.rhx .acct-menu .theme-toggle.rhx-theme:hover { background: var(--rhx-gsoft, #e6f3eb) !important; }
.rhx-sw { position: relative; flex: none; width: 34px; height: 20px; margin-left: 4px; border-radius: 99px; background: #cbd5e1; transition: background .18s; }
.rhx-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.35); transition: transform .18s; }
.theme-toggle[aria-pressed="true"] .rhx-sw { background: #17804a; }
.theme-toggle[aria-pressed="true"] .rhx-sw::after { transform: translateX(14px); }
html[data-theme="dark"] .rhx-sw { background: #475569; }
html[data-theme="dark"] .theme-toggle[aria-pressed="true"] .rhx-sw { background: #22a352; }
@media (prefers-reduced-motion: reduce) { .rhx-sw, .rhx-sw::after { transition: none; } }

/* "Post Ads" is short enough to show in full from 1181px (the old "Post Property" only fit from 1500px). */
@media (min-width: 1181px) { .rhx-post .l { display: inline !important; } .rhx-post .s { display: none !important; } }

/* 1001-1180px (small laptops, tablets in landscape): the top row was ~100px too wide and cut off Post Property.
   Short "Post" label, and Saved / Messages move to the profile menu (they are listed there too). */
@media (min-width: 1001px) and (max-width: 1180px) {
  .rhx-post .l { display: none !important; }
  .rhx-post .s { display: inline !important; }
  .rhx-icons > .rhx-ic.rhx-hide-s:nth-of-type(1), .rhx-icons > .rhx-ic.rhx-hide-s:nth-of-type(2) { display: none !important; }
  .rhx-city b { max-width: 90px; }
}
