/* Property Index Styles - Enhanced Modern Design */

/* ===== CSS VARIABLES ===== */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    --secondary-50: #f0f9ff;
    --secondary-100: #e0f2fe;
    --secondary-200: #bae6fd;
    --secondary-300: #7dd3fc;
    --secondary-400: #38bdf8;
    --secondary-500: #0ea5e9;
    --secondary-600: #0284c7;
    --secondary-700: #0369a1;
    --secondary-800: #075985;
    --secondary-900: #0c4a6e;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --error-50: #fef2f2;
    --error-500: #ef4444;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

/* ===== GLOBAL STYLES ===== */
.property-listing-container { 
    min-height: 100vh;
}

/* Container and layout utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Text utilities */
.text-center {
    text-align: center;
}

/* Bootstrap-like utilities */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-5 {
    gap: 1.25rem;
}

/* Position utilities */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.overflow-hidden {
    overflow: hidden;
}

.z-index-1 {
    z-index: 1;
}

.z-index-2 {
    z-index: 2;
}

/* ===== ENHANCED HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--secondary-700) 100%);
    padding: 40px 0 30px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--gray-50) 0%, var(--gray-50) 0%);
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-badge i {
    color: var(--warning-500);
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.gradient-text::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--warning-500), #fbbf24);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced Search Bar */
.hero-search {
    margin-bottom: 4rem;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

/* Improved search responsiveness */
@media (max-width: 768px) {
    .search-inputs {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-group {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-inputs {
        padding: 0.75rem;
    }
    
    .search-input,
    .search-select,
    .search-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
}

.search-inputs {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-xl);
}

.search-group {
    flex: 1;
    position: relative;
}

.search-input,
.search-select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--gray-800);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.search-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    z-index: 2;
}

.search-input:focus,
.search-select:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, var(--warning-500) 0%, #fbbf24 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

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

/* Enhanced Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all var(--transition-fast);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--warning-500) 0%, #fbbf24 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ===== MAIN CONTENT LAYOUT ===== */
.main-content-section {
    padding: 0 0 2rem 0; 
    min-height: 100vh;
}

/* Override any Bootstrap grid classes that might interfere */
.main-content-section .container {
    max-width: none;
    padding: 0;
}

.main-content-section .row {
    display: block;
    margin: 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1rem;
    align-items: start;
    max-width: 1400px;
    margin: 10px;
}

/* Ensure filters sidebar is first (left side) */
.filters-sidebar {
    grid-column: 1;
    order: 1;
    width: 350px;
    min-width: 350px;
    position: sticky;
    height: fit-content;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

/* Ensure main content is second (right side) */
.main-content {
    grid-column: 2;
    order: 2;
    width: 1fr;
    min-height: 600px;
    padding-top: 0;
}

.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 3px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: var(--gray-400);
}

/* ===== MOBILE FILTER TOGGLE ===== */
.mobile-filter-toggle {
    display: none;
    margin-bottom: 0;
    width: 100%;
}

.btn-toggle-filters {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-600) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.btn-toggle-filters:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-toggle-filters.active {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--secondary-700) 100%);
}

.btn-toggle-filters i {
    font-size: 1.1rem;
}

.toggle-icon {
    transition: transform var(--transition-fast);
}

.btn-toggle-filters.active .toggle-icon {
    transform: rotate(180deg);
}

.filters-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.filters-header {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-600) 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-filters-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: none;
}

.close-filters-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.filters-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filters-title h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.clear-filters-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-filters-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

 

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

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.filter-label i {
    color: var(--primary-500);
    width: 16px;
}

