/* ============================================================
   T&M Bhalla Real Estate Ltd — Main Stylesheet
   Theme: Modern White + Blue
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary:       #1a3c5e;   /* Navy Blue */
  --primary-light: #2563eb;   /* Bright Blue */
  --primary-dark:  #0f2440;   /* Deep Navy */
  --accent:        #f59e0b;   /* Gold accent */
  --white:         #ffffff;
  --bg-light:      #f0f6ff;
  --bg-card:       #f8fafc;
  --border:        #e2e8f0;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --success:       #16a34a;
  --danger:        #dc2626;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow:        0 4px 16px rgba(26,60,94,0.10);
  --shadow-lg:     0 12px 40px rgba(26,60,94,0.16);
  --transition:    0.25s ease;
  --font:          'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif:    'Georgia', 'Times New Roman', serif;
  --nav-h:         72px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---------- Animations ---------- */

/* Keyframes */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes badgePop {
  0%   { transform: scale(0.7); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1);   opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

/* Hero entrance — staggered children */
.hero-badge   { animation: fadeUp 0.55s ease both; animation-delay: 0.05s; }
.hero h1      { animation: fadeUp 0.6s  ease both; animation-delay: 0.15s; }
.hero > .container > .hero-content > p {
                animation: fadeUp 0.6s  ease both; animation-delay: 0.25s; }
.hero-search  { animation: fadeUp 0.6s  ease both; animation-delay: 0.35s; }
.hero-stats   { animation: fadeUp 0.55s ease both; animation-delay: 0.45s; }

/* Scroll-reveal base state */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay helpers used by JS */
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* About badge card pop-in */
.about-badge-card { animation: badgePop 0.5s cubic-bezier(0.34,1.56,0.64,1) both; animation-delay: 0.7s; }

/* Nav link — animated underline */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  width: 0; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: width 0.25s ease, left 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 60%; left: 20%; }

/* Card image zoom on hover */
.card-img img,
.team-card-img img {
  transition: transform 0.45s ease;
}
.listing-card:hover .card-img img,
.team-card:hover .team-card-img img {
  transform: scale(1.05);
}

