/* ============================================
   PROPERTY MATCH INTELLIGENCE™ - MAIN STYLES
   Fully responsive | Mobile-first | Optimized
   ============================================ */

/* ---------- CSS RESET & VARIABLES (enhanced) ---------- */
:root {
  --primary: #0c84c0;
  --primary-dark: #0c5e7a;
  --primary-light: #e1f0f7;
  --primary-soft: #d4eaf3;
  --secondary: #10b981;
  --secondary-dark: #0d9c6e;
  --accent: #f59e0b;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --gray: #475569;
  --gray-light: #94a3b8;
  --gray-bg: #f8fafc;
  --white: #ffffff;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}

/* ---------- BASE ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background-color: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, .heading-font {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 2rem 0 1.2rem; position: relative; }
h2 i { color: var(--primary); margin-right: 12px; }
h3 { font-size: 1.35rem; margin: 1rem 0 0.6rem; color: var(--dark-soft); }
p { margin-bottom: 1rem; color: var(--gray); line-height: 1.6; }
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ---------- UTILITIES ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.btn-primary, .btn-secondary, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--primary); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--white); border: 1px solid var(--primary); color: var(--primary); }
.btn-secondary:hover { background: var(--primary-light); transform: translateY(-2px); }
.btn-block { width: 100%; text-align: center; }

/* ---------- HEADER / NAVIGATION (mobile-first enhancements) ---------- */
.header {
  position: sticky;
  top: 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 14px 0;
}
.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 45px; width: auto; }
.nav-links ul { display: flex; gap: 28px; list-style: none; }
.nav-links a { font-weight: 500; color: var(--dark); }
.cta-nav { background: var(--primary); color: var(--white) !important; padding: 8px 20px; border-radius: var(--radius-full); }
.mobile-menu-btn { display: none; flex-direction: column; gap: 6px; cursor: pointer; }
.mobile-menu-btn span { width: 26px; height: 2px; background: var(--dark); transition: var(--transition); }

/* ---------- HERO SECTION ---------- */
.hero-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #e9f2f9 100%);
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--border-light);
}
.hero-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 1.2; }
.hero-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  display: inline-block;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-stats { display: flex; gap: 32px; margin: 28px 0; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--primary); display: inline-block; line-height: 1.2; }
.stat-suffix { font-size: 1rem; font-weight: 600; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--gray); display: block; }
.hero-image { flex: 0.8; text-align: center; }
.hero-image img { max-width: 100%; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }

/* ---------- CARDS & GRIDS ---------- */
.feature-grid, .benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin: 40px 0;
}
.feature-card, .benefit-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.feature-card:hover, .benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.feature-card i, .benefit-card i { font-size: 2.2rem; color: var(--primary); margin-bottom: 20px; display: inline-block; }
.warning-card {
  background: #fff7ed;
  border-left: 5px solid var(--accent);
  padding: 24px;
  border-radius: var(--radius-lg);
  margin: 32px 0;
}
.vendor-neutral-badge {
  background: #e6f7f0;
  color: #0e6b3e;
  border-radius: var(--radius-full);
  padding: 8px 20px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 20px;
}
.featured-neutral-card { background: var(--gray-bg); border-radius: var(--radius-xl); padding: 32px; margin-bottom: 40px; }

/* ---------- TABLES ---------- */
.comparison-wrapper { overflow-x: auto; margin: 30px 0; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 600px;
}
.comparison-table th, .comparison-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border-light); }
.comparison-table th { background: var(--primary-light); font-weight: 700; color: var(--primary-dark); }
.footnote { font-size: 0.75rem; color: var(--gray-light); margin-top: 8px; }

/* ---------- FORM SECTION ---------- */
.form-cta {
  background: linear-gradient(120deg, #f0f9ff, var(--white));
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  margin: 48px 0;
  text-align: center;
  border: 1px solid var(--border-light);
}
.property-match-form { max-width: 800px; margin: 32px auto 0; }
.form-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.form-group { flex: 1; min-width: 200px; text-align: left; }
.form-group.full-width { width: 100%; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 132, 192, 0.1);
}
.error-msg { color: #dc2626; font-size: 0.75rem; display: block; margin-top: 5px; min-height: 20px; }
.form-feedback { margin-top: 20px; padding: 12px; border-radius: var(--radius-md); }
.form-feedback.success { background: #d1fae5; color: #065f46; }
.form-feedback.error { background: #fee2e2; color: #991b1b; }
.form-disclaimer { font-size: 0.75rem; margin-top: 16px; color: var(--gray-light); }

/* ---------- FAQ SECTION ---------- */
.faq-section { margin: 60px 0; }
.faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-light); margin-bottom: 16px; }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 18px 12px 18px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--dark);
  transition: var(--transition);
}
.faq-question i { transition: transform 0.25s; }
.faq-question[aria-expanded="true"] i { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 12px 0 0;
}
.faq-answer p { margin-bottom: 20px; }
.faq-question[aria-expanded="true"] + .faq-answer { max-height: 300px; }

/* ---------- FOOTER & FLOATING BUTTONS ---------- */
.footer { background: #0b1628; color: #cfd6e4; padding: 56px 0 24px; margin-top: 48px; }
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 20px;
  background: #25d366;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 28px;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transition: var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); background: #128C7E; }
.back-to-top {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: var(--primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 992px) {
  .container { padding: 0 20px; }
  .hero-grid { flex-direction: column; text-align: center; }
  .hero-stats { justify-content: center; }
  .form-row { flex-direction: column; gap: 16px; }
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 73px;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav-links.active { display: block; }
  .nav-links ul { flex-direction: column; gap: 16px; }
  .mobile-menu-btn { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .comparison-table { min-width: 100%; }
  .form-cta { padding: 32px 20px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-stats { gap: 20px; }
  .stat-number { font-size: 1.6rem; }
  .btn-primary, .btn-secondary { padding: 10px 24px; font-size: 0.9rem; }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}
.feature-card, .benefit-card, .faq-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.feature-card.revealed, .benefit-card.revealed, .faq-item.revealed {
  opacity: 1;
  transform: translateY(0);
}