.input-group,
.select-group {
    position: relative;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    background: white;
    color: var(--gray-800);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: none;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 2;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Enhanced dropdown styling */
.filter-select:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.filter-select:focus {
    border-color: var(--primary-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select option {
    padding: 0.75rem 1rem;
    background: white;
    color: var(--gray-800);
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.filter-select option:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.filter-select option:checked {
    background: var(--primary-100);
    color: var(--primary-700);
    font-weight: 600;
}

.filter-select option:focus {
    background: var(--primary-50);
    color: var(--primary-700);
}

/* Custom dropdown arrow */
.select-group::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--gray-400);
    pointer-events: none;
    transition: all var(--transition-fast);
    z-index: 3;
}

.select-group:hover::after {
    border-top-color: var(--primary-500);
}

.filter-select:focus + .select-group::after {
    border-top-color: var(--primary-600);
}

/* Improve select group positioning */
.select-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* Radio and Checkbox Styles */
.radio-group,
.checkbox-group {
    display: flex; 
    gap: 0.75rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.radio-option:hover,
.checkbox-option:hover {
    background: transparent;
}

.radio-option input,
.checkbox-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom,
.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300, #d1d5db);
    border-radius: 50%;
    background: white;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-option:hover .radio-custom {
    border-color: var(--primary-400, #93c5fd);
}

.radio-option input:checked + .radio-custom {
    border-color: var(--primary-500, #3b82f6);
    background: var(--primary-500, #3b82f6);
}

.radio-option input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.radio-option input:checked ~ .radio-label {
    color: var(--primary-700, #1e40af);
    font-weight: 600;
}

.checkbox-option input:checked + .checkbox-custom {
    border-color: var(--primary-500);
    background: var(--primary-500);
}

.checkbox-option input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.radio-option input[type="radio"]:focus + .radio-custom {
    box-shadow: 0 0 0 3px var(--primary-100, rgba(219, 234, 254, 1));
}

.radio-label,
.checkbox-label {
    font-size: 14px;
    color: var(--gray-700, #374151);
    transition: all 0.2s ease;
    user-select: none;
    cursor: pointer;
}

/* Price Range Styles */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.price-group {
    flex: 1;
    position: relative;
}

.price-group .filter-input {
    padding-left: 1rem;
    padding-right: 2.5rem;
}

.price-label {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

.price-separator {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background: var(--gray-300);
    border-radius: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-label input {
    display: none;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.toggle-label input:checked + .toggle-slider {
    transform: translateX(24px);
}

.toggle-label input:checked {
    background: var(--primary-500);
}

/* Apply Filters Button */
.btn-apply-filters {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-600) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-apply-filters:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-apply-filters:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results Header */
.results-header {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.results-count i {
    color: var(--primary-500);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

#sortSelect {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

#sortSelect:hover {
    border-color: var(--primary-500);
}

#sortSelect:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-tag {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-200);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.remove-filter {
    background: none;
    border: none;
    color: var(--primary-500);
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
    transition: color var(--transition-fast);
}

.remove-filter:hover {
    color: var(--error-500);
}

/* ===== ENHANCED PROPERTY CARDS ===== */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Loading animation for property cards */
.property-card.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Enhanced hover effects */
.property-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    position: relative;
    cursor: pointer;
}

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

/* Improved property image container */
.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

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

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

/* Enhanced property badges */
.property-badges {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    z-index: 3;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}



.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-400);
}

.property-badges {
    position: absolute;
    bottom: .5rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge {
    background: rgba(246, 72, 59, 0.9);
    color: white;
}

.listing-badge {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.person-badge {
    background: rgba(139, 92, 246, 0.9);
    color: white;
}

.featured-badge {
    background: linear-gradient(135deg, var(--warning-500) 0%, #fbbf24 100%);
    color: white;
}

.property-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.property-card:hover .property-overlay {
    opacity: 1;
}

.overlay-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.action-btn:hover {
    background: white;
    transform: scale(1.1);
    color: var(--primary-500);
}

.action-btn.view-btn {
    background: var(--primary-500);
    color: white;
}

.action-btn.view-btn:hover {
    background: var(--primary-600);
    color: white;
}

.property-content {
    padding: 1.5rem;
}

.property-header {
    margin-bottom: 10px;
}

.property-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-location-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.property-price {
    font-size: 1rem;
    font-weight: 800;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.8rem;
    flex: 1;
    margin-bottom: 0;
}

.property-location i {
    color: var(--primary-500);
}

.property-features {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.property-features .feature:first-child {
    text-align: left;
}

.property-features .feature:last-child {
    text-align: right;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.feature i {
    color: var(--primary-500);
    width: 16px;
}


.property-footer {
    display: flex;
    justify-content: center;
    align-items: center; 
    border-top: 1px solid var(--gray-200);
}

.property-meta {
    display: flex;
    gap: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray-500);
    font-size: 0.75rem;
}

.meta-item i {
    color: var(--gray-400);
}

.btn-view-details {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-600) 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

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

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

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

.btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

/* ===== ENHANCED PAGINATION ===== */
.pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    background: white;
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.page-link:hover:not(.disabled) {
    background: var(--primary-50);
    color: var(--primary-600);
}

.page-link.active {
    background: var(--primary-500);
    color: white;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    max-width: 400px;
    word-wrap: break-word;
}

/* Enhanced toast animations */
.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--success-500);
    background: linear-gradient(135deg, var(--success-50) 0%, white 100%);
}

.toast-success i {
    color: var(--success-500);
}

.toast-info {
    border-left: 4px solid var(--primary-500);
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
}

.toast-info i {
    color: var(--primary-500);
}

.toast-error {
    border-left: 4px solid var(--error-500);
    background: linear-gradient(135deg, var(--error-50) 0%, white 100%);
}

.toast-error i {
    color: var(--error-500);
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Improved focus states */
.search-input:focus,
.search-select:focus,
.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Enhanced button states */
.search-btn:active,
.btn-apply-filters:active,
.btn-view-details:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

/* Improved accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}



/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .content-layout {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }
    
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Additional responsive improvements */
@media (max-width: 1400px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .search-inputs {
        flex-wrap: wrap;
    }
    
    .search-group {
        min-width: 200px;
    }
}

@media (max-width: 1100px) {
    .content-layout {
        grid-template-columns: 250px 1fr;
        gap: 1rem;
    }
    
    .filters-sidebar {
        width: 250px;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .search-inputs {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        z-index: 1000;
        background: white;
        transition: all var(--transition-normal);
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
    }
    
    .filters-sidebar.mobile-active {
        left: 0;
    }
    
    /* Mobile overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        display: none; /* Hidden by default on desktop */
    }
    
    .mobile-overlay {
        display: block; /* Show on mobile */
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-filter-toggle {
        display: block;
        order: 1;
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .main-content {
        order: 3;
        width: 100%;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .results-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .sort-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-label {
        font-size: 0.8rem;
    }
    
    #sortSelect {
        flex: 1;
        max-width: 200px;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .view-controls {
        justify-content: center;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .list-view .property-card {
        grid-template-columns: 1fr;
    }
    
    .list-view .property-image {
        height: 200px;
    }
    
    .empty-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    /* Mobile filter improvements */
    .filters-card {
        border-radius: 16px;
        margin-bottom: 1rem;
    }
    
    .filters-form {
        padding: 1rem;
    }
    
    .filter-group {
        margin-bottom: 1rem;
    }
    
    .filter-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .radio-group {
        gap: 0.5rem;
    }
    
    .radio-option {
        padding: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .radio-label {
        font-size: 0.85rem;
    }
    
    .filter-clear-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .btn-toggle-filters {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    .results-count {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    .property-card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .property-image {
        border-radius: 12px 12px 0 0;
    }
    
    .property-content {
        padding: 1rem;
    }
    
    .property-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .property-price {
        font-size: 1.1rem;
    }
    
    .property-features {
        font-size: 0.85rem;
    }
}
    
    .btn-toggle-filters {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }
    
    .close-filters-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
    }
    
    /* Mobile filter card adjustments */
    .filters-card {
        border-radius: 0;
        box-shadow: none;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .filters-form {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
    }
    
    .filters-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        z-index: 10;
    }
}

/* Top Advertisement */
.top-advertisement {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    text-align: center;
}

.ad-container {
    max-width: 728px;
    margin: 0 auto; 
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    text-align: center;
}

.ads-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ad-banner {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.horizontal-ad {
    width: 100%;
    max-width: 728px;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
}

.ad-placeholder i {
    font-size: 2rem;
    color: var(--gray-400);
}

.ad-placeholder span {
    font-size: 0.875rem;
    font-weight: 500;
}

.ad-placeholder small {
    font-size: 0.75rem;
    color: var(--gray-400);
    background: var(--gray-200);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.ad-text {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

/* Main Content */
    
    .hero-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .search-inputs {
        padding: 0.75rem;
    }
    
    .search-input,
    .search-select,
    .search-btn {
        padding: 0.875rem;
    }
    
    .content-layout {
        padding: 0 0.5rem;
        gap: 1rem;
    }
    
    .mobile-filter-toggle {
        margin-bottom: 1rem;
    }
    
    .btn-toggle-filters {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .filters-form {
        padding: 1rem;
    }
    
    .property-content {
        padding: 0.8rem;
    }
    
    .property-features {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .property-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .btn-view-details {
        justify-content: center;
    }
    
    /* Mobile dropdown improvements */
    .filter-select {
        font-size: 1rem;
        padding: 0.875rem 1rem 0.875rem 2.5rem;
    }
    
    .select-group::after {
        border-left-width: 7px;
        border-right-width: 7px;
        border-top-width: 7px;
    }
}
