/* NOVARIC® Real Estate — Main Stylesheet */
/* Brand colors: #180D12 (Deep Burgundy), #48BDED (NOVARIC Blue) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

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

:root {
  --burgundy: #180D12;
  --blue: #48BDED;
  --blue-light: #7DD2F4;
  --blue-lighter: #B6E6FA;
  --blue-pale: #DEF3FD;
  --blue-dark: #22A5DA;
  --blue-darker: #1685B8;
  --blue-darkest: #146A95;
  --white: #FFFFFF;
  --bg-tint: #F6EFF2;
  --bg-tint2: #E8DAE0;
  --neutral-3: #C9ADB9;
  --neutral-5: #7E5065;
  --neutral-7: #3D1E2D;
  --text: #1a0f14;
  --text-muted: #6B5260;
  --border: #e0d0d8;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(24,13,18,0.08);
  --shadow: 0 4px 16px rgba(24,13,18,0.10);
  --shadow-lg: 0 8px 32px rgba(24,13,18,0.14);
  --header-h: 68px;
  --font: 'Inter', 'Manrope', system-ui, sans-serif;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ============================================================
   DISCLAIMER BANNER
============================================================ */
#disclaimer-banner {
  background: linear-gradient(135deg, var(--blue-darkest), var(--blue-dark));
  color: var(--white);
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 0.83rem; z-index: 1100; position: relative;
}
#disclaimer-banner p { flex: 1; }
.disclaimer-dismiss {
  background: rgba(255,255,255,0.2); color: var(--white);
  border: 1px solid rgba(255,255,255,0.3); padding: 4px 12px;
  border-radius: 6px; font-size: 0.8rem; white-space: nowrap;
  transition: background 0.2s;
}
.disclaimer-dismiss:hover { background: rgba(255,255,255,0.35); }

/* ============================================================
   HEADER
============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--burgundy);
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1440px; width: 100%; margin: 0 auto;
  padding: 0 24px; display: flex; align-items: center; gap: 16px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: var(--white); font-family: var(--font-display); font-weight: 800;
  font-size: 1.25rem; letter-spacing: -0.02em;
}
.site-logo img { height: 36px; width: auto; }
.logo-text { color: var(--white); }
.logo-text span { color: var(--blue); }

.nav-menu {
  display: flex; align-items: center; gap: 4px; flex: 1; margin-left: 24px;
}
.nav-menu a {
  color: rgba(255,255,255,0.78); font-size: 0.88rem; font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius-sm); transition: all 0.2s;
  white-space: nowrap;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--white); background: rgba(72,189,237,0.15); }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 200px;
  background: var(--burgundy); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); padding: 6px; display: none;
  box-shadow: var(--shadow-lg); z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 8px 12px; font-size: 0.85rem; border-radius: 6px; color: rgba(255,255,255,0.8); }
.nav-dropdown-menu a:hover { background: rgba(72,189,237,0.15); color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

.lang-selector, .currency-selector {
  display: flex; gap: 2px; background: rgba(255,255,255,0.07);
  border-radius: 8px; padding: 3px;
}
.lang-btn, .currency-btn {
  color: rgba(255,255,255,0.6); font-size: 0.78rem; font-weight: 500;
  padding: 3px 7px; border-radius: 6px; transition: all 0.2s;
}
.lang-btn.active, .currency-btn.active { background: var(--blue); color: var(--white); }
.lang-btn:hover, .currency-btn:hover { color: var(--white); background: rgba(255,255,255,0.12); }

.header-icon-btn {
  position: relative; color: rgba(255,255,255,0.75); font-size: 1.1rem;
  padding: 8px; border-radius: 8px; transition: all 0.2s; display: flex; align-items: center;
}
.header-icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.fav-counter, .compare-counter {
  position: absolute; top: 2px; right: 2px; background: var(--blue);
  color: var(--white); font-size: 0.65rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}

.signin-btn {
  background: var(--blue); color: var(--white); font-size: 0.85rem; font-weight: 600;
  padding: 8px 18px; border-radius: 8px; transition: all 0.2s;
}
.signin-btn:hover { background: var(--blue-dark); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
  color: var(--white);
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: 0.3s; }

/* ============================================================
   HERO / MAP SECTION
============================================================ */
.hero-map-section { position: relative; height: calc(100vh - var(--header-h)); min-height: 600px; }
#main-map { width: 100%; height: 100%; z-index: 1; }

