@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fafbfc; color: #1a2332; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

:root {
  --primary: #0f2b3d;
  --primary-light: #1a4a6a;
  --secondary: #1a7a6a;
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --gold-dark: #a8882e;
  --cream: #fcf9f3;
  --light: #f5f7fa;
  --white: #ffffff;
  --text: #1a2332;
  --text-light: #6b7a8a;
  --text-muted: #9aa8b8;
  --shadow-sm: 0 2px 8px rgba(15,43,61,0.06);
  --shadow: 0 4px 24px rgba(15,43,61,0.08);
  --shadow-lg: 0 12px 48px rgba(15,43,61,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* HEADER */
.header {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15,43,61,0.06);
  position: sticky; top: 0; z-index: 1000;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1200px; margin: 0 auto;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.5px;
  display: flex; align-items: center;
}
.logo.small { font-size: 1.2rem; }
.logo.long { font-size: 1.1rem; letter-spacing: 0; }
.logo img { display: block; }
.logo span { color: var(--primary); }
.logo .green { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  color: var(--text-light); font-weight: 500; font-size: 0.9rem;
  letter-spacing: 0.3px; position: relative; transition: var(--transition);
}
.nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--gold); transition: var(--transition);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }
.lang-switch { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.flag-icon { width: 20px; height: 14px; border-radius: 2px; vertical-align: middle; display: inline-block; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.lang-btn {
  background: none; border: 1px solid transparent; cursor: pointer;
  font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border-radius: 6px;
  transition: var(--transition); color: var(--text-light); letter-spacing: 0.3px;
}
.lang-btn:hover { border-color: var(--gold-light); background: var(--cream); color: var(--text); }
.lang-btn.active { border-color: var(--gold); background: var(--cream); color: var(--primary); }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a4a6a 50%, var(--secondary) 100%);
  color: white; padding: 100px 24px 120px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 120px; background: linear-gradient(transparent, rgba(255,255,255,0.04));
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem; font-weight: 600; margin-bottom: 20px;
  position: relative; letter-spacing: -0.5px; line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero h1::after {
  content: ''; display: block; width: 60px; height: 3px;
  background: var(--gold); margin: 20px auto 0; border-radius: 2px;
}
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 0 auto; position: relative; font-weight: 300; line-height: 1.6; text-shadow: 0 1px 12px rgba(0,0,0,0.2); }
.hero-sub { margin-top: 36px; }
.hero-brand { font-family: 'Playfair Display', serif; font-size: 2.8rem; font-weight: 700; color: var(--gold); letter-spacing: 4px; margin-bottom: 8px; text-shadow: 0 2px 16px rgba(0,0,0,0.3); }
.hero-sub h2 { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 600; color: var(--gold-light); margin-bottom: 10px; text-shadow: 0 2px 12px rgba(0,0,0,0.25); }
.hero-sub h2 span:first-child { color: white; }
.hero-sub h2 span:last-child { color: var(--gold); }
.hero-sub p { font-size: 1.05rem; opacity: 0.85; max-width: 580px; text-shadow: 0 1px 10px rgba(0,0,0,0.2); }

