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

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #FFFFFF;
  --bg-alt: #F3F2EE;
  --bg-dark: #111625;
  --text-main: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-light: #9A9A9A;
  --accent: #C5A880;
  --accent-hover: #B59870;
  --border: #E5E4E1;
  --border-dark: #2A3143;
  --radius: 4px;
  --radius-sm: 2px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Manrope', 'Inter', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
  --transition: 0.25s ease;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

/* ── PROMO BAR ── */
.promo-bar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.promo-bar a {
  color: #fff;
  text-decoration: underline;
}

/* ── SALES LEADERS SECTION ── */
.sales-leaders-section {
  padding: 80px 5%;
  background: var(--bg-dark);
  color: white;
  margin: 0 auto;
}

.sl-header {
  text-align: center;
  margin-bottom: 60px;
}

.sl-header h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  color: white;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.sl-header h2 span {
  color: var(--accent);
  text-decoration: none;
}

.sl-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
}

.sl-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.sl-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: white;
}

.sl-rank {
  width: 24px;
  text-align: right;
  color: rgba(255, 255, 255, 0.5);
}

.sl-change {
  width: 32px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 4px;
}

.sl-change.positive {
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
}

.sl-change.negative {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.sl-change.neutral {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.sl-name {
  width: 250px;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sl-total {
  width: 40px;
  text-align: right;
  color: white;
  font-weight: 600;
}

.sl-bars-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.sl-bar-container {
  display: flex;
  height: 24px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.sl-bar-nomortgage {
  background: rgba(197, 168, 128, 0.2);
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 8px;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  transition: width 0.5s ease;
}

.sl-bar-mortgage {
  background: var(--accent);
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 8px;
  color: var(--bg-dark);
  font-size: 0.8rem;
  font-weight: 600;
  transition: width 0.5s ease;
}

.sl-legend {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}

.sl-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.sl-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 72px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-phone {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-phone:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* ── HERO ── */
.hero {
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 8% 80px 10%;
  background: var(--bg-alt);
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 4vw, 4.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 48px;
  line-height: 1.7;
  font-weight: 400;
}

.hero-image {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 500px;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.05), transparent 60%);
}

/* ── STATS BAR ── */
.stats-bar {
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  gap: 0;
}

.stat-item {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 40px 20px;
  border-right: 1px solid var(--border-dark);
  color: #fff;
}

.stat-item:last-child {
  border-right: none;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ── BUTTONS ── */
.cta-button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 15px 36px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.cta-button:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--text-main);
  padding: 14px 36px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
}

/* ── SECTION ── */
.section-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 96px 40px;
}

.section-inner.narrow {
  max-width: 900px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-main);
  line-height: 1.2;
}

/* ── PREMIUM SEARCH BAR ── */
.premium-search-bar {
  background: #A4865B;
  padding: 24px 40px;
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
  color: white;
}

.premium-select {
  position: relative;
  flex: 1;
}

.premium-select-toggle {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color var(--transition);
  white-space: nowrap;
}

.premium-select-toggle:hover {
  border-color: #fff;
}

.premium-select-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 240px;
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-lg);
  padding: 16px 0;
  color: var(--text-main);
  border-radius: var(--radius);
}

.premium-select-menu.open {
  display: block;
}

.premium-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: background var(--transition);
}

.premium-checkbox-label:hover {
  background: var(--bg-alt);
}

.premium-checkbox-label input {
  display: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  display: inline-block;
  position: relative;
  transition: all var(--transition);
}

.premium-checkbox-label input:checked~.custom-checkbox {
  background: transparent;
  border-color: var(--text-main);
}

.premium-checkbox-label input:checked~.custom-checkbox::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--text-main);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.premium-price-range {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.price-labels {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.price-prefix {
  color: rgba(255, 255, 255, 0.6);
  margin-right: 8px;
}

.price-labels span[id^="price-"] {
  font-weight: 500;
  margin-right: 4px;
}

.price-currency {
  color: rgba(255, 255, 255, 0.6);
}

.range-slider-container {
  position: relative;
  width: 100%;
  height: 24px;
}

.range-slider-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  width: 100%;
  background: rgba(255, 255, 255, 0.3);
}

.range-slider-track::before {
  content: '';
  position: absolute;
  height: 100%;
  background: white;
  left: 0;
  width: 100%;
  z-index: 1;
}

.range-slider-container input[type="range"] {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  z-index: 2;
}

.range-slider-container input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #A4865B;
  border: 2px solid white;
  cursor: pointer;
}