.hero-overlay {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: 48px 24px 24px;
  background: linear-gradient(to bottom, rgba(24,13,18,0.75) 0%, rgba(24,13,18,0.3) 60%, transparent 100%);
  pointer-events: none;
}
.hero-overlay > * { pointer-events: all; }
.hero-title { font-family: var(--font-display); font-size: clamp(1.6rem,3vw,2.5rem); font-weight: 800; color: var(--white); margin-bottom: 10px; text-shadow: 0 2px 8px rgba(0,0,0,0.4); max-width: 700px; }
.hero-subtitle { color: rgba(255,255,255,0.8); font-size: 1rem; margin-bottom: 24px; max-width: 560px; }

.search-box {
  background: var(--white); border-radius: var(--radius); padding: 6px 6px 6px 16px;
  display: flex; align-items: center; gap: 8px; max-width: 680px;
  box-shadow: var(--shadow-lg); border: 2px solid transparent;
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--blue); }
.search-box input { flex: 1; border: none; outline: none; font-size: 0.95rem; background: transparent; }
.search-box-btn {
  background: var(--blue); color: var(--white); padding: 10px 20px; border-radius: 10px;
  font-weight: 600; font-size: 0.9rem; transition: background 0.2s; white-space: nowrap;
}
.search-box-btn:hover { background: var(--blue-dark); }

.search-tabs { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.search-tab {
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25); padding: 6px 16px; border-radius: 20px;
  font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s; backdrop-filter: blur(4px);
}
.search-tab.active, .search-tab:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

.city-chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.city-chip {
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.2); padding: 5px 14px; border-radius: 16px;
  font-size: 0.82rem; cursor: pointer; transition: all 0.2s; backdrop-filter: blur(4px);
}
.city-chip:hover { background: rgba(72,189,237,0.3); border-color: var(--blue); color: var(--white); }

/* Basemap toggle */
.basemap-controls {
  position: absolute; bottom: 20px; left: 16px; z-index: 10;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.basemap-btn {
  background: var(--white); color: var(--text); font-size: 0.78rem; font-weight: 500;
  padding: 6px 12px; border-radius: 20px; box-shadow: var(--shadow);
  border: 2px solid transparent; transition: all 0.2s;
}
.basemap-btn.active { border-color: var(--blue); color: var(--blue); }
.basemap-btn:hover { background: var(--blue-pale); }

/* GIS Layers panel */
.gis-panel {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: var(--white); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-lg); min-width: 220px;
}
.gis-panel h5 { font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; color: var(--burgundy); }
.gis-panel-toggle { display: block; width: 100%; text-align: left; font-size: 0.85rem; font-weight: 600; cursor: pointer; color: var(--text); padding: 0; }
.gis-panel-body { display: none; margin-top: 8px; }
.gis-panel-body.open { display: block; }
.gis-layer-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 0.82rem; cursor: pointer; }
.gis-layer-item input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--blue); }
.gis-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.15); flex-shrink: 0; }

/* ============================================================
   MAP MARKERS
============================================================ */
.price-pin {
  background: var(--burgundy); color: var(--white);
  padding: 5px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 700;
  border: 2px solid var(--blue); white-space: nowrap; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex; align-items: center; gap: 3px;
}
.price-pin:hover, .price-pin.hovered { transform: scale(1.12); box-shadow: 0 4px 16px rgba(0,0,0,0.3); z-index: 1000; }
.price-pin--rent { border-color: #22C55E; }
.price-pin--auction { border-color: #F97316; background: #3D1E2D; }
.price-pin__suffix { font-size: 0.68rem; opacity: 0.8; }

.cluster-icon {
  background: var(--blue); color: var(--white);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  border: 3px solid var(--white); box-shadow: var(--shadow);
}

.poi-icon { font-size: 1.4rem; text-align: center; line-height: 32px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3)); }