/* SEARCH BOX */
.search-box {
  background: white; border-radius: var(--radius);
  padding: 32px; max-width: 860px; margin: -80px auto 70px;
  box-shadow: var(--shadow-lg); position: relative; z-index: 10;
  border: 1px solid rgba(15,43,61,0.04);
}
.search-box .overline {
  text-align: center; margin-bottom: 20px;
  font-size: 0.95rem; color: var(--text-light); line-height: 1.7;
}
.search-box .overline strong { color: var(--primary); }
.search-box h3 { text-align: center; margin-bottom: 20px; color: var(--text); font-size: 1.15rem; font-weight: 600; }
.search-row { display: flex; gap: 12px; flex-wrap: wrap; }
.search-row select, .search-row input {
  flex: 1; min-width: 160px; padding: 14px 18px; font-size: 0.9rem;
  border: 2px solid #eef1f4; border-radius: var(--radius-sm);
  background: #fafbfc; transition: var(--transition);
  font-family: 'Inter', sans-serif; color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.search-row select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.search-row select:focus, .search-row input:focus {
  border-color: var(--primary); outline: none; background: white;
  box-shadow: 0 0 0 4px rgba(15,43,61,0.06);
}
.btn {
  padding: 14px 32px; border: none; border-radius: var(--radius-sm);
  background: var(--primary); color: white; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; transition: var(--transition);
  white-space: nowrap; font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}
.btn:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,43,61,0.15); }
.btn-secondary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--primary);
}
.btn-secondary:hover { background: linear-gradient(135deg, var(--gold-dark) 0%, #967a28 100%); box-shadow: 0 8px 24px rgba(201,168,76,0.35); }

/* SECTIONS */
.section { padding: 80px 0; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; text-align: center; margin-bottom: 48px;
  color: var(--text); font-weight: 600; letter-spacing: -0.3px;
}
.section-title span { color: var(--primary); }
.section-title::after {
  content: ''; display: block; width: 50px; height: 2px;
  background: var(--gold); margin: 16px auto 0; border-radius: 2px;
}

/* PROPERTY CARDS */
.properties-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.property-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: var(--transition);
  border: 1px solid rgba(15,43,61,0.04);
}
.property-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.property-card { animation: fadeUp 0.6s ease both; }
.property-card:nth-child(1) { animation-delay: 0s; }
.property-card:nth-child(2) { animation-delay: 0.1s; }
.property-card:nth-child(3) { animation-delay: 0.2s; }
.property-card:nth-child(4) { animation-delay: 0.3s; }
.property-card:nth-child(5) { animation-delay: 0.4s; }
.property-card:nth-child(6) { animation-delay: 0.5s; }

.property-img {
  height: 220px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 3rem; position: relative; overflow: hidden;
}
.property-img img { transition: var(--transition); }
.property-card:hover .property-img img { transform: scale(1.05); }
.property-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,43,61,0.3), transparent);
  pointer-events: none;
}
.property-img .tag {
  position: absolute; top: 16px; left: 16px; padding: 6px 16px;
  border-radius: 20px; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase; backdrop-filter: blur(10px);
}
.tag-sale { background: rgba(15,43,61,0.85); color: white; }
.tag-rent { background: rgba(26,122,106,0.85); color: white; }
.tag-transfer { background: rgba(201,168,76,0.85); color: var(--primary); }
.property-body { padding: 24px; }
.property-town { font-size: 0.8rem; color: var(--gold-dark); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.property-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; color: var(--text); line-height: 1.4; }
.property-desc { color: var(--text-light); font-size: 0.88rem; margin-bottom: 16px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.property-price { font-size: 1.5rem; font-weight: 700; color: var(--secondary); font-family: 'Playfair Display', serif; }
.property-price small { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); font-family: 'Inter', sans-serif; }
.no-properties { grid-column: 1 / -1; text-align: center; padding: 60px 40px; color: var(--text-light); font-size: 1.05rem; }