/* Service card icon bounce on hover */
.service-card .service-icon {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.service-card:hover .service-icon { transform: scale(1.2) rotate(-5deg); }

/* Value card icon */
.value-card .value-icon {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.value-card:hover .value-icon { transform: scale(1.18); }

/* Skeleton shimmer */
.review-card [style*="background:var(--bg-light)"] {
  background: linear-gradient(90deg, var(--bg-light) 25%, #e8f0fe 50%, var(--bg-light) 75%) !important;
  background-size: 400px 100% !important;
  animation: shimmer 1.4s infinite linear;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { color: var(--text-muted); line-height: 1.75; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Wider pages: on larger desktop screens the 1200px container leaves a lot
   of unused space on each side. Widen it so content uses the screen more
   effectively. Applied per-page via the .page-wide body class. */
@media (min-width: 1280px) {
  .page-wide .container { max-width: 1440px; }
}
.section   { padding: 80px 0; }
.section--alt { background: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header .eyebrow {
  display: inline-block;
  background: rgba(37,99,235,0.08);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.section-header h2 { color: var(--primary); margin-bottom: 12px; }
.section-header p  { max-width: 560px; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary-light);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline {
  border-color: var(--white);
  color: var(--white);
  background: transparent;
}
.btn-outline:hover { background: var(--white); color: var(--primary); }
.btn-dark {
  background: var(--primary);
  color: var(--white);
}
.btn-dark:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.navbar.scrolled .nav-logo { color: var(--primary); }
.navbar.scrolled .nav-link { color: var(--text); }
.navbar.scrolled .nav-link:hover { color: var(--primary-light); }
.navbar.scrolled .nav-cta { background: var(--primary-light); color: var(--white); }
.navbar--solid {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.navbar--solid .nav-logo { color: var(--primary); }
.navbar--solid .nav-link { color: var(--text); }
.navbar--solid .nav-cta { background: var(--primary-light); color: var(--white); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  overflow: visible;
}
.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo-img {
  height: 48px !important;
  max-height: 48px !important;
  width: auto !important;
  max-width: 160px !important;
  display: block !important;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-logo-img {
  height: 56px !important;
  max-height: 56px !important;
  width: auto !important;
  max-width: 200px !important;
  display: block !important;
  object-fit: contain;
  margin-bottom: 14px;
}
.nav-logo span { color: var(--accent); }
.nav-logo sub {
  display: block;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  line-height: 1;
  margin-top: 1px;
}
.navbar.scrolled .nav-logo sub,
.navbar--solid .nav-logo sub { color: var(--text-light); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,0.15); }

/* Solid / scrolled navbar — dark text context */
.navbar.scrolled .nav-link:hover,
.navbar--solid .nav-link:hover { color: var(--primary-light); background: var(--bg-light); }
.navbar.scrolled .nav-link.active,
.navbar--solid .nav-link.active { background: var(--bg-light); color: var(--primary-light); }
.nav-cta {
  padding: 9px 22px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}
.nav-cta:hover { background: var(--white); color: var(--primary); }

/* ---------- Nav Dropdown ("Resources") ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-family: inherit;
  line-height: 1.4;
}
.dropdown-caret {
  font-size: 0.65em;
  transition: transform var(--transition);
}
.nav-dropdown:hover .dropdown-caret,
.nav-dropdown.open .dropdown-caret { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 230px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 1100;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  white-space: nowrap;
}
.dropdown-item:hover, .dropdown-item.active {
  background: var(--bg-light);
  color: var(--primary-light);
}

/* Admin button — subtle, sits just before the CTA */
.nav-admin-btn {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.18);
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.nav-admin-btn:hover {
  color: var(--white);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
}
.navbar.scrolled .nav-admin-btn,
.navbar--solid .nav-admin-btn {
  color: var(--text-muted);
  border-color: var(--border);
}
.navbar.scrolled .nav-admin-btn:hover,
.navbar--solid .nav-admin-btn:hover {
  color: var(--primary);
  background: var(--bg-light);
  border-color: var(--primary-light);
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px 8px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius);
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger:hover,
.nav-hamburger:focus { background: rgba(0,0,0,0.06); outline: none; }
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
  pointer-events: none;
}
.navbar.scrolled .nav-hamburger span,
.navbar--solid .nav-hamburger span { background: var(--text); }

/* ---------- Mobile Nav ---------- */
.mobile-nav {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--white);
  z-index: 999;
  padding: 12px 16px 20px;
  box-shadow: var(--shadow-lg);
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 2px;
  /* Animate in from top */
  display: flex;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mobile-nav.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav a {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav a:hover, .mobile-nav a.active {
  background: var(--bg-light);
  color: var(--primary-light);
}
.mobile-nav .mobile-cta {
  margin-top: 10px;
  background: var(--primary-light);
  color: var(--white);
  text-align: center;
  border-radius: var(--radius);
  padding: 13px;
  font-weight: 600;
}
.mobile-nav-divider {
  padding: 14px 16px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.mobile-nav a:first-child + .mobile-nav-divider,
.mobile-nav-divider:first-child {
  border-top: none;
  margin-top: 0;
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1e4d7b 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 0 80px;
  max-width: 680px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-badge .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 span { color: var(--accent); }
.hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 520px;
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.hero-stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-top: 4px; }
.hero-visual {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 45%;
  overflow: hidden;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; opacity: 0.25; }

/* Search Bar (Hero) */
.hero-search {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
  max-width: 560px;
}
.hero-search input, .hero-search select {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
}
.hero-search select { min-width: 130px; cursor: pointer; }
.hero-search .divider { width: 1px; height: 28px; background: var(--border); }
.hero-search button {
  background: var(--primary-light);
  color: var(--white);
  border: none;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-card);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.listing-card:hover .card-img img { transform: scale(1.04); }
/* Base badge — positioned absolutely, never overlaps because each
   uses its own corner via .badge-tl / .badge-tr / .badge-bl / .badge-br */
.card-badge {
  position: absolute;
  padding: 5px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: calc(50% - 18px);   /* never wider than half the card */
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
/* Four corner positions */
.badge-tl { top: 14px;    left: 14px;  }   /* Top-Left  — status      */
.badge-tr { top: 14px;    right: 14px; }   /* Top-Right — featured    */
.badge-bl { bottom: 52px; left: 14px;  }   /* Bot-Left  — sub-type    */
.badge-br { bottom: 14px; right: 14px; }   /* Bot-Right — price       */

.badge-sale     { background: var(--primary-light); color: var(--white); }
.badge-rent     { background: var(--success);        color: var(--white); }
.badge-sold     { background: var(--text-muted);     color: var(--white); }
.badge-featured { background: var(--accent);         color: #1a1a1a;      }

/* Price tag (bottom-right corner) */
.card-price-tag {
  position: absolute;
  background: rgba(15,36,64,0.88);
  backdrop-filter: blur(6px);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  max-width: calc(60% - 18px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.card-address { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 5px; }
.card-features {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.card-feat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.card-feat svg { color: var(--primary-light); }
.card-actions { margin-top: auto; display: flex; gap: 10px; }
.card-actions .btn { flex: 1; justify-content: center; }

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.review-card:hover { box-shadow: var(--shadow); }
.review-stars { display: flex; gap: 3px; margin-bottom: 12px; }
.star { color: #fbbf24; font-size: 1rem; }
.review-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; font-style: italic; }
.reviewer { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.reviewer-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.reviewer-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.reviewer-date { font-size: 0.78rem; color: var(--text-light); }
.google-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.reviews-big-num {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.reviews-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- About Preview ---------- */
.about-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img-wrap { position: relative; }
.about-img-wrap img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }
.about-badge-card {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-width: 160px;
}
.about-badge-num { font-size: 1.8rem; font-weight: 800; color: var(--primary-light); line-height: 1; }
.about-badge-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.about-content .eyebrow {
  display: inline-block;
  background: rgba(37,99,235,0.08);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}
.about-content h2 { color: var(--primary); margin-bottom: 16px; }
.about-content p { margin-bottom: 16px; }
.about-highlights { display: flex; gap: 20px; margin: 28px 0; }
.highlight { text-align: center; }
.highlight-num { font-size: 1.8rem; font-weight: 800; color: var(--primary-light); }
.highlight-label { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- Services ---------- */
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  text-align: center;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.service-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(26,60,94,0.08));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
}
.service-card h3 { color: var(--primary); margin-bottom: 10px; }
.service-card p  { font-size: 0.9rem; }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.cta-banner h2 { color: var(--white); margin-bottom: 8px; }
.cta-banner p   { color: rgba(255,255,255,0.7); }
.cta-banner .cta-btns { display: flex; gap: 14px; flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 60px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin: 12px 0 20px; }
.footer-brand .nav-logo { margin-bottom: 0; font-size: 1.2rem; }
.footer h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-contact a { color: rgba(255,255,255,0.75); font-size: 0.88rem; display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; margin-bottom: 10px; }
.footer-contact a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--white); }
.social-links { display: flex; flex-wrap: wrap; gap: 12px; }
.social-link {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
  transition: all var(--transition);
  flex-shrink: 0;
}
.social-link svg { width: 18px; height: 18px; fill: currentColor; }
.social-link:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--white);
  transform: translateY(-2px);
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Filters ---------- */
.filters-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}
.filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 120px; }
.filter-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.filter-select {
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}
.filter-divider { width: 1px; height: 40px; background: var(--border); }
.filter-search { flex: 2; }
.filter-search input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  font-weight: 500;
}
.filter-count { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }

/* ---------- Page Header ---------- */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 120px 0 60px;
  color: var(--white);
}
.page-header h1 { color: var(--white); margin-bottom: 10px; }
.page-header p   { color: rgba(255,255,255,0.75); font-size: 1.05rem; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: var(--white); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.contact-info-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  color: var(--white);
  height: 100%;
}
.contact-info-card h3 { color: var(--white); margin-bottom: 8px; }
.contact-info-card > p { color: rgba(255,255,255,0.7); margin-bottom: 32px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.contact-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-item-label { font-size: 0.78rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; margin-bottom: 4px; }
.contact-item-val { color: rgba(255,255,255,0.9); font-size: 0.92rem; line-height: 1.5; }
.contact-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.contact-form-card h3 { color: var(--primary); margin-bottom: 6px; }
.contact-form-card > p { margin-bottom: 28px; font-size: 0.9rem; }
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 240px;
  margin-top: 24px;
  border: 1px solid rgba(255,255,255,0.15);
}
.map-wrap iframe { width: 100%; height: 100%; border: none; }

/* ---------- About Page ---------- */
.about-hero { padding: 140px 0 80px; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.about-hero h1 { color: var(--white); }
.about-hero p  { color: rgba(255,255,255,0.75); }
.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.team-img { height: 280px; overflow: hidden; background: var(--bg-light); }
.team-img img { width: 100%; height: 100%; object-fit: cover; }
.team-body { padding: 24px; }
.team-name { font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.team-role { font-size: 0.85rem; color: var(--primary-light); font-weight: 600; margin-bottom: 10px; }
.team-bio  { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  border: 1px solid var(--border);
  text-align: center;
}
.value-icon { font-size: 2rem; margin-bottom: 14px; }
.value-card h3 { color: var(--primary); margin-bottom: 8px; }
.value-card p  { font-size: 0.88rem; }

/* ---------- Admin CMS ---------- */
.admin-body {
  background: #f1f5f9;
  min-height: 100vh;
}
.admin-header {
  background: var(--primary-dark);
  color: var(--white);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-header h1 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.admin-sidebar {
  background: var(--primary);
  padding: 24px 0;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.admin-content { padding: 32px; }
.admin-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-card-header h2 { font-size: 1.1rem; color: var(--primary); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-card); }
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}
.status-active   { background: #dcfce7; color: #15803d; }
.status-sold     { background: #fee2e2; color: #b91c1c; }
.status-rented   { background: #e0f2fe; color: #0369a1; }
.status-inactive { background: #f1f5f9; color: #64748b; }
.admin-actions { display: flex; gap: 8px; }
.btn-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-card); color: var(--primary); }
.btn-icon.danger:hover { border-color: var(--danger); background: #fee2e2; color: var(--danger); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,36,64,0.55);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.modal-header h3 { color: var(--primary); }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-card);
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--border); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Login Screen */
.login-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-card h2 { color: var(--primary); margin-bottom: 6px; }
.login-card p  { margin-bottom: 28px; font-size: 0.9rem; }
.login-error {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--border);
}
.stat-box-num { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-box-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { color: var(--primary); margin-bottom: 8px; }
.empty-state p  { max-width: 360px; margin: 0 auto; font-size: 0.9rem; }

/* ---------- Toast ---------- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  min-width: 260px;
  max-width: 340px;
  animation: slideUp 0.3s ease;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-info    { border-left: 4px solid var(--primary-light); }
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ---------- Image Upload Preview ---------- */
.img-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.img-preview-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--bg-card); border: 1px solid var(--border); }
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(220,38,38,0.85);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
}
.img-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.img-upload-area:hover { border-color: var(--primary-light); background: rgba(37,99,235,0.03); }
.img-upload-area p { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted   { color: var(--text-muted); }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Category Tabs ---------- */
.cat-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 5px;
  width: fit-content;
  margin-bottom: 28px;
}
.cat-tab {
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--transition);
}
.cat-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.cat-tab:hover:not(.active) { color: var(--primary); }

/* ---------- Listings Layout (Sidebar + Grid) ---------- */
.listings-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

/* ---------- Filter Sidebar ---------- */
.filter-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.filter-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 2;
}
.filter-sidebar-header h3 {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 700;
}
.filter-clear-btn {
  font-size: 0.78rem;
  color: var(--primary-light);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}
.filter-clear-btn:hover { text-decoration: underline; }

.filter-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.filter-section:last-child { border-bottom: none; }
.filter-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.filter-section-label .toggle-icon { font-size: 0.7rem; transition: transform var(--transition); }
.filter-section.collapsed .filter-section-body { display: none; }
.filter-section.collapsed .toggle-icon { transform: rotate(-90deg); }

.filter-radio-group, .filter-check-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  color: var(--text);
  cursor: pointer;
  padding: 3px 0;
}
.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--primary-light);
  cursor: pointer;
  flex-shrink: 0;
}
.filter-option-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-light);
  background: var(--bg-card);
  border-radius: 50px;
  padding: 1px 7px;
}

.price-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.price-range-inputs input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.price-range-inputs input:focus { border-color: var(--primary-light); }
.price-range-inputs .range-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.sqft-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.sqft-range-inputs input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
}
.sqft-range-inputs input:focus { border-color: var(--primary-light); }

