/* Properties Page Specific Styles */

/* Property Cards - Purple Text */
.property-card .card-title,
.property-card .card-price,
.property-card .card-location,
.property-card .card-transaction,
.property-card .card-detail-item,
.property-card .agent-name,
.property-card .agent-company,
.property-card .agent-rating {
    color: #8b5cf6 !important;
}

.property-card .card-title {
    font-weight: 700;
}

.property-card .card-price {
    font-weight: 700;
    font-size: 1.25rem;
}

.dark .property-card .card-title,
.dark .property-card .card-price,
.dark .property-card .card-location,
.dark .property-card .card-transaction,
.dark .property-card .card-detail-item,
.dark .property-card .agent-name,
.dark .property-card .agent-company,
.dark .property-card .agent-rating {
    color: #a78bfa !important;
}

/* Properties Hero Section */
.properties-hero {
    background: #ff8c00;
    padding: 8rem 0 4rem;
    text-align: center;
    color: white;
}

.properties-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.properties-hero p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Featured Property Profile */
.featured-property-profile {
    background: #ff8c00 !important;
    padding: clamp(3rem, 8vw, 5rem) 0;
}

.featured-property-profile .container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.featured-header h2 {
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.featured-subtitle {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.featured-link:hover {
    transform: translateY(-2px);
    background: rgba(29, 78, 216, 0.16);
}

.featured-profile-card {
    display: grid;
}

.featured-profile-card.empty-state {
    padding: 3rem;
    text-align: center;
    border-radius: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    color: #64748b;
    background: rgba(248, 250, 252, 0.6);
}

.profile-card {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    padding: clamp(2rem, 4vw, 3rem);
    position: relative;
    overflow: hidden;
}

.profile-card::after {
    content: '';
    position: absolute;
    inset-inline-start: -120px;
    inset-block-start: 20%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.12) 0%, transparent 70%);
    pointer-events: none;
    transform: rotate(-18deg);
}

[data-theme="dark"] .profile-card {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(51, 65, 85, 0.8);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.6);
}

.profile-card__media {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    min-height: 320px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.profile-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.profile-card__badge {
    position: absolute;
    inset-block-start: 20px;
    inset-inline-start: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(239, 68, 68, 0.95));
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 16px 38px rgba(220, 38, 38, 0.35);
}

.profile-card__media-meta {
    position: absolute;
    inset-block-end: 20px;
    inset-inline: 20px;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-card__media-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.profile-card__media-meta i {
    color: #38bdf8;
}

.profile-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-card__title {
    font-size: clamp(1.8rem, 2.4vw, 2.2rem);
    color: #0f172a;
    margin: 0;
}

.profile-card__price {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1d4ed8;
}

.profile-card__location {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #475569;
    font-weight: 600;
    font-size: 1rem;
}

.profile-card__location i {
    color: #2563eb;
}

.profile-card__description {
    color: #334155;
    margin: 0;
    line-height: 1.9;
}

.profile-card__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-card__metrics li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #1f2937;
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-card__metrics i {
    color: #1d4ed8;
}

.profile-card__features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-card__features span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.profile-card__actions .btn-primary {
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
}

.profile-card__actions .btn-secondary {
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
}

.profile-card__actions .btn-secondary i {
    font-size: 1.05rem;
}

@media (max-width: 1024px) {
    .profile-card {
        grid-template-columns: 1fr;
    }

    .profile-card__media {
        min-height: 260px;
    }

    .featured-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .featured-link {
        align-self: flex-end;
    }
}

@media (max-width: 640px) {
    .featured-property-profile {
        padding: 2.5rem 0;
    }

    .profile-card {
        padding: 1.75rem;
        border-radius: 24px;
    }

    .profile-card__badge {
        inset-block-start: 16px;
        inset-inline-start: 16px;
    }

    .profile-card__media-meta {
        inset-inline: 16px;
        inset-block-end: 16px;
    }

    .profile-card__actions {
        width: 100%;
    }

    .profile-card__actions .btn-primary,
    .profile-card__actions .btn-secondary {
        flex: 1;
        justify-content: center;
    }

    .featured-link {
        align-self: stretch;
        justify-content: center;
    }
}

/* Advanced Search Bar */
.advanced-search-bar {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    max-width: 1000px;
    margin: 0 auto;
    color: white;
}

.advanced-search-bar h2,
.advanced-search-bar p {
    color: white;
}

.section-intro {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.section-copy {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
}

.search-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
}

.search-primary {
    flex: 1;
}

.search-primary input {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    transition: all 0.3s ease;
}

.search-primary input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.search-actions {
    display: flex;
    gap: 0.75rem;
}

.search-hint {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-top: 1rem;
}

.search-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.search-btn, .clear-btn, .advanced-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    white-space: nowrap;
}

