/* 
 * Veteran Property Network - Modern Design System
 * Premium real estate technology platform styling
 */

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

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================================================
   COLOR PALETTE
   ============================================================================ */
:root {
  /* Primary Blues */
  --vpn-blue-50: #F0F7FF;
  --vpn-blue-100: #E0EFFE;
  --vpn-blue-200: #B9DDFE;
  --vpn-blue-300: #7CC0FD;
  --vpn-blue-400: #36A2FA;
  --vpn-blue-500: #0B7FE8;
  --vpn-blue-600: #006AFF;
  --vpn-blue-700: #0052CC;
  --vpn-blue-800: #003D99;
  --vpn-blue-900: #002966;
  
  /* Neutral Grays */
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  
  /* Semantic Colors */
  --success-50: #F0FDF4;
  --success-500: #10B981;
  --success-600: #059669;
  
  --warning-50: #FFFBEB;
  --warning-500: #F59E0B;
  --warning-600: #D97706;
  
  --error-50: #FEF2F2;
  --error-500: #EF4444;
  --error-600: #DC2626;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ============================================================================
   GLOBAL RESETS & UTILITIES
   ============================================================================ */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
  background-color: var(--gray-50);
}

/* ============================================================================
   PREMIUM iOS LIQUID GLASS RETINA - COMPLETE FILTER SYSTEM
   ============================================================================ */

/* Main Filter Panel with Liquid Glass */
#contextual-filters-container {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(40px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
  border-radius: 20px !important;
  border: 0.5px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 
    0 8px 32px 0 rgba(31, 38, 135, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
  padding: 24px !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#contextual-filters-container:hover {
  box-shadow: 
    0 12px 48px 0 rgba(31, 38, 135, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-1px) !important;
}

/* Property Type Toggle (Rooms/Homes) - Premium Glass Effect */
.property-type-toggle {
  background: rgba(240, 247, 255, 0.6) !important;
  backdrop-filter: blur(20px) !important;
  border-radius: 16px !important;
  padding: 6px !important;
  border: 0.5px solid rgba(59, 130, 246, 0.2) !important;
  box-shadow: 
    inset 0 1px 3px rgba(59, 130, 246, 0.1),
    0 2px 8px rgba(59, 130, 246, 0.08) !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 4px !important;
  margin-bottom: 20px !important;
}

.property-type-toggle button {
  padding: 12px 20px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
  letter-spacing: -0.01em !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  border: none !important;
  background: transparent !important;
  color: #64748b !important;
}

.property-type-toggle button:before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%) !important;
  opacity: 0 !important;
  transition: opacity 0.35s ease !important;
  border-radius: 12px !important;
  z-index: -1 !important;
}

