/* ============================================
   Dubai Realty - Premium Design System
   Desert + Sea + Glass + Neon
   ============================================ */

/* CSS Variables - Dubai Color Palette */
:root {
  /* Primary - Turquoise Sea */
  --primary: #25B7B0;
  --primary-dark: #1A9A94;
  --primary-light: #38C6D9;

  /* Gold/Luxury */
  --gold: #D4AF37;
  --gold-light: #C8A96A;
  --champagne: #F2E9D8;

  /* Sand/Desert */
  --sand: #D6B27A;
  --sand-dark: #C89B5A;
  --caramel: #B8843A;

  /* Sea/Sky */
  --sky: #7EC8E3;
  --deep-blue: #0B3D91;
  --aqua: #38C6D9;

  /* Neon Accents */
  --neon-cyan: #00B7FF;
  --neon-purple: #B000B5;
  --neon-amber: #FF9A3D;

  /* Neutrals */
  --white: #FFFFFF;
  --ivory: #F2E9D8;
  --graphite: #1F2328;
  --black: #0B0F14;
  --gray-50: #FAFAF9;
  --gray-100: #F5F5F4;
  --gray-200: #E7E5E4;
  --gray-300: #D6D3D1;
  --gray-400: #A8A29E;
  --gray-500: #78716C;
  --gray-600: #57534E;
  --gray-700: #44403C;
  --gray-800: #292524;
  --gray-900: #1C1917;

  /* Semantic */
  --success: #10b981;
  --warning: #FF9A3D;
  --danger: #ef4444;
  --rent: #25B7B0;
  --sale: #D4AF37;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-gold: 0 4px 20px rgb(212 175 55 / 0.25);
  --shadow-cyan: 0 4px 20px rgb(37 183 176 / 0.25);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Base Styles
   ============================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

a {
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: none;
}

/* Телефонные ссылки - подчеркивание при hover */
a[href^="tel:"]:hover {
  text-decoration: underline;
}

/* ============================================
   Modern Navbar
   ============================================ */

.navbar-modern {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.875rem 0;
  transition: var(--transition);
}

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

.navbar-modern .navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.navbar-modern .navbar-brand .brand-dubai {
  color: var(--graphite);
}

.navbar-modern .navbar-brand .brand-realty {
  color: var(--primary);
}

.navbar-modern .nav-link {
  color: var(--gray-600) !important;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.navbar-modern .nav-link:hover {
  color: var(--primary) !important;
  background: rgba(37, 183, 176, 0.08);
}

.navbar-modern .nav-link.active {
  color: var(--primary) !important;
}

.navbar-modern .btn-nav {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: var(--transition);
  border: none;
}

.navbar-modern .btn-nav:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyan);
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-selector .dropdown-toggle {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-selector .dropdown-toggle:hover {
  border-color: var(--primary);
}

.lang-selector .dropdown-menu {
  min-width: 120px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
}

.lang-selector .dropdown-item {
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
}

.lang-selector .dropdown-item:hover {
  background: rgba(37, 183, 176, 0.1);
  color: var(--primary);
}

/* User Menu */
.user-menu .dropdown-toggle {
  background: linear-gradient(135deg, var(--sand) 0%, var(--gold) 100%);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  border: 2px solid white;
  box-shadow: var(--shadow-md);
}

.user-menu .dropdown-toggle::after {
  display: none;
}

/* Navbar Dropdown Menus */
.navbar-modern .dropdown-menu {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  margin-top: 0.5rem;
  min-width: 180px;
}

.navbar-modern .dropdown-item {
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-modern .dropdown-item:hover {
  background: rgba(37, 183, 176, 0.1);
  color: var(--primary);
}

.navbar-modern .dropdown-item i {
  width: 18px;
  color: var(--gray-500);
}

.navbar-modern .dropdown-item:hover i {
  color: var(--primary);
}

.navbar-modern .dropdown-divider {
  margin: 0.375rem 0;
  border-color: var(--gray-100);
}

.navbar-modern .dropdown-item.text-danger {
  color: var(--danger);
}

.navbar-modern .dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* User Avatar in navbar */
.navbar-modern .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ============================================
   Hero Section - Parallax
   ============================================ */

.hero-modern {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--graphite);
}

.hero-modern {
  background: url('/static/img/dubai-hero.jpg') center center / cover no-repeat fixed;
  position: relative;
}

.hero-bg,
.hero-overlay {
  display: none;
}

.hero-modern .container,
.hero-modern .hero-content {
  position: relative;
  z-index: 2;
}

.hero-modern h1 {
  color: white;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 30px rgba(0, 0, 0, 0.3);
}

.hero-modern h1 span {
  background: linear-gradient(90deg, var(--gold) 0%, var(--neon-amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-modern .lead {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Search Box */
.search-box-modern {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 183, 255, 0.15);
  backdrop-filter: blur(10px);
}

.search-box-modern .form-select,
.search-box-modern .form-control {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  transition: var(--transition);
  background-color: white;
  color: var(--gray-700);
  height: auto;
  min-height: 52px;
}

.search-box-modern .form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2325b7b0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.75rem;
  cursor: pointer;
}

.search-box-modern .form-select:hover {
  border-color: var(--primary-light);
  background-color: var(--gray-50);
}

.search-box-modern .form-select:focus,
.search-box-modern .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 183, 176, 0.15);
  outline: none;
}

.search-box-modern .form-select option {
  padding: 12px 16px;
  background: white;
  color: var(--gray-700);
}

.search-box-modern .form-select option:hover,
.search-box-modern .form-select option:checked {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.search-box-modern .btn-search {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0.875rem 2rem;
  font-weight: 600;
  transition: var(--transition);
}

.search-box-modern .btn-search:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyan);
}

/* ============================================
   Filter Section (Listings & New Buildings)
   ============================================ */

.filters-section {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem 0;
}

.filters-section .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.filters-section .form-select,
.filters-section .form-control {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--gray-800);
  background-color: var(--white);
  transition: var(--transition);
  height: 48px;
}

