/* ============================================================
   Đức Sơn Nhà Đất — Main Stylesheet
   Mobile-first: base = mobile, scale up with min-width.
   Pixel parity with design-reference/ducsonnhadat-homepage-demo.html
   ============================================================ */

/* ── 1. CSS VARIABLES (design tokens) ──────────────────────── */
:root {
  /* Brand */
  --navy:        #0A1628;
  --gold:        #8B5E2B;
  --gold-dk:     #7A5224;

  /* Backgrounds */
  --bg:          #F7F5F0;
  --bg-white:    #FAFAF8;
  --bg-alt:      #F5EDE0;
  --white:       #ffffff;

  /* Borders */
  --border:      #E2D8CA;
  --border-hov:  #C4A07A;

  /* Text */
  --text:        #0A1628;
  --text-nav:    #4a5568;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --text-xlight: #bbb;

  /* Typography */
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;

  /* Radii */
  --r-card:  8px;
  --r-btn:   3px;
  --r-input: 4px;
  --r-badge: 3px;
  --r-chip:  20px;
  --r-pill:  30px;

  /* Shadows */
  --sh-card:   0 10px 40px rgba(10,22,40,.10);
  --sh-hover:  0 16px 48px rgba(10,22,40,.15);
  --sh-news:   0 6px  24px rgba(10,22,40,.08);
  --sh-area:   0 4px  20px rgba(139,94,43,.10);
  --sh-search: 0 -8px 48px rgba(0,0,0,.20);

  /* Layout */
  --nav-h:     60px;
  --content-w: 1280px;
}

/* ── 2. RESET + BASE ────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background:  var(--bg);
  color:       var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

button { cursor: pointer; font-family: var(--font-sans); }

address { font-style: normal; }

ul, ol { list-style: none; padding: 0; }

/* ── 3. TYPOGRAPHY HELPERS ──────────────────────────────────── */
.serif { font-family: var(--font-serif); }

/* ── 4. SKIP NAV (accessibility) ────────────────────────────── */
.skip-nav {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--white);
  padding: 8px 16px;
  font-size: 13px;
  z-index: 999;
  border-radius: 0 0 4px 0;
  text-decoration: none;
}
.skip-nav:focus { left: 0; }

/* Phase 10G — thanh chiến dịch (tuỳ chọn) */
.dsnd-campaign-bar {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  font-size: 12px;
  padding: 8px 16px;
  line-height: 1.4;
}
.dsnd-campaign-bar a {
  color: var(--gold);
  text-decoration: none;
}
.dsnd-campaign-bar a:hover { text-decoration: underline; }

/* ── 5. NAV ─────────────────────────────────────────────────── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Logo */
.logo-wrap {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.logo-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .5px;
}
.logo-tag {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 1px;
}
.logo-wrap--image .logo-img {
  display: block;
  height: auto;
  max-height: 44px;
  width: auto;
  max-width: min(180px, 32vw);
  object-fit: contain;
}

/* Desktop nav links — hidden on mobile */
.nav-links {
  display: none;
  gap: 18px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: var(--text-nav);
  text-decoration: none;
  letter-spacing: .3px;
}
.nav-links a:hover { color: var(--gold); }

/* Nav right */
.nav-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }

.nav-trust {
  display: none;
  font-size: 11px;
  color: var(--text-xlight);
  max-width: 200px;
  line-height: 1.35;
}

.hotline {
  display: none;
  font-size: 12px;
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}
.hotline span { color: var(--gold); }

.nav-cta {
  display: none;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: var(--r-btn);
  text-decoration: none;
  transition: background .2s;
}
.nav-cta:hover { background: var(--gold); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: .3s;
}

