/* === Variables === */
:root {
  --primary: #1a365d;
  --primary-light: #2a4a7f;
  --accent: #c9a96e;
  --accent-hover: #b8943d;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #ffffff;
  --bg-alt: #f7fafc;
  --bg-dark: #1a202c;
  --border: #e2e8f0;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
  --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --max-width: 1200px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* === Nav === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* === Hero === */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  color: #fff;
  text-align: center;
  padding: 8rem 2rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero.jpg') center/cover no-repeat;
  opacity: 0.15;
}
.hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 3rem; font-weight: 700; margin-bottom: 0.5rem; }
.hero p { font-size: 1.25rem; opacity: 0.9; margin-bottom: 2rem; }

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* === Sections === */
.section { padding: 5rem 2rem; }
.section-alt { background: var(--bg-alt); }
.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}
.container { max-width: var(--max-width); margin: 0 auto; }

/* === About === */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: center;
}
.about-photo {
  width: 300px;
  height: 360px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  border: 2px dashed var(--border);
}
.about-text h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 1rem; }
.about-text p { margin-bottom: 1rem; color: var(--text); }
.about-areas { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.about-areas span {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--primary);
}

/* === Property Cards === */
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.property-card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.property-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}
.card-image {
  height: 180px;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
}
.card-body { padding: 1.25rem; }
.card-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.card-address { color: var(--text); margin-bottom: 0.5rem; font-size: 0.95rem; }
.card-details {
  display: flex;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.card-details span { display: flex; align-items: center; gap: 0.25rem; }
.card-status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.status-active { background: #c6f6d5; color: #22543d; }
.status-sold { background: #fed7d7; color: #9b2c2c; }
.status-other { background: #e2e8f0; color: #4a5568; }
.card-link {
  display: block;
  text-align: center;
  padding: 0.6rem;
  background: var(--bg-alt);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.card-link:hover { background: var(--primary); color: #fff; }

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-info h3 { color: var(--primary); margin-bottom: 1rem; }
.contact-item { display: flex; gap: 0.75rem; margin-bottom: 1rem; align-items: flex-start; }
.contact-item .label { font-weight: 600; min-width: 60px; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input, .contact-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* === Footer === */
.footer {
  background: var(--bg-dark);
  color: #a0aec0;
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
}

/* === Filter Bar === */
.filter-bar {
  background: var(--bg);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 140px; }
.filter-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; }
.filter-group input, .filter-group select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
}
.filter-group input:focus, .filter-group select:focus { outline: none; border-color: var(--primary); }
.results-info { color: var(--text-light); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.pagination button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.pagination button:hover { background: var(--bg-alt); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* === Property Detail === */
.detail-header {
  background: var(--primary);
  color: #fff;
  padding: 3rem 2rem;
}
.detail-header .container { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; }
.detail-price { font-size: 2.5rem; font-weight: 700; }
.detail-address { font-size: 1.2rem; opacity: 0.9; }
.detail-stats {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; }
.detail-section { margin-bottom: 2rem; }
.detail-section h2 { font-size: 1.3rem; color: var(--primary); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent); }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); }
.detail-table td:first-child { font-weight: 600; color: var(--text-light); width: 200px; }
.detail-cta {
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
}
.detail-cta h3 { color: var(--primary); margin-bottom: 0.5rem; }
.detail-cta p { color: var(--text-light); margin-bottom: 1rem; }

/* === Loading / Empty === */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--primary); padding: 1rem 2rem; gap: 1rem; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: 5rem 1.5rem; }
  .about-grid { grid-template-columns: 1fr; justify-items: center; }
  .property-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .filter-row { flex-direction: column; }
  .filter-group { min-width: 100%; }
  .detail-header .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .property-grid { grid-template-columns: 1fr; }
  .detail-stats { gap: 1rem; }
}