.filters-section .form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2378716C' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
  cursor: pointer;
}

.filters-section .form-select:hover,
.filters-section .form-control:hover {
  border-color: var(--gray-300);
  background-color: var(--gray-50);
}

.filters-section .form-select:focus,
.filters-section .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 183, 176, 0.15);
  outline: none;
  background-color: var(--white);
}

.filters-section .form-select option {
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--gray-700);
}

.filters-section .form-check {
  padding-left: 1.75rem;
}

.filters-section .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.filters-section .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.filters-section .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(37, 183, 176, 0.15);
}

.filters-section .form-check-label {
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
  padding-left: 0.25rem;
}

/* Filter Buttons */
.filters-section .btn-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: var(--transition);
  cursor: pointer;
}

.filters-section .btn-filter-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border: none;
}

.filters-section .btn-filter-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyan);
}

.filters-section .btn-filter-outline {
  background: var(--white);
  color: var(--gray-600);
  border: 2px solid var(--gray-200);
}

.filters-section .btn-filter-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 183, 176, 0.05);
}

.filters-section .btn-filter-reset {
  background: transparent;
  color: var(--gray-500);
  border: 2px solid var(--gray-200);
}

.filters-section .btn-filter-reset:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

/* Filter Divider */
.filters-section .filter-divider {
  border-top: 1px solid var(--gray-200);
  margin: 1.25rem 0;
}

/* Active Filters Count Badge */
.filters-section .filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Hero Search Row */
.hero-search-row {
  display: flex;
  gap: 12px;
}

.hero-search-row .form-select,
.hero-search-row .btn-search {
  flex: 1;
  white-space: nowrap;
}

/* District Cards */
.district-card {
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.district-card:hover {
  transform: translateY(-4px);
}

.district-card-img {
  height: 180px;
  overflow: hidden;
  position: relative;
}

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

.district-card:hover .district-card-img img {
  transform: scale(1.05);
}

.district-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0B3D91 0%, #25B7B0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
}

.district-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.district-card-overlay h5 {
  color: white;
  margin: 0;
  font-weight: 700;
}