.bed-bath-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bed-bath-row select {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.bed-bath-row select:focus { border-color: var(--primary-light); }

.filter-search-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.filter-search-input:focus { border-color: var(--primary-light); }

/* Active filters strip */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(37,99,235,0.08);
  color: var(--primary-light);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 50px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}
.active-filter-tag button {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Results header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.results-count strong { color: var(--primary); }
.sort-select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
  background: var(--white);
}
.sort-select:focus { border-color: var(--primary-light); }

/* Mobile filter toggle */
.filter-mobile-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 16px;
}
.filter-badge {
  background: var(--primary-light);
  color: var(--white);
  border-radius: 50px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ---------- Feature Tag Pills ---------- */
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0 14px;
}
.feature-tag {
  background: var(--bg-light);
  color: var(--primary);
  border: 1px solid rgba(26,60,94,0.1);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.73rem;
  font-weight: 600;
}

/* ---------- Commercial & Category Badges ---------- */
.badge-commercial { background: #7c3aed; color: var(--white); }
.badge-office     { background: #0891b2; color: var(--white); }
.badge-retail     { background: #d97706; color: var(--white); }
.badge-land       { background: #65a30d; color: var(--white); }
.badge-residential{ background: var(--primary-light); color: var(--white); }

/* Card category strip */
.card-category-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.strip-residential { background: var(--primary-light); }
.strip-commercial  { background: #7c3aed; }
.strip-office      { background: #0891b2; }
.strip-retail      { background: #d97706; }
.strip-land        { background: #65a30d; }

/* Card detail grid (commercial) */
.card-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 10px 0 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.card-detail-item { font-size: 0.78rem; }
.card-detail-label { color: var(--text-light); font-weight: 500; }
.card-detail-value { color: var(--text); font-weight: 700; margin-top: 1px; }

/* ---------- Admin form sections ---------- */
.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.form-section-header {
  background: var(--bg-card);
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}
.form-section-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.form-section-body .full { grid-column: span 2; }

.category-toggle {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}
.cat-toggle-btn {
  padding: 10px 28px;
  border: none;
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border-right: 1px solid var(--border);
}
.cat-toggle-btn:last-child { border-right: none; }
.cat-toggle-btn.active {
  background: var(--primary);
  color: var(--white);
}

/* ---------- Listing Detail Modal ---------- */
.listing-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.listing-modal-overlay.open {
  opacity: 1; pointer-events: all;
}
.listing-modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}
.listing-modal-overlay.open .listing-modal-box {
  transform: translateY(0);
}
.modal-close-btn {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  background: rgba(0,0,0,0.5); border: none; border-radius: 50%;
  width: 36px; height: 36px; color: #fff; font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal-close-btn:hover { background: rgba(0,0,0,0.8); }

/* Listing detail modal: close (×) button should sit top-right of the box */
.listing-modal-box > .modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
}

/* Share icon — mirrors the close (×) button but sits top-left of the box */
.modal-share {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-card);
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-share:hover { background: var(--border); }
.listing-modal-box > .modal-share {
  position: absolute; top: 14px; left: 14px; z-index: 10;
}

/* Gallery */
.modal-gallery { position: relative; }
.modal-gallery-main {
  position: relative;
  height: 340px;
  background: var(--primary-dark);
  overflow: hidden;
}
.modal-gallery-main img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity 0.2s ease;
}
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); border: none; border-radius: 50%;
  width: 40px; height: 40px; color: #fff; font-size: 1.4rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.gallery-nav:hover { background: rgba(0,0,0,0.8); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.modal-photo-count {
  position: absolute; bottom: 12px; right: 14px;
  background: rgba(0,0,0,0.5); color: #fff;
  font-size: 0.78rem; padding: 3px 10px; border-radius: 50px;
}
.modal-thumbs {
  display: flex; gap: 6px; padding: 8px 12px;
  background: var(--bg-card); overflow-x: auto;
}
.modal-thumb {
  width: 72px; height: 54px; object-fit: cover;
  border-radius: 6px; cursor: pointer; flex-shrink: 0;
  border: 2px solid transparent; opacity: 0.65;
  transition: opacity var(--transition), border-color var(--transition);
}
.modal-thumb.active, .modal-thumb:hover { opacity: 1; border-color: var(--primary-light); }

/* Modal body */
.modal-content-body { padding: 28px 32px 32px; }
.modal-header-info {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.modal-mls { font-size: 0.78rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.modal-address { font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 4px; }
.modal-location { font-size: 0.9rem; color: var(--text-muted); }
.modal-price { font-size: 1.6rem; font-weight: 800; color: var(--primary-light); white-space: nowrap; }

/* Stats row */
.modal-stats-row {
  display: flex; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 24px;
}
.modal-stat {
  flex: 1; text-align: center; padding: 16px 12px;
  border-right: 1px solid var(--border);
}
.modal-stat:last-child { border-right: none; }
.modal-stat-num { display: block; font-size: 1.25rem; font-weight: 800; color: var(--primary-dark); }
.modal-stat-label { display: block; font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }

/* Sections */
.modal-section { margin-bottom: 20px; }
.modal-section-title { font-size: 0.85rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 10px; }
.modal-features { display: flex; flex-wrap: wrap; gap: 6px; }

/* CTA bar */
.modal-cta-bar {
  display: flex; gap: 10px; flex-wrap: nowrap; align-items: stretch;
  padding-top: 20px; border-top: 1px solid var(--border); margin-top: 8px;
}
.modal-cta-bar .btn {
  flex: 1; justify-content: center; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 12px; padding-right: 12px;
}
.modal-cta-enquire { flex: 2 !important; }
/* .btn-outline is designed for dark/colored backgrounds (white text on
   transparent). On the modal's white CTA bar that made the "Call Munish"
   button invisible until hover. Give it visible primary-colored styling. */
.modal-cta-call.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.modal-cta-call.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Responsive modal */
@media (max-width: 640px) {
  .listing-modal-overlay { padding: 0; align-items: flex-end; }
  .listing-modal-box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 94vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-gallery-main { height: 240px; }
  .modal-thumbs { gap: 6px; padding: 8px 12px; }
  .modal-thumb { width: 52px; height: 40px; object-fit: cover; }
  .modal-content-body { padding: 18px 16px 110px; }
  .modal-header-info { flex-direction: column; gap: 6px; align-items: flex-start; }
  .modal-address { font-size: 1.1rem; }
  .modal-price { font-size: 1.25rem; white-space: normal; }
  .modal-stats-row { flex-wrap: wrap; }
  .modal-stat { min-width: 50%; padding: 10px 8px; }
  /* CTA bar: sticky footer with stacked full-width buttons */
  .modal-cta-bar {
    flex-direction: column;
    gap: 9px;
    position: sticky;
    bottom: 0;
    background: var(--white);
    margin: 16px -16px -110px;
    padding: 14px 16px 28px;
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 24px rgba(0,0,0,0.09);
  }
  .modal-cta-bar .btn {
    width: 100%;
    min-width: 0;
    flex: none;
    justify-content: center;
    padding: 14px 16px;
    font-size: 0.95rem;
  }
  .modal-close-btn { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 1rem; }
  .listing-modal-box > .modal-close,
  .listing-modal-box > .modal-share { top: 12px; }
  .listing-modal-box > .modal-close { right: 12px; }
  .listing-modal-box > .modal-share { left: 12px; }
}

/* ---------- Mortgage Calculator (shared form/results styles) ---------- */
.mortgage-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0 0 4px;
}
.mortgage-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 22px;
}
.mortgage-input-group { position: relative; }
.mortgage-input-prefix,
.mortgage-input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
}
.mortgage-input-prefix { left: 14px; }
.mortgage-input-suffix { right: 14px; }
.mortgage-input-group .form-control.has-prefix { padding-left: 28px; }
.mortgage-input-group .form-control.has-suffix { padding-right: 36px; }
.mortgage-down-row { display: flex; gap: 12px; align-items: flex-start; }
.mortgage-down-row .form-group { flex: 1; }
.mortgage-down-row .mortgage-down-percent { flex: 0 0 110px; }
.mortgage-results {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 8px;
}
.mortgage-result-main {
  text-align: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.mortgage-result-main .amount {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-light);
  line-height: 1.2;
}
.mortgage-result-main .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.mortgage-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
.mortgage-result-item .value { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); }
.mortgage-result-item .label { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.mortgage-disclaimer {
  font-size: 0.74rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 16px 0 0;
}
/* Mortgage Calc link styled as an outline button (listing modal CTA bar) */
.modal-cta-mortgage.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.modal-cta-mortgage.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

@media (max-width: 640px) {
  .mortgage-result-main .amount { font-size: 1.7rem; }
  .mortgage-result-grid { grid-template-columns: 1fr 1fr; gap: 12px 14px; }
}

/* ---------- Mortgage Calculator Page ---------- */
.calculator-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}
.calculator-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
}
.calculator-card .mortgage-title {
  font-size: 1.5rem;
}
.calculator-card .mortgage-subtitle {
  margin-bottom: 26px;
}
.mtg-listing-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.mtg-listing-info strong {
  color: var(--primary-dark);
}
.calculator-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.calculator-cta-card {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}
.calculator-cta-card h3 {
  color: var(--white);
  margin: 0 0 10px;
  font-size: 1.2rem;
}
.calculator-cta-card p {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 20px;
}
.calculator-cta-card .btn {
  width: 100%;
  justify-content: center;
}
.calculator-info-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.calculator-info-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--primary-dark);
}
.calculator-info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 12px;
}
.calculator-info-card p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .calculator-card {
    padding: 24px 18px;
  }
}