/* ABOUT SECTION */
.about-section { background: white; padding: 56px 48px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 0; }
.about-section p { font-size: 1.05rem; line-height: 1.9; color: var(--text-light); max-width: 760px; margin: 0 auto 40px; text-align: center; font-weight: 300; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.stat-box { text-align: center; padding: 36px 24px; background: var(--light); border-radius: var(--radius); transition: var(--transition); border: 1px solid rgba(15,43,61,0.04); }
.stat-box:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-box .num { font-family: 'Playfair Display', serif; font-size: 2.8rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.stat-box:nth-child(2) .num { color: var(--gold); }
.stat-box:nth-child(3) .num { font-size: 2rem; }
.stat-box .label { font-size: 0.9rem; color: var(--text-light); font-weight: 500; }

/* SERVICES */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.service-card {
  background: white; padding: 40px 28px; border-radius: var(--radius);
  text-align: center; box-shadow: var(--shadow); transition: var(--transition);
  border: 1px solid rgba(15,43,61,0.04);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-icon { font-size: 2.8rem; margin-bottom: 20px; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--text); font-weight: 600; }
.service-card p { color: var(--text-light); font-size: 0.88rem; line-height: 1.7; }

/* FOOTER */
.footer {
  background: var(--primary); color: rgba(255,255,255,0.7); padding: 56px 0 28px;
}
.footer .logo span { color: white; }
.footer .logo .green { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 32px; }
.footer h4 { color: white; margin-bottom: 16px; font-size: 1rem; font-weight: 600; }
.footer p, .footer a { font-size: 0.88rem; line-height: 2; }
.footer a:hover { color: var(--gold-light); }
.social-icons { display: flex; gap: 16px; margin-top: 12px; }
.social-icons a { color: rgba(255,255,255,0.6); transition: var(--transition); display: flex; align-items: center; }
.social-icons a:hover { color: var(--gold); transform: translateY(-2px); }
.social-icons svg { width: 28px; height: 28px; }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.82rem; }

/* FEATURED BADGE */
.featured-badge {
  position: absolute; top: 16px; right: 16px; background: rgba(201,168,76,0.9);
  color: var(--primary); padding: 4px 12px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.3px;
  backdrop-filter: blur(10px);
}

/* MORTGAGE CALCULATOR */
.calc-container { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px; max-width: 720px; margin: 0 auto; border: 1px solid rgba(15,43,61,0.04); }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.calc-result { background: var(--light); border-radius: var(--radius-sm); padding: 32px; text-align: center; margin-top: 24px; border: 1px solid rgba(15,43,61,0.04); }
.calc-result .payment { font-family: 'Playfair Display', serif; font-size: 2.8rem; font-weight: 700; color: var(--primary); }
.calc-result .label { color: var(--text-light); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.calc-result .detail { color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }
.calc-slider { width: 100%; height: 6px; accent-color: var(--gold); border-radius: 3px; cursor: pointer; }

/* PROPERTY CARD LINK */
.property-card-link { display: block; color: inherit; text-decoration: none; }
.property-card-link:hover .property-card { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* PROPERTY DETAIL PAGE */
.detail-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a4a6a 50%, var(--secondary) 100%);
  color: white; padding: 80px 24px; text-align: center; position: relative; overflow: hidden;
}
.detail-hero::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.detail-hero .detail-type-badge {
  display: inline-block; background: var(--gold); color: var(--primary);
  padding: 6px 20px; border-radius: 30px; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 16px;
}
.detail-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.6rem; font-weight: 600; margin-bottom: 12px; text-shadow: 0 2px 16px rgba(0,0,0,0.25); }
.detail-hero .detail-price { font-size: 2rem; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.detail-hero .detail-location { font-size: 1.05rem; opacity: 0.85; }
.detail-content { padding: 48px 0; }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1100px; margin: 0 auto; }
.detail-description h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 16px; color: var(--text); }
.detail-description p { color: var(--text-light); line-height: 1.8; font-size: 0.98rem; }
.detail-location-box { background: var(--light); border-radius: var(--radius); padding: 28px; border: 1px solid rgba(15,43,61,0.04); }
.detail-location-box h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 12px; color: var(--text); }
.detail-location-box p { color: var(--text-light); line-height: 1.7; font-size: 0.92rem; }
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 40px; }
.detail-gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); transition: var(--transition); cursor: pointer; }
.detail-gallery img:hover { transform: scale(1.02); box-shadow: var(--shadow); }
.detail-sidebar { display: flex; flex-direction: column; gap: 24px; }
.detail-contact-card { background: white; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); border: 1px solid rgba(15,43,61,0.04); text-align: center; }
.detail-contact-card h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 16px; }
.detail-contact-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 6px; }
.detail-contact-card .btn { width: 100%; margin-top: 12px; }
.detail-contact-card .btn-secondary { width: 100%; }