/* Home Map */
.home-map {
  height: 500px;
}

/* Hero Stats */
.hero-stats-row {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 1;
  min-width: 120px;
}

.hero-stat .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gold) 0%, var(--neon-amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-stat .stat-label {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Section Styles
   ============================================ */

.section {
  padding: var(--space-3xl) 0;
}

.section-light {
  background: var(--white);
}

.section-gray {
  background: var(--gray-50);
}

.section-sand {
  background: linear-gradient(180deg, var(--champagne) 0%, var(--white) 100%);
}

.section-dark {
  background: linear-gradient(135deg, var(--graphite) 0%, var(--black) 100%);
  color: white;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.section-subtitle {
  color: var(--gray-500);
  font-size: 1.125rem;
}

.section-header {
  margin-bottom: var(--space-2xl);
}

/* ============================================
   Property Cards - Elegant Style
   ============================================ */

.property-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.property-card .card-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
  flex-shrink: 0;
  display: block;
}

.property-card .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

/* Elegant Badges */
.property-card .card-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.property-card .badge-status {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--gray-800);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-md);
  border-left: 3px solid var(--gold);
}

.property-card .badge-status.rent {
  border-left-color: var(--primary);
}

.property-card .badge-featured {
  background: linear-gradient(135deg, var(--gold) 0%, var(--neon-amber) 100%);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  font-size: 0.875rem;
}

.property-card .badge-verified,
.badge-verified {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.property-card .badge-verified {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 0.8rem;
}

/* Compare Button */
.property-card .card-compare-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: none;
  box-shadow: var(--shadow-md);
  z-index: 10;
  opacity: 1;
  transition: background 0.2s, transform 0.2s;
}

.property-card:hover .card-compare-btn {
  transform: scale(1.1);
}

.property-card .card-compare-btn:hover {
  background: var(--primary);
  color: white;
}

.property-card .card-compare-btn.active,
.property-card .card-compare-btn.btn-primary {
  background: var(--primary);
  color: white;
  opacity: 1;
  transform: translateY(0);
}

/* Favorite Button */
.property-card .card-favorite-btn {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: var(--radius-full);
  color: var(--gray-500);
  box-shadow: var(--shadow-md);
  opacity: 1;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  z-index: 10;
}

.property-card:hover .card-favorite-btn {
  transform: scale(1.1);
}

.property-card .card-favorite-btn:hover {
  background: #fff;
  color: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.property-card .card-favorite-btn.active,
.property-card .card-favorite-btn.is-favorite {
  background: #ef4444;
  color: white;
  opacity: 1;
  transform: translateY(0);
}

.property-card .card-favorite-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.property-card .card-favorite-btn.loading i {
  animation: pulse-heart 1s infinite;
}

@keyframes pulse-heart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Listing Detail Page - Action Buttons */
.listing-actions {
  margin-top: 0.5rem;
}

.listing-actions .btn {
  border-radius: var(--radius-lg);
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.listing-favorite-btn {
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: white !important;
}

.listing-favorite-btn:hover,
.listing-favorite-btn.is-favorite {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: white !important;
}

.listing-compare-btn {
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: white !important;
}

.listing-compare-btn:hover,
.listing-compare-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
}

/* Navbar Favorites Badge */
.favorites-badge {
  background: #ef4444 !important;
}

.property-card .card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card .card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.property-card .card-location {
  color: var(--gray-500);
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.property-card .card-location i {
  color: var(--primary);
  font-size: 0.75rem;
}

.property-card .card-price {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--graphite);
  margin-bottom: 1rem;
}

.property-card .card-price span {
  color: var(--gold);
}

.property-card .card-price small {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--gray-500);
}

.property-card .card-features {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
  flex-wrap: wrap;
}

.property-card .feature {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gray-600);
  font-size: 0.8125rem;
}

.property-card .feature i {
  color: var(--primary);
  font-size: 0.875rem;
}

.property-card .card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: var(--transition);
  border-top: 1px solid var(--gray-100);
}

.property-card .card-btn:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.property-card .card-btn i {
  transition: var(--transition);
}