.property-type-toggle button.active {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
  color: white !important;
  box-shadow: 
    0 4px 16px rgba(59, 130, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: scale(1.02) !important;
}

.property-type-toggle button:hover:not(.active) {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #2563EB !important;
}

/* Context Filter Buttons (For Rent/For Sale, Loan Types) */
.context-filter-btn {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  letter-spacing: -0.01em !important;
  color: #475569 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 
    0 2px 8px rgba(148, 163, 184, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  position: relative !important;
  overflow: hidden !important;
}

.context-filter-btn:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 
    0 6px 16px rgba(59, 130, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  color: #2563EB !important;
}

.context-filter-btn.active {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
  border-color: transparent !important;
  color: white !important;
  box-shadow: 
    0 4px 16px rgba(59, 130, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: scale(1.02) !important;
}

/* Premium Toggle Switches - iOS Style */
.toggle-switch-container {
  background: rgba(248, 250, 252, 0.7) !important;
  backdrop-filter: blur(20px) !important;
  border: 0.5px solid rgba(226, 232, 240, 0.5) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  margin: 8px 0 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 
    0 2px 8px rgba(148, 163, 184, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.toggle-switch-container:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  transform: translateX(2px) !important;
}

/* iOS Toggle Switch */
.toggle-switch-container input[type="checkbox"]:checked + div {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.15),
    0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.toggle-switch-container input[type="checkbox"] + div {
  background: rgba(203, 213, 225, 0.8) !important;
  backdrop-filter: blur(5px) !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.toggle-switch-container input[type="checkbox"] + div::after {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
  background: white !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Premium Select Dropdowns */
#contextual-filters-container select,
#contextual-filters-container input[type="number"],
#contextual-filters-container input[type="text"] {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  font-weight: 500 !important;
  font-size: 0.9375rem !important;
  color: #1e293b !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 
    0 2px 8px rgba(148, 163, 184, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

#contextual-filters-container select:focus,
#contextual-filters-container input[type="number"]:focus,
#contextual-filters-container input[type="text"]:focus {
  outline: none !important;
  background: rgba(255, 255, 255, 1) !important;
  border-color: #3B82F6 !important;
  box-shadow: 
    0 0 0 4px rgba(59, 130, 246, 0.15),
    0 4px 16px rgba(59, 130, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-1px) !important;
}

#contextual-filters-container select:hover,
#contextual-filters-container input[type="number"]:hover,
#contextual-filters-container input[type="text"]:hover {
  border-color: rgba(59, 130, 246, 0.4) !important;
  box-shadow: 
    0 4px 12px rgba(148, 163, 184, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* Labels with Premium Typography */
#contextual-filters-container label {
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  margin-bottom: 8px !important;
  display: block !important;
}

/* Assumable Button - Special Green Gradient */
button[data-filter="loan-assumable"] {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 
    0 4px 16px rgba(16, 185, 129, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

button[data-filter="loan-assumable"]:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 
    0 6px 24px rgba(16, 185, 129, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px) scale(1.03) !important;
}

/* Section Dividers with Glass Effect */
#rooms-filters > div:not(:last-child),
#homes-filters > div:not(:last-child) {
  margin-bottom: 12px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5) !important;
}

/* Smooth Animations */
@keyframes liquidGlassFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

#contextual-filters-container:hover {
  animation: liquidGlassFloat 3s ease-in-out infinite;
}

/* Filter Section Transitions */
#rooms-filters,
#homes-filters,
#rent-options,
#sale-options {
  animation: slideDownFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid Layouts for Buttons */
#contextual-filters-container .grid {
  gap: 8px !important;
}

/* Input Placeholders */
#contextual-filters-container input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em !important;
}

/* Icon Styling */
#contextual-filters-container i {
  opacity: 0.85 !important;
  transition: opacity 0.2s ease !important;
}

#contextual-filters-container button:hover i,
#contextual-filters-container .toggle-switch-container:hover i {
  opacity: 1 !important;
}

/* ============================================================================
   NAVIGATION BAR
   ============================================================================ */
.modern-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.modern-nav:hover {
  box-shadow: var(--shadow-md);
}

.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--vpn-blue-600);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--vpn-blue-600);
  border-radius: 2px 2px 0 0;
}

/* ============================================================================
   MODERN CARDS
   ============================================================================ */
.modern-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.modern-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--vpn-blue-200);
}

.modern-card-elevated {
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.modern-card-elevated:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

/* Property Listing Card */
.property-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.property-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--vpn-blue-300);
}

.property-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

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

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

.property-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

.property-military-badge {
  background: linear-gradient(135deg, var(--vpn-blue-600) 0%, var(--vpn-blue-700) 100%);
  color: white;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--vpn-blue-600) 0%, var(--vpn-blue-700) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 106, 255, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--vpn-blue-700) 0%, var(--vpn-blue-800) 100%);
  box-shadow: 0 6px 16px rgba(0, 106, 255, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 106, 255, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--vpn-blue-600);
  border: 2px solid var(--vpn-blue-200);
}

.btn-secondary:hover {
  background: var(--vpn-blue-50);
  border-color: var(--vpn-blue-400);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-ghost:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
  border-radius: 14px;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 10px;
}

