/**
 * Modern Property Cards Styles
 * استایل‌های مدرن برای کارت‌های املاک
 */

/* Properties Container */
.properties-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 0;
}

/* Modern Property Card */
.property-card.modern-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    min-height: 420px;
}

.property-card.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #dc2626;
}

[data-theme="dark"] .property-card.modern-card {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .property-card.modern-card:hover {
    border-color: #ef4444;
}

/* Property Image */
.property-card .property-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
}

.property-card .property-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 30px 30px;
    background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
    opacity: 0.3;
}

/* Property Badges */
.property-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.property-price-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.property-title-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
    max-width: 90%;
    line-height: 1.3;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    backdrop-filter: blur(10px);
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: #ef4444;
    color: white;
}

.favorite-btn.active:hover {
    background: #dc2626;
}

.favorite-btn i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Property Content */
.property-card .property-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
}

.property-card .property-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .property-card .property-title {
    color: #f9fafb;
}

.property-card .property-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .property-card .property-location {
    color: #9ca3af;
}

.property-card .property-location i {
    color: #ef4444;
    font-size: 0.875rem;
}

/* Property Features */
.property-card .property-features {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: #f3f4f6;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

[data-theme="dark"] .feature-badge {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

.feature-badge:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

[data-theme="dark"] .feature-badge:hover {
    background: #4b5563;
    border-color: #6b7280;
}

.feature-badge i {
    font-size: 0.75rem;
    color: #6b7280;
}

[data-theme="dark"] .feature-badge i {
    color: #9ca3af;
}

/* Property Price */
.property-card .property-price-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .property-card .property-price-main {
    color: #ef4444;
}

/* Features List */
.property-card .property-features-list {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.4;
}

[data-theme="dark"] .property-card .property-features-list {
    color: #9ca3af;
}

/* Property Agent */
.property-card .property-agent {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

[data-theme="dark"] .property-card .property-agent {
    border-color: #374151;
}

.property-card .agent-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
    color: #374151;
}

[data-theme="dark"] .property-card .agent-info {
    color: #d1d5db;
}

.agent-icon {
    color: #6b7280 !important;
    font-size: 0.75rem;
}

[data-theme="dark"] .agent-icon {
    color: #9ca3af !important;
}

.verified-icon {
    color: #10b981 !important;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.property-card .agent-company {
    font-size: 0.75rem;
    color: #6b7280;
    padding-right: 1.25rem;
}

[data-theme="dark"] .property-card .agent-company {
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .properties-table {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .properties-table {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .property-card.modern-card {
        min-height: 380px;
    }
    
    .property-card .property-image {
        height: 180px;
    }
    
    .property-card .property-content {
        padding: 1rem;
        height: calc(100% - 180px);
    }
    
    .property-card .property-title {
        font-size: 1rem;
    }
    
    .property-card .property-features {
        gap: 0.375rem;
    }
    
    .feature-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.6875rem;
    }
    
    .property-price-badge {
        font-size: 0.8125rem;
        padding: 6px 10px;
    }
    
    .property-type-badge {
        font-size: 0.6875rem;
        padding: 4px 10px;
    }
    
    .favorite-btn {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
    }
    
    .favorite-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .properties-table {
        padding: 0 0.5rem;
    }
    
    .property-card.modern-card {
        min-height: 360px;
        border-radius: 12px;
    }
    
    .property-card .property-image {
        height: 160px;
    }
    
    .property-card .property-content {
        padding: 0.875rem;
        height: calc(100% - 160px);
    }
    
    .property-title-overlay {
        font-size: 0.9rem;
    }
}

/* Animation for new cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-card[data-aos="fade-up"] {
    animation: fadeInUp 0.4s ease-out;
}

/* Loading state */
.property-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.property-card.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Hover effects */
.property-card.modern-card:hover .property-image {
    transform: scale(1.02);
}

.property-card.modern-card:hover .property-title {
    color: #dc2626;
}

[data-theme="dark"] .property-card.modern-card:hover .property-title {
    color: #ef4444;
}