/*
Theme Name: Homeid Child Theme
Theme URI: https://homeid.g5plus.net/
Author: G5 Theme
Author URI: https://themeforest.net/user/g5theme
Description: Child theme for Homeid Theme
Version: 1.9.5
Template: homeid
Text Domain: homeid-child
*/

/* ============================================================
 * 1) فقط متغیرهای فونت — به هیچ وجه font-family رو روی * اجبار نکن
 * ============================================================ */
:root {
    --g5-body-font: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-primary-font: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-h1-font: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-h2-font: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-h3-font: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-h4-font: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-h5-font: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-h6-font: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-font-menu: "Vazirmatn", Tahoma, sans-serif !important;
    --g5-font-sub-menu: "Vazirmatn", Tahoma, sans-serif !important;
}

body,
h1, h2, h3, h4, h5, h6,
p, span, a, li, td, th, label,
input, select, textarea, button {
    font-family: "Vazirmatn", Tahoma, sans-serif !important;
}

/* آیکون‌ها: دست‌نخورده باقی می‌مونن — هیچ CSS برای font-family آیکون‌ها نزن */

/* ============================================================
 * 2) وسط‌چین کردن متن‌های social circle (بدون تغییر display)
 * ============================================================ */
.g5ere__agent-content.g5ere__loop-agent-social-circle,
.g5ere__loop-agent-social-circle {
    text-align: center !important;
}

.g5ere__loop-agent-social-circle ul,
.g5ere__loop-agent-social-circle .g5ere__social-networks,
.g5ere__loop-agent-social-circle .social-networks {
    text-align: center !important;
    justify-content: center !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
}

/* ============================================================
 * 3) حذف دکمه‌های افزودن آگهی و حساب کاربری
 * ============================================================ */
.g5core-header-customize-after_menu,
.g5core-header-customize.g5core-header-customize-after_menu {
    display: none !important;
}

/* ============================================================
 * 4) فاصله بین آیتم‌های منو
 * ============================================================ */
.menu-horizontal > .menu-item + .menu-item {
    margin-left: 35px !important;
}

/* ============================================================
 * 5) حذف نوار جستجوی بنفش (فقط صفحه اصلی)
 * ============================================================ */
.home .g5ere__search-form,
.home .g5ere__property-search-form,
.home .g5ere__search-form-wrapper {
    display: none !important;
}

/* ============================================================
 * 6) RTL
 * ============================================================ */
