/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', Arial, sans-serif;
    direction: rtl;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الهيدر */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #ffd700;
}

/* القسم الرئيسي */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* قسم العقارات */
.properties {
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.properties h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    font-weight: 700;
}

.property-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 20px;
}

.property-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.property-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.property-info {
    padding: 1.5rem;
}

.property-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.price {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.location {
    color: #666;
    margin-bottom: 1rem;
}

.feature {
    display: inline-block;
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0.2rem;
    color: #555;
}

.property-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 1rem 0;
}

.view-details {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    margin-top: 1rem;
}

.view-details:hover {
    background: #218838;
}

/* رسائل الحالة */
.no-properties, .error {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    grid-column: 1 / -1;
}

.no-properties h4 {
    color: #666;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* الفوتر */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .property-list {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .properties h3 {
        font-size: 2rem;
    }
}

/* تحسينات إضافية */
.btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* تأثيرات التحميل */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* تحسين الطباعة */
@media print {
    header, footer, nav {
        display: none;
    }
    
    .property-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}