.property-card:hover .card-btn i {
  transform: translateX(4px);
}

/* ============================================
   Building Cards (New Buildings)
   ============================================ */

.building-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.building-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.building-card .card-img-wrapper {
  position: relative;
  height: 240px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
}

.building-card .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.building-card:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.building-card .badge-stage {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--gray-800);
  box-shadow: var(--shadow-md);
  border-left: 3px solid var(--gray-400);
}

.building-card .badge-stage.ready {
  border-left-color: var(--success);
  color: var(--success);
}

.building-card .badge-stage.construction {
  border-left-color: var(--neon-amber);
  color: var(--caramel);
}

.building-card .badge-featured {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--neon-amber) 100%);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
}

.building-card .card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.building-card .developer-name {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.building-card .card-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.building-card .card-location {
  color: var(--gray-500);
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.building-card .card-location i {
  color: var(--primary);
  font-size: 0.75rem;
}

.building-card .card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--graphite);
  margin-top: auto;
}

.building-card .card-price span {
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-weight: 500;
}

.building-card .card-features {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  margin-top: 1rem;
  flex-wrap: wrap;
}

.building-card .feature {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gray-600);
  font-size: 0.8125rem;
}

.building-card .feature i {
  color: var(--primary);
  font-size: 0.875rem;
}

.building-card .card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: var(--transition);
  border-top: 1px solid var(--gray-100);
}

.building-card .card-btn:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

/* ============================================
   Quick Links / Tags
   ============================================ */

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.quick-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 183, 176, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-link i {
  font-size: 0.875rem;
  color: var(--primary);
}

/* ============================================
   Buttons
   ============================================ */

.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary-modern {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyan);
  color: white;
}

.btn-gold-modern {
  background: linear-gradient(135deg, var(--gold) 0%, var(--caramel) 100%);
  color: white;
}

.btn-gold-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
  color: white;
}

.btn-success-modern {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
}

.btn-success-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  color: white;
  opacity: 0.95;
}

.btn-outline-modern {
  background: transparent;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

.btn-outline-modern:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 183, 176, 0.05);
}

.btn-white-modern {
  background: white;
  color: var(--gray-900);
}

.btn-white-modern:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

/* ============================================
   Realtor Cards
   ============================================ */

.realtor-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.realtor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.realtor-card .realtor-photo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--champagne);
  box-shadow: var(--shadow-md);
}

.realtor-card .realtor-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.realtor-card .realtor-agency {
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.realtor-card .realtor-stats {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ============================================
   Popular Searches
   ============================================ */

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  font-size: 0.875rem;
  text-decoration: none;
  transition: var(--transition);
}

.search-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 183, 176, 0.05);
}

.search-tag .tag-count {
  background: var(--gray-100);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* ============================================
   Stats Section / CTA
   ============================================ */

.stats-modern {
  background: linear-gradient(135deg, var(--graphite) 0%, var(--black) 100%);
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}

.stats-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  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='%23D4AF37' fill-opacity='0.05'%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;
}

.stats-modern .container {
  position: relative;
  z-index: 1;
}

/* ============================================
   Footer Modern
   ============================================ */

.footer-modern {
  background: var(--graphite);
  color: var(--gray-400);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-modern h5 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-modern a {
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition);
}

.footer-modern a:hover {
  color: var(--primary);
}

.footer-modern .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-modern .footer-links li {
  margin-bottom: 0.875rem;
}

.footer-modern .footer-links li a {
  display: inline;
  font-size: 0.9375rem;
}

.footer-modern .footer-links li.d-flex {
  display: flex !important;
}

.footer-modern .footer-links li.d-flex i {
  flex-shrink: 0;
  width: 20px;
  min-width: 20px;
  margin-right: 0.75rem;
  color: var(--primary);
  text-align: center;
}

.footer-modern .footer-links li.d-flex span,
.footer-modern .footer-links li.d-flex a {
  flex: 1;
}

/* Contact info in footer */
.footer-modern .footer-links.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 1rem;
}

.footer-modern .footer-links.contact-info li:last-child {
  margin-bottom: 0;
}