.novaric-popup .leaflet-popup-content-wrapper { border-radius: var(--radius); padding: 0; overflow: hidden; }
.novaric-popup .leaflet-popup-content { margin: 0; width: 260px !important; }
.map-popup img { width: 100%; height: 140px; object-fit: cover; }
.map-popup__body { padding: 12px; }
.map-popup__body h4 { font-size: 0.88rem; font-weight: 600; margin: 6px 0 4px; }
.map-popup__body h4 a:hover { color: var(--blue); }
.map-popup__city { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.map-popup__stats { display: flex; gap: 10px; font-size: 0.78rem; margin-bottom: 8px; }
.map-popup__price { font-size: 1rem; font-weight: 700; color: var(--burgundy); margin-bottom: 10px; }
.map-popup__btn {
  display: block; background: var(--blue); color: var(--white);
  text-align: center; padding: 8px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600; transition: background 0.2s;
}
.map-popup__btn:hover { background: var(--blue-dark); }

/* ============================================================
   SECTIONS
============================================================ */
.section { padding: 80px 0; }
.section--alt { background: var(--bg-tint); }
.section--dark { background: var(--burgundy); color: var(--white); }
.section--blue { background: var(--blue-pale); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag { display: inline-block; background: var(--blue-pale); color: var(--blue-darkest); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 14px; border-radius: 20px; margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: clamp(1.6rem, 2.5vw, 2.2rem); font-weight: 800; line-height: 1.2; }
.section-title--white { color: var(--white); }
.section-subtitle { color: var(--text-muted); margin-top: 10px; font-size: 1rem; }
.section-subtitle--white { color: rgba(255,255,255,0.7); }

/* Stats strip */
.stats-strip { background: var(--blue); padding: 28px 0; }
.stats-strip .container { display: flex; justify-content: space-around; gap: 24px; flex-wrap: wrap; }
.stat-item { text-align: center; color: var(--white); }
.stat-item__value { font-size: 1.8rem; font-weight: 800; font-family: var(--font-display); }
.stat-item__label { font-size: 0.82rem; opacity: 0.85; margin-top: 2px; }

/* ============================================================
   CARDS
============================================================ */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.luxury-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px; }

.property-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-image { position: relative; height: 220px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.property-card:hover .card-image img { transform: scale(1.04); }

.card-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }

.badge {
  padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.badge--buy { background: var(--blue); color: var(--white); }
.badge--rent { background: #22C55E; color: var(--white); }
.badge--auction { background: #F97316; color: var(--white); }
.badge--type { background: rgba(24,13,18,0.7); color: var(--white); }
.badge--luxury { background: #D4AF37; color: #1a0d00; }
.badge--new { background: var(--blue); color: var(--white); }
.badge--investment { background: #8B5CF6; color: var(--white); }
.badge--featured { background: var(--burgundy); color: var(--white); }
.badge--sea-view { background: #0EA5E9; color: var(--white); }
.badge--reduced { background: #EF4444; color: var(--white); }

.energy-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; border: 1px solid;
}
.energy-badge--Aplus, .energy-badge--A { background: #dcfce7; color: #166534; border-color: #86efac; }
.energy-badge--B { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.energy-badge--C { background: #fef9c3; color: #713f12; border-color: #fde047; }
.energy-badge--D, .energy-badge--E, .energy-badge--F { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

.card-heart {
  background: var(--white); width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); font-size: 1rem; transition: all 0.2s;
  color: #ccc;
}
.card-heart:hover, .card-heart.active { color: #E53E3E; }

.compare-check {
  background: var(--white); width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); font-size: 0.85rem; transition: all 0.2s; color: #ccc;
}
.compare-check.active { background: var(--blue); color: var(--white); }

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 0.95rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.card-title:hover { color: var(--blue-dark); }
.card-address { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.card-stats { display: flex; gap: 14px; font-size: 0.82rem; color: var(--text-muted); }
.card-stats span { display: flex; align-items: center; gap: 4px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.card-price { font-size: 1.1rem; font-weight: 800; color: var(--burgundy); }
.card-yield { font-size: 0.78rem; background: var(--bg-tint); color: var(--neutral-5); padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.card-link { font-size: 0.82rem; color: var(--blue-dark); font-weight: 600; }
.card-link:hover { color: var(--blue); }

/* Dark card variant */
.property-card--dark { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.property-card--dark .card-title { color: var(--white); }
.property-card--dark .card-address, .property-card--dark .card-stats { color: rgba(255,255,255,0.6); }
.property-card--dark .card-price { color: var(--blue-light); }
.property-card--dark .card-footer { border-color: rgba(255,255,255,0.1); }
.property-card--dark:hover { background: rgba(255,255,255,0.09); }

/* ============================================================
   MARKET INSIGHTS CHARTS BAND
============================================================ */
.insights-band { background: var(--burgundy); padding: 72px 0; }
.insights-band .section-tag { background: rgba(72,189,237,0.2); color: var(--blue-light); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.chart-card { background: rgba(255,255,255,0.06); border-radius: var(--radius); padding: 24px; border: 1px solid rgba(255,255,255,0.08); }
.chart-card h4 { font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.8); margin-bottom: 16px; }

/* ============================================================
   MORTGAGE / AI WIDGET
============================================================ */
.widget-band { padding: 72px 0; background: var(--bg-tint); }
.widgets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.widget-card { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.widget-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.widget-field { margin-bottom: 16px; }
.widget-field label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.widget-field input, .widget-field select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.9rem; transition: border-color 0.2s; background: var(--white);
}
.widget-field input:focus, .widget-field select:focus { outline: none; border-color: var(--blue); }
.widget-result { background: var(--blue-pale); border-radius: var(--radius-sm); padding: 16px; margin-top: 12px; }
.widget-result p { font-size: 0.82rem; color: var(--blue-darkest); }
.widget-result .result-value { font-size: 1.5rem; font-weight: 800; color: var(--burgundy); }
.ai-val-btn {
  width: 100%; background: var(--burgundy); color: var(--white); padding: 12px;
  border-radius: var(--radius-sm); font-weight: 600; transition: background 0.2s; margin-top: 12px;
}
.ai-val-btn:hover { background: var(--neutral-7); }
.ai-result { margin-top: 16px; background: var(--blue-pale); border-radius: var(--radius-sm); padding: 16px; display: none; }
.ai-result.visible { display: block; }
.ai-result .ai-price { font-size: 1.4rem; font-weight: 800; color: var(--burgundy); }

/* ============================================================
   SERVICES GRID
============================================================ */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.service-card { background: var(--white); border-radius: var(--radius); padding: 28px 20px; text-align: center; border: 1px solid var(--border); transition: all 0.2s; }
.service-card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.service-icon { font-size: 2rem; margin-bottom: 14px; }
.service-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.service-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ============================================================
   NEWS CARDS
============================================================ */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.news-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: all 0.2s; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-card__img { height: 180px; overflow: hidden; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-card:hover .news-card__img img { transform: scale(1.05); }
.news-card__body { padding: 20px; }
.news-cat { font-size: 0.72rem; font-weight: 700; color: var(--blue-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.news-card__title { font-size: 0.95rem; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.news-card__excerpt { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.news-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 10px; }

/* ============================================================
   CTA BAND
============================================================ */
.cta-band { background: var(--blue); padding: 72px 0; text-align: center; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--white); margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 1rem; margin-bottom: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; border-radius: var(--radius-sm); transition: all 0.2s; }
.btn--primary { background: var(--burgundy); color: var(--white); padding: 14px 28px; font-size: 1rem; }
.btn--primary:hover { background: var(--neutral-7); }
.btn--secondary { background: var(--white); color: var(--burgundy); padding: 14px 28px; font-size: 1rem; }
.btn--secondary:hover { background: var(--bg-tint); }
.btn--outline { border: 2px solid currentColor; padding: 12px 24px; font-size: 0.9rem; }
.btn--blue { background: var(--blue); color: var(--white); padding: 12px 24px; }
.btn--blue:hover { background: var(--blue-dark); }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer { background: var(--burgundy); color: rgba(255,255,255,0.75); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand { }
.footer-logo { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer-logo span { color: var(--blue); }
.footer-tagline { font-size: 0.85rem; line-height: 1.5; margin-bottom: 16px; max-width: 260px; }
.footer-contact { font-size: 0.82rem; display: flex; flex-direction: column; gap: 6px; }
.footer-contact a { color: rgba(255,255,255,0.7); }
.footer-contact a:hover { color: var(--blue); }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-link {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
  transition: background 0.2s; color: rgba(255,255,255,0.8);
}
.social-link:hover { background: var(--blue); color: var(--white); }

.footer-col h5 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--white); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 0.85rem; color: rgba(255,255,255,0.65); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--blue); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }

/* ============================================================
   LISTINGS PAGE — SPLIT VIEW
============================================================ */
.listings-layout { display: grid; grid-template-columns: 1fr 1fr; height: calc(100vh - var(--header-h)); overflow: hidden; }
.listings-map-pane { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); }
.listings-map-pane #listings-map { width: 100%; height: 100%; }
.listings-results-pane { overflow-y: auto; padding: 20px; background: var(--bg-tint); }
.listings-toolbar { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.filter-panel { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.filter-panel h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.filter-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; flex-wrap: wrap; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  padding: 5px 12px; border-radius: 16px; font-size: 0.78rem; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--white); cursor: pointer; transition: all 0.2s;
}
.filter-chip.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.filter-chip:hover { border-color: var(--blue); color: var(--blue); }
.filter-input { padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; }
.filter-input:focus { outline: none; border-color: var(--blue); }
.result-count { font-size: 0.85rem; color: var(--text-muted); }
.result-count strong { color: var(--text); }
.sort-select { padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; background: var(--white); }
.listings-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.nl-search { width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; }
.nl-search:focus { outline: none; border-color: var(--blue); }
.reset-btn { font-size: 0.82rem; color: var(--blue-dark); font-weight: 600; padding: 0; background: none; }

/* ============================================================
   LISTING DETAIL
============================================================ */
.listing-detail { padding-top: 32px; padding-bottom: 80px; }
.listing-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: 480px; border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.gallery-main { grid-row: 1 / 3; overflow: hidden; cursor: pointer; }
.gallery-thumb { overflow: hidden; cursor: pointer; }
.gallery-main img, .gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-main:hover img, .gallery-thumb:hover img { transform: scale(1.03); }

.listing-content-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.listing-key-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; background: var(--bg-tint); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.key-stat { text-align: center; }
.key-stat__icon { font-size: 1.4rem; margin-bottom: 4px; }
.key-stat__value { font-size: 0.95rem; font-weight: 700; }
.key-stat__label { font-size: 0.72rem; color: var(--text-muted); }

.detail-tabs { border-bottom: 2px solid var(--border); display: flex; gap: 0; margin-bottom: 24px; }
.tab-btn { padding: 12px 20px; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab-btn.active { color: var(--burgundy); border-bottom-color: var(--blue); }
.tab-btn:hover { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.energy-scale { display: flex; gap: 4px; align-items: center; margin: 12px 0; }
.energy-bar {
  padding: 4px 12px; border-radius: 4px; font-size: 0.78rem; font-weight: 700;
  opacity: 0.35; transition: opacity 0.2s;
}
.energy-bar.active { opacity: 1; transform: scale(1.1); }
.energy-bar--Aplus { background: #166534; color: white; }
.energy-bar--A { background: #15803d; color: white; }
.energy-bar--B { background: #16a34a; color: white; }
.energy-bar--C { background: #ca8a04; color: white; }
.energy-bar--D { background: #ea580c; color: white; }
.energy-bar--E { background: #dc2626; color: white; }
.energy-bar--F { background: #991b1b; color: white; }

.agent-sidebar { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); position: sticky; top: calc(var(--header-h) + 16px); }
.agent-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.agent-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.agent-name { font-weight: 700; font-size: 0.95rem; }
.agent-specialty { font-size: 0.78rem; color: var(--text-muted); }
.agent-rating { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; color: #F59E0B; font-weight: 600; }
.agent-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.agent-btn { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 600; text-align: center; justify-content: center; transition: all 0.2s; }
.agent-btn--primary { background: var(--burgundy); color: var(--white); }
.agent-btn--primary:hover { background: var(--neutral-7); }
.agent-btn--outline { border: 2px solid var(--border); color: var(--text); }
.agent-btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.agent-btn--blue { background: var(--blue); color: var(--white); }
.agent-btn--blue:hover { background: var(--blue-dark); }

.qr-placeholder { background: var(--bg-tint); border-radius: var(--radius-sm); padding: 16px; text-align: center; margin-top: 16px; }
.qr-placeholder p { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.qr-box { width: 80px; height: 80px; margin: 0 auto; background: repeating-conic-gradient(#aaa 0% 25%, white 0% 50%) 0 0 / 6px 6px; border-radius: 4px; }

.listing-action-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.action-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; border: 1.5px solid var(--border); background: var(--white); color: var(--text); transition: all 0.2s; }
.action-btn:hover { border-color: var(--blue); color: var(--blue); }
.action-btn.active { background: #fee2e2; border-color: #EF4444; color: #EF4444; }

/* Document rows */
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.doc-icon { font-size: 1.4rem; }
.doc-info { flex: 1; }
.doc-name { font-size: 0.88rem; font-weight: 600; }
.doc-meta { font-size: 0.75rem; color: var(--text-muted); }
.doc-dl { font-size: 0.82rem; color: var(--blue-dark); font-weight: 600; }

/* ============================================================
   PORTAL KPI CARDS
============================================================ */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.kpi-card { background: var(--white); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.kpi-card__icon { font-size: 1.5rem; margin-bottom: 8px; }
.kpi-card__value { font-size: 1.6rem; font-weight: 800; color: var(--burgundy); font-family: var(--font-display); }
.kpi-card__label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.kpi-card__trend { font-size: 0.78rem; font-weight: 600; margin-top: 6px; }
.kpi-card__trend--up { color: #16a34a; }
.kpi-card__trend--down { color: #dc2626; }

/* ============================================================
   TABLES
============================================================ */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th { background: var(--bg-tint); padding: 10px 14px; text-align: left; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: var(--bg-tint); }
.table-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--white); box-shadow: var(--shadow-sm); overflow-x: auto; }

/* ============================================================
   FORMS
============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 0.83rem; font-weight: 600; color: var(--text-muted); }
.form-field input, .form-field select, .form-field textarea {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; transition: border-color 0.2s; background: var(--white);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--blue); }
.form-field textarea { resize: vertical; min-height: 100px; }
.form-full { grid-column: 1 / -1; }
.submit-btn { grid-column: 1 / -1; background: var(--burgundy); color: var(--white); padding: 13px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; transition: background 0.2s; }
.submit-btn:hover { background: var(--neutral-7); }

/* ============================================================
   ACCORDION
============================================================ */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden; }
.accordion-header { width: 100%; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; font-size: 0.92rem; font-weight: 600; cursor: pointer; background: var(--white); transition: background 0.2s; }
.accordion-header:hover { background: var(--bg-tint); }
.accordion-header::after { content: '+'; font-size: 1.2rem; color: var(--blue); }
.accordion-item.open .accordion-header::after { content: '−'; }
.accordion-body { display: none; padding: 0 20px 16px; font-size: 0.88rem; line-height: 1.65; color: var(--text-muted); }
.accordion-item.open .accordion-body { display: block; }

/* ============================================================
   MODALS
============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(24,13,18,0.75);
  z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[style*="display: flex"] { display: flex !important; }
.modal {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px;
  max-width: 440px; width: 100%; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal__close { position: absolute; top: 16px; right: 16px; font-size: 1.2rem; color: var(--text-muted); }
.modal h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; }

/* ============================================================
   LIGHTBOX
============================================================ */
#lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  z-index: 3000; display: none; align-items: center; justify-content: center;
}
.lightbox__img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius-sm); object-fit: contain; }
.lightbox__close { position: absolute; top: 20px; right: 24px; color: white; font-size: 2rem; cursor: pointer; z-index: 10; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); color: white; font-size: 1.8rem; padding: 12px 16px; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.2s; }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,0.3); }
.lightbox__counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-size: 0.85rem; }

/* ============================================================
   CHAT WIDGET
============================================================ */
#chat-toggle {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--burgundy); color: var(--white);
  box-shadow: 0 4px 20px rgba(24,13,18,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; transition: all 0.25s;
  border: 3px solid var(--blue);
}
#chat-toggle:hover { transform: scale(1.08); background: var(--neutral-7); }
#chat-toggle.active { background: var(--blue); border-color: var(--white); }

#chat-drawer {
  position: fixed; bottom: 98px; right: 28px; z-index: 500;
  width: 340px; max-height: 480px; background: var(--white);
  border-radius: var(--radius-lg); box-shadow: 0 8px 40px rgba(24,13,18,0.2);
  border: 1px solid var(--border); display: flex; flex-direction: column;
  transform: scale(0.9) translateY(12px); opacity: 0; pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
#chat-drawer.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }
.chat-header {
  background: var(--burgundy); padding: 14px 16px; display: flex; align-items: center;
  gap: 10px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.chat-header h4 { font-size: 0.88rem; font-weight: 700; color: var(--white); flex: 1; }
.chat-header p { font-size: 0.72rem; color: rgba(255,255,255,0.7); }
#chat-close { color: rgba(255,255,255,0.6); font-size: 1.1rem; }
#chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; flex-direction: column; }
.chat-msg--user { align-items: flex-end; }
.chat-msg--bot { align-items: flex-start; }
.chat-bubble { padding: 10px 14px; border-radius: 14px; font-size: 0.83rem; line-height: 1.5; max-width: 85%; }
.chat-msg--user .chat-bubble { background: var(--blue); color: var(--white); border-bottom-right-radius: 4px; }
.chat-msg--bot .chat-bubble { background: var(--bg-tint); color: var(--text); border-bottom-left-radius: 4px; }
.chat-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 3px; }
.chat-typing .chat-bubble { display: flex; gap: 4px; align-items: center; }
.chat-typing .chat-bubble span { width: 7px; height: 7px; background: var(--text-muted); border-radius: 50%; animation: bounce 1s infinite; }
.chat-typing .chat-bubble span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing .chat-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%,80%,100% { transform: scale(0.7); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }
.chat-input-row { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); }
#chat-input { flex: 1; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; }
#chat-input:focus { outline: none; border-color: var(--blue); }
#chat-send { background: var(--burgundy); color: var(--white); padding: 9px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; }
#chat-send:hover { background: var(--neutral-7); }

/* ============================================================
   TOAST
============================================================ */
#toast-container { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 4000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--text); color: var(--white); padding: 10px 20px; border-radius: 24px; font-size: 0.85rem; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: all 0.3s; pointer-events: none; }
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--warning { background: #F59E0B; }
.toast--success { background: #16a34a; }
.toast--error { background: #dc2626; }

/* ============================================================
   COMPARE BAR
============================================================ */
#compare-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 600; background: var(--burgundy); padding: 12px 24px; display: none; align-items: center; gap: 14px; box-shadow: 0 -2px 16px rgba(0,0,0,0.2); }
.compare-bar__items { display: flex; gap: 10px; flex: 1; }
.compare-bar__item { background: rgba(255,255,255,0.15); color: var(--white); padding: 5px 10px 5px 12px; border-radius: 8px; font-size: 0.8rem; display: flex; align-items: center; gap: 8px; }
.compare-bar__remove { color: rgba(255,255,255,0.7); font-size: 1.1rem; line-height: 1; }
.compare-bar__remove:hover { color: var(--white); }
.compare-bar__cta { background: var(--blue); color: var(--white); padding: 8px 20px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 700; white-space: nowrap; }

/* ============================================================
   MISC UTILITIES
============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--white); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.page-header { background: var(--burgundy); padding: 48px 0 40px; margin-bottom: 48px; }
.page-header h1 { font-family: var(--font-display); font-size: clamp(1.8rem,3vw,2.6rem); font-weight: 800; color: var(--white); margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.75); font-size: 1rem; }
.breadcrumb { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-bottom: 14px; display: flex; gap: 8px; }
.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: var(--blue); }
.similar-row { overflow-x: auto; display: flex; gap: 20px; padding-bottom: 8px; }
.similar-row .property-card { min-width: 280px; flex-shrink: 0; }
.progress-bar-wrap { background: var(--bg-tint2); border-radius: 6px; height: 10px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--blue); border-radius: 6px; transition: width 0.5s; }
.funnel-step { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.funnel-label { font-size: 0.88rem; font-weight: 500; }
.funnel-val { font-size: 0.9rem; font-weight: 700; }
.pipeline-bar { flex: 1; margin: 0 16px; }

/* ============================================================
   LEAFLET OVERRIDES
============================================================ */
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content-wrapper { border-radius: var(--radius) !important; box-shadow: var(--shadow-lg) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 0 !important; }
.leaflet-popup-tip-container { display: none; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .widgets-grid { grid-template-columns: 1fr; }
  .listing-content-grid { grid-template-columns: 1fr; }
  .agent-sidebar { position: static; }
}

@media (max-width: 900px) {
  .listings-layout { grid-template-columns: 1fr; height: auto; }
  .listings-map-pane { height: 380px; position: relative; top: 0; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .nav-menu { display: none; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--burgundy); padding: 16px 20px; gap: 4px; z-index: 900; }
  .nav-menu.open { display: flex; }
  .nav-toggle { display: flex; }
  .lang-selector { display: none; }
  .hero-overlay { padding: 24px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .listing-gallery { grid-template-columns: 1fr; grid-template-rows: 280px; height: auto; }
  .gallery-thumb { display: none; }
  .gallery-main { grid-row: 1; }
  .chart-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .listings-results-grid { grid-template-columns: 1fr; }
  #chat-drawer { right: 12px; width: calc(100vw - 24px); bottom: 88px; }
  #chat-toggle { right: 16px; bottom: 20px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .listings-grid, .luxury-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 0 12px; }
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .search-tabs { display: none; }
  .currency-selector { display: none; }
  .page-header { padding: 32px 0 28px; }
}
