/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #5c50f5;
  --color-primary-dark: #4a3fd4;
  --color-text: #1a1a2e;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-light: #f8f8ff;
  --color-border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(92,80,245,0.16);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

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

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === HEADER === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  height: 64px;
  display: flex;
  align-items: center;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

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

.logo--light { color: #fff; }
.logo--light span { color: #c7c2ff; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav__cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s !important;
}

.nav__cta:hover { background: var(--color-primary-dark) !important; }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, #f0effe 0%, #e8e4ff 100%);
  padding: 80px 0 96px;
}

.hero__inner {
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

/* === SEARCH BAR === */
.search-bar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}

.search-bar__tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
}

.tab {
  flex: 1;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.tab.active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

.search-bar__input {
  display: flex;
  align-items: center;
  padding: 8px 8px 8px 16px;
  gap: 8px;
}

.search-bar__input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--color-text);
  background: transparent;
}

.search-bar__input input::placeholder {
  color: var(--color-text-muted);
}

.btn-search {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-search:hover { background: var(--color-primary-dark); }

/* === FEATURES === */
.features {
  padding: 80px 0;
  background: var(--color-bg);
}

.features h2,
.listings h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.feature-card__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* === LISTINGS === */
.listings {
  padding: 80px 0;
  background: var(--color-bg-light);
}

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

/* Property Card */
.property-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}

.property-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.property-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #ddd6fe, #c7d2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.property-card__body {
  padding: 20px;
}

.property-card__price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.property-card__price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.property-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.property-card__location {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.property-card__details {
  display: flex;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.property-card__detail {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* === CTA BANNER === */
.cta-banner {
  background: var(--color-primary);
  padding: 64px 0;
}

.cta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-banner h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn--white {
  background: #fff;
  color: var(--color-primary);
}

.btn--white:hover {
  background: #f0effe;
}

/* === FOOTER === */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}

.footer__inner {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  padding-bottom: 48px;
}

.footer__brand {
  flex: 1;
  min-width: 200px;
}

.footer__brand p {
  margin-top: 12px;
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer__links > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 130px;
}

.footer__links strong {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.footer__links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer__links a:hover { color: #fff; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav a:not(.nav__cta) { display: none; }
  .hero { padding: 56px 0 72px; }
  .cta-banner__inner { flex-direction: column; text-align: center; }
  .footer__inner { flex-direction: column; gap: 32px; }
  .footer__links { gap: 32px; }
}