/*
Theme Name: Benaya Real Estate
Theme URI: https://benaya-eg.com
Author: Web Developer
Description: قالب عقاري متطور وسريع.
Version: 1.0
Text Domain: benaya
*/

/* BENAYA REAL ESTATE - MASTER STYLE SHEET 2026
   Branding: Royal Navy (#122333), Lime Green (#b8d962)
*/

:root {
    --primary: #122333;
    --accent: #b8d978;
    --sky: #7ebfc5;
    --white: #ffffff;
    --light-gray: #f4f7f6;
    --text-dark: #333333;
    --text-muted: #777777;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}


/* 1. التأسيس العام */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }
body { background-color: var(--white); color: var(--text-dark); direction: rtl; line-height: 1.7; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 2. الهيدر (Navigation) */
.main-header {
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo { font-size: 1.8rem; font-weight: 900; color: var(--primary); }
.logo span { color: var(--accent); }
.logo-en { display: block; font-size: 0.7rem; color: var(--text-muted); margin-top: -5px; }
.nav-links a { margin-right: 25px; font-weight: 700; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }


/* 4. كروت المشاريع (Project Cards) */
.section-header-sadan { text-align: center; margin-bottom: 50px; }
.line-decorator { width: 50px; height: 4px; background: var(--accent); margin: 15px auto; }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}
.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.project-card:hover { transform: translateY(-10px); }
.project-img-container { position: relative; height: 220px; }
.project-img-container img { width: 100%; height: 100%; object-fit: cover; }
.category-tag {
    position: absolute; top: 15px; right: 15px;
    background: var(--accent); color: var(--primary);
    padding: 4px 12px; border-radius: 5px; font-weight: bold; font-size: 0.8rem;
}
.card-content { padding: 25px; }
.card-content h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--primary); }
.price { color: var(--primary); font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; }
.price span { font-size: 0.9rem; font-weight: normal; }
.card-actions { display: flex; gap: 10px; }
.action-btn {
    flex: 1; padding: 10px; text-align: center;
    border-radius: 10px; font-weight: bold;
    border: 1px solid var(--primary); transition: 0.3s;
}
.action-btn:hover { background: var(--primary); color: white; }

/* 5. الفوتر (Footer) */
.main-footer { background: var(--primary); color: white; padding: 60px 0 20px; margin-top: 80px; }
.footer-logo { font-size: 2.5rem; font-weight: 900; margin-bottom: 10px; }
.footer-logo span { color: var(--accent); }

/* 6. شريط التواصل للموبايل (Mobile Contact Bar) */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    display: none; grid-template-columns: 1fr 1fr;
    z-index: 2000; box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
}
.nav-item { padding: 15px; text-align: center; color: white; font-weight: bold; font-size: 1.1rem; }
.nav-call { background: var(--primary); }
.nav-whatsapp { background: #25D366; }

/* 7. العودة للأعلى */
#backToTop {
    position: fixed; bottom: 80px; left: 20px;
    width: 45px; height: 45px; background: var(--accent);
    color: var(--primary); border: none; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); z-index: 1000;
}

/* 8. التجاوب (Responsive) */
@media (max-width: 768px) {
    .nav-links { display: none; } /* يفضل إضافة قائمة هامبرغر لاحقاً */
    .hero-text h1 { font-size: 2rem; }
    .bottom-nav { display: grid; }
    .hero-stats { flex-wrap: wrap; }
    main { padding-bottom: 70px; } /* لكي لا يغطي الشريط المحتوى */
}
/* تنسيق الشبكة الرباعية */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

/* تنسيق كروت المدن الصغيرة */
.city-card-small {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 15px;
    font-weight: bold;
    color: var(--primary);
    border: 1px solid transparent;
    transition: 0.3s;
}
.city-card-small:hover {
    border-color: var(--accent);
    background: white;
    transform: translateY(-5px);
}

/* تنسيق كرت المطور */
.dev-card {
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}
.dev-card:hover img {
    filter: grayscale(0%) !important;
}
/* ============================================= */
/* تنسيقات مدن مميزة (المحدثة من الصورة) */
/* ============================================= */

/* 1. تنسيق الشبكة الأساسي (The Main Grid) */
.cities-grid-advanced {
    display: grid;
    /* تخطيط الشبكة: 3 أعمدة، والصف الأخير له طول مختلف */
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(250px, auto));
    gap: 20px;
}

/* 2. تنسيق الكرت الكامل (The Full Card) */
.city-card-full {
    position: relative;
    border-radius: 20px;
    overflow: hidden; /* لإخفاء تجاوزات الصورة */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
    display: block;
    color: white; /* لون النص الأساسي للطبقة */
}
.city-card-full:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* 3. تنسيق صورة الخلفية (The Background Image) */
.city-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* لملء الكرت بالكامل */
    position: absolute;
    inset: 0;
    z-index: 1; /* خلف الطبقة */
}

