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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  background: #1a56db;
  color: #fff;
}
.btn:hover { background: #1e40af; transform: translateY(-1px); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-outline {
  background: transparent;
  border: 2px solid #1a56db;
  color: #1a56db;
}
.btn-outline:hover { background: #1a56db; color: #fff; }
.btn-light {
  background: #fff;
  color: #1a56db;
}
.btn-light:hover { background: #f1f5f9; }

/* === HEADER === */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 500;
}
.logo span strong { font-weight: 700; color: #1a56db; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.header-nav a { font-size: 0.95rem; font-weight: 500; color: #475569; transition: color 0.2s; }
.header-nav a:hover { color: #1a56db; }
.city-nav { position: relative; }
.city-nav-btn {
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a56db;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.city-nav-btn:hover { color: #1e3a8a; }
.city-nav-arrow { font-size: 0.7rem; transition: transform 0.2s; }
.city-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 160px;
  z-index: 100;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}
.city-nav-dropdown.open { display: block; }
.city-nav-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
}
.city-nav-dropdown a:hover { color: #1a56db; background: #f8fafc; }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #475569;
  padding: 0.25rem;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 1rem;
  gap: 0.75rem;
}
.mobile-nav a { font-weight: 500; color: #475569; padding: 0.5rem 0; }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 50%, #3b82f6 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* === CHAT === */
.chat-container {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.chat-messages {
  min-height: 220px;
  max-height: 340px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.message.user { flex-direction: row-reverse; }
.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.message.bot .message-avatar { background: #dbeafe; }
.message-content { max-width: 75%; }
.message-content p { margin-bottom: 0.5rem; font-size: 0.95rem; color: #334155; }
.message.user .message-content {
  background: #1a56db;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 12px 12px 4px 12px;
  font-size: 0.95rem;
}
.message.bot .message-content {
  background: #f1f5f9;
  padding: 0.75rem 1rem;
  border-radius: 4px 12px 12px 12px;
}
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.suggestions button {
  background: #1a56db;
  color: #fff;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}
.suggestions button:hover { background: #1e40af; }
.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  background: #fafafa;
}
.chat-input-area input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-area input:focus { border-color: #1a56db; }
.chat-input-area button {
  background: #1a56db;
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.chat-input-area button:hover { background: #1e40af; }
.chat-powered {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.chat-powered strong { color: #fff; }
.chat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* === SECTIONS === */
section { padding: 4rem 0; }
section h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section-sub { color: #64748b; font-size: 1.05rem; margin-bottom: 2rem; }

/* === CATEGORIES PREVIEW === */
.categories-preview { background: #fff; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.5rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s;
  text-align: center;
}
.category-card:hover {
  border-color: #1a56db;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,86,219,0.1);
}
.cat-icon { font-size: 2rem; }
.cat-name { font-weight: 600; font-size: 0.9rem; color: #1e293b; }
.cat-count { font-size: 0.8rem; color: #64748b; }

/* === STATS BAR === */
.stats-bar {
  background: #1e3a5f;
  color: #fff;
  padding: 2.5rem 0;
}
.stats-bar .container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #60a5fa;
}
.stat span { font-size: 0.9rem; opacity: 0.8; }

/* === FEATURED LISTINGS === */
.featured-listings { background: #f8fafc; }
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.listing-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: box-shadow 0.2s;
}
.listing-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.listing-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.listing-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.listing-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.listing-location { font-size: 0.85rem; color: #64748b; margin-bottom: 0.5rem; }
.listing-desc { font-size: 0.9rem; color: #475569; margin-bottom: 1rem; line-height: 1.5; }

/* === COMMUNITIES === */
.communities { background: #fff; text-align: center; }
.community-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.community-tag {
  background: #eff6ff;
  color: #1e40af;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* === CTA === */
.cta {
  background: linear-gradient(135deg, #1a56db, #3b82f6);
  color: #fff;
  text-align: center;
}
.cta h2 { font-family: 'Merriweather', serif; margin-bottom: 0.75rem; }
.cta p { opacity: 0.9; margin-bottom: 1.5rem; font-size: 1.05rem; }

/* === FOOTER === */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .logo { color: #fff; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; max-width: 260px; }
.footer-links h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-links a {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: #60a5fa; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  font-size: 0.85rem;
}
.footer-bottom a { color: #60a5fa; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .hero { padding: 3rem 0 2.5rem; }
  .stats-bar .container { justify-content: center; }
  .listing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr 1fr; }
}

/* === MOBILE NAV ANIMATION === */
.mobile-nav {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1rem;
}
.mobile-nav.open {
  display: flex;
  max-height: 400px;
  padding: 0.75rem 1rem;
}

/* === PICKAXE FAB SAFETY — cap popup width on mobile === */
@media (max-width: 480px) {
  .pickaxe-embed iframe,
  .pickaxe-embed [class*="popup"],
  .pickaxe-embed [class*="chat-window"] {
    max-width: 320px !important;
  }
}