/* ---------- Resource Pages: News / Guides / FAQ ---------- */
.news-list, .guide-steps, .faq-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}
.news-article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.news-article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.news-tag {
  display: inline-block;
  background: rgba(37,99,235,0.08);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
}
.news-date { font-size: 0.85rem; color: var(--text-light); }
.news-article h2 { color: var(--primary); margin-bottom: 14px; font-size: 1.5rem; }
.news-article p { margin-bottom: 14px; }
.news-article p:last-child { margin-bottom: 0; }

.guide-step {
  display: flex;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.guide-step-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
}
.guide-step-content h3 { color: var(--primary); margin-bottom: 6px; }
.guide-step-content p { margin: 0; }
.guide-step-content p + p { margin-top: 10px; }

.faq-category-title {
  color: var(--primary);
  margin: 44px auto 18px;
  max-width: 820px;
  text-align: left;
}
.faq-category-title:first-of-type { margin-top: 0; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  cursor: pointer;
}
.faq-item summary {
  font-weight: 600;
  color: var(--primary);
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin-top: 12px; font-size: 0.9rem; }

@media (max-width: 640px) {
  .news-article { padding: 22px 18px; }
  .guide-step { flex-direction: column; gap: 14px; padding: 22px 18px; }
  .guide-step-num { width: 40px; height: 40px; font-size: 1.05rem; }
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; margin-top: 40px;
}
.page-btn {
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); font-size: 0.88rem; font-weight: 600;
  color: var(--text); cursor: pointer; transition: all var(--transition);
  min-width: 40px; text-align: center;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary-light); color: var(--primary-light); }