/* 4. تنسيق الطبقة الشفافة التي تحتوي النص (The Text Overlay) */
.city-info-overlay {
    position: relative;
    z-index: 2; /* أمام الصورة */
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* توسيط النصوص عمودياً (مثل الصورة) */
    align-items: center; /* توسيط النصوص أفقياً */
    text-align: center;
}
.city-info-overlay h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 5px;
}
.city-info-overlay .projects-count {
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0.9;
}

/* 5. تنسيقات خاصة للتخطيط (المطابقة للصورة) */

/* كرت التجمع الخامس يأخذ عمودين عمودياً */
.tagamoa-featured {
    grid-row: 1 / 3; /* يمتد من الصف الأول للثالث */
}

/* كرت الشيخ زايد في الصف السفلي */
.zayed-card {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

/* الكروت الوهمية (Placeholders) في الصف السفلي لضبط التنسيق */
.placeholder-card {
    background: rgba(var(--primary-rgb), 0.05); /* لون خفيف جداً */
    border: 2px dashed rgba(var(--primary-rgb), 0.1);
}

/* 6. التجاوب مع الهواتف الذكية (Responsive) */
@media (max-width: 992px) {
    .cities-grid-advanced {
        grid-template-columns: 1fr 1fr; /* عمودين للشاشات المتوسطة */
    }
    .tagamoa-featured {
        grid-row: auto; /* إلغاء الامتداد الطولي */
    }
}
@media (max-width: 576px) {
    .cities-grid-advanced {
        grid-template-columns: 1fr; /* عمود واحد للموبايل */
    }
}
/* تنسيق بطاقات المشروعات الجديد */
.project-card-new {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: var(--transition);
}

.project-thumb {
    position: relative;
    height: 200px;
}

.project-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}

.dev-logo-small {
    position: absolute; bottom: 15px; left: 15px;
    background: #fff; padding: 5px; border-radius: 8px;
    width: 50px; height: 50px; box-shadow: var(--shadow);
}

.project-details { padding: 20px; text-align: center; }

.proj-category-tag {
    background: #7ebfc5; color: #122333;
    padding: 3px 15px; border-radius: 5px;
    font-size: 13px; font-weight: 700; display: inline-block;
}

.tag-commercial { background: #7ebfc5 !important; }

.proj-price {
    font-size: 20px; font-weight: 800; color: #b8d962; margin: 10px 0;
}

.proj-specs {
    display: flex; justify-content: center; gap: 10px; margin-bottom: 15px;
}

.proj-specs span {
    background: #f0f2f5; padding: 4px 10px;
    border-radius: 5px; font-size: 12px; border: 1px solid #ddd;
}

.project-details h3 {
    font-size: 16px; color: var(--primary);
    margin-bottom: 20px; line-height: 1.4; height: 42px; overflow: hidden;
}

.proj-contact-actions {
    display: flex; gap: 5px; border-top: 1px solid #eee; padding-top: 15px;
}

.btn-contact-small {
    flex: 1; border: 1px solid #ccc; padding: 8px 2px;
    border-radius: 8px; font-size: 12px; font-weight: 700;
    color: var(--primary); transition: 0.3s;
}

.btn-wa { color: #25D366; }

.btn-contact-small:hover { background: #f8f9fa; }

/* --- منيو الموبايل (Responsive Menu) --- */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: none; /* مخفي افتراضياً في الموبايل */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    .nav-links.active { display: flex; }
}

/* --- تنسيقات المحرر المتطور في لوحة التحكم --- */
.ck-editor__editable {
    min-height: 250px;
    color: #333 !important;
    direction: rtl !important;
    text-align: right !important;
}

/* --- تنسيق عرض المحتوى المنسق في صفحات العرض --- */
.formatted-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
}
.formatted-content h2, .formatted-content h3 { color: var(--primary); margin: 20px 0 10px; }
.formatted-content ul { padding-right: 25px; margin-bottom: 20px; }
.formatted-content img { max-width: 100%; border-radius: 15px; margin: 15px 0; }

/* تنسيقات محرك البحث */
.search-section {
    margin-top: -50px; /* لجعله يتداخل قليلاً مع الهيدر أو البانر */
    position: relative;
    z-index: 10;
}

.search-form input, .search-form select {
    outline: none;
    transition: 0.3s;
}

.search-form input:focus, .search-form select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(184, 217, 98, 0.2);
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
}

@font-face {
    font-family: 'Cairo';
    src: url('https://benaya-eg.com/benaya2/font/cairo.woff2') format('woff2');
    font-weight: 400 700; /* يدعم العادي والعريض */
    font-style: normal;
    font-display: swap; /* يمنع اختفاء النص أثناء التحميل */
}

/* تطبيق الخط على الموقع بالكامل */
body {
    font-family: 'Cairo', sans-serif !important;
}