@media (max-width: 768px) {
  .detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .detail-hero h1 { font-size: 1.8rem; }
  .detail-hero .detail-price { font-size: 1.5rem; }
  .detail-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

/* CAPTURE PROMO SECTION */
.capture-promo {
  background: linear-gradient(135deg, var(--primary) 0%, #0f2b3d 50%, #1a4a6a 100%);
  color: white; position: relative; overflow: hidden;
}
.capture-promo::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.capture-promo-header { text-align: center; max-width: 720px; margin: 0 auto 48px; position: relative; }
.capture-promo-badge {
  display: inline-block; background: var(--gold); color: var(--primary);
  padding: 8px 24px; border-radius: 30px; font-weight: 700; font-size: 0.85rem;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 20px;
}
.capture-promo-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem; font-weight: 600; line-height: 1.3; margin-bottom: 16px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.capture-promo-desc {
  font-size: 1.05rem; opacity: 0.85; line-height: 1.7;
  text-shadow: 0 1px 10px rgba(0,0,0,0.15);
}
.capture-promo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  max-width: 1100px; margin: 0 auto 40px; position: relative;
}
.capture-promo-card {
  background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius);
  padding: 32px 24px; text-align: center; transition: var(--transition);
}
.capture-promo-card:hover {
  background: rgba(255,255,255,0.14); transform: translateY(-4px);
  border-color: var(--gold); box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.capture-promo-card-icon { font-size: 2.6rem; margin-bottom: 16px; }
.capture-promo-card h4 {
  font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: white;
}
.capture-promo-card p {
  font-size: 0.85rem; opacity: 0.75; line-height: 1.6;
}
.capture-promo-cta { text-align: center; position: relative; }
.capture-promo-cta .btn-secondary {
  padding: 14px 40px; font-size: 1rem;
}

.capture-promo-cta .btn-secondary:hover {
  box-shadow: 0 8px 32px rgba(201,168,76,0.4);
}

@media (max-width: 992px) {
  .capture-promo-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .capture-promo-title { font-size: 2rem; }
}

@media (max-width: 768px) {
  .capture-promo-grid { grid-template-columns: 1fr; gap: 16px; }
  .capture-promo-title { font-size: 1.6rem; }
  .capture-promo-badge { font-size: 0.75rem; padding: 6px 18px; }
  .capture-promo-desc { font-size: 0.95rem; }
  .capture-promo-card { padding: 24px 18px; }
}

/* CAPTURE PAGE */
.capture-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a4a6a 50%, var(--secondary) 100%);
  color: white; padding: 100px 24px; text-align: center; position: relative; overflow: hidden;
}
.capture-hero::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.capture-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.8rem; font-weight: 600; margin-bottom: 16px; position: relative; }
.capture-hero h1::after { content: ''; display: block; width: 50px; height: 3px; background: var(--gold); margin: 16px auto 0; border-radius: 2px; }
.capture-hero p { font-size: 1.1rem; opacity: 0.85; max-width: 600px; margin: 0 auto; position: relative; font-weight: 300; }
.capture-form-box { background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 48px; max-width: 720px; margin: -44px auto 64px; position: relative; z-index: 10; border: 1px solid rgba(15,43,61,0.04); }
.capture-form-box h2 { font-family: 'Playfair Display', serif; margin-bottom: 28px; text-align: center; font-size: 1.6rem; }
.capture-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: 960px; margin: 0 auto 64px; }
.capture-benefit { text-align: center; padding: 32px 20px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(15,43,61,0.04); transition: var(--transition); }
.capture-benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.capture-benefit .icon { font-size: 2.8rem; margin-bottom: 16px; }
.capture-benefit h4 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); font-weight: 600; }
.capture-benefit p { color: var(--text-light); font-size: 0.88rem; line-height: 1.7; }

/* CRM STYLES */
.crm-body { background: #f5f7fa; }
.crm-header {
  background: var(--primary); color: white;
  padding: 0 24px; position: sticky; top: 0; z-index: 100;
}
.crm-header-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1400px; margin: 0 auto; height: 64px; }
.crm-header .logo { font-size: 1.2rem; }
.crm-header .logo span { color: white; }
.crm-header .logo .green { color: var(--gold); }
.crm-nav { display: flex; gap: 2px; }
.crm-nav a {
  padding: 8px 18px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7); font-weight: 500; transition: var(--transition);
  font-size: 0.88rem;
}
.crm-nav a:hover, .crm-nav a.active { background: rgba(255,255,255,0.1); color: white; }
.crm-header .lang-btn { color: rgba(255,255,255,0.7); }
.crm-header .lang-btn:hover { border-color: var(--gold); background: rgba(255,255,255,0.1); color: white; }
.crm-header .lang-btn.active { border-color: var(--gold); background: rgba(255,255,255,0.15); color: white; }
.crm-layout { display: flex; min-height: calc(100vh - 64px); }
.crm-sidebar {
  width: 220px; background: white; border-right: 1px solid #eef1f4;
  padding: 0; flex-shrink: 0; display: flex; flex-direction: column;
}
.crm-sidebar-logo {
  padding: 20px 16px 16px; border-bottom: 1px solid #eef1f4;
  text-align: center;
}
.crm-sidebar-logo img { 
  max-width: 100%; height: auto; display: block; margin: 0 auto;
}
.crm-sidebar a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; color: var(--text-light);
  transition: var(--transition); font-size: 0.88rem; border-left: 3px solid transparent;
}
.crm-sidebar a:hover, .crm-sidebar a.active { background: var(--light); color: var(--primary); font-weight: 600; border-left-color: var(--gold); }
.crm-content { flex: 1; padding: 32px; overflow-x: auto; }