.page-btn.active { background: var(--primary-light); color: var(--white); border-color: var(--primary-light); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-ellipsis { color: var(--text-light); font-size: 0.9rem; padding: 0 4px; }

/* Feature checkbox grid in admin */
.feature-check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.feature-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 0;
}
.feature-check-item input { accent-color: var(--primary-light); cursor: pointer; }

/* ---------- Team Section ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 860px;
  margin: 0 auto;
}
.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.team-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.team-card-img {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.team-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.team-role-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.5);
}
.team-card-body {
  padding: 24px 28px 28px;
}
.team-card-body h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.team-card-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.team-card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}
.team-card-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.team-card-contact a {
  font-size: 0.84rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition);
}
.team-card-contact a:hover { color: var(--primary-light); }
.team-card-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.specialty-tag {
  background: rgba(37,99,235,0.07);
  color: var(--primary-light);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── 1200px: hide admin btn to avoid overflow ── */
@media (max-width: 1200px) {
  .nav-admin-btn { display: none; }
}

/* ── 1024px: tablets ── */
@media (max-width: 1024px) {
  .listings-layout { grid-template-columns: 220px 1fr; gap: 18px; }
  .feature-check-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .reviews-grid, .values-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .about-preview { gap: 36px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 100px 0 70px; }
  .card-img img { height: 190px; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ── 768px: mobile ── */
@media (max-width: 768px) {
  /* Nav */
  .nav-links, .nav-cta, .nav-admin-btn { display: none; }
  .nav-hamburger { display: flex; }

  /* Listings sidebar — slide-in drawer */
  .listings-layout { grid-template-columns: 1fr; }
  .filter-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(300px, 88vw);
    max-height: 100vh;
    overflow-y: auto;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-radius: 0;
    padding-top: 60px;
  }
  .filter-sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .filter-mobile-toggle { display: flex; }
  .filter-mobile-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 499; display: none;
  }
  .filter-mobile-overlay.show { display: block; }

  /* Hero — remove 100vh so content isn't centred in a massive gap */
  .hero {
    min-height: unset;
    align-items: flex-start;
    padding: 0;
  }
  .hero-content { padding: 88px 0 52px; }
  .hero-visual { display: none; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }

  /* Hero search — vertical pill on mobile */
  .hero-search {
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 100%;
  }
  /* Main text input */
  .hero-search > input[type="text"] {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  /* Hide all vertical dividers inside the form */
  .hero-search .divider { display: none !important; }
  /* Filter row (residential / commercial sub-selects) */
  #heroResFilters, #heroComFilters {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  #heroResFilters select, #heroComFilters select {
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
    font-size: 0.9rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
  }
  /* Search button — full width */
  .hero-search button {
    width: 100%;
    justify-content: center;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 14px 20px;
    font-size: 1rem;
  }
  .hero-category-tabs { width: 100%; min-width: 0; }

  /* Grids */
  .grid-3, .grid-2, .reviews-grid, .values-grid { grid-template-columns: 1fr; }
  .listings-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; gap: 24px; }
  .team-card-img { height: 220px; }

  /* Cards */
  .card-img img { height: 200px; }

  /* About */
  .about-preview { grid-template-columns: 1fr !important; }
  .about-badge-card { position: static; margin-top: 16px; }
  .about-highlights { gap: 10px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

  /* CTA banner */
  .cta-banner { flex-direction: column; text-align: center; padding: 40px 24px; gap: 24px; }
  .cta-btns { flex-direction: column; width: 100%; }
  .cta-btns .btn { width: 100%; justify-content: center; }

  /* Province tabs */
  .province-tabs { gap: 8px; margin-bottom: 14px; }
  .province-tab { font-size: 0.82rem; padding: 8px 14px; }
  .province-tab-sub { display: none; }

  /* Brokerage badge */
  .listing-brokerage { font-size: 0.68rem; }
}