.advanced-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.advanced-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.advanced-count {
    background: #667eea;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    min-width: 20px;
    text-align: center;
}

.search-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.search-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.clear-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: clamp(2rem, 5vw, 3rem) 0 1.5rem;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}

.filter-tab {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover,
.filter-tab:focus {
    background: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.35);
}

.filter-tab.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}


.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1.5rem, 4vw, 2.5rem);
}

.properties-grid .loading-state,
.properties-grid .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
    color: #475569;
    font-weight: 600;
}




.advanced-btn .advanced-btn-icon {
    transition: transform 0.2s ease;
}

.advanced-btn.active {
    background: #2473bb;
    box-shadow: 0 10px 25px rgba(36, 115, 187, 0.35);
}

.advanced-btn.active .advanced-btn-icon {
    transform: none;
}

/* Advanced Filters Panel */
.advanced-filters-panel {
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
    border: 2px solid rgba(167, 139, 250, 0.3);
}

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

.filters-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(167, 139, 250, 0.2);
}

.filters-actions .btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.filters-actions .btn-ghost {
    background: rgba(167, 139, 250, 0.1);
    color: #667eea;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.filters-actions .btn-ghost:hover {
    background: rgba(167, 139, 250, 0.2);
    transform: translateY(-2px);
}

.filters-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.filters-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.filter-group {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.filter-group label:first-child {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1rem;
    display: block;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    padding: 0.3rem 0;
}

.checkbox-group input[type="checkbox"] {
    accent-color: #667eea;
}

.home-search-hero .filter-group label:first-child {
    color: #1f2937;
}

.home-search-hero .checkbox-group label {
    color: #374151;
}

.home-search-hero .checkbox-group label:hover {
    color: #111827;
}

.home-search-hero .range-inputs span,
.home-search-hero .range-inputs input,
.home-search-hero .filters-grid label,
.home-search-hero .filters-grid input,
.home-search-hero .filters-grid select {
    color: #1f2937;
}

.home-search-hero .filters-grid input::placeholder {
    color: #9ca3af;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-inputs input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 5px;
    font-family: 'Vazirmatn', Arial, sans-serif;
    transition: all 0.3s ease;
}

.range-inputs input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.range-inputs span {
    color: #667eea;
    font-weight: 500;
}

.advanced-search-bar select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 5px;
    font-family: 'Vazirmatn', Arial, sans-serif;
    transition: all 0.3s ease;
}

.advanced-search-bar select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-meta {
    margin-top: 1rem;
    text-align: center;
}

.stats-summary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Properties List Section */

.home-search-hero {
    min-height: auto;
    padding: clamp(4rem, 10vw, 6rem) 0 clamp(3rem, 6vw, 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
}

.home-search-hero .container {
    width: min(1100px, 95%);
    margin: 0 auto;
}

.home-search-hero .hero-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0.5rem;
}

.home-search-hero .hero-intro h1 {
    margin-bottom: 0.75rem;
}

.home-search-hero .hero-intro p {
    font-size: 1.1rem;
    opacity: 0.85;
}

.home-search-hero .advanced-search-bar {
    margin: 0 auto 0;
}

.home-search-hero .search-meta {
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-align: center;
}

.home-search-hero #homeAdvancedFilters {
    max-height: min(72vh, 760px);
    min-height: min(420px, 60vh);
    overflow-y: auto;
    text-align: right;
    direction: rtl;
}

