/*
Theme Name: Hải Phòng Homeland Rentals
Theme URI: https://haiphonghomeland.com
Author: Hải Phòng Homeland
Description: Theme WordPress cho website chuyên cho thuê nhà ở, mặt bằng kinh doanh và homestay tại Hải Phòng.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: hph-rentals
*/

:root {
  --ink: #13202b;
  --muted: #637381;
  --line: #dde6ea;
  --paper: #ffffff;
  --soft: #f5f8f7;
  --brand: #08746b;
  --brand-dark: #075b54;
  --accent: #b45309;
  --gold: #d99a25;
  --sky: #2563eb;
  --shadow: 0 18px 45px rgba(19, 32, 43, 0.12);
  --soft-shadow: 0 10px 25px rgba(19, 32, 43, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfcfc;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(19, 32, 43, 0.04);
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner,
.footer-grid,
.listing-grid,
.category-grid,
.project-grid,
.service-grid {
  display: grid;
  gap: 24px;
}

.header-inner {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 74px;
}

.brand {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--brand-dark);
  font-size: 18px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.primary-menu {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #273642;
  font-weight: 700;
  font-size: 14px;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius);
}

.primary-menu a:hover {
  background: #edf7f5;
  color: var(--brand-dark);
}

.header-actions,
.cta-row,
.property-actions,
.mobile-sticky {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--soft-shadow);
}

.btn.secondary {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}

.btn.accent {
  background: var(--accent);
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-badge {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: #e7f5f2;
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(8, 116, 107, 0.12);
}

.icon-badge.small {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
}

.hero {
  min-height: 660px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(10, 25, 31, 0.9), rgba(10, 25, 31, 0.62), rgba(10, 25, 31, 0.18)),
    url("assets/hero-rentals.svg") center/cover no-repeat;
  color: #fff;
  border-bottom: 1px solid var(--line);
}

.hero-content {
  width: min(760px, 100%);
  padding: 80px 0;
}

.eyebrow {
  color: #85e4d7;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 68px);
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
}

h3 {
  font-size: 21px;
}

.lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  max-width: 680px;
}

.search-panel {
  margin-top: 28px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 12px;
  border: 0;
  background: #f8fafb;
  font-weight: 900;
  cursor: pointer;
  color: var(--muted);
}

.tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--brand);
}

.search-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 12px;
  padding: 18px;
}

.field,
select,
input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}

select:focus,
input:focus,
textarea:focus {
  outline: 3px solid rgba(8, 116, 107, 0.14);
  border-color: var(--brand);
}

.section {
  padding: 72px 0;
}

.section.soft {
  background: var(--soft);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-head p,
.card p,
.property-meta,
.site-footer {
  color: var(--muted);
}

.section-head p {
  max-width: 700px;
  margin: 0;
}

.category-grid {
  grid-template-columns: repeat(3, 1fr);
}

.project-grid {
  grid-template-columns: repeat(4, 1fr);
}

.card,
.property-card,
.filter-box,
.contact-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(19, 32, 43, 0.02);
}

.card {
  padding: 24px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

a.card:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 116, 107, 0.3);
  box-shadow: var(--soft-shadow);
}

.card strong {
  color: var(--brand-dark);
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
}

.listing-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}

.listing-grid {
  grid-template-columns: repeat(3, 1fr);
}

.property-card {
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.property-card:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 116, 107, 0.3);
  box-shadow: var(--soft-shadow);
}

.property-thumb {
  aspect-ratio: 4 / 3;
  background: #dce7eb;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  overflow: hidden;
}

.property-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.property-card:hover .property-thumb img {
  transform: scale(1.04);
}

.property-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.property-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #dce7eb;
  position: relative;
}

.property-gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.property-gallery a,
.property-thumb a {
  display: block;
  height: 100%;
  cursor: zoom-in;
}

.property-gallery .featured-photo {
  grid-column: span 2;
  grid-row: span 2;
}

.property-body {
  padding: 18px;
}

.price {
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 8px;
}