/* ============================================================================
   FORM INPUTS
   ============================================================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  border: 2px solid var(--gray-300);
  border-radius: 12px;
  background: white;
  transition: all 0.2s ease;
  outline: none;
  color: var(--gray-900);
}

.form-input:hover {
  border-color: var(--gray-400);
}

.form-input:focus {
  border-color: var(--vpn-blue-500);
  box-shadow: 0 0 0 3px rgba(0, 106, 255, 0.1);
  background: var(--vpn-blue-50);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.form-select {
  width: 100%;
  padding: 0.875rem 2.5rem 0.875rem 1rem;
  font-size: 0.9375rem;
  border: 2px solid var(--gray-300);
  border-radius: 12px;
  background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23757575' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.75rem center/1.25rem 1.25rem;
  appearance: none;
  transition: all 0.2s ease;
  cursor: pointer;
  outline: none;
}

.form-select:hover {
  border-color: var(--gray-400);
}

.form-select:focus {
  border-color: var(--vpn-blue-500);
  box-shadow: 0 0 0 3px rgba(0, 106, 255, 0.1);
}

/* ============================================================================
   BADGES & TAGS
   ============================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  letter-spacing: -0.01em;
}

.badge-blue {
  background: var(--vpn-blue-100);
  color: var(--vpn-blue-700);
}

.badge-green {
  background: var(--success-50);
  color: var(--success-600);
}

.badge-yellow {
  background: var(--warning-50);
  color: var(--warning-600);
}

.badge-gray {
  background: var(--gray-100);
  color: var(--gray-700);
}

/* ============================================================================
   STATISTICS & KPI CARDS
   ============================================================================ */
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--vpn-blue-500) 0%, var(--vpn-blue-600) 100%);
  transition: width 0.3s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card:hover::before {
  width: 6px;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-change {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.stat-change.positive {
  color: var(--success-600);
}

.stat-change.negative {
  color: var(--error-600);
}

/* ============================================================================
   SEARCH FILTERS
   ============================================================================ */
.filter-panel {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.filter-group {
  margin-bottom: 1.25rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

/* ============================================================================
   MESSAGE BUBBLES
   ============================================================================ */
.message-bubble {
  max-width: 70%;
  padding: 0.875rem 1.125rem;
  border-radius: 16px;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.message-bubble.sent {
  background: linear-gradient(135deg, var(--vpn-blue-600) 0%, var(--vpn-blue-700) 100%);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.message-bubble.received {
  background: var(--gray-100);
  color: var(--gray-900);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
  display: block;
}

/* ============================================================================
   AVATARS
   ============================================================================ */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vpn-blue-400) 0%, var(--vpn-blue-600) 100%);
  color: white;
  font-weight: 600;
  overflow: hidden;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar-md {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
}

/* ============================================================================
   LOADING & SKELETONS
   ============================================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 0%, var(--gray-100) 50%, var(--gray-200) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================================================
   ALERTS & NOTIFICATIONS
   ============================================================================ */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  border-left: 4px solid;
  margin-bottom: 1rem;
}

.alert-info {
  background: var(--vpn-blue-50);
  border-color: var(--vpn-blue-500);
  color: var(--vpn-blue-900);
}

.alert-success {
  background: var(--success-50);
  border-color: var(--success-500);
  color: var(--success-900);
}

.alert-warning {
  background: var(--warning-50);
  border-color: var(--warning-500);
  color: var(--warning-900);
}

.alert-error {
  background: var(--error-50);
  border-color: var(--error-500);
  color: var(--error-900);
}

/* ============================================================================
   RESPONSIVE UTILITIES & MOBILE OPTIMIZATIONS
   ============================================================================ */

/* Mobile-first touch targets - ensure 44x44px minimum for accessibility */
@media (max-width: 768px) {
  /* General touch-friendly targets */
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
  
  .property-card-image {
    height: 180px;
  }
  
  .stat-value {
    font-size: 1.875rem;
  }
  
  .message-bubble {
    max-width: 85%;
  }
  
  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Mobile navigation improvements */
  nav {
    padding: 0.75rem 0;
  }
  
  /* Better mobile forms */
  .form-input, .form-select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 1rem;
  }
  
  /* Mobile-friendly cards */
  .modern-card, .property-card {
    margin-bottom: 1rem;
  }
  
  /* Improve readability on mobile */
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  
  /* Mobile hero adjustments */
  .hero-gradient h1 {
    font-size: 1.875rem !important;
    line-height: 1.2;
  }
  
  .hero-gradient p {
    font-size: 1rem !important;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
  .property-card-image {
    height: 200px;
  }
  
  .stat-value {
    font-size: 2rem;
  }
}

/* Prevent text size adjust on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Better tap highlight for mobile */
* {
  -webkit-tap-highlight-color: rgba(0, 106, 255, 0.1);
}

/* Mobile menu specific styles */
@media (max-width: 1024px) {
  #mobile-menu {
    touch-action: pan-y;
  }
  
  #mobile-menu > div {
    max-width: 85vw;
  }
  
  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.4s ease-out;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slide-up 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   DEMO LOGIN CARDS (Enhanced)
   ============================================================================ */
.demo-login-card {
  position: relative;
  overflow: hidden;
}

.demo-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.5) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.demo-login-card:hover::before {
  opacity: 1;
}

/* ============================================================================
   NAVIGATION DROPDOWN STYLES
   ============================================================================ */

.nav-dropdown-container {
  position: relative;
  display: inline-block;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 280px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.98);
  animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

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

.nav-dropdown-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 51, 234, 0.08) 100%);
  transform: translateX(4px);
}