.home-search-hero #homeAdvancedFilters::-webkit-scrollbar {
    width: 8px;
}

.home-search-hero #homeAdvancedFilters::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.home-search-hero .advanced-filters-panel {
    width: min(1100px, 95%);
    margin: 1rem auto 0;
    text-align: right;
    position: relative;
}

.advanced-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.home-search-hero #homeAdvancedFilters .advanced-filters-header {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    z-index: 5;
    box-shadow: 0 8px 12px rgba(15, 23, 42, 0.06);
}

.advanced-filters-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #1f2937;
}

.advanced-filters-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: #6b7280;
}

.advanced-filters-close {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.25);
    color: #c0392b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.advanced-filters-close:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.05);
}

.advanced-filters-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.advanced-filters-hint {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.advanced-filters-hint i {
    color: #2563eb;
}

.advanced-filters-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem 1.6rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(29, 78, 216, 0.35);
}


.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.3);
    transform: translateY(-2px);
}

.advanced-filters-actions .btn-primary i,
.advanced-filters-actions .btn-secondary i {
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .advanced-filters-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .advanced-filters-actions {
        width: 100%;
        justify-content: stretch;
    }

    .advanced-filters-actions button {
        flex: 1;
    }
}


.results-info {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-btn {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #f5f5f5;
}

.view-btn.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* Property Labels and Enhanced Display */
.property-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.property-label {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.property-label.label-newly-built {
    background: #27ae60;
}

.property-label.label-luxury {
    background: #f39c12;
}

.property-label.label-investment {
    background: #9b59b6;
}

.property-label.label-urgent {
    background: #e74c3c;
    animation: pulse 1.5s infinite;
}

.property-label.label-beachfront {
    background: #3498db;
}

.property-label.label-special-opportunity {
    background: #e67e22;
}

.property-label.label-exclusive {
    background: #8e44ad;
}

.property-label.label-under-construction {
    background: #f39c12;
}

.property-label.label-pre-sale {
    background: #2ecc71;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.badge-sponsored {
    background: #f39c12 !important;
    color: white !important;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px #f39c12; }
    to { box-shadow: 0 0 15px #f39c12; }
}

.property-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
}

.property-meta > span {
    background: #f1f2f6;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
}

.property-stats {
    margin-top: 0.5rem;
    color: #999;
    font-size: 0.85rem;
}

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #555;
    background: #f8f9fa;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.property-features i {
    color: #e74c3c;
    font-size: 0.8rem;
}

/* Property Actions Enhanced */
.property-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.property-actions.is-grid {
    flex-direction: column;
    align-items: stretch;
}

.property-actions.is-grid button {
    width: 100%;
}

.contact-btn, .favorite-btn, .share-btn, .compare-btn {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: none;
    border-radius: 5px;
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

/* دکمه‌های تماس در کارت املاک */
.agent-contact {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.agent-contact .contact-btn {
    flex: 1;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-btn {
    background: #27ae60;
    color: white;
}

.contact-btn:hover {
    background: #229954;
    transform: translateY(-1px);
}

.phone-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.phone-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.favorite-btn {
    background: #e74c3c;
    color: white;
}

.favorite-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.compare-btn {
    background: #8e44ad;
    color: rgb(24, 3, 3);
}

.compare-btn:hover {
    background: #6d28d9;
    transform: translateY(-1px);
}

.compare-btn.comparing {
    background: #4c1d95;
    color: rgb(12, 0, 116);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.share-btn {
    background: #3498db;
    color: white;
}

.share-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.property-actions button {
    min-height: 42px;
}

/* Mobile Responsive */

.view-btn:hover,

/* Properties Container */
.properties-container {
    position: relative;
}

/* List View Styles */
.properties-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.properties-grid.list-view .property-card {
    display: flex;
    flex-direction: row;
    max-width: none;
    height: auto;
}

.properties-grid.list-view .property-image {
    width: 300px;
    height: 100%;
    min-height: 200px;
    flex-shrink: 0;
}

.properties-grid.list-view .property-image-media {
    height: 100%;
}

.properties-grid.list-view .property-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.properties-grid.list-view .property-features {
    margin-bottom: 0.5rem;
}

/* Map View */
.map-view {
    background: white;
    border-radius: 10px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.map-placeholder i {
    font-size: 4rem;
    color: #95a5a6;
    margin-bottom: 1rem;
}

.map-placeholder p {
    font-size: 1.3rem;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.map-placeholder small {
    color: #7f8c8d;
}

/* Pagination */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination button {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', Arial, sans-serif;
}

.pagination button:hover,
.pagination button.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Logo Link */
.logo a {
    text-decoration: none;
    color: inherit;
}

/* Active Navigation */
.nav-links li.active > a {
    color: #e74c3c;
    font-weight: 600;
}

/* Responsive Design */

@media (max-width: 480px) {
    .properties-hero h1 {
        font-size: 1.8rem;
    }
    
    .range-inputs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-toggle {
        justify-content: center;
    }
}

/* fix buttons overflow */
.property-card{ 
    overflow: hidden; 
    border: none;
    background: var(--card); 
    border-radius: 16px;
    box-shadow: none !important;
    position: relative;
    /* Performance Optimizations */
    contain: layout style paint;
    content-visibility: auto;
    /* GPU Acceleration - only on hover */
    transform: translateZ(0);
    backface-visibility: hidden;
    /* Faster transitions */
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}

/* Add will-change only on hover */
.property-card:hover {
    will-change: transform;
}

/* Chroma Grid - Gradient Border Effect (Optimized) */
.property-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.4),
        rgba(59, 130, 246, 0.4),
        rgba(249, 115, 22, 0.4),
        rgba(236, 72, 153, 0.4)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
    transform: translateZ(0);
}

.property-card:hover::before {
    opacity: 1;
    will-change: opacity;
}

/* Chroma Grid - Simplified Background (No blur for performance) */
.property-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.1),
        rgba(59, 130, 246, 0.1),
        rgba(249, 115, 22, 0.1),
        rgba(236, 72, 153, 0.1)
    );
    border-radius: 16px;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.25s ease;
    transform: translateZ(0);
}

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

/* Chroma Grid - Optimized Lift Effect */
.property-card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Ensure card content stays above effects */
.property-card > * {
    position: relative;
    z-index: 2;
}

/* Enhanced property imagery */
.property-image {
    position: relative;
    min-height: 220px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.35), rgba(30, 64, 175, 0.45));
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}