/* ── 6. MOBILE MENU OVERLAY ─────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 100;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}
.mobile-menu-header .logo-wrap--image { flex-direction: row; align-items: center; }
.mobile-menu-header .logo-img { max-height: 40px; width: auto; }
.mobile-menu-close {
  font-size: 24px;
  background: none;
  border: none;
  color: var(--navy);
  line-height: 1;
  padding: 4px;
}

.mobile-menu a {
  font-size: 18px;
  font-family: var(--font-serif);
  color: var(--navy);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-alt);
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .mob-cta {
  margin-top: 28px;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 16px;
  border-radius: var(--r-btn);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: none !important;
}
.mob-hotline {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.mob-hotline span { color: var(--gold); font-weight: 500; }

/* ── 7. HERO ────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding: 48px 16px 0;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  opacity: .03;
  background-image:
    linear-gradient(rgba(139,94,43,1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,94,43,1) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  border: 1px solid rgba(212,163,64,.5);
  color: #D4A340;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 28px;
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 14px;
}
.hero-h1 em { color: #D4A340; font-style: italic; }

.hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin-bottom: 28px;
  line-height: 1.85;
}

/* ── 8. SEARCH MEGA FORM ────────────────────────────────────── */
.search-mega {
  background: var(--white);
  border-radius: 6px 6px 0 0;
  padding: 20px 16px 18px;
  box-shadow: var(--sh-search);
}

.search-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--bg-alt);
  margin-bottom: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stab {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 8px 14px 12px;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: .2s;
  white-space: nowrap;
}
.stab.on  { color: var(--navy); border-bottom-color: var(--gold); font-weight: 500; }
.stab:hover { color: var(--navy); }

/* Mobile: single column search */
.search-row1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.field label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
  display: block;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r-input);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--navy);
  font-family: var(--font-sans);
  background: var(--bg-white);
  outline: none;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field select:focus {
  border-color: var(--gold);
  background: var(--white);
}
.field input::placeholder { color: var(--text-xlight); }

.sbtn {
  background: var(--gold);
  color: var(--white);
  border: none;
  padding: 14px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--r-input);
  font-family: var(--font-sans);
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s;
  width: 100%;
}
.sbtn:hover { background: var(--gold-dk); }

/* Quick chips — hidden on mobile */
.search-row2 { display: none; }

.chip-label { font-size: 11px; color: var(--text-light); }
.chip {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 11px;
  padding: 6px 14px;
  border-radius: var(--r-chip);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--gold); color: var(--gold); background: var(--white); }

/* ── 9. STATS BAR ───────────────────────────────────────────── */
.stats {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.stt {
  text-align: center;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stt:nth-child(2n)        { border-right: none; }
.stt:nth-last-child(-n+2) { border-bottom: none; }

.stt-n {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--gold);
}
.stt-l {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 4px;
}

/* ── 10. SECTION HEADER ─────────────────────────────────────── */
.sec-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.sec-eye {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.sec-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--navy);
}
.see-all {
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: .5px;
  border-bottom: 1px solid rgba(139,94,43,.4);
  padding-bottom: 2px;
  white-space: nowrap;
}
.see-all:hover { border-bottom-color: var(--gold); }

/* ── 11. FILTER BAR ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-label { display: none; }

.ftag {
  background: var(--white);
  border: 1px solid var(--border);
  color: #374151;
  font-size: 11px;
  padding: 7px 14px;
  border-radius: var(--r-chip);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  font-family: var(--font-sans);
}
.ftag.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ftag:hover:not(.active) { border-color: var(--gold); color: var(--gold); }

.sort-wrap { width: 100%; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.sort-label { display: none; }
.sort-sel {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  padding: 8px 12px;
  font-size: 12px;
  font-family: var(--font-sans);
  background: var(--white);
  color: #374151;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.result-count { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.result-count strong { color: var(--navy); }

/* ── 12. CONTENT SECTIONS (padding wrapper) ─────────────────── */
.content { padding: 24px 16px; }

/* ── 13. PROPERTY CARD (.lcard) ─────────────────────────────── */
.listing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lcard {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .25s, border-color .25s;
}
.lcard:hover { box-shadow: var(--sh-card); border-color: var(--border-hov); }
.lcard.featured { grid-column: span 2; }

/* Card image */
.cimg { position: relative; overflow: hidden; }
.cimg-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cimg-inner.tall { height: 180px; }
.cimg-inner.norm { height: 140px; }
.cimg-inner.sm   { height: 120px; }