.nav-dropdown-item i {
  font-size: 1.25rem;
  width: 32px;
  flex-shrink: 0;
}

/* Active navigation link */
.glass-nav-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
  color: #3B82F6;
  font-weight: 600;
}

/* Dropdown arrow animation */
.nav-dropdown-container button i.fa-chevron-down {
  transition: transform 0.2s ease;
}

.nav-dropdown-container:hover button i.fa-chevron-down {
  transform: rotate(180deg);
}

/* User profile dropdown special positioning */
#nav-dropdown-profile {
  right: 0;
  left: auto;
  min-width: 260px;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .nav-dropdown {
    left: auto;
    right: 0;
    min-width: 240px;
  }
}

/* Unread badge pulse animation */
#unread-badge {
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
  }
}

/* ============================================================================
   LOCATION SEARCH AUTOCOMPLETE STYLES
   ============================================================================ */

.location-search-container {
  position: relative;
}

.location-suggestion-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f3f4f6;
}

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

.location-suggestion-item:hover {
  background: linear-gradient(135deg, #f0f4ff 0%, #e6f2ff 100%);
}

.location-suggestion-item i {
  flex-shrink: 0;
}

/* Advanced Filters Modal Animation */
#filters-modal {
  animation: fadeIn 0.2s ease-out;
}

#filters-modal > div {
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Filter Badge Pulse Animation */
#filter-badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Enhanced Map Controls */
.map-control-btn {
  position: relative;
  overflow: visible;
}

/* Smooth transitions for all interactive elements */
input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(0, 106, 255, 0.1);
  transition: all 0.2s ease;
}

/* Professional checkbox styling */
input[type="checkbox"]:checked {
  background-color: #006AFF;
  border-color: #006AFF;
}

input[type="checkbox"]:focus {
  ring-color: #006AFF;
  ring-offset-width: 2px;
}


/* ============================================================================
   CONTEXTUAL FILTER BUTTONS
   ============================================================================ */

.context-filter-btn {
  padding: 8px 12px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  background: white;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.context-filter-btn:hover {
  border-color: #3B82F6;
  background: #EFF6FF;
  color: #2563EB;
}

.context-filter-btn.active {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  border-color: #2563EB;
}

.context-filter-btn i {
  font-size: 12px;
}

/* Toggle Switch Styling */
input[type="checkbox"].sr-only:checked + div {
  background-color: #3B82F6;
}

/* Smooth transitions for contextual filters */
#contextual-filters {
  transition: all 0.3s ease;
}

#rooms-filters,
#homes-filters {
  animation: fadeIn 0.3s ease-out;
}

#rent-options,
#sale-options {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Primary filter buttons (Rooms/Homes) */
#filter-btn-rooms,
#filter-btn-homes {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

#filter-btn-rooms:hover,
#filter-btn-homes:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* ============================================================================
   APPLE iOS LIQUID GLASS RETINA DESIGN
   Premium glassmorphism and depth effects
   ============================================================================ */

/* Enhanced Location Search with Glass Effect */
#location-search-input {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#location-search-input:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 12px 48px rgba(59, 130, 246, 0.15),
              0 0 0 4px rgba(59, 130, 246, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

/* Premium Primary Toggle Buttons (Rooms/Homes) */
#filter-btn-rooms,
#filter-btn-homes {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#filter-btn-rooms:hover,
#filter-btn-homes:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

#filter-btn-rooms::before,
#filter-btn-homes::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

#filter-btn-rooms:hover::before,
#filter-btn-homes:hover::before {
  left: 100%;
}