.premium-search-btn {
  background: transparent;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-arrow {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.premium-search-btn:hover .btn-arrow {
  background: white;
  color: #A4865B;
  border-color: white;
}

/* ── MODAL SORTING & FLOOR PLAN ── */
.sortable-table th[data-sort] {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.sortable-table th[data-sort]:hover {
  color: var(--text-main);
}

.sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.8rem;
}

.floor-plan-link {
  color: var(--text-main);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.floor-plan-link:hover {
  color: var(--accent);
}

/* ── CATALOG GRID ── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2px;
}

.property-card {
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  border-color: var(--text-main);
}

.card-img {
  height: 260px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}

.property-card:hover .card-img::after {
  opacity: 1;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.property-card:hover .card-img img {
  transform: scale(1.04);
}

.card-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #fff;
  color: var(--text-main);
  padding: 5px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}

.card-content {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-developer {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: auto;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 20px;
}

.card-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-link:hover {
  gap: 10px;
}

/* ── MODALS ── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.active {
  opacity: 1;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 56px;
  box-shadow: var(--shadow-lg);
  transform: translateY(30px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  float: none;
}

.modal-close:hover {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-alt);
}

/* ── SMART POPUP ── */
.smart-popup {
  position: fixed;
  bottom: 40px;
  left: 40px;
  background: white;
  padding: 36px 40px;
  width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  z-index: 10000;
  border-radius: 12px;
  transform: translateY(calc(100% + 60px));
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.smart-popup.show {
  transform: translateY(0);
}

.smart-popup h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text-main);
  text-transform: none;
  letter-spacing: -0.01em;
}

.smart-popup p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 28px 0;
  line-height: 1.6;
  font-weight: 400;
}

.smart-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.5rem;
  transition: all var(--transition);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smart-popup-close:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 50%;
}

#lead-form-popup {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smart-popup input {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition);
  background: var(--bg-light);
}

.smart-popup input::placeholder {
  color: var(--text-light);
}

.smart-popup input:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(187, 169, 145, 0.1);
}

