/*
Theme Name: ListingHive Child
Template: listinghive
Author: Ahmed Maher
Version: 1.2.4
*/

/* 1. دعم الاتجاهات والقوائم العربية */
body {
    text-align: right;
    direction: rtl;
    font-family: 'Cairo', sans-serif !important;
}

body.ltr {
    text-align: left;
    direction: ltr;
}

/* 2. تنسيق بطاقة العقار الاحترافية */
.hp-listing {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.hp-listing:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* 3. توحيد أحجام الصور (Aspect Ratio) */
.hp-listing__image img {
    width: 100% !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    display: block;
}

/* 4. الهوية البصرية الأساسية للموقع */
.hp-listing__action--primary, 
.button--primary,
.hp-link:hover {
    background-color: #c6a013 !important;
    border-color: #c6a013 !important;
    color: #fff !important;
}

.hp-listing__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

/* =========================================
   5. تنسيق الهيدر العلوي (اللون الكحلي الداكن)
   ========================================= */
header.site-header {
    background-color: #121e31 !important; /* لون كحلي غامق مطابق للتصميم */
    position: relative !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* ضبط محاذاة القائمة لليمين */
.header-navbar__menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* تحويل نصوص القائمة العلوية إلى اللون الأبيض */
.header-navbar__menu a {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* 6. تنسيق زر "إنشاء حساب / دخول" (البرتقالي/الذهبي) */
.menu-item--user-register a {
    background-color: #f6a86c !important;
    color: #121e31 !important; /* نص غامق ليتناسب مع الزر */
    padding: 10px 25px !important;
    border-radius: 8px !important; /* شكل مستطيلي */
    font-weight: bold !important;
    display: inline-block !important;
    margin-right: 15px !important;
    text-decoration: none !important;
    transition: 0.3s !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.menu-item--user-register a:hover {
    background-color: #e5965b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(246, 168, 108, 0.3);
}

/* تنسيق زر "تسجيل الدخول" في حال كان مفصولاً */
.hp-menu__item--user-login a, 
.menu-item--user-login a {
    color: #ffffff !important; /* أبيض ليظهر على الكحلي */
    font-weight: 600 !important;
    padding: 10px 15px !important;
    text-decoration: none !important;
    transition: 0.3s;
}

.hp-menu__item--user-login a:hover {
    color: #f6a86c !important;
}

/* 7. تنسيق النافذة المنبثقة (Pop-up Customization) */
.hp-window {
    border-radius: 15px !important;
}

.hp-window__title {
    font-weight: bold;
    color: #1a202c;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 15px;
}

select[name="role_type"] {
    border: 2px solid #c6a013 !important;
    background-color: #fffdf5 !important;
    font-weight: bold !important;
}

/* =========================================
   8. هندسة شريط البحث ليتوسط الزخارف (النمط الداكن)
   ========================================= */
.main-search-bar {
    max-width: 950px !important; /* تقييد العرض لكي لا يتجاوز الزخارف الجانبية */
    margin: -20px auto 0 !important; /* مرفوع قليلاً ليتقاطع مع المبنى */
    position: relative;
    z-index: 100;
}

.main-search-bar form {
    background-color: #121e31 !important; /* نفس لون الهيدر */
    border-radius: 12px !important;
    padding: 8px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
    border: none !important;
}

.main-search-bar .hp-form__field {
    flex: 1 !important;
    margin: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important; /* فواصل بيضاء شفافة */
    padding: 0 15px !important;
}

.main-search-bar .hp-form__field:last-of-type {
    border-left: none !important;
}

.main-search-bar label {
    display: none !important;
}

/* =========================================
   9. نصوص القوائم المنسدلة (اللون الأبيض)
   ========================================= */
.main-search-bar select,
.main-search-bar input[type="text"] {
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    font-size: 1.05rem !important;
    color: #ffffff !important; /* نصوص بيضاء */
    font-weight: 600 !important;
    font-family: 'Cairo', sans-serif !important;
}

.main-search-bar select {
    cursor: pointer !important;
    padding-right: 25px !important; /* مساحة لأيقونة السهم */
    appearance: none !important; /* إخفاء سهم المتصفح الافتراضي */
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20width%3D"292.4"%20height%3D"292.4"><path%20fill%3D"%23ffffff"%20d%3D"M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z"%2F><%2Fsvg>') !important; /* سهم أبيض */
    background-repeat: no-repeat !important;
    background-position: right center !important; /* يمين في العربية */
    background-size: 12px !important;
}

/* لضمان أن الخيارات داخل القائمة (عند فتحها) تظهر بلون غامق مقروء */
.main-search-bar select option {
    color: #121e31 !important;
    background-color: #ffffff !important;
}

.main-search-bar input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* =========================================
   10. زر البحث المستطيل (المطابق للتصميم)
   ========================================= */
.main-search-bar button {
    background-color: #f6a86c !important; /* لون برتقالي/ذهبي */
    color: #121e31 !important; /* نص كحلي */
    height: 50px !important;
    padding: 0 40px !important;
    border-radius: 8px !important; /* حواف ناعمة */
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    min-width: 220px !important; /* السر هنا: جعله مستطيلاً طويلاً */
    margin-right: 15px !important; /* مسافة بينه وبين الحقول */
    border: none !important;
    transition: 0.3s ease;
}

.main-search-bar button:hover {
    background-color: #e5965b !important; /* لون أغمق قليلاً عند التمرير */
    transform: translateY(-2px);
}

/* ضبط استجابة شريط البحث على الموبايل */
@media (max-width: 768px) {
    .main-search-bar form {
        flex-direction: column !important;
    }
    .main-search-bar .hp-form__field {
        border-left: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
        width: 100%;
        padding: 10px 0 !important;
    }
    .main-search-bar button {
        width: 100% !important;
        margin-right: 0 !important;
        margin-top: 15px !important;
    }
}