/* Glass Context Filter Buttons */
.context-filter-btn {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.context-filter-btn:hover {
  background: rgba(239, 246, 255, 0.9);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.context-filter-btn.active {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.95) 0%, 
    rgba(37, 99, 235, 0.95) 100%);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3),
              0 8px 32px rgba(59, 130, 246, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Premium Toggle Switches */
.toggle-switch-container {
  background: rgba(249, 250, 251, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch-container:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Enhanced Toggle Switch */
input[type="checkbox"].sr-only + div {
  background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1),
              0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="checkbox"].sr-only:checked + div {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4),
              inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

input[type="checkbox"].sr-only + div::after {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Dropdown Selects */
select.w-full {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

select.w-full:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1),
              0 0 0 4px rgba(59, 130, 246, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Premium Input Fields */
input[type="number"].px-3 {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="number"].px-3:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1),
              0 0 0 4px rgba(59, 130, 246, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Contextual Filters Container */
#contextual-filters {
  background: linear-gradient(180deg, 
    rgba(249, 250, 251, 0.8) 0%, 
    rgba(243, 244, 246, 0.8) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Section Labels */
#contextual-filters label.block {
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 11px;
  color: #6B7280;
}

/* Results Header Glass Effect */
.map-results-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Sort Select Glass Effect */
.map-sort-select {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.map-sort-select:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1),
              0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Listings Panel Glass Effect */
.map-listings-panel {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(249, 250, 251, 0.95) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
}

/* Location Suggestions Glass Dropdown */
#location-suggestions {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12),
              0 4px 16px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.location-suggestion-item {
  backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.location-suggestion-item:hover {
  background: linear-gradient(90deg, 
    rgba(239, 246, 255, 0.8) 0%, 
    rgba(219, 234, 254, 0.8) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Map Control Buttons Glass Effect */
.map-control-btn {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-control-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

/* Smooth micro-interactions */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* iOS-style haptic feedback simulation */
button:active,
.context-filter-btn:active {
  transform: scale(0.97);
}

/* Premium gradient text for labels */
.premium-label {
  background: linear-gradient(135deg, #1F2937 0%, #4B5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}


/* ============================================================================
   NAVIGATION ALWAYS VISIBLE - GLOBAL LAYOUT FIX
   ============================================================================ */

/* Ensure body doesn't have conflicting positioning */
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Ensure nav is always visible above all content */
.glass-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
}

/* Fix for search page specifically */
.map-view-container {
  position: relative;
  z-index: 1;
}

/* Ensure location search bar doesn't overlap nav */
.map-listings-panel .sticky {
  top: 0 !important;
  z-index: 100 !important;
}

/* Mobile responsive nav visibility */
@media (max-width: 1024px) {
  .glass-nav {
    border-radius: 0 !important;
  }
  
  .map-view-container {
    height: calc(100vh - 64px) !important;
  }
}

/* Desktop full visibility */
@media (min-width: 1025px) {
  .glass-nav {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 
                0 2px 8px rgba(0, 0, 0, 0.04),
                inset 0 -1px 0 rgba(255, 255, 255, 0.5) !important;
  }
}


/* ============================================================================
   DASHBOARD-STYLE SPA TRANSITIONS
   ============================================================================ */

/* Smooth content transitions */
#app {
  min-height: 100vh;
  transition: opacity 0.2s ease-in-out;
}

/* Page transition animation */
@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply to all main content sections */
.min-h-screen {
  animation: pageSlideIn 0.3s ease-out;
}

/* Ensure navigation stays fixed during transitions */
.glass-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(40px) saturate(180%) !important;
}

/* Search page integration - remove jarring background */
.map-view-container {
  background: var(--gray-50);
  transition: all 0.3s ease;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Active navigation highlight */
.glass-nav-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  color: var(--vpn-blue-600);
  font-weight: 600;
  border-bottom: 2px solid var(--vpn-blue-600);
}

/* Dashboard icon for better visual clarity */
.fa-th-large {
  font-size: 0.875rem;
}

/* ============================================================================
   PREMIUM SEARCH & FILTER REDESIGN
   ============================================================================ */

/* Property Type Toggle - Premium */
.property-type-toggle-premium {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 4px;
  background: rgba(241, 245, 249, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.property-type-toggle-premium button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-type-toggle-premium button .toggle-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #64748b;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.property-type-toggle-premium button .toggle-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.property-type-toggle-premium button .toggle-label {
  font-weight: 700;
  font-size: 15px;
  color: #374151;
  transition: color 0.3s ease;
}

.property-type-toggle-premium button .toggle-sublabel {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
  transition: color 0.3s ease;
}

.property-type-toggle-premium button:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
}

.property-type-toggle-premium button:hover:not(.active) .toggle-icon {
  transform: scale(1.05);
  color: #3b82f6;
}

.property-type-toggle-premium button.active {
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.property-type-toggle-premium button.active .toggle-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  transform: scale(1.05);
}

.property-type-toggle-premium button.active .toggle-label {
  color: #1e40af;
}

.property-type-toggle-premium button.active .toggle-sublabel {
  color: #3b82f6;
}

/* Filter Card Styling */
.filter-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.filter-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08);
}

.filter-card.military-card {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(224, 231, 255, 0.95) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.filter-label {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  letter-spacing: -0.01em;
}

/* Filter Chips */
.filter-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-chip:hover {
  border-color: rgba(59, 130, 246, 0.4);
  color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.filter-chip.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
  transform: scale(1.02);
}

.filter-chip-sm {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-chip-sm:hover {
  border-color: rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}

.filter-chip-sm.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: transparent;
  color: white;
}

/* Filter Input */
.filter-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  transition: all 0.3s ease;
}

.filter-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.filter-input::placeholder {
  color: #9ca3af;
}

/* Filter Select */
.filter-select {
  width: 100%;
  padding: 12px 14px;
  padding-right: 40px;
  border-radius: 12px;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  transition: all 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Budget Chips */
.budget-chip {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(248, 250, 252, 0.9);
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s ease;
}

.budget-chip:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

/* Premium Toggle Row */
.premium-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.5);
  transition: all 0.3s ease;
}

.premium-toggle-row:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateX(2px);
}

.premium-toggle-row.highlight {
  background: rgba(239, 246, 255, 0.7);
  border-color: rgba(59, 130, 246, 0.15);
}

.toggle-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.toggle-text {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

/* Premium Toggle Switch */
.premium-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}

.premium-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(203, 213, 225, 0.8);
  border-radius: 28px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.premium-toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.premium-toggle input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Listing Type Cards */
.listing-type-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.listing-type-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.12);
}

.listing-type-card.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.95) 100%);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.listing-type-card .ltc-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.listing-type-card .ltc-content {
  display: flex;
  flex-direction: column;
}

