/* -------------------------------------------------- */
/* 1. إعدادات عامة (General Settings) */
/* -------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0a;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Playfair Display', serif;
}

/* -------------------------------------------------- */
/* 2. الهيدر (Header) */
/* -------------------------------------------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    position: absolute;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d4af37;
    /* Gold */
}

nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
}

nav a:hover {
    color: #d4af37;
}

#lang-btn {
    background: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    margin-left: 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    transition: 0.3s;
}

#lang-btn:hover {
    background: #d4af37;
    color: #000;
}

/* -------------------------------------------------- */
/* 3. واجهة الموقع (Hero Section) */
/* -------------------------------------------------- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* ده السطر المهم اللي بيحط الصورة */
    background: url('images/hero-bg.jpg') no-repeat center center/cover;
    /* لون احتياطي لو الصورة لسه بتحمل */
    background-color: #000;
}

/* تعديل مهم للفيديو عشان يملأ الشاشة صح */
.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* سحر بيخلي الفيديو يغطي الشاشة بدون مط */
    transform: translate(-50%, -50%);
    opacity: 0.5;
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.btn-main {
    padding: 15px 40px;
    background: #d4af37;
    color: #000;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: 0.3s;
    text-transform: uppercase;
}

.btn-main:hover {
    background: #fff;
}

/* -------------------------------------------------- */
/* 4. قسم العقارات (Properties) */
/* -------------------------------------------------- */
.properties-section {
    padding: 80px 8%;
    background: #0f0f0f;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    color: #d4af37;
    font-size: 2.5rem;
}

/* --- (تمت الإضافة) تنسيق أزرار الفلتر المفقود --- */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 1px solid #333;
    background: transparent;
    color: #fff;
    cursor: pointer;
    border-radius: 50px;
    transition: 0.3s;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background: #d4af37;
    color: #000;
    border-color: #d4af37;
}

/* الشبكة (Grid) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* الكروت (Cards) */
.card {
    background: #141414;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    border-color: #d4af37;
}

/* --- (تم التعديل) إصلاح مشكلة انكماش الصور --- */
.card-image {
    width: 100%;
    /* عرض كامل */
    height: 300px;
    /* طول ثابت */
    min-height: 300px;
    /* إجبار المتصفح على الطول ده */
    background-color: #222;
    /* لون رصاصي يظهر لو الصورة لسه بتحمل */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    cursor: pointer;
    transition: transform 0.5s;
}

.card:hover .card-image {
    transform: scale(1.05);
    /* زووم بسيط عند الهوفر */
}

.card-actions {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.icon-btn:hover {
    background: #d4af37;
    color: #000;
    border-color: #d4af37;
}

.card-info {
    padding: 25px;
    position: relative;
    background: #141414;
    z-index: 6;
}

.card-info h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.price {
    color: #d4af37;
    font-size: 1.2rem;
    font-weight: bold;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

/* -------------------------------------------------- */
/* 5. نموذج التواصل (Contact Form) */
/* -------------------------------------------------- */
.contact-section {
    padding: 80px 8%;
    background: #050505;
}

.contact-container {
    max-width: 600px;
    margin: auto;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #d4af37;
}

/* -------------------------------------------------- */
/* 6. الشات بوت (Chatbot) */
/* -------------------------------------------------- */
.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1000;
    width: 320px;
}

.chat-header {
    background: #d4af37;
    color: #000;
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.chat-body {
    background: #1a1a1a;
    height: 350px;
    border: 1px solid #d4af37;
    display: flex;
    /* لازم يكون flex عشان الرسايل تظهر */
    flex-direction: column;
}

#chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 0.9rem;
}

#chat-input {
    border: none;
    border-top: 1px solid #333;
    padding: 15px;
    width: 100%;
    background: #222;
    color: #fff;
    outline: none;
}

/* -------------------------------------------------- */
/* 7. الفوتر وزر الواتساب */
/* -------------------------------------------------- */
footer {
    background: #000;
    padding: 50px;
    text-align: center;
    border-top: 1px solid #222;
}

.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* -------------------------------------------------- */
/* 8. النوافذ المنبثقة (Modals) */
/* -------------------------------------------------- */
.modal {
    display: none;
    /* مخفي افتراضياً */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content-img {
    max-width: 90%;
    max-height: 80vh;
    border: 2px solid #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

#map-container,
#panorama {
    width: 80%;
    height: 70vh;
    background: #fff;
    border: 2px solid #d4af37;
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 45px;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: #d4af37;
}

/* للموبايل */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    #map-container,
    #panorama {
        width: 95%;
        height: 50vh;
    }

    .chat-widget {
        width: 280px;
        right: 20px;
    }
}