.smart-popup .cta-button {
  margin-top: 4px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* ── CHAT WIDGET ── */
.chat-widget {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 10001;
}

.chat-toggle-btn {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(197, 168, 128, 0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.chat-toggle-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* Chat Notification Bubble */
.chat-notification {
  position: absolute;
  bottom: 80px;
  right: 0;
  background: white;
  padding: 16px 20px;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  width: 280px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 10;
  border: 1px solid var(--border);
}

.chat-notification.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-notification-content {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-main);
  padding-right: 16px;
}

.chat-notification-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.1rem;
}

.chat-notification-close:hover {
  color: var(--text-main);
}

.chat-window {
  position: absolute;
  bottom: 84px;
  right: 0;
  width: 380px;
  height: 560px;
  background: white;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-window.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-header {
  background: var(--bg-dark);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chat-header .status-dot {
  width: 8px;
  height: 8px;
  background: #C5A880;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(197, 168, 128, 0.8);
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-alt);
}

.message {
  max-width: 85%;
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.message.user {
  align-self: flex-end;
  background: var(--bg-dark);
  color: white;
  border-radius: 16px 16px 4px 16px;
}

.message.bot {
  align-self: flex-start;
  background: white;
  color: var(--text-main);
  border: none;
  border-radius: 16px 16px 16px 4px;
}

.chat-input-area {
  padding: 16px 20px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input-area input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 12px 20px;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.chat-input-area input:focus {
  border-color: var(--accent);
}

.chat-input-area button {
  background: var(--accent);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(197, 168, 128, 0.3);
}

.chat-input-area button:hover {
  background: var(--accent-hover);
}

/* ── ABOUT SECTION ── */
.about-section {
  background: var(--bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 2.8vw, 3rem);
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.about-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.about-image {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
}

/* ── FOOTER ── */
footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 5% 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
  text-decoration: none;
}

.footer-logo span {
  color: var(--accent);
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  max-width: 280px;
}

.footer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ── ABOUT COMPANY PAGE ── */
.page-header-dark {
  background-color: var(--bg-dark);
  color: white;
  padding: 40px 5% 0 5%;
}

.page-header-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 60px;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span {
  color: white;
}

.page-title-large {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 80px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sub-nav {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-nav li {
  padding-bottom: 16px;
  position: relative;
}

.sub-nav a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

.sub-nav a:hover {
  color: var(--accent);
}

.sub-nav li.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
}

.about-main-content {
  background-color: #F3F2EE;
  padding: 80px 5%;
  min-height: 600px;
}

.about-content-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  gap: 80px;
}

.about-text-column {
  flex: 1;
}

.about-content-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 40px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.about-text-column p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 24px;
}

.about-sidebar-column {
  width: 360px;
  flex-shrink: 0;
}

.about-sidebar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about-circle-img-container {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  padding: 8px;
  border: 1px solid rgba(197, 168, 128, 0.4);
  margin-bottom: 32px;
}

.about-circle-img-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.about-sidebar-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.about-sidebar-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 24px;
}

.about-sidebar-btn {
  background-color: #a48650;
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition);
  border-radius: 0;
  /* Strict rectangular per requirements */
}

.about-sidebar-btn:hover {
  background-color: var(--accent);
}

/* Logo styles */
.site-logo {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

.navbar .logo .site-logo {
  height: 48px;
}

.footer-logo .site-logo {
  height: 52px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.auth-card .site-logo {
  height: 64px;
  margin: 0 auto;
}

/* Logo with text (index.html navbar) */
.logo-with-text {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-label-top {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.logo-label-bottom {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-transform: uppercase;
}

/* ── DETAILED APARTMENT VIEW (DESKTOP) ── */
.modal-details-view {
  max-width: 1000px;
  width: 90%;
  background: #fff;
  padding: 0 !important;
  display: flex;
  flex-direction: row;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 80vh;
}

.details-gallery-col {
  flex: 1.5;
  background: #f8fafc;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-right: 1px solid #e2e8f0;
}

.details-gallery-col #layout-gallery {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.details-gallery-col .layout-slide {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
}

.details-info-col {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (SCREENS <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* ── GLOBALS & TYPOGRAPHY ── */
  body {
    font-size: 15px;
  }

  /* ── NAVBAR & HAMBURGER MENU ── */
  .navbar {
    padding: 0 16px;
    height: 64px;
    position: relative;
  }

  .logo-label {
    display: none !important;
  }

  .nav-phone {
    display: none !important;
  }

  .site-logo {
    height: 36px;
  }

  .navbar .logo .site-logo {
    height: 36px;
  }

  /* Hamburger Toggle button */
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    margin-left: 15px;
  }

  .nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-main);
    transition: transform var(--transition), opacity var(--transition);
  }

  .navbar.nav-open .nav-burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .navbar.nav-open .nav-burger span:nth-child(2) {
    opacity: 0;
  }

  .navbar.nav-open .nav-burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Mobile Dropdown Menu */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg);
    flex-direction: column;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    box-shadow: var(--shadow-md);
    margin: 0;
  }

  .navbar.nav-open .nav-links {
    display: flex;
  }

  .nav-actions {
    gap: 12px;
  }

  .nav-phone {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .btn-outline {
    padding: 8px 16px;
    font-size: 0.75rem;
  }

  /* ── HERO SECTION ── */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    padding: 40px 20px;
    order: 2;
  }

  .hero-image {
    min-height: 240px;
    height: 35vh;
    order: 1;
  }

  .hero h1 {
    font-size: 2rem;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    margin-bottom: 24px;
    font-size: 0.95rem;
  }

  /* ── STATS BAR ── */
  .stats-bar {
    flex-direction: column;
  }

  .stat-item {
    width: 100%;
    max-width: none;
    padding: 24px 20px;
    border-right: none;
    border-bottom: 1px solid var(--border-dark);
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  .stat-value {
    font-size: 2rem;
  }

  /* ── PREMIUM SEARCH BAR (FILTERS) ── */
  .premium-search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px 20px;
    margin-bottom: 32px;
  }

  .premium-select {
    width: 100%;
  }

  .premium-price-range {
    width: 100%;
  }

  .price-labels {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .premium-search-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
  }

  /* ── SALES LEADERS SECTION ── */
  .sales-leaders-section {
    padding: 48px 20px;
  }

  .sl-header {
    margin-bottom: 32px;
  }

  .sl-header h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .sl-row {
    gap: 12px;
    font-size: 0.85rem;
    flex-wrap: wrap;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .sl-rank {
    width: 20px;
    text-align: left;
    order: 1;
  }

  .sl-change {
    width: 32px;
    text-align: center;
    order: 2;
  }

  .sl-name {
    flex: 1;
    width: auto;
    white-space: normal;
    font-size: 0.9rem;
    order: 3;
  }

  .sl-total {
    width: auto;
    text-align: right;
    order: 4;
  }

  .sl-bars-wrapper {
    width: 100%;
    flex: none;
    margin-top: 8px;
    order: 5;
  }

  .sl-bar-container {
    height: 18px;
  }

  .sl-bar-nomortgage, .sl-bar-mortgage {
    font-size: 0.7rem;
    padding-left: 6px;
  }

  .sl-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
  }

  /* ── CATALOG SECTION ── */
  .section-inner {
    padding: 48px 20px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .property-card {
    border-color: var(--border);
  }

  .card-img {
    height: 200px;
  }

  .card-content {
    padding: 20px;
  }

  .card-title {
    font-size: 1.25rem;
  }

  /* ── ABOUT COMPANY SECTION ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-content h2 {
    font-size: 1.8rem;
  }

  .about-content p {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  /* ── ABOUT PAGE (about.html) ── */
  .page-title-large {
    font-size: 2rem;
    margin-bottom: 32px;
  }

  .breadcrumbs {
    margin-bottom: 24px;
  }

  .sub-nav {
    overflow-x: auto;
    white-space: nowrap;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
  }

  .sub-nav li {
    padding-bottom: 12px;
  }

  .about-main-content {
    padding: 40px 20px;
  }

  .about-content-inner {
    flex-direction: column;
    gap: 40px;
  }

  .about-content-title {
    font-size: 1.6rem;
    margin-bottom: 24px;
  }

  .about-text-column p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .about-sidebar-column {
    width: 100%;
  }

  .about-circle-img-container {
    width: 200px;
    height: 200px;
    margin-bottom: 24px;
  }

  /* ── FOOTER ── */
  footer {
    padding: 48px 20px 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 40px;
  }

  .footer-logo {
    margin-bottom: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
  }

  /* ── MODALS & TABLES ── */
  .modal-content {
    padding: 36px 20px 24px;
    width: 95%;
    max-height: 85vh;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  #modal-title {
    font-size: 1.5rem !important;
    margin-bottom: 20px !important;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 500px !important;
  }

  th, td {
    padding: 12px 10px;
    font-size: 0.8rem;
  }

  /* ── DETAILED APARTMENT MODAL ── */
  .modal-details-view {
    flex-direction: column !important;
    height: 90vh !important;
    width: 95% !important;
    max-width: 500px !important;
    overflow-y: auto;
  }

  .details-gallery-col {
    flex: none !important;
    width: 100% !important;
    height: 250px !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    position: relative;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .details-gallery-col #layout-gallery {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .details-gallery-col .layout-slide {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
  }

  .details-info-col {
    flex: 1 !important;
    width: 100% !important;
    padding: 24px !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: visible !important;
    height: auto !important;
  }

  .details-info-col h2 {
    font-size: 1.35rem !important;
    margin-bottom: 12px !important;
  }

  /* ── SMART POPUP ── */
  .smart-popup {
    bottom: 20px;
    left: 20px;
    right: 20px;
    width: auto;
    padding: 24px;
  }

  .smart-popup h3 {
    font-size: 1.3rem;
  }

  .smart-popup p {
    margin-bottom: 20px;
    font-size: 0.85rem;
  }

  /* ── CHAT WIDGET ── */
  .chat-widget {
    bottom: 20px;
    right: 20px;
  }

  .chat-toggle-btn {
    width: 52px;
    height: 52px;
  }

  .chat-window {
    width: calc(100vw - 40px);
    height: 70vh;
    bottom: 64px;
    right: 0;
  }

  .chat-messages {
    padding: 16px;
  }

  .message {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  /* ── AUTH PAGES (auth.html, admin-login.html) ── */
  .auth-container {
    padding: 40px 20px;
  }

  .auth-card {
    padding: 30px 20px !important;
    max-width: 90% !important;
  }

  /* ── PROFILE PAGE (profile.html) ── */
  .profile-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}