.listing-type-card .ltc-label {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.listing-type-card .ltc-sublabel {
  font-size: 11px;
  color: #9ca3af;
}

/* Bed/Bath Selector */
.bed-bath-selector {
  display: flex;
  gap: 4px;
  background: rgba(241, 245, 249, 0.8);
  padding: 4px;
  border-radius: 10px;
}

.bb-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s ease;
}

.bb-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #3b82f6;
}

.bb-btn.active {
  background: white;
  color: #3b82f6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Loan Type Cards */
.loan-type-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.loan-type-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.loan-type-card.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.95) 100%);
  color: #1e40af;
}

.loan-type-card.assumable {
  flex-direction: column;
  gap: 4px;
}

.loan-type-card .loan-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  font-size: 9px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Assumable Banner */
.assumable-banner {
  position: relative;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-radius: 16px;
  padding: 20px;
  overflow: hidden;
}

.assumable-banner .ab-glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.assumable-banner .ab-content {
  position: relative;
  z-index: 1;
}

/* Results Header Premium */
.results-header-premium {
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  backdrop-filter: blur(20px);
}

.results-count-premium {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.results-count-premium .count-number {
  font-size: 24px;
  font-weight: 800;
  color: #1f2937;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.results-count-premium .count-label {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.sort-select-premium {
  padding: 10px 36px 10px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: all 0.3s ease;
}

.sort-select-premium:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Active Filters Container */
.active-filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(226, 232, 240, 0.6);
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
}

.active-filter-tag button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.2s ease;
}

.active-filter-tag button:hover {
  background: #3b82f6;
  color: white;
}

/* Promo Banner Premium */
.promo-banner-premium {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08);
}

.promo-banner-premium .promo-glow {
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
}

.promo-banner-premium .promo-content {
  position: relative;
  z-index: 1;
}

.promo-banner-premium .promo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.promo-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.promo-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.promo-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.9);
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.promo-btn-secondary:hover {
  background: white;
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

/* Empty State Premium */
.empty-state-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
}

.empty-state-premium .empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 32px;
  color: #6366f1;
}

.empty-state-premium .empty-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}

.empty-state-premium .empty-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}

.empty-state-premium .empty-suggestions {
  padding: 16px 24px;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.empty-suggestion-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: white;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s ease;
}

.empty-suggestion-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .property-type-toggle-premium button {
    padding: 12px 14px;
  }
  
  .property-type-toggle-premium button .toggle-icon {
    width: 38px;
    height: 38px;
  }
  
  .filter-card {
    padding: 14px;
  }
  
  .premium-toggle-row {
    padding: 10px 12px;
  }
  
  .toggle-icon-sm {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .toggle-text {
    font-size: 12px;
  }
  
  .results-count-premium .count-number {
    font-size: 20px;
  }
}