/* ================================================================
   PROVINCE TABS
   ================================================================ */
.province-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.province-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 22px;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
}
.province-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-light);
}
.province-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(10,61,122,0.25);
}
.province-tab-sub {
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.75;
  letter-spacing: 0.01em;
}
.province-tab.active .province-tab-sub {
  opacity: 0.85;
}

/* ================================================================
   BROKERAGE BADGE (legal disclosure on listing cards)
   ================================================================ */
.listing-brokerage {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-brokerage::before {
  content: "🏢";
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Province label pill on listing card */
.province-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--primary-light);
  color: var(--white);
  margin-left: auto;
  flex-shrink: 0;
}
.province-pill.bc {
  background: #1a7a4a;
}


/* ================================================================
   DEMO BANNER
   ================================================================ */
.demo-banner {
  background: linear-gradient(135deg, #fff7e6 0%, #ffecd0 100%);
  border: 1.5px solid #f5c57a;
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.84rem;
  color: #7a4a00;
}
.demo-banner-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.demo-banner strong { color: #5a3300; }
.demo-banner a { color: var(--primary); font-weight: 600; }
.demo-banner a:hover { text-decoration: underline; }

/* ================================================================
   LOADING SPINNER  (branded — matches site blue/gold palette)
   ================================================================ */
@keyframes spin-ring {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.6); }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.listings-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  gap: 20px;
  animation: fade-in-up 0.3s ease;
  grid-column: 1 / -1;   /* span full grid width */
}
.spinner-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
}
.spinner-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  animation: spin-ring 0.9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  box-sizing: border-box;
}
.spinner-logo-dot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.spinner-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.spinner-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 2px;
}
.spinner-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-light);
  animation: pulse-dot 1.2s ease-in-out infinite;
}
.spinner-dots span:nth-child(2) { animation-delay: 0.2s; }
.spinner-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ================================================================
   NAVBAR — tighter at 900–1024px
   ================================================================ */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-links { gap: 4px; }
  .nav-link  { font-size: 0.85rem; padding: 6px 10px; }
  .nav-cta   { font-size: 0.82rem; padding: 8px 14px; }
}
@media (max-width: 900px) and (min-width: 769px) {
  .nav-cta { display: none; }
}

