/* استيراد الخطوط الاحترافية */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&family=Montserrat:wght@400;600;800&display=swap');

:root {
    --primary-bg: #F6EEE3;       /* لون الخلفية الكريمي */
    --white: #FFFFFF;           /* اللون الأبيض للبطاقات */
    --accent-gold: #D7AD77;      /* اللون الذهبي */
    --text-dark: #141414;        /* لون النصوص */
    --text-gray: #5A5A5A;        /* النصوص الثانوية */
    --soft-border: 1px solid rgba(0,0,0,0.08);
    --card-radius: 24px;
    --header-green: #516559;     /* لون الهيدر الجديد */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Tajawal', 'Montserrat', sans-serif; }
body { background-color: var(--primary-bg); color: var(--text-dark); line-height: 1.5; overflow-x: hidden; }

/* ============================================================
   تحديثات الهيدر الاحترافية (توزيع العناصر + إلغاء الفلتر)
   ============================================================ */
.main-header { 
    background: var(--header-green); 
    width: 100%; 
    z-index: 1000; 
    position: relative; 
    padding: 15px 0; 
    border-bottom: 3px solid var(--accent-gold); 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    direction: ltr; /* لضمان ترتيب الأيقونات من اليسار لليمين برمجياً */
}

/* توزيع المساحات لضمان سنترة اللوجو */
.header-right, .header-left { flex: 1; display: flex; align-items: center; }
.header-center { flex: 2; text-align: center; order: 2; }
.header-right { order: 3; justify-content: flex-end; } /* الهامبرجر يمين */
.header-left { order: 1; justify-content: flex-start; }  /* الأدمن يسار */

/* اللوجو - إلغاء الفلتر تماماً */
.header-center img {
    max-height: 80px;
    width: auto;
    filter: none !important;
    display: inline-block;
    vertical-align: middle;
}

/* تنسيق الروابط داخل القائمة المنسدلة */
.nav-item-link {
    color: #fff; 
    padding: 12px 20px; 
    display: block; 
    text-decoration: none; 
    font-size: 0.9rem;
    text-align: right;
    transition: 0.3s;
}
.nav-item-link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent-gold) !important;
}

/* ============================================================
   تنسيقات المحتوى الأصلية (البحث، الشبكة، البطاقات)
   ============================================================ */

/* شريط البحث Pill-shaped */
.search-filter-container { padding: 30px 5%; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.filter-item, .search-input { background: var(--white); border: var(--soft-border); padding: 12px 25px; border-radius: 50px; font-size: 14px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); min-width: 180px; outline: none; }
.filter-btn { background: var(--accent-gold); color: white; font-weight: 700; padding: 12px 35px; border-radius: 50px; border: none; cursor: pointer; transition: 0.3s; }
.filter-btn:hover { background: #b88a5d; transform: translateY(-2px); }

/* شبكة البروفايلات */
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; padding: 20px 5%; max-width: 1300px; margin: 0 auto; }
.profile-card { background: var(--white); border-radius: var(--card-radius); overflow: hidden; border: var(--soft-border); transition: 0.4s; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.profile-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

.card-image-container { position: relative; width: 100%; height: 380px; }
.profile-img { width: 100%; height: 100%; object-fit: cover; }

/* الشارات داخل الكارت */
.price-badge { position: absolute; bottom: 15px; left: 15px; background: var(--accent-gold); color: white; padding: 5px 15px; border-radius: 50px; font-weight: bold; }
.verify-badge { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.9); color: #2ecc71; padding: 5px 12px; border-radius: 50px; font-size: 12px; font-weight: bold; }

.card-content { padding: 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.status-dot { width: 10px; height: 10px; background: #2ecc71; border-radius: 50%; }
.location { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 15px; }

.view-btn { display: block; width: 100%; text-align: center; padding: 12px; background: #FAF6F0; border: 1px solid var(--accent-gold); color: var(--accent-gold); text-decoration: none; border-radius: 50px; font-weight: bold; transition: 0.3s; }
.view-btn:hover { background: var(--accent-gold); color: white; }

/* صفحة البروفايل */
.profile-shell { max-width: 1200px; margin: 30px auto; padding: 25px; background: var(--white); border-radius: var(--card-radius); border: var(--soft-border); }
.info-table td { padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.03); font-size: 15px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 15px; }
.gallery-item { width: 100%; height: 100px; object-fit: cover; border-radius: 12px; cursor: pointer; border: var(--soft-border); }

/* أزرار الإدمن */
.admin-btn { padding: 8px 20px; border-radius: 50px; text-decoration: none; font-weight: bold; transition: 0.3s; border: 1px solid; }

/* ============================================================
   تحديثات التجاوب مع الموبايل المتقدمة
   ============================================================ */

@media (max-width: 768px) {
    /* تعديل توزيع الهيدر في الموبايل */
    .header-center img {
        max-height: 70px; /* تصغير اللوجو ليناسب الشاشة */
    }
    
    .admin-text {
        display: ; /* إخفاء النص وترك الأيقونة لتوفير مساحة */
    }

    .header-left, .header-right {
        display: flex !important; /* ضمان عدم اختفاء أيقونة الأدمن أو المنيو */
    }

    /* ضبط شريط البحث والفلترة في الموبايل */
    .search-filter-container {
        flex-direction: column;
        padding: 20px;
    }

    .filter-item, .search-input, .filter-btn {
        width: 100%;
        min-width: unset;
    }

    /* ضبط شبكة البروفايلات في الموبايل */
    .profiles-grid {
        grid-template-columns: 1fr !important;
        padding: 15px;
    }

    .card-image-container {
        height: 320px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sticky-sidebar {
        position: static !important;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .header-center img {
        max-height: 45px;
    }
    
    .card-content {
        padding: 15px;
    }

    .price-badge {
        font-size: 12px;
        padding: 4px 12px;
    }
}