/* eRealtor — Real Estate Search Platform */

:root {
  --navy: #1B3A4B;
  --teal: #00A896;
  --amber: #F4A261;
  --white: #ffffff;
  --light: #f8fafb;
  --gray: #6B7280;
  --dark: #111827;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5%;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.logo span { color: var(--teal); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--navy); }

.btn-primary {
  background: var(--teal);
  color: var(--white);
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}

.btn-primary:hover {
  background: #008f7a;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--navy);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #264653 100%);
  color: var(--white);
  padding: 5rem 5% 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  max-width: 700px;
  margin: 0 auto 1.25rem;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.search-bar {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
  background: rgba(255,255,255,0.12);
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
}

.search-bar input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  background: var(--white);
  color: var(--dark);
}

.search-bar input::placeholder { color: #9CA3AF; }

.search-bar button {
  padding: 0.75rem 1.5rem;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.search-bar button:hover { background: #008f7a; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

.hero-stat { text-align: center; }

.hero-stat .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--amber);
}

.hero-stat .label {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Properties */
.properties-section {
  padding: 4rem 5%;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--gray);
  font-size: 1.05rem;
}

.filters {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border: 2px solid #E5E7EB;
  border-radius: 50px;
  background: var(--white);
  color: var(--gray);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(0,168,150,0.05);
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.property-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.property-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 3rem;
}

.property-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.property-body { padding: 1.25rem; }

.property-tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.tag-sale { background: rgba(0,168,150,0.12); color: var(--teal); }
.tag-rent { background: rgba(244,162,97,0.15); color: #e07b3a; }
.tag-new { background: rgba(27,58,75,0.1); color: var(--navy); }

.property-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.property-location {
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.property-features {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid #f1f5f9;
  margin-top: 0.5rem;
  color: var(--gray);
  font-size: 0.82rem;
}

.property-features span { display: flex; align-items: center; gap: 0.3rem; }

.property-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy);
  margin-top: 0.5rem;
}

/* Features */
.features-section {
  background: var(--light);
  padding: 5rem 5%;
}

.features-section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.features-section > p {
  text-align: center;
  color: var(--gray);
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: rgba(0,168,150,0.1);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--teal) 0%, #007a68 100%);
  color: var(--white);
  padding: 4rem 5%;
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.cta-section .btn-primary {
  background: var(--white);
  color: var(--teal);
  font-size: 1rem;
  padding: 0.85rem 2rem;
}

.cta-section .btn-primary:hover {
  background: #f0fdfb;
  transform: translateY(-1px);
}

/* Footer */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 2.5rem 5%;
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
footer a:hover { color: var(--white); }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* Mobile */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 1.5rem; }
  .nav-links { display: none; }
  .search-bar { flex-direction: column; }
  .search-bar button { width: 100%; }
}

/* === Metrics dashboard === */
.metrics-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0d2233 100%);
  color: var(--white);
  padding: 4rem 5% 3rem;
  text-align: center;
}
.metrics-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}
.metrics-hero p { opacity: 0.65; font-size: 0.9rem; }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.kpi-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  text-align: center;
}
.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.kpi-label {
  font-size: 0.78rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.top-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.top-post-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.er-badge {
  background: var(--teal);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
}

.posts-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.posts-table th {
  text-align: left;
  padding: 0.65rem 0.9rem;
  background: var(--light);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e5e7eb;
}
.posts-table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid #f1f5f9; }
.er-high { color: var(--teal); font-weight: 700; }
.er-low  { color: var(--gray); }

/* === Per-listing lead-capture modal & CTA === */
.property-cta {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.65rem 1rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.15s;
}
.property-cta:hover { background: #0f2735; transform: translateY(-1px); }

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
}

.form-optional {
  font-weight: 500;
  color: var(--gray);
  text-transform: none;
  letter-spacing: 0;
}

.form-group-checkbox { margin-top: 0.5rem; }
.form-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--navy);
  font-weight: 500;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lead-modal[hidden] { display: none; }

.lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.lead-modal-dialog {
  position: relative;
  background: var(--white);
  border-radius: 18px;
  padding: 2rem 1.85rem 1.75rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: lead-modal-in 0.18s ease-out;
}

@keyframes lead-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.lead-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.85rem;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--gray);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.lead-modal-close:hover { background: var(--light); color: var(--navy); }

.lead-modal-header {
  margin-bottom: 1.25rem;
  padding-right: 2rem;
}
.lead-modal-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.35rem;
}
.lead-modal-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.3px;
}

@media (max-width: 540px) {
  .lead-modal-dialog { padding: 1.5rem 1.25rem; }
}

/* === NPA demo: hero image + gallery strip === */
.npa-demo-hero-img {
  width: 100%;
  max-width: 520px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.npa-demo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.npa-demo-gallery-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

@media (max-width: 920px) {
  .npa-demo-hero-img {
    max-width: 100%;
    height: 140px;
  }
  .npa-demo-gallery {
    grid-template-columns: repeat(2, 1fr);
    overflow-x: auto;
  }
}
@media (max-width: 480px) {
  .npa-demo-gallery {
    grid-template-columns: repeat(2, 1fr);
    overflow-x: hidden;
  }
  .npa-demo-gallery-img {
    height: 96px;
    min-width: 0;
  }
}

/* === NPA demo: verified SAMB Chandigarh auction listings === */
.npa-demo-verified-listing {
  max-width: 1240px;
  margin: 2.5rem auto 0;
  padding: 2rem 0 0;
  border-top: 1px solid #e5e7eb;
}

.npa-demo-verified-listing-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.npa-demo-verified-listing-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
  margin-bottom: 0.4rem;
}

.npa-demo-verified-listing-caption {
  color: var(--gray);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 760px;
  margin-bottom: 1.75rem;
}

.npa-demo-property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.npa-demo-card-cite-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid #f1f5f9;
}

.npa-demo-card-cite {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
  transition: color 0.15s;
}

.npa-demo-card-cite:hover {
  text-decoration: underline;
  color: #008f7a;
}

.npa-demo-card-cite-meta {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.4;
}

@media (max-width: 920px) {
  .npa-demo-property-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .npa-demo-verified-listing-title {
    font-size: 1.25rem;
  }
}