.property-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  background: #eef7f5;
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.filter-box,
.contact-box {
  padding: 20px;
}

.filter-box label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-hero {
  padding: 54px 0;
  background:
    linear-gradient(135deg, rgba(8, 116, 107, 0.12), rgba(180, 83, 9, 0.08)),
    var(--soft);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  align-items: start;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.spec {
  padding: 14px;
  background: var(--soft);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.spec b {
  display: block;
  color: var(--ink);
}

.spec-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
  color: var(--brand-dark);
  background: #e7f5f2;
}

.site-footer {
  padding: 46px 0 86px;
  background: #17212b;
  color: #cfd8df;
}

.footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.site-footer h3,
.site-footer strong {
  color: #fff;
}

.footer-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.footer-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-list .icon {
  color: #85e4d7;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 16, 22, 0.86);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.mobile-sticky {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 10px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.mobile-sticky .btn {
  flex: 1;
}

@media (max-width: 900px) {
  .wrap {
    width: min(100% - 24px, 1180px);
  }

  .header-inner,
  .listing-layout,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    gap: 12px;
    padding: 12px 0;
  }

  .primary-menu,
  .header-actions {
    justify-content: start;
    flex-wrap: wrap;
  }

  .primary-menu {
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .primary-menu a {
    white-space: nowrap;
  }

  .header-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .search-form,
  .category-grid,
  .project-grid,
  .listing-grid {
    grid-template-columns: 1fr;
  }

  .property-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .property-gallery .featured-photo {
    grid-column: span 2;
    grid-row: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 48px 0;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 19px;
  }

  .lead {
    font-size: 17px;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .tab {
    justify-content: flex-start;
    padding: 13px 16px;
  }

  .section {
    padding: 46px 0;
  }

  .section-head {
    display: block;
  }

  .card,
  .property-body,
  .filter-box,
  .contact-box {
    padding: 18px;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .mobile-sticky {
    display: flex;
  }
}

@media (max-width: 520px) {
  .property-gallery {
    grid-template-columns: 1fr;
  }

  .property-gallery .featured-photo {
    grid-column: auto;
  }

  .mobile-sticky {
    gap: 8px;
  }

  .mobile-sticky .btn {
    padding: 10px 8px;
    font-size: 14px;
  }
}

/* CTA and color refresh: clearer blue identity with stronger orange conversion actions. */
:root {
  --ink: #0f172a;
  --muted: #475569;
  --line: #d8e0ea;
  --soft: #f4f7fb;
  --brand: #0b4f8a;
  --brand-dark: #083b68;
  --brand-soft: #e8f2fb;
  --accent: #e65f1f;
  --accent-dark: #bf4514;
  --gold: #f59e0b;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
}

body {
  background: #f7f9fc;
  color: var(--ink);
}

.brand {
  color: var(--brand-dark);
}

.brand small,
.card strong,
.tab.active,
.price {
  color: var(--brand);
}

.primary-menu a:hover,
.btn.secondary:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn {
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(11, 79, 138, 0.18);
}

.btn:hover {
  background: var(--brand-dark);
}

.btn.accent,
.search-form .btn,
.mobile-sticky .btn.accent,
.detail-hero .btn.accent,
.contact-box .btn.accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(230, 95, 31, 0.28);
}

.btn.accent:hover,
.search-form .btn:hover,
.mobile-sticky .btn.accent:hover,
.detail-hero .btn.accent:hover,
.contact-box .btn.accent:hover {
  background: var(--accent-dark);
}

.btn.secondary {
  color: var(--brand-dark);
  border-color: #8eb7d7;
}

.hero {
  background:
    linear-gradient(90deg, rgba(7, 30, 54, 0.94), rgba(7, 30, 54, 0.78), rgba(7, 30, 54, 0.38)),
    url("assets/hero-rentals.svg") center/cover no-repeat;
}

.hero .eyebrow {
  color: #ffffff;
  background: rgba(230, 95, 31, 0.88);
}

.search-panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.tab.active {
  box-shadow: inset 0 -4px 0 var(--accent);
}

.icon-badge,
.spec-icon,
.pill {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.pill {
  border-color: #c7ddf0;
}

.card:hover,
.property-card:hover {
  border-color: #9fc4e2;
}

.detail-hero {
  background:
    linear-gradient(135deg, rgba(11, 79, 138, 0.12), rgba(230, 95, 31, 0.1)),
    #f4f7fb;
}

.site-footer {
  background: #0b1f33;
}

.footer-list .icon {
  color: #93c5fd;
}

.mobile-sticky {
  background: #ffffff;
}

.mobile-sticky .btn {
  min-height: 50px;
  font-size: 15px;
}

.property-actions .btn:first-child {
  border-color: #8eb7d7;
}

.property-actions .btn:last-child {
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(230, 95, 31, 0.22);
}

.property-actions .btn:last-child:hover {
  background: var(--accent-dark);
}

/* Ocean blue palette */
:root {
  --ink: #0f172a;
  --muted: #475569;
  --line: #d7e3ee;
  --soft: #eef7fb;
  --brand: #0284c7;
  --brand-dark: #075985;
  --brand-soft: #e0f2fe;
  --accent: #0ea5e9;
  --accent-dark: #0369a1;
  --gold: #38bdf8;
  --shadow: 0 18px 44px rgba(2, 132, 199, 0.15);
  --soft-shadow: 0 10px 26px rgba(2, 132, 199, 0.1);
}

.brand,
.brand small,
.card strong,
.tab.active,
.price {
  color: var(--brand-dark);
}

.hero {
  background:
    linear-gradient(90deg, rgba(3, 41, 68, 0.94), rgba(3, 82, 122, 0.78), rgba(3, 105, 161, 0.38)),
    url("assets/hero-rentals.svg") center/cover no-repeat;
}

.hero .eyebrow {
  background: rgba(14, 165, 233, 0.88);
}

.btn,
.btn.accent,
.search-form .btn,
.property-actions .btn:last-child,
.mobile-sticky .btn.accent,
.detail-hero .btn.accent,
.contact-box .btn.accent {
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.26);
}

.btn:hover,
.btn.accent:hover,
.search-form .btn:hover,
.property-actions .btn:last-child:hover,
.mobile-sticky .btn.accent:hover,
.detail-hero .btn.accent:hover,
.contact-box .btn.accent:hover {
  background: var(--accent-dark);
}

.tab.active {
  box-shadow: inset 0 -4px 0 var(--accent);
}

.card:hover,
.property-card:hover {
  border-color: #7dd3fc;
}

.pill {
  border-color: #bae6fd;
}

.detail-hero {
  background:
    linear-gradient(135deg, rgba(2, 132, 199, 0.14), rgba(14, 165, 233, 0.08)),
    #eef7fb;
}

.site-footer {
  background: #082f49;
}

.footer-list .icon {
  color: #7dd3fc;
}

/* Usability refinement: higher contrast, consistent spacing, better desktop/mobile rhythm. */
:root {
  --ink: #111827;
  --muted: #4b5563;
  --line: #d6dee6;
  --paper: #ffffff;
  --soft: #f3f6f8;
  --brand: #006b5f;
  --brand-dark: #064e46;
  --brand-soft: #e6f4f1;
  --accent: #b93815;
  --accent-dark: #8f2d12;
  --gold: #b7791f;
  --shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
  --soft-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

body {
  background: #f8fafb;
  color: var(--ink);
  font-family: "Segoe UI", "Roboto", "Arial", "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1 {
  font-size: 52px;
  line-height: 1.08;
}

h2 {
  font-size: 34px;
  line-height: 1.16;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
}

.site-header {
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  grid-template-columns: 220px 1fr auto;
  gap: 18px;
}

.brand {
  color: var(--ink);
  font-size: 19px;
}

.brand small {
  color: var(--brand);
}

.primary-menu {
  justify-content: center;
  gap: 2px;
  color: #1f2937;
  font-size: 14px;
}

.primary-menu a {
  min-height: 42px;
  padding: 9px 11px;
  color: #1f2937;
}

.primary-menu a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn {
  min-height: 46px;
  padding: 11px 18px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
}

.btn:hover {
  background: var(--brand-dark);
}

.btn.secondary {
  background: #fff;
  color: var(--brand-dark);
  border-color: #7bbcb3;
}

.btn.secondary:hover {
  background: var(--brand-soft);
}

.btn.accent {
  background: var(--accent);
}

.btn.accent:hover {
  background: var(--accent-dark);
}

.hero {
  min-height: 620px;
  background:
    linear-gradient(90deg, rgba(9, 22, 31, 0.92), rgba(9, 22, 31, 0.76), rgba(9, 22, 31, 0.36)),
    url("assets/hero-rentals.svg") center/cover no-repeat;
}

.hero-content {
  width: min(820px, 100%);
}

.eyebrow {
  color: var(--brand);
  background: var(--brand-soft);
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #d7fff7;
  background: rgba(0, 107, 95, 0.55);
}

.lead {
  color: rgba(255, 255, 255, 0.94);
  font-size: 19px;
}

.search-panel {
  border: 1px solid #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.tab {
  color: #374151;
  background: #eef3f5;
  min-height: 54px;
  font-size: 15px;
}

.tab.active {
  color: var(--brand-dark);
  box-shadow: inset 0 -4px 0 var(--brand);
}

.field,
select,
input,
textarea {
  min-height: 48px;
  color: var(--ink);
  border-color: #cbd5df;
}

.field::placeholder,
input::placeholder,
textarea::placeholder {
  color: #6b7280;
}

.section {
  padding: 68px 0;
}

.section.soft {
  background: #eef4f5;
}

.section-head {
  margin-bottom: 28px;
}

.section-head p,
.card p,
.property-meta {
  color: var(--muted);
}

.card,
.property-card,
.filter-box,
.contact-box {
  border-color: #d7e0e7;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.card {
  min-height: 100%;
}

.card strong {
  color: var(--brand-dark);
}

.icon-badge,
.spec-icon {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.price {
  color: var(--accent-dark);
}

.pill {
  background: #edf7f5;
  color: var(--brand-dark);
  border: 1px solid #cde7e2;
}

.property-actions {
  align-items: stretch;
}

.property-actions .btn {
  flex: 1;
  padding: 10px 12px;
}

.spec {
  background: #fff;
}

.site-footer {
  background: #101923;
  color: #d7e0e7;
}

.site-footer p,
.footer-list {
  color: #d7e0e7;
}

.footer-list .icon {
  color: #8ee8dc;
}

@media (min-width: 901px) {
  .header-actions {
    justify-content: flex-end;
  }

  .listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: 1fr;
  }

  .primary-menu {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  body {
    font-size: 15px;
  }

  .wrap {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    gap: 10px;
    min-height: auto;
    padding: 14px 0;
  }

  .brand {
    font-size: 18px;
  }

  .primary-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    overflow: visible;
  }

  .primary-menu a {
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 9px 8px;
    background: #f2f6f7;
    font-size: 13px;
    text-align: center;
    white-space: normal;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 40px 0;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
  }

  h3 {
    font-size: 19px;
  }

  .lead {
    font-size: 16px;
  }

  .search-panel {
    margin-top: 22px;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .tab {
    min-height: 48px;
    justify-content: flex-start;
  }

  .search-form {
    padding: 14px;
    gap: 10px;
  }

  .btn,
  .field,
  select,
  input,
  textarea {
    min-height: 48px;
  }

  .section {
    padding: 42px 0;
  }

  .card,
  .property-body,
  .filter-box,
  .contact-box {
    padding: 16px;
  }

  .listing-grid,
  .category-grid,
  .project-grid,
  .search-form,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .property-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .property-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-sticky {
    padding: 8px 10px;
    box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.12);
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 20px, 1180px);
  }

  .primary-menu {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .property-actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }

  .property-gallery {
    grid-template-columns: 1fr;
  }

  .mobile-sticky {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