/* Gradient placeholders */
.c1 { background: linear-gradient(135deg,#dce8f0,#b8d0e8); }
.c2 { background: linear-gradient(135deg,#e8dcd0,#d4b896); }
.c3 { background: linear-gradient(135deg,#d8e8dc,#b0ceb8); }
.c4 { background: linear-gradient(135deg,#e8e0d8,#cfc0a8); }
.c5 { background: linear-gradient(135deg,#dce0e8,#b8c0d4); }
.c6 { background: linear-gradient(135deg,#e8dce0,#d4b0bc); }
.c7 { background: linear-gradient(135deg,#e4e8d8,#c4c8a4); }
.c8 { background: linear-gradient(135deg,#e8e8dc,#d0d0b0); }

.house-svg { opacity: .2; }
.pin-svg   { flex-shrink: 0; }

/* Badge */
.cbadge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-badge);
  font-weight: 500;
}
.cbadge.hot   { background: var(--gold);             color: var(--white); }
.cbadge.new   { background: var(--navy);             color: var(--white); }
.cbadge.rent  { background: rgba(255,255,255,.92);   color: var(--navy); border: 1px solid #eee; }
.cbadge.price { background: #e74c3c;                 color: var(--white); }

/* Save button */
.save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,.92);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background .2s, color .2s;
}
.save-btn:hover { background: var(--white); color: #e74c3c; }

/* Card body */
.cbody { padding: 12px 12px 14px; }

.cprice {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 5px;
}
.cprice.lg { font-size: 18px; }

.ctitle {
  font-size: 12px;
  color: var(--navy);
  margin-bottom: 7px;
  line-height: 1.5;
  font-weight: 400;
}

.cloc {
  font-size: 10px;
  color: var(--text-light);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cmeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--bg-alt);
  padding-top: 10px;
  list-style: none;
}
.cmet {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.cmet-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.ctag-row { display: none; }
.ctag { font-size: 10px; background: var(--bg); color: var(--text-muted); padding: 4px 9px; border-radius: 4px; }

.agent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--bg-alt);
  padding-top: 10px;
  margin-top: 6px;
}
.agent-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--gold);
  font-weight: 500;
  flex-shrink: 0;
}
.agent-name  { font-size: 11px; color: var(--text-muted); display: none; }
.agent-phone { font-size: 12px; color: var(--gold); margin-left: auto; font-weight: 500; text-decoration: none; }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 36px; }
.load-more-btn {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--navy);
  padding: 14px 32px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--r-btn);
  font-family: var(--font-sans);
  transition: background .2s, color .2s;
}
.load-more-btn:hover { background: var(--navy); color: var(--white); }

/* Cat footer (grid bottom) */
.cat-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.cat-count { font-size: 13px; color: var(--text-light); }
.cat-view-all-btn {
  background: var(--navy);
  color: var(--white);
  padding: 12px 28px;
  border-radius: var(--r-btn);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background .2s;
  font-family: var(--font-sans);
  text-align: center;
}
.cat-view-all-btn:hover { background: var(--gold); }

/* ── 14. FEATURED SLIDER ────────────────────────────────────── */
.featured-section { padding: 28px 16px 24px; }

.slider-nav-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.slider-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 14px;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
  line-height: 1;
}
.slider-btn:hover { border-color: var(--gold); color: var(--gold); }

.slider-dots { display: flex; gap: 6px; align-items: center; }
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all .3s;
  padding: 0;
  flex-shrink: 0;
}
.slider-dot.active { background: var(--gold); width: 22px; border-radius: 4px; }

/* Scroll-snap container */
.feat-slider-outer {
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--r-card);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.feat-slider-outer::-webkit-scrollbar { display: none; }

.feat-slider { display: flex; }

.feat-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Featured card — mobile: stack */
.feat-card {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--white);
}
.feat-img {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Tỷ lệ ngang 4:3 trên mobile — ngăn ảnh dọc kéo giãn block */
  aspect-ratio: 4 / 3;
  overflow: hidden;
  /* min-height fallback cho trình duyệt cũ không hỗ trợ aspect-ratio */
  min-height: 200px;
}
/* Ảnh bên trong luôn cover khung — không bao giờ bị méo dù ảnh dọc hay ngang */
.feat-img > img,
.feat-img > .feat-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* Ưu tiên phần trên (mặt tiền nhà, không cắt mất) */
  display: block;
  /* max-width: none đảm bảo không có rule nào override kích thước đã set */
  max-width: none;
}
.feat-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.feat-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.feat-type {
  font-size: 11px;
  letter-spacing: .5px;
  background: var(--bg-alt);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--r-btn);
}
.feat-status {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--r-btn);
}
.feat-status.green { background: #dcfce7; color: #166534; }
.feat-status.blue  { background: #dbeafe; color: #1e40af; }

.feat-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: 10px;
}
.feat-title a { text-decoration: none; color: inherit; }
.feat-title a:hover { color: var(--gold); }

.feat-cmeta { flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ── 15. CAT SECTIONS ───────────────────────────────────────── */
.cat-section     { padding: 0 16px 40px; }
.cat-section-alt { background: var(--white); padding: 40px 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── 16. AREA CARDS ─────────────────────────────────────────── */
.areas { background: var(--white); padding: 32px 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.area-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.acard {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, background .2s, box-shadow .2s;
  color: var(--navy);
  display: block;
  text-decoration: none;
}
.acard:hover { border-color: var(--gold); background: #FDFCFA; box-shadow: var(--sh-area); }

.a-num {
  font-size: 36px;
  font-family: var(--font-serif);
  color: var(--bg-alt);
  position: absolute;
  right: 12px;
  bottom: 6px;
  font-weight: 600;
  line-height: 1;
}
.a-name  { font-family: var(--font-serif); font-size: 15px; color: var(--navy); margin-bottom: 5px; }
.a-count { font-size: 12px; color: var(--gold); font-weight: 500; }
.a-sub   { font-size: 10px; color: var(--text-light); margin-top: 3px; }

/* ── 17. NEWS SECTION ───────────────────────────────────────── */
.news-section { padding: 32px 16px; background: var(--bg); }

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Main news card */
.news-main {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .25s, border-color .25s;
}
.news-main:hover { box-shadow: var(--sh-card); border-color: var(--border-hov); }

.news-main-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.ni1 { background: linear-gradient(135deg,#d4e4f0,#a8c8e0); }
.ni2 { background: linear-gradient(135deg,#e0d4c8,#c8b090); }
.ni3 { background: linear-gradient(135deg,#d8e8d8,#b0ccb0); }
.ni4 { background: linear-gradient(135deg,#e8dcd0,#c8a888); }
.ni5 { background: linear-gradient(135deg,#d8d8e8,#b0b0cc); }
.ni6 { background: linear-gradient(135deg,#e8e0d0,#c8c0a0); }

.news-icon-img { opacity: .18; }

.news-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--r-badge);
  font-weight: 500;
}
.news-cat.thi-truong { background: var(--navy); color: var(--gold); }
.news-cat.phong-thuy { background: var(--gold); color: var(--white); }
.news-cat.phap-ly    { background: #2563eb;     color: var(--white); }
.news-cat.quy-hoach  { background: #059669;     color: var(--white); }

.news-main-body { padding: 22px 24px 24px; }
.news-main-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: 10px;
}
.news-main-title a { text-decoration: none; color: inherit; }
.news-main-desc  { font-size: 13px; color: var(--text-muted); line-height: 1.75; margin-bottom: 14px; }

.news-meta { display: flex; align-items: center; gap: 12px; }
.news-date { font-size: 11px; color: var(--text-light); }
.news-read {
  font-size: 11px;
  color: var(--gold);
  margin-left: auto;
  border-bottom: 1px solid rgba(139,94,43,.35);
  padding-bottom: 1px;
  text-decoration: none;
}

/* Side news cards */
.news-side { display: flex; flex-direction: column; gap: 12px; }

.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  transition: box-shadow .2s, border-color .2s;
}
.news-card:hover { box-shadow: var(--sh-news); border-color: var(--border-hov); }

.news-card-img {
  width: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.news-card-body { padding: 14px 16px; flex: 1; }
.news-card-cat {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 500;
  display: block;
}
.news-card-cat.thi-truong { color: var(--navy); }
.news-card-cat.phap-ly    { color: #2563eb; }
.news-card-cat.quy-hoach  { color: #059669; }
.news-card-cat.phong-thuy { color: var(--gold); }

.news-card-title { font-size: 13px; color: var(--navy); line-height: 1.5; margin-bottom: 8px; }
.news-card-title a { text-decoration: none; color: inherit; }
.news-card-date { font-size: 11px; color: var(--text-light); }

/* ── 18. CTA BANNER ─────────────────────────────────────────── */
.cta-banner {
  background: var(--navy);
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.cta-eye  { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.cta-title {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--white);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 12px;
}
.cta-desc { font-size: 14px; color: rgba(255,255,255,.5); line-height: 1.85; max-width: 100%; }

.cta-btns { display: flex; flex-direction: column; width: 100%; gap: 12px; }

.btn-gold {
  background: var(--gold);
  color: var(--white);
  padding: 15px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--r-btn);
  font-family: var(--font-sans);
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s;
  text-align: center;
  text-decoration: none;
  display: block;
}
.btn-gold:hover { background: var(--gold-dk); }

.btn-wht {
  background: transparent;
  color: rgba(255,255,255,.75);
  padding: 15px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--r-btn);
  font-family: var(--font-sans);
  white-space: nowrap;
  transition: border-color .2s, color .2s;
  text-align: center;
  text-decoration: none;
  display: block;
}
.btn-wht:hover { border-color: rgba(255,255,255,.5); color: var(--white); }

/* ── 19. FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.footer-logo { font-family: var(--font-serif); font-size: 18px; color: var(--navy); }
.footer-logo span { color: var(--gold); }

.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links a { font-size: 12px; color: var(--text-light); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--gold); }

.footer-text { font-size: 11px; color: var(--text-xlight); }

.footer-company {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-light);
  max-width: 520px;
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 12px;
  color: var(--text-light);
}
.footer-contact a { color: var(--navy); text-decoration: none; }
.footer-contact a:hover { color: var(--gold); }
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 12px;
}
.footer-social a {
  color: var(--text-light);
  text-decoration: none;
}
.footer-social a:hover { color: var(--gold); }

/* ── 20. FLOATING CTA (mobile only) ─────────────────────────── */
.floating-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  z-index: 50;
  border-top: 1px solid var(--border);
}
.floating-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  font-family: var(--font-sans);
  transition: background .2s;
}
.floating-call { background: var(--navy); color: var(--white); }
.floating-call:hover { background: var(--gold); }
.floating-zalo { background: var(--gold); color: var(--white); }
.floating-zalo:hover { background: var(--gold-dk); }

/* ── 21. RESPONSIVE — TABLET (min-width: 641px) ─────────────── */
@media (min-width: 641px) {

  :root { --nav-h: 68px; }

  /* Nav */
  .nav          { padding: 0 24px; }
  .nav-links    { display: flex; }
  .hotline      { display: block; }
  .nav-cta      { display: block; }
  .hamburger    { display: none; }
  .nav-trust    { display: block; }

  /* ══ NAV TABLET BASELINE (641px+) ════════════════════════════════
     Logo: 0 0 auto — không grow, không shrink, natural width.
     Nav-links: flex container, lấy space còn lại.
     Nav-right: không wrap, có thể co nhẹ (flex: 0 1 auto).
     Logo text: white-space:nowrap — không xuống dòng dù bị ép.
     ═══════════════════════════════════════════════════════════════ */
  .logo-wrap                 { flex: 0 0 auto; }
  .logo-name, .logo-tag      { white-space: nowrap; }
  .nav-links                 { flex: 1 1 auto; min-width: 0; }
  .nav-right                 { flex: 0 1 auto; flex-wrap: nowrap; }

  /* STICKY NAV ADMIN-BAR OFFSET:
     WP inject html{margin-top:32px} khi admin-bar visible.
     Sticky nav top:32px → stick ngay dưới admin bar, không bị che. */
  body.admin-bar .nav        { top: 32px; }
  /* Mobile admin bar (46px) xem @media max-width:782px ở cuối file */

  /* Hero */
  .hero         { padding: 60px 24px 0; }
  .hero-badge   { font-size: 10px; letter-spacing: 3px; padding: 7px 20px; }
  .hero-h1      { font-size: 42px; line-height: 1.18; }
  .hero-sub     { font-size: 15px; margin-bottom: 44px; }

  /* Search */
  .search-mega  { padding: 28px 32px 24px; }
  .stab         { font-size: 12px; padding: 8px 22px 12px; }
  .search-row1  { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
  .sbtn         { width: auto; padding: 12px 30px; }
  .search-row2  { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

  /* Stats */
  .stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .stt {
    padding: 18px 32px;
    flex: 1 1 33%;
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  .stt:last-child       { border-right: none; }
  .stt:nth-child(2n)    { border-right: 1px solid var(--border); }
  .stt-n { font-size: 30px; }

  /* Content */
  .content { padding: 36px 24px; }

  /* Listing grid — 3 columns */
  .listing-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .lcard.featured { grid-column: span 3; }

  /* Card sizes */
  .cimg-inner.tall { height: 230px; }
  .cimg-inner.norm { height: 172px; }
  .cimg-inner.sm   { height: 148px; }
  .cbody           { padding: 16px 18px 18px; }
  .cprice          { font-size: 20px; }
  .cprice.lg       { font-size: 24px; }
  .ctitle          { font-size: 13px; }
  .cloc            { font-size: 11px; }
  .cmet            { font-size: 11px; }
  .ctag-row        { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
  .agent-name      { display: block; }

  /* Load more */
  .load-more-btn { padding: 14px 56px; font-size: 12px; }

  /* Areas — 3 columns */
  .areas      { padding: 36px 24px; }
  .area-grid  { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .a-num      { font-size: 40px; }
  .sec-title  { font-size: 30px; }

  /* News — 2 columns */
  .news-section { padding: 36px 24px; }
  .news-grid    {
    grid-template-columns: 1fr 1fr;
  }
  .news-main-img    { height: 240px; }
  .news-main-title  { font-size: 20px; }
  .news-card-img    { width: 96px; }
  .news-side:last-child { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

  /* CTA — horizontal */
  .cta-banner { padding: 48px 24px; flex-direction: column; gap: 28px; }
  .cta-btns   { flex-direction: row; justify-content: center; width: auto; }
  .btn-gold,
  .btn-wht    { display: inline-block; padding: 15px 36px; width: auto; }
  .cta-title  { font-size: 32px; }

  /* Footer */
  .footer {
    padding: 24px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .footer-links { gap: 16px; }

  /* Sections */
  .cat-section     { padding: 0 24px 40px; }
  .cat-section-alt { padding: 40px 24px; }
  .cat-footer      { flex-direction: row; align-items: center; text-align: left; }
  .cat-view-all-btn { text-align: center; }

  /* Featured slider */
  .featured-section { padding: 36px 24px 28px; }
  .feat-card { grid-template-columns: 1fr 1fr; }
  .feat-body { padding: 28px 28px 24px; }
  .feat-title { font-size: 19px; }
  .slider-btn { width: 36px; height: 36px; font-size: 16px; }
  /* Tablet/Desktop side-by-side: height cố định, object-fit:cover xử lý crop */
  .feat-img {
    aspect-ratio: unset;
    height: 300px;
    min-height: unset;
  }

  /* Filter bar */
  .filter-label { display: block; font-size: 12px; color: var(--text-muted); }
  .sort-wrap    { width: auto; margin-top: 0; margin-left: auto; }
  .sort-label   { display: block; font-size: 12px; color: var(--text-light); }
  .sort-sel     { width: auto; }

  /* Hide floating CTA on larger screens */
  .floating-cta { display: none; }
}

/* ── 21b. RESPONSIVE — DESKTOP FULL (min-width: 992px) ──────── */
/* Áp dụng full flex contract. Tất cả nav items hiện đủ kể cả "Đăng tin".
   Gap nhỏ hơn (14px) để vừa viewport 992–1199px. */
@media (min-width: 992px) {

  /* ══ FLEX CONTRACT CỐT LÕI — broker + non-broker pages ════════
     logo-wrap:  0 0 auto — fixed, không co, không giãn.
     nav-links:  1 1 auto — lấy toàn bộ space còn lại, ko wrap text.
     nav-right:  0 1 auto — không grow, co được một chút khi cần.
     Hotline/CTA/Đăng tin: không set flex-shrink cứng, để co theo nav-right.
     ════════════════════════════════════════════════════════════= */
  .logo-wrap  { flex: 0 0 auto; }
  .nav-links  { flex: 1 1 auto; min-width: 0; white-space: nowrap; gap: 14px; }
  .nav-right  { flex: 0 1 auto; display: flex; align-items: center; flex-wrap: nowrap; gap: 12px; }
}

/* ── 22. RESPONSIVE — DESKTOP (min-width: 1025px) ───────────── */
@media (min-width: 1025px) {

  /* Nav */
  .nav        { padding: 0 48px; }
  /* Reinforce flex contract tại desktop wide (1025px+) — gap 28px */
  .logo-wrap  { flex: 0 0 auto; }
  .nav-links  { flex: 1 1 auto; min-width: 0; white-space: nowrap; gap: 28px; }
  .nav-right  { flex: 0 1 auto; flex-wrap: nowrap; gap: 14px; }

  /* Hero */
  .hero      { padding: 80px 48px 0; }
  .hero-h1   { font-size: 54px; }

  /* Stats — single row */
  .stats { flex-wrap: nowrap; }
  .stt   { flex: unset; padding: 22px 56px; border-bottom: none; }
  .stt:nth-child(2n) { border-right: 1px solid var(--border); }
  .stt:last-child    { border-right: none; }

  /* Content */
  .content { padding: 52px 48px; }

  /* Listing grid — 4 columns */
  .listing-grid { grid-template-columns: repeat(4, 1fr); }
  .lcard.featured { grid-column: span 2; }

  /* Areas — 5 columns */
  .areas     { padding: 52px 48px; }
  .area-grid { grid-template-columns: repeat(5, 1fr); }

  /* News — 3-column layout */
  .news-section { padding: 52px 48px; }
  .news-grid    { grid-template-columns: 1.7fr 1fr 1fr; }
  .news-side:last-child { grid-column: unset; display: flex; flex-direction: column; }

  /* CTA */
  .cta-banner { padding: 64px 48px; flex-direction: row; justify-content: space-between; text-align: left; gap: 48px; }
  .cta-desc   { max-width: 500px; }
  .cta-title  { font-size: 36px; }

  /* Footer */
  .footer { padding: 30px 48px; flex-wrap: nowrap; }
  .footer-links { gap: 26px; }

  /* Sections */
  .cat-section     { padding: 0 48px 52px; }
  .cat-section-alt { padding: 52px 48px; }
  .featured-section { padding: 52px 48px 40px; }

  /* Featured card */
  .feat-card { grid-template-columns: 1.15fr 1fr; }
  /* Desktop lớn: tăng chiều cao ảnh */
  .feat-img { height: 340px; }
}

/* ── 23. WIDE (min-width: 1280px) ───────────────────────────── */
@media (min-width: 1280px) {
  .hero-inner { max-width: 920px; }
}

/* ── 24. GENERIC PAGE TEMPLATE (page.php) ─────────────────────
   Áp dụng cho trang tĩnh không có template riêng
   (Chính sách bảo mật, Điều khoản, v.v.)
   ────────────────────────────────────────────────────────────── */

/* Hero header */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary, #1a3c5e) 0%, #2a5298 100%);
  padding: 48px 20px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-hero--has-bg {
  background-image: var(--page-hero-bg);
  background-size: cover;
  background-position: center;
}
.page-hero--has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 60, .65);
}
.page-hero__inner {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.page-hero__breadcrumb {
  font-size: 13px;
  margin: 0 0 12px;
  opacity: .8;
}
.page-hero__breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.page-hero__breadcrumb a:hover { text-decoration: underline; }
.page-hero__title {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
}

/* Content area */
.page-content {
  padding: 40px 20px 60px;
}
.page-content__inner {
  max-width: 860px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}
.page-content__inner h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: #1a3c5e;
}
.page-content__inner h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: #1a3c5e;
}
.page-content__inner p  { margin: 0 0 14px; }
.page-content__inner ul,
.page-content__inner ol { padding-left: 22px; margin: 0 0 14px; }
.page-content__inner li { margin-bottom: 6px; }
.page-content__inner a  { color: #2a5298; }
.page-content__inner a:hover { text-decoration: underline; }
.page-content__inner strong { color: #111; }

@media (min-width: 768px) {
  .page-hero  { padding: 64px 48px 56px; }
  .page-content { padding: 52px 48px 80px; }
}

/* Admin bar height on mobile is 46px (WP standard, ≤782px).
   Must override the 32px set at tablet+ breakpoint above. */
@media screen and (max-width: 782px) {
  body.admin-bar .nav { top: 46px; }
}