.footer-modern .footer-links.contact-info li i {
  flex-shrink: 0;
  width: 24px;
  min-width: 24px;
  margin-right: 12px;
  color: var(--primary);
  font-size: 1rem;
  margin-top: 2px;
}

.footer-modern .footer-links.contact-info li span,
.footer-modern .footer-links.contact-info li a {
  flex: 1;
  line-height: 1.5;
}

.footer-modern .social-links {
  display: flex;
  gap: 0.75rem;
}

.footer-modern .social-link {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition);
  font-size: 1.125rem;
}

.footer-modern .social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  color: var(--gray-400);
  font-size: 0.875rem;
}

.footer-legal-links a:hover {
  color: var(--primary);
}

.footer-developer {
  background: #fff;
  padding: 0.75rem 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.footer-developer a {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}

.footer-developer a:hover {
  opacity: 0.7;
}

/* ============================================
   Map Section
   ============================================ */

.map-container {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

/* ============================================
   Card Modern (Detail pages)
   ============================================ */

.card-modern {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.card-modern .card-body {
  padding: 1.5rem;
}

/* ============================================
   Page Header (Gradient)
   ============================================ */

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--graphite) 0%, var(--deep-blue) 100%);
}

/* ============================================
   Developer Cards
   ============================================ */

.developer-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  height: 100%;
}

.developer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.developer-card img {
  height: 60px !important;
  width: auto !important;
  max-width: 120px !important;
  margin-bottom: 1rem !important;
  object-fit: contain !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.developer-card .dev-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--champagne) 0%, var(--sand) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.developer-card .dev-placeholder i {
  font-size: 1.5rem;
  color: var(--caramel);
}

/* Developer logo placeholder with initials */
.developer-card .dev-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--graphite) 0%, var(--deep-blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--gold);
}

.developer-card .dev-logo-placeholder span {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.developer-card .dev-logo-placeholder::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: calc(var(--radius-xl) - 3px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Make developer card a link */
a.developer-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.developer-card h6 {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--gray-900);
}

.developer-card small {
  color: var(--gray-500);
}

/* ============================================
   Utilities
   ============================================ */

.text-primary { color: var(--primary) !important; }
.text-gold { color: var(--gold) !important; }
.bg-sand { background: var(--champagne); }

.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }

/* Gradient texts */
.text-gradient-gold {
  background: linear-gradient(90deg, var(--gold) 0%, var(--neon-amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-delay-1 { animation-delay: 0.15s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.45s; opacity: 0; }

/* Parallax helper */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 768px) {
  .parallax-bg,
  .hero-bg {
    background-attachment: scroll;
  }
}

/* ============================================
   Listing Detail Page
   ============================================ */

.listing-map-container {
  height: 350px;
  border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
  .listing-map-container {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .listing-map-container {
    height: 200px;
  }
}

/* ============================================
   Filters Section Mobile
   ============================================ */

@media (max-width: 576px) {
  .filters-section {
    padding: 1rem 0;
  }

  .filters-section .form-label {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
  }

  .filters-section .form-select,
  .filters-section .form-control {
    height: 42px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .filters-section .btn-filter {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet landscape and below */
@media (max-width: 992px) {
  .hero-modern {
    min-height: 80vh;
  }

  .hero-modern h1 {
    font-size: 2.25rem;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  /* Cards on tablets - 2 columns */
  .property-card .card-body {
    padding: 1rem;
  }
}

/* Tablet portrait and below */
@media (max-width: 768px) {
  .hero-modern {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-modern h1 {
    font-size: 1.875rem;
  }

  .hero-modern .lead {
    font-size: 1rem;
  }

  .search-box-modern {
    padding: 1rem;
  }

  /* Search box row - stack on mobile with gaps */
  .search-box-modern .row.g-3 {
    margin: 0 !important;
  }

  .search-box-modern .row.g-3 > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0.375rem 0 !important;
  }

  .search-box-modern .btn-search {
    margin-top: 0.5rem;
  }

  .property-card .card-img-wrapper,
  .building-card .card-img-wrapper {
    height: 200px;
  }

  /* Use bottom positioning instead of fixed top */
  .property-card .card-compare-btn,
  .property-card .card-favorite-btn {
    top: auto;
    bottom: 1rem;
  }

  /* Stats grid on mobile */
  .stats-row {
    flex-wrap: wrap;
  }

  .stats-row > div {
    flex: 0 0 50%;
    margin-bottom: 0.5rem;
  }

  /* Section padding */
  .section {
    padding: 2rem 0;
  }

  /* Hero content max-width reset for mobile */
  .hero-modern .col-lg-7,
  .hero-modern h1,
  .hero-modern .lead,
  .hero-modern .search-box-modern,
  .hero-modern .row.mt-5 {
    max-width: 100%;
  }

  /* Search form stacks vertically */
  .hero-search-row {
    flex-direction: column;
    gap: 8px;
  }

  .hero-search-row .form-select,
  .hero-search-row .btn-search {
    flex: none;
    width: 100%;
  }

  /* District cards smaller images */
  .district-card-img {
    height: 150px;
  }

  /* Map smaller on tablets */
  .home-map {
    height: 350px;
  }
}

/* Large phones */
@media (max-width: 576px) {
  .hero-modern h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .hero-modern .lead {
    font-size: 0.9rem;
  }

  .property-card .card-img-wrapper,
  .building-card .card-img-wrapper {
    height: 180px;
  }

  .property-card .card-body {
    padding: 0.875rem;
  }

  .property-card .card-title {
    font-size: 1rem;
  }

  .property-card .card-price {
    font-size: 1.1rem;
  }

  /* Buttons smaller on mobile */
  .property-card .card-compare-btn,
  .property-card .card-favorite-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  /* Search box improvements */
  .search-box-modern .form-control,
  .search-box-modern .form-select {
    font-size: 0.9rem;
    padding: 0.625rem 0.75rem;
  }

  .search-box-modern .btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }

  /* Filter buttons stack on mobile */
  .filter-buttons .btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  /* Modal and popup improvements */
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-body {
    padding: 1rem;
  }

  /* Table responsive improvements */
  .table-responsive {
    font-size: 0.85rem;
  }

  .table td, .table th {
    padding: 0.5rem;
  }

  /* District cards smaller on phones */
  .district-card-img {
    height: 140px;
  }

  /* Map smaller on phones */
  .home-map {
    height: 300px;
  }

  /* Hero stats smaller */
  .hero-stat {
    padding: 0.75rem 1rem;
  }

  .hero-stat .stat-number {
    font-size: 1.75rem;
  }

  .hero-stat .stat-label {
    font-size: 0.75rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .hero-modern h1 {
    font-size: 1.35rem;
  }

  .property-card .card-img-wrapper,
  .building-card .card-img-wrapper {
    height: 160px;
  }

  .property-card .card-body {
    padding: 0.75rem;
  }

  .property-card .card-title {
    font-size: 0.95rem;
  }

  /* Two column stat grids to single column */
  .stats-row > div {
    flex: 0 0 100%;
  }

  /* CTA buttons full width */
  .btn-cta {
    width: 100%;
    justify-content: center;
  }

  /* Hide less important elements */
  .hide-on-mobile {
    display: none !important;
  }

  /* Compact card badges */
  .property-card .card-badges {
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
  }

  .property-card .badge-price {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  /* District cards even smaller */
  .district-card-img {
    height: 130px;
  }

  /* Map compact */
  .home-map {
    height: 250px;
  }

  /* Hero stats compact */
  .hero-stat .stat-number {
    font-size: 1.5rem;
  }

  /* CTA buttons stack on small screens */
  .stats-modern .d-flex {
    flex-direction: column;
    align-items: center;
  }

  .stats-modern .btn-modern {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* Extra small phones (iPhone SE, etc.) */
@media (max-width: 375px) {
  .hero-modern h1 {
    font-size: 1.25rem;
  }

  .hero-modern .lead {
    font-size: 0.85rem;
  }

  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .property-card .card-img-wrapper {
    height: 140px;
  }

  /* District cards minimal */
  .district-card-img {
    height: 110px;
  }

  .district-card-overlay {
    padding: 0.75rem;
  }

  .district-card-overlay h5 {
    font-size: 0.95rem;
  }

  /* Map minimal */
  .home-map {
    height: 220px;
  }

  /* Hero stats single column */
  .hero-stats-row {
    gap: 0.5rem;
  }

  .hero-stat {
    padding: 0.5rem 0.75rem;
    min-width: 90px;
  }

  .hero-stat .stat-number {
    font-size: 1.25rem;
  }

  /* Navbar adjustments */
  .navbar-brand img {
    max-height: 32px;
  }
}

/* Row gaps fix for Bootstrap 4 (g-4 is Bootstrap 5) */
.row.g-4 {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.row.g-4 > [class*="col-"] {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Bootstrap 5 spacing utilities for Bootstrap 4 compatibility */
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }

/* ============================================
   Top Bar (Dark Header - верхний уровень)
   ============================================ */

.topbar {
  background: linear-gradient(135deg, #1F2328 0%, #2d3339 100%);
  color: #fff;
  font-size: 0.8125rem;
  padding: 0.5rem 0;
  display: block !important;
}

@media (max-width: 991px) {
  .topbar {
    display: none !important;
  }
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.topbar-link:hover {
  color: #fff;
}

.topbar-link-whatsapp:hover {
  color: #25D366;
}

.topbar-link-accent {
  background: var(--primary);
  color: #fff;
  padding: 0.375rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none !important;
}

.topbar-link-accent:hover {
  background: var(--primary-dark);
  color: #fff;
}

.topbar-text {
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.2);
}

/* ============================================
   Hero Section - Fixed Width Content
   ============================================ */

.hero-modern .col-lg-7 {
  max-width: 700px;
}

.hero-modern h1 {
  max-width: 600px;
}

.hero-modern .lead {
  max-width: 550px;
}

.hero-modern .search-box-modern {
  max-width: 600px;
}

.hero-modern .row.mt-5 {
  max-width: 500px;
}

/* ============================================
   Tools & Forms Responsive
   ============================================ */

/* Table responsive on mobile */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.875rem;
  }

  .table-responsive .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Form rows responsive */
  .form-row {
    flex-direction: column;
  }

  .form-row > .form-group {
    width: 100%;
    margin-bottom: 1rem;
  }

  /* Dashboard cards responsive */
  #dashboard .card {
    margin-bottom: 1rem;
  }

  #dashboard .card-body {
    padding: 1rem;
  }

  #dashboard .d-grid.gap-2 .btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  /* Hero sections */
  .bg-gradient-primary h1 {
    font-size: 1.5rem;
  }

  .bg-gradient-primary .lead {
    font-size: 0.95rem;
  }

  .bg-gradient-primary.py-5 {
    padding: 1.5rem 0 !important;
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: 0.85rem;
  }

  /* Cards */
  .card-title {
    font-size: 1.1rem;
  }

  .card-subtitle {
    font-size: 0.85rem;
  }

  /* Form fields */
  .form-group label {
    font-size: 0.9rem;
  }

  .form-control {
    font-size: 0.95rem;
    padding: 0.625rem 0.875rem;
  }

  /* Table improvements */
  .table td, .table th {
    padding: 0.5rem;
  }

  .table .btn {
    white-space: nowrap;
  }

  /* Dashboard table actions */
  #dashboard .table td .row {
    margin: 0;
  }

  #dashboard .table td .col-12 {
    padding: 0.25rem 0;
  }

  #dashboard .table td .btn {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
  }
}

@media (max-width: 375px) {
  .bg-gradient-primary h1 {
    font-size: 1.3rem;
  }

  .card-header h5 {
    font-size: 1rem;
  }

  .form-control,
  .form-select {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Profile navbar responsive */
@media (max-width: 576px) {
  .nav-pills.nav-justified {
    flex-direction: column;
  }

  .nav-pills.nav-justified .nav-item {
    margin-bottom: 0.25rem;
  }

  .nav-pills.nav-justified .nav-link {
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
  }
}