/* ================================================================
   480px — small phones
   ================================================================ */
@media (max-width: 480px) {
  h1 { font-size: 1.7rem !important; }
  h2 { font-size: 1.3rem; }
  .hero-title { font-size: 1.75rem !important; line-height: 1.2; }
  .hero-subtitle { font-size: 0.9rem; }
  .container { padding: 0 14px; }
  .section { padding: 48px 0; }
  .page-header { padding: 80px 0 32px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .hero-stat-num { font-size: 1.5rem; }
  .province-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .province-tab { font-size: 0.78rem; padding: 8px 13px; white-space: nowrap; flex-shrink: 0; }
  .province-tab-sub { display: none; }
  .results-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .sort-select { width: 100%; }
  .card-price { font-size: 1.15rem; }
  .card-img img { height: 200px; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-box-num { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-brand { margin-bottom: 4px; }
  .cta-banner { padding: 28px 16px; }
  .cta-banner h2 { font-size: 1.2rem; }
  .card { border-radius: var(--radius); }
  .contact-grid { grid-template-columns: 1fr; }
  .about-highlights { grid-template-columns: 1fr; }
  .listings-spinner { padding: 48px 16px; }
}

/* ---------- Gallery expand button ---------- */
.gallery-expand-btn {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(0,0,0,0.55); border: none; border-radius: 6px;
  width: 36px; height: 36px; color: #fff; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 5;
}
.gallery-expand-btn:hover { background: rgba(0,0,0,0.85); }

/* ---------- Fullscreen photo lightbox ---------- */
.photo-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
.photo-lightbox.open { opacity: 1; pointer-events: all; }

.lb-img-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  padding: 64px 80px;
  box-sizing: border-box;
}
.lb-img-wrap img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  display: block;
}

.lb-close {
  position: absolute; top: 18px; right: 18px;
  background: rgba(255,255,255,0.15); border: none; border-radius: 50%;
  width: 44px; height: 44px; color: #fff; font-size: 1.6rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}
.lb-close:hover { background: rgba(255,255,255,0.3); }

.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none; border-radius: 50%;
  width: 52px; height: 52px; color: #fff; font-size: 2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.25); }

.lb-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.75); font-size: 0.85rem; font-weight: 600;
  background: rgba(0,0,0,0.4); padding: 4px 14px; border-radius: 50px;
}

@media (max-width: 640px) {
  .lb-img-wrap { padding: 56px 16px; }
  .lb-prev { left: 6px; width: 42px; height: 42px; font-size: 1.5rem; }
  .lb-next { right: 6px; width: 42px; height: 42px; font-size: 1.5rem; }
}

/* ---------- City quick-filter bar ---------- */
.city-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.city-filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  margin-right: 2px;
}
.city-btn {
  padding: 5px 13px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.city-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }
.city-btn.active {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--white);
}

@media (max-width: 640px) {
  .city-filter-bar { gap: 6px; padding: 8px 10px; overflow-x: auto; flex-wrap: nowrap; }
  .city-btn { font-size: 0.75rem; padding: 4px 11px; flex-shrink: 0; }
}
