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

:root {
  --bg: #0a0a1a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --text: #f0f0f5;
  --text-muted: #9ca3af;
  --accent: #4A90D9;
  --accent-cyan: #06b6d4;
  --gradient: linear-gradient(135deg, #4A90D9, #06b6d4);
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.1);
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --max-w: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-cyan); }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,26,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background .3s;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-logo {
  font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--text-muted); font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.lang-toggle {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 6px 14px; color: var(--text); cursor: pointer;
  font-size: .8rem; font-weight: 600; transition: all .2s;
}
.lang-toggle:hover { background: var(--bg-card-hover); }
.lang-toggle .active-lang { color: var(--accent-cyan); }

.mobile-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 1.5rem; cursor: pointer; padding: 4px;
}

/* Mobile nav */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    flex-direction: column; background: rgba(10,10,26,0.97);
    backdrop-filter: blur(20px); padding: 40px 24px; gap: 24px;
    transform: translateX(100%); transition: transform .3s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px; font-weight: 600;
  font-size: .95rem; border: none; cursor: pointer; transition: all .3s;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 20px rgba(74,144,217,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74,144,217,0.45);
  color: #fff;
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-outline:hover {
  background: var(--glass); transform: translateY(-2px); color: #fff;
}
.btn-sm { padding: 10px 24px; font-size: .85rem; }

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px;
  transition: all .3s;
}
.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(74,144,217,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 50px; padding: 8px 18px; font-size: .8rem;
  color: var(--accent-cyan); margin-bottom: 24px; font-weight: 500;
}
.hero-badge::before { content: ''; width: 8px; height: 8px; background: var(--accent-cyan); border-radius: 50%; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 20px; letter-spacing: -0.02em;
}
.hero h1 .gradient-text {
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.hero .subtitle {
  font-size: 1.15rem; color: var(--text-muted); margin-bottom: 16px; font-weight: 500;
}
.hero p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 36px; max-width: 560px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat-badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 12px 20px;
}
.stat-badge .stat-icon { font-size: 1.4rem; }
.stat-badge .stat-text { font-size: .8rem; color: var(--text-muted); line-height: 1.3; }
.stat-badge .stat-text strong { display: block; color: var(--text); font-size: .9rem; }

/* ===== SECTION DEFAULTS ===== */
section { padding: 100px 0; position: relative; }
.section-label {
  display: inline-block; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: var(--accent-cyan);
  margin-bottom: 12px;
}
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 16px; }
.section-desc { font-size: 1.05rem; color: var(--text-muted); max-width: 600px; margin-bottom: 48px; }

/* ===== AI PROTOCOL ===== */
.protocol { background: linear-gradient(180deg, var(--bg) 0%, rgba(10,10,30,1) 100%); }
.protocol-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.protocol-card .card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--gradient); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; margin-bottom: 20px;
}
.protocol-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.protocol-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* ===== HOW IT WORKS ===== */
.steps { background: var(--bg); }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.step-card { text-align: center; padding: 40px 28px; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gradient); display: flex; align-items: center;
  justify-content: center; font-family: var(--font-heading);
  font-size: 1.3rem; font-weight: 800; margin: 0 auto 24px;
}
.step-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.step-card p { font-size: .9rem; color: var(--text-muted); }