html, body {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================================
 * فاصله بین آیتم اول منو و لوگو (سمت راست)
 * ============================================================ */
.site-header .site-navigation .menu-horizontal > li:first-child,
.menu-horizontal > li.menu-item:first-child {
    padding-right: 30px !important;
    margin-right: 30px !important;
}

/* فاصله بین آیتم‌ها */
.menu-horizontal > .menu-item + .menu-item {
    padding-left: 35px !important;
}

/* اگه caret آیتم has-children به چپ چسبیده، فاصله بده */
.menu-horizontal > .menu-item.menu-item-has-children > a {
    padding-left: 20px !important;
    position: relative;
}

/* منو از چپ به جای center، flex-start (سمت راست) */
.site-header .site-navigation {
    justify-content: flex-start !important;
    -webkit-box-pack: start !important;
    -ms-flex-pack: start !important;
}

/* ============================================================
 * ۱) حذف تمام دکمه‌های اکشن از کارت ملک (گالری + علاقه‌مندی + مقایسه)
 * ============================================================ */
.g5ere__loop-property-actions,
.g5ere__loop-property-actions.g5ere__lpa-rounded {
    display: none !important;
}

/* ============================================================
 * ۲) اصلاح فاصله منو از لوگو
 * ============================================================ */

/* حذف justify-content: center از nav (این کلاس content-center رو خنثی می‌کنه) */
.g5core-site-header .g5core-primary-menu.site-menu.content-center {
    -webkit-box-pack: start !important;
    -ms-flex-pack: start !important;
    justify-content: flex-start !important;
}

/* فاصله بین آیتم‌های منو (هر آیتم از بعدی) */
.g5core-site-header .menu-horizontal > .menu-item + .menu-item {
    margin-left: 35px !important;
}

/* فاصله آیتم اول از لوگو (سمت راست) */
.g5core-site-header .menu-horizontal > .menu-item:first-child {
    margin-right: 40px !important;
}

/* مطمئن شدن که caret (فلش زیرمنو) فاصله مناسب داره */
.g5core-site-header .menu-horizontal > .menu-item-has-children > a .caret,
.g5core-site-header .menu-horizontal > .menu-item-has-children > a .x-caret {
    margin-left: 8px !important;
    margin-right: 4px !important;
}

/* ============================================================
 * RTL کامل برای sub-menu (زیرمنو)
 * ============================================================ */

/* ۱) زیرمنوی سطح ۱ — در سمت راست والد قرار بگیره */
.g5core-site-header .menu-horizontal > .menu-item-has-children > .sub-menu {
    left: auto !important;
    right: 0 !important;
    text-align: right !important;
}

/* ۲) زیرمنوهای تو در تو (سطح ۲ و ۳) — در سمت چپ والدشون (چون RTL) */
.g5core-site-header .sub-menu .menu-item-has-children > .sub-menu {
    left: 100% !important;
    right: auto !important;
}

/* ۳) آیتم‌های داخل sub-menu — RTL و راست‌چین */
.g5core-site-header .sub-menu li {
    text-align: right !important;
}

.g5core-site-header .sub-menu li > a {
    text-align: right !important;
    direction: rtl !important;
}

/* ۴) caret (فلش) — در سمت چپ متن قرار بگیره (RTL) */
.g5core-site-header .menu-horizontal > .menu-item-has-children > a .caret,
.g5core-site-header .menu-horizontal > .menu-item-has-children > a .x-caret {
    float: left !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
}

/* ۵) زیرمنوی mega menu — عرض container و راست‌چین */
.g5core-site-header .x-mega-sub-menu,
.g5core-site-header .menu-horizontal > .menu-item-has-children.x-submenu-width-container > .sub-menu {
    right: 0 !important;
    left: auto !important;
    text-align: right !important;
    direction: rtl !important;
}

/* ۶) آیتم‌های داخل mega menu */
.g5core-site-header .x-mega-sub-menu .ube-heading-title,
.g5core-site-header .x-mega-sub-menu .ube-list-icon-item,
.g5core-site-header .x-mega-sub-menu a {
    text-align: right !important;
    direction: rtl !important;
}

/* ۷) اطمینان از RTL بودن ul.sub-menu */
.g5core-site-header ul.sub-menu {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================================
 * حذف باکس‌ها و دکمه‌های صفحه ملک (single property)
 * ============================================================ */

/* ۱) باکس «محل» (نقشه) */
.g5ere__single-block.g5ere__property-block.g5ere__property-block-map {
    display: none !important;
}

/* ۲) باکس «مکان‌های نزدیک» */
.g5ere__single-block.g5ere__property-block.g5ere__property-block-nearby-places {
    display: none !important;
}

/* ۳) باکس «ماشین حساب وام مسکن» */
.g5ere__single-block.g5ere__property-block.g5ere__property-block-mortgage {
    display: none !important;
}

/* ۴) دکمه «زنگ زدن» در باکس تماس با کارشناس */
.g5ere__contact-actions-call,
.g5ere__contact-actions .g5ere__contact-actions-call {
    display: none !important;
}

/* ۵) دکمه «علاقه‌مندی» در هدر صفحه ملک */
.g5ere__property-meta-action .g5ere__property-actions li.favorite {
    display: none !important;
}

/* ۶) دکمه «مقایسه» در هدر صفحه ملک */
.g5ere__property-meta-action .g5ere__property-actions li.compare {
    display: none !important;
}