/* STAT CARDS */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: white; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(15,43,61,0.04); }
.stat-card .num { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; }
.stat-card .label { color: var(--text-light); font-size: 0.85rem; margin-top: 4px; }
.stat-card .num { color: var(--primary); }
.stat-card:nth-child(2) .num { color: var(--secondary); }
.stat-card:nth-child(3) .num { color: var(--gold); }
.stat-card:nth-child(4) .num { color: #8b5cf6; }

/* TABLES */
.crm-table { width: 100%; border-collapse: separate; border-spacing: 0; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.crm-table th { background: var(--light); color: var(--text); text-align: left; padding: 14px 18px; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #eef1f4; }
.crm-table td { padding: 14px 18px; border-bottom: 1px solid #f0f2f4; font-size: 0.88rem; }
.crm-table tr:last-child td { border-bottom: none; }
.crm-table tr:hover td { background: #fafbfc; }
.crm-table .actions { display: flex; gap: 6px; }
.btn-sm { padding: 6px 14px; font-size: 0.78rem; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; transition: var(--transition); }
.btn-edit { background: var(--primary); color: white; }
.btn-edit:hover { background: var(--primary-light); }
.btn-delete { background: #dc2626; color: white; }
.btn-delete:hover { background: #b91c1c; }
.btn-view { background: var(--secondary); color: white; }
.btn-view:hover { background: #146a5a; }

/* FORMS */
.crm-form { background: white; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 700px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.85rem; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 2px solid #eef1f4;
  border-radius: var(--radius-sm); font-size: 0.9rem;
  transition: var(--transition); background: #fafbfc;
  font-family: 'Inter', sans-serif;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); outline: none; background: white;
  box-shadow: 0 0 0 4px rgba(15,43,61,0.06);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.btn-cancel { background: #eef1f4; color: var(--text-light); }
.btn-cancel:hover { background: #e2e5e8; color: var(--text); }

/* MODAL */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15,43,61,0.5); backdrop-filter: blur(4px);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: white; border-radius: var(--radius); padding: 40px;
  max-width: 640px; width: 92%; max-height: 90vh; overflow-y: auto;
  transform: scale(0.95) translateY(10px); transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal h2 { font-family: 'Playfair Display', serif; margin-bottom: 24px; font-size: 1.5rem; }
.modal .close { float: right; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); transition: var(--transition); line-height: 1; }
.modal .close:hover { color: var(--text); transform: rotate(90deg); }

/* LOGIN */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  position: relative;
}
.login-page::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-box {
  background: white; padding: 48px; border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(15,43,61,0.2);
  width: 100%; max-width: 420px; position: relative;
}
.login-box h1 { text-align: center; margin-bottom: 4px; font-family: 'Playfair Display', serif; }
.login-box p { text-align: center; color: var(--text-light); margin-bottom: 28px; font-size: 0.88rem; }
.login-box .form-group input { background: white; }

/* BADGES */
.badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.3px; }
.badge-new { background: #dcfce7; color: #166534; }
.badge-contacted { background: #fef3c7; color: #92400e; }
.badge-closed { background: #e0e7ff; color: #3730a3; }

/* LEAD CARD */
.lead-card {
  background: white; padding: 20px 24px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  border: 1px solid rgba(15,43,61,0.04); cursor: pointer; transition: var(--transition);
}
.lead-card:hover { box-shadow: var(--shadow); border-color: var(--gold-light); }
.lead-card .info { flex: 1; min-width: 200px; }
.lead-card .name { font-weight: 700; color: var(--text); }
.lead-card .detail { color: var(--text-light); font-size: 0.85rem; }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--primary);
  color: white; padding: 16px 28px; border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(15,43,61,0.2); z-index: 99999;
  transform: translateY(100px); opacity: 0; transition: var(--transition);
  font-weight: 500; font-size: 0.9rem;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #dc2626; }

/* IMAGE UPLOAD */
.image-upload-area { border: 2px dashed #d0d5db; border-radius: var(--radius-sm); padding: 24px; text-align: center; cursor: pointer; transition: var(--transition); background: var(--light); }
.image-upload-area:hover { border-color: var(--gold); background: var(--cream); }
.image-upload-area input { display: none; }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 12px; }
.image-preview-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--light); border: 3px solid transparent; transition: var(--transition); }
.image-preview-item.featured { border-color: var(--gold); }
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-item .img-actions { position: absolute; bottom: 0; left: 0; right: 0; display: flex; gap: 2px; }
.image-preview-item .img-actions button { flex: 1; border: none; padding: 4px; font-size: 0.65rem; cursor: pointer; color: white; font-weight: 600; }
.image-preview-item .img-actions .btn-feat { background: var(--secondary); }
.image-preview-item .img-actions .btn-del { background: #dc2626; }
.image-preview-item .featured-tag { position: absolute; top: 4px; right: 4px; background: var(--gold); color: var(--primary); font-size: 0.6rem; padding: 2px 8px; border-radius: 8px; font-weight: 700; }
.table-img-thumb { width: 44px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--light); }

/* SETTINGS PAGE */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 768px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-section { background: white; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(15,43,61,0.04); }
.settings-section h3 { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--gold-light); font-size: 1.1rem; color: var(--text); }
.settings-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.settings-image-box { text-align: center; }
.settings-image-box .preview { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; background: var(--light); margin-bottom: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid #eef1f4; }
.settings-image-box .preview img { width: 100%; height: 100%; object-fit: cover; }
.settings-image-box .preview .placeholder { color: var(--text-muted); font-size: 0.8rem; }
.settings-image-box .btn-upload { font-size: 0.78rem; padding: 6px 14px; }
.settings-image-box .btn-remove { font-size: 0.78rem; padding: 6px 14px; background: #dc2626; color: white; }
.settings-image-box .btn-remove:hover { background: #b91c1c; }

/* TABS */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid #eef1f4; }
.tab { padding: 10px 24px; cursor: pointer; border: none; background: none; font-size: 0.88rem; font-weight: 600; color: var(--text-light); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--gold); }

/* LEAD FILTERS */
.lead-filters { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.lead-filters select, .lead-filters input { padding: 10px 16px; border: 2px solid #eef1f4; border-radius: var(--radius-sm); font-size: 0.88rem; background: white; font-family: 'Inter', sans-serif; }
.lead-filters input { flex: 1; min-width: 200px; }
.lead-filters select:focus, .lead-filters input:focus { border-color: var(--primary); outline: none; }

/* ROLE BADGE */
.role-badge { font-size: 0.68rem; padding: 2px 10px; border-radius: 20px; display: inline-block; margin-top: 4px; font-weight: 600; letter-spacing: 0.3px; }
.role-badge.admin { background: var(--primary); color: white; }
.role-badge.agent { background: var(--gold); color: var(--primary); }

/* LEAD DETAIL */
.lead-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.lead-detail-field label { font-weight: 600; font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 4px; }
.lead-detail-field .value { font-size: 0.95rem; color: var(--text); }
.lead-detail-message { background: var(--light); padding: 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-style: italic; color: var(--text-light); line-height: 1.6; }
.lead-notes-textarea { width: 100%; min-height: 100px; padding: 14px; border: 2px solid #eef1f4; border-radius: var(--radius-sm); font-family: inherit; resize: vertical; transition: var(--transition); }
.lead-notes-textarea:focus { border-color: var(--primary); outline: none; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: #d0d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9aa8b8; }

/* GDPR CHECKBOX */
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 0.82rem; color: var(--text-light); line-height: 1.5; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); cursor: pointer; flex-shrink: 0; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 4rem; margin-bottom: 16px; }

/* BACK LINK */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; margin-bottom: 20px; }
.back-link:hover { color: var(--primary-light); }

/* WHATSAPP FLOATING BUTTON */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition); cursor: pointer;
  animation: whatsappPulse 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.55); }
.whatsapp-float svg { width: 32px; height: 32px; fill: white; }
@keyframes whatsappPulse {
  0% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 40px rgba(37,211,102,0.7); }
  100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
}

/* HAMBURGER */
.hamburger {
  display: none; background: none; border: none; font-size: 1.6rem;
  cursor: pointer; color: var(--primary); padding: 4px 8px;
  line-height: 1; z-index: 1001;
}
.hamburger:hover { color: var(--gold); }

/* RESPONSIVE */
@media (max-width: 992px) {
  .container { padding: 0 16px; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .header-inner { flex-wrap: wrap; gap: 8px; position: relative; }
  .logo { font-size: 1.2rem; }
  .nav {
    display: none; order: 3; width: 100%; flex-direction: column;
    background: white; border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 32px rgba(15,43,61,0.12);
    padding: 16px; gap: 4px; position: absolute; top: 100%; left: 0;
    z-index: 999; border-top: 1px solid #eef1f4;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; border-radius: 8px; }
  .nav a:hover { background: var(--light); }
  .lang-switch { margin-left: auto; justify-content: flex-end; padding: 8px 0 0; }
  .hero { padding: 48px 16px 72px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero-brand { font-size: 1.8rem; letter-spacing: 2px; }
  .hero-sub h2 { font-size: 1.4rem; }
  .hero-sub p { font-size: 0.9rem; }
  .section-title { font-size: 1.6rem; margin-bottom: 32px; }
  .search-box { padding: 24px 20px; margin: -40px auto 48px; border-radius: 12px; }
  .search-row { flex-direction: column; gap: 8px; }
  .search-row select, .search-row input, .search-row .btn { min-width: auto; width: 100%; }
  .properties-grid { grid-template-columns: 1fr; gap: 20px; }
  .property-body { padding: 18px; }
  .stats-grid { grid-template-columns: 1fr; gap: 16px; }
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .section { padding: 48px 0; }
  .about-section { padding: 28px 20px; }
  .about-section p { font-size: 0.92rem; margin-bottom: 28px; }
  .stat-box { padding: 24px 16px; }
  .stat-box .num { font-size: 2rem; }
  .footer { padding: 40px 0 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-bottom { padding-top: 16px; }
  .calc-container { padding: 24px; }
  .calc-row { grid-template-columns: 1fr; gap: 16px; }
  .calc-result { padding: 20px; }
  .calc-result .payment { font-size: 2rem; }
  .capture-hero { padding: 60px 16px; }
  .capture-hero h1 { font-size: 1.8rem; }
  .capture-benefits { grid-template-columns: 1fr; gap: 16px; }
  .capture-form-box { padding: 24px; margin: -40px auto 48px; border-radius: 12px; }
  .capture-benefit { padding: 24px 16px; }
  .crm-layout { flex-direction: column; }
  .crm-sidebar { width: 100%; display: flex; overflow-x: auto; padding: 0; border: none; }
  .crm-sidebar a { white-space: nowrap; padding: 12px 16px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .crm-content { padding: 16px; }
  .crm-table { font-size: 0.72rem; }
  .crm-table th, .crm-table td { padding: 8px 10px; }
  .crm-table .actions { flex-direction: column; gap: 4px; }
  .crm-table .btn-sm { padding: 4px 10px; font-size: 0.7rem; }
  .lang-switch { margin-left: auto; }
  .modal { padding: 24px; width: 96%; }
  .modal h2 { font-size: 1.2rem; }
  .lead-card { flex-direction: column; align-items: flex-start; padding: 16px; }
  .lead-card .info { min-width: auto; }
  .lead-detail-grid { grid-template-columns: 1fr; gap: 12px; }
  .lead-filters { flex-direction: column; }
  .lead-filters input { min-width: auto; }
  .login-box { padding: 32px 24px; }
  .settings-grid { grid-template-columns: 1fr; }
  #cta-capture h2 { font-size: 1.4rem !important; }
  #cta-capture p { font-size: 0.92rem !important; }
  #cta-capture .btn-lg { padding: 12px 32px; font-size: 0.9rem; }
  .toast { right: 16px; left: 16px; bottom: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.9rem; }
  .hero { padding: 36px 16px 60px; }
  .hero-brand { font-size: 1.4rem; letter-spacing: 1px; }
  .hero-sub h2 { font-size: 1.25rem; }
  .section-title { font-size: 1.3rem; }
  .stat-cards { grid-template-columns: 1fr; }
  .crm-header-inner { gap: 8px; }
  .crm-nav { gap: 0; }
  .crm-nav a { padding: 6px 10px; font-size: 0.78rem; }
  .image-preview-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .capture-hero h1 { font-size: 1.4rem; }
}