/* ===== AGENTS COMMUNITY ===== */
.community { background: linear-gradient(180deg, rgba(10,10,30,1) 0%, var(--bg) 100%); }
.community-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.community-stats { display: flex; gap: 24px; margin: 32px 0; }
.community-stat {
  text-align: center; padding: 16px 24px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.community-stat .num {
  font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.community-stat .label { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

.community-features { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.community-features li {
  display: flex; align-items: flex-start; gap: 12px; font-size: .95rem;
}
.community-features li::before {
  content: '✓'; color: var(--accent-cyan); font-weight: 700; flex-shrink: 0;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  background: rgba(6,182,212,0.1); border-radius: 50%; font-size: .75rem;
}

@media (max-width: 768px) {
  .community-content { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== PROPERTY SEARCH TEASER ===== */
.search-teaser {
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(10,10,30,1) 100%);
}
.search-form {
  max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
}
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }

/* ===== FORMS ===== */
.form-input, .form-select {
  width: 100%; padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-family: var(--font-body); font-size: .9rem;
  transition: border-color .2s;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus {
  outline: none; border-color: var(--accent);
}
.form-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-select option { background: var(--bg); }

/* ===== VALUATION ===== */
.valuation {
  text-align: center; padding: 80px 0;
  background: linear-gradient(135deg, rgba(74,144,217,0.08), rgba(6,182,212,0.08));
}
.valuation-inner {
  max-width: 560px; margin: 0 auto;
}
.valuation h2 { margin-bottom: 16px; }
.valuation p { color: var(--text-muted); margin-bottom: 32px; }

/* ===== ABOUT ===== */
.about { background: var(--bg); }
.about-content {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start;
}
.about-photo {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: var(--text-muted);
}
.about-bio h3 { font-size: 1.5rem; margin-bottom: 8px; }
.about-bio .role { color: var(--accent-cyan); font-size: .9rem; margin-bottom: 20px; }
.about-bio p { color: var(--text-muted); font-size: .95rem; margin-bottom: 16px; }
.about-markets { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.market-tag {
  padding: 8px 16px; border-radius: 50px; font-size: .8rem; font-weight: 600;
  background: var(--glass); border: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
  .about-content { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 240px; margin: 0 auto; }
}

/* ===== FOOTER ===== */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--glass-border);
  background: rgba(5,5,15,0.6);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand .nav-logo { margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: .85rem; max-width: 280px; }
.footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; color: var(--text); }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--text-muted); font-size: .85rem; }
.footer ul a:hover { color: #fff; }

.footer-socials { display: flex; gap: 12px; margin-top: 16px; }
.footer-socials a {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 1.1rem; transition: all .2s;
}
.footer-socials a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--glass-border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== PAGE HERO (for list/search pages) ===== */
.page-hero {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(74,144,217,0.06) 0%, var(--bg) 100%);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* ===== PAGE FORM ===== */
.page-form-section { padding: 0 0 100px; }
.page-form {
  max-width: 600px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
}
.page-form .form-row { display: flex; gap: 12px; }
@media (max-width: 480px) {
  .form-row { flex-direction: column; }
}

.form-success {
  text-align: center; padding: 48px; display: none;
}
.form-success .check-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gradient); margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.form-success h3 { margin-bottom: 8px; }
.form-success p { color: var(--text-muted); }

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ===== TESTIMONIALS ===== */
.testimonials-section {
  padding: 100px 0;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.testimonial-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.testimonial-stars {
  color: #f59e0b;
  font-size: 18px;
  letter-spacing: 2px;
}
.testimonial-quote {
  color: #c4c9d4;
  font-size: 15px;
  line-height: 1.7;
  flex: 1;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}
.testimonial-name {
  color: #f0f0f5;
  font-weight: 600;
  font-size: 15px;
}
.testimonial-role {
  color: #9ca3af;
  font-size: 13px;
}
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== CHAT WIDGET ===== */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}
.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A90D9, #06b6d4);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(74, 144, 217, 0.4);
  transition: all 0.3s ease;
}
.chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(74, 144, 217, 0.5);
}
.chat-window {
  display: none;
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 380px;
  height: 520px;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: chatSlideUp 0.3s ease;
}
.chat-window.open { display: flex; }
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A90D9, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}
.chat-header-name { color: #f0f0f5; font-weight: 600; font-size: 15px; }
.chat-header-status { color: #4ade80; font-size: 12px; }
.chat-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.chat-close:hover { color: #fff; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg { max-width: 85%; }
.chat-msg p {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.chat-msg.bot { align-self: flex-start; }
.chat-msg.bot p {
  background: rgba(255, 255, 255, 0.08);
  color: #f0f0f5;
  border-bottom-left-radius: 4px;
}
.chat-msg.user { align-self: flex-end; }
.chat-msg.user p {
  background: linear-gradient(135deg, #4A90D9, #06b6d4);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: #f0f0f5;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-area input:focus { border-color: #4A90D9; }
.chat-send {
  background: linear-gradient(135deg, #4A90D9, #06b6d4);
  border: none;
  border-radius: 10px;
  padding: 12px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.chat-send:hover { opacity: 0.85; }
.chat-typing p {
  color: #9ca3af !important;
  font-style: italic;
}
@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 140px);
    right: -8px;
  }
  .chat-widget { bottom: 16px; right: 16px; }
}