.property-image-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.property-card:hover .property-image-media {
    transform: scale(1.03);
}

.property-location-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.5rem 0 0.75rem;
}

.location-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 600;
}

[data-theme="dark"] .location-chip {
    background: rgba(96, 165, 250, 0.2);
    color: #bfdbfe;
}


.property-meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.18);
    color: #1f2937;
    font-size: 0.78rem;
    font-weight: 600;
}

[data-theme="dark"] .property-meta-chip {
    background: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}

.property-key-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 0.5rem;
}

.key-info-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-size: 0.78rem;
    font-weight: 600;
}

[data-theme="dark"] .key-info-item {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.property-contact-hint,
.property-updated {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}

[data-theme="dark"] .property-contact-hint,
[data-theme="dark"] .property-updated {
    color: #cbd5f5;
}

.properties-loading-overlay {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-weight: 500;
    backdrop-filter: blur(12px);
    direction: rtl;
}

[data-theme="dark"] .properties-loading-overlay {
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.24);
}

.properties-loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(37, 99, 235, 0.25);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: properties-loading-spin 0.8s linear infinite;
}

@keyframes properties-loading-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Leaflet Map Popup Styles */
.property-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 250px;
    line-height: 1.4;
}

.property-popup h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.property-popup p {
    margin: 4px 0;
    font-size: 14px;
    color: #34495e;
}

.property-popup .popup-link {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.property-popup .popup-link:hover {
    background: #2980b9;
}

/* Leaflet overrides for RTL support */
.leaflet-popup-content-wrapper {
    direction: rtl;
    text-align: right;
}

.leaflet-popup-tip {
    background: white;
}
