/* =========================================================
   Home Index Page
   تمام کلاس‌ها اختصاصی هستند تا قالب اصلی Override نشود.
========================================================= */

/* ======================
   Hero
====================== */
.home-hero__slide {
    height: 650px;
}

/* ======================
   Search Modal
====================== */
.home-search-modal__header {
    direction: rtl;
}

.home-search-tabs .nav {
    justify-content: center;
    gap: 10px;
}

.home-search-tabs a {
    min-width: 150px;
}

.home-search-form {
    direction: rtl;
}

.home-search-form .col-md-4,
.home-search-form .col-lg-4,
.home-search-form .col-lg-8,
.home-search-form .col-lg-12 {
    margin-top: 10px;
}

.home-search-form__submit {
    width: 100%;
    margin-top: 12px;
}

.home-select {
    min-height: 55px;
}

/* ======================
   Property Section
====================== */
.home-property-section__alert {
    text-align: center;
    width: 100%;
    color: var(--ltn__secondary-color);
    font-size: 18px;
    line-height: 1.9;
}

.home-property-section__more {
    width: 100%;
}

.home-empty-state {
    text-align: center;
    padding: 24px;
    border: 1px dashed rgba(0, 0, 0, .15);
    border-radius: 12px;
}

/* ======================
   Property Card
====================== */
.home-property-card {
    min-height: 620px;
}

.home-property-card__main-img {
    width: 368px !important;
    height: 282px !important;
    object-fit: cover;
}

.home-property-card__expert-img {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover;
}

.home-property-card__code {
    float: left;
    margin-top: 0 !important;
}

.home-property-card__call {
    float: left;
}

.home-property-card__call i {
    float: left;
    font-size: 30px;
    color: red;
}

/* ======================
   Experts
====================== */
.home-expert-card {
    min-height: 425px !important;
}

.home-expert-card__image {
    border-radius: 15px;
    width: 368px !important;
    height: 282px !important;
    object-fit: cover;
}

.home-expert-card__social i.fa-phone-volume {
    font-size: 18px;
    color: red;
}

/* ======================
   News
====================== */
.home-news-card {
    min-height: 425px !important;
}

.home-news-card__image {
    width: 368px !important;
    height: 230px !important;
    object-fit: cover;
}

.home-news-card__desc {
    min-height: 54px;
    line-height: 1.8;
}

/* ======================
   Chat
====================== */
.home-chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: #fff;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
}

.home-chat-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-color: rgba(0, 0, 0, .5);
    justify-content: right;
    align-items: stretch;
}

.home-chat-modal.is-open {
    display: flex;
}

.home-chat-modal__content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px 0 0 10px;
    width: 300px;
    height: 100%;
    text-align: center;
}

.home-chat-modal__close {
    position: absolute;
    top: 10px;
    right: 20px;
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

.home-chat-modal input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.home-chat-modal button:not(.home-chat-modal__close) {
    background-color: #007bff;
    color: #fff;
    padding: 10px;
    width: 100%;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.home-chat-modal button:not(.home-chat-modal__close):hover {
    background-color: #0056b3;
}

.home-chat-room {
    display: none;
}

.messages-box {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.user-message {
    background-color: #f1f1f1;
    text-align: right;
}

.admin-message {
    background-color: #007bff;
    color: #fff;
    text-align: right;
}

/* ======================
   Responsive
====================== */
@media (max-width: 768px) {
    .home-hero__slide {
        height: 520px;
    }

    .home-property-card,
    .home-expert-card,
    .home-news-card {
        min-height: auto !important;
    }

    .home-property-card__main-img,
    .home-expert-card__image,
    .home-news-card__image {
        width: 100% !important;
    }

    .home-chat-modal__content {
        width: 92%;
    }
}
.home-search-modal__content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
}

.home-search-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

    .home-search-modal__header h4 {
        margin: 0;
        font-weight: 800;
    }

.home-search-modal__close {
    border: 0;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.home-search-modal__body {
    direction: rtl;
    padding: 28px 36px 36px;
    background: #f6f9fb;
}

.home-search-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

    .home-search-tabs a {
        min-width: 180px;
        padding: 16px 22px;
        border-radius: 14px;
        background: #fff;
        color: #15252d;
        font-weight: 800;
        text-align: center;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    }

        .home-search-tabs a.active {
            background: var(--ltn__secondary-color);
            color: #fff;
        }

.home-search-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1f2937;
}

.home-search-form .col-lg-3,
.home-search-form .col-lg-4,
.home-search-form .col-lg-8,
.home-search-form .col-md-6 {
    margin-bottom: 18px;
}

.home-search-form .form-control,
.home-search-form .select2-container .select2-selection--single,
.home-search-form .select2-container .select2-selection--multiple {
    min-height: 56px;
    border: 1px solid #dbe5ec !important;
    border-radius: 12px !important;
    background: #fff;
}

.home-search-form .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
}

.home-search-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 56px;
    padding-right: 16px;
    color: #34444d;
}

.home-search-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 56px;
}



.home-search-form__submit {
    width: 100%;
    height: 60px;
    border-radius: 14px;
    font-weight: 900;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .home-search-modal__body {
        padding: 22px 16px;
    }

    .home-search-tabs {
        flex-direction: column;
    }

        .home-search-tabs a {
            width: 100%;
        }
}
.home-search-modal .modal-content {
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    background: #f7fafc;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.home-search-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
    padding: 22px 30px;
    background: #ffffff;
    border-bottom: 1px solid #e8eef3;
}

    .home-search-modal__header h4 {
        margin: 0;
        font-size: 22px;
        font-weight: 900;
        color: #102a33;
    }

.home-search-modal__close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 18px;
}

.home-search-modal__body {
    direction: rtl;
    padding: 34px 45px 45px;
}

.home-search-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 35px;
}

    .home-search-tabs a {
        min-width: 220px;
        padding: 20px 26px;
        border-radius: 18px;
        background: #ffffff;
        color: #102a33;
        font-weight: 900;
        font-size: 17px;
        text-align: center;
        box-shadow: 0 14px 35px rgba(15, 23, 42, .08);
    }

        .home-search-tabs a.active {
            background: #ff5a3c;
            color: #ffffff;
        }

    .home-search-tabs i {
        margin-left: 8px;
    }

.home-search-form {
    background: #ffffff;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid #e6eef5;
}

    .home-search-form label {
        display: block;
        margin-bottom: 10px;
        font-size: 15px;
        font-weight: 900;
        color: #102a33;
    }

    .home-search-form .col-lg-3,
    .home-search-form .col-lg-4,
    .home-search-form .col-lg-8,
    .home-search-form .col-md-6 {
        margin-bottom: 22px;
    }

    .home-search-form .form-control {
        height: 58px;
        border-radius: 16px;
        border: 1px solid #d9e5ec;
        background: #fbfdff;
        font-size: 15px;
        font-weight: 700;
        color: #22343c;
        padding: 0 18px;
    }

        .home-search-form .form-control:focus {
            border-color: #ff5a3c;
            box-shadow: 0 0 0 4px rgba(255, 90, 60, .12);
        }

    .home-search-form .select2-container {
        width: 100% !important;
    }

    .home-search-form .select2-selection--single,
    .home-search-form .select2-selection--multiple {
        min-height: 58px !important;
        border-radius: 16px !important;
        border: 1px solid #d9e5ec !important;
        background: #fbfdff !important;
    }

        .home-search-form .select2-selection--single .select2-selection__rendered {
            line-height: 58px !important;
            padding-right: 18px !important;
            padding-left: 35px !important;
            font-weight: 700;
            color: #22343c !important;
        }

        .home-search-form .select2-selection--single .select2-selection__arrow {
            height: 58px !important;
            left: 12px !important;
            right: auto !important;
        }

   /* .home-search-form .select2-selection--multiple {
        padding: 9px 12px !important;
    }*/

    .home-search-form .select2-selection__choice {
        border: 0 !important;
        border-radius: 999px !important;
        background: #ff5a3c !important;
        color: #fff !important;
        padding: 5px 12px !important;
        font-weight: 700;
    }

.home-search-form__submit {
    width: 100%;
    height: 62px;
    border-radius: 18px;
    margin-top: 10px;
    font-size: 18px;
    font-weight: 900;
    background: #ff5a3c;
    border: 0;
}

    .home-search-form__submit:hover {
        background: #e94d31;
    }

@media (max-width: 768px) {
    .home-search-modal {
        margin: 10px;
    }

    .home-search-modal__body {
        padding: 22px 16px;
    }

    .home-search-tabs {
        flex-direction: column;
    }

        .home-search-tabs a {
            min-width: 100%;
        }

    .home-search-form {
        padding: 18px;
    }
}

/* ======================
   Fix Modal Over Header/Menu
====================== */
#homeSearchModal {
    z-index: 99999 !important;
}

.modal-backdrop {
    z-index: 99990 !important;
}

#homeSearchModal .modal-dialog {
    margin-top: 30px;
    z-index: 100000 !important;
}

#homeSearchModal .modal-content {
    position: relative;
    z-index: 100001 !important;
}

/* ======================
   Fix Select2 Dropdown In Modal
====================== */
.select2-container--open {
    z-index: 100002 !important;
}

.select2-dropdown {
    z-index: 100003 !important;
    direction: rtl;
    text-align: right;
}

#homeSearchModal .select2-container {
    z-index: 100001 !important;
}

/* ======================
   Stable Property Card UI
====================== */

.home-property-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
    min-height: 520px;
    transition: .25s ease;
}

    .home-property-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 45px rgba(15, 23, 42, .13);
    }

.home-property-card__image {
    height: 220px !important;
    background: #f4f7f9;
    overflow: hidden;
    position: relative;
}

.home-property-card__main-img {
    width: 100% !important;
    height: 220px !important;
    max-height: 220px !important;
    object-fit: cover;
    display: block;
}

.home-property-card__expert-img {
    width: 52px !important;
    height: 52px !important;
    max-height: 52px !important;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #fff;
}

.home-property-card .real-estate-agent {
    position: absolute;
    top: 15px;
    right: 15px;
}

.home-property-card__body {
    padding: 18px 22px 14px;
}

.home-property-card .product-badge ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0;
}

.home-property-card .sale-badg {
    float: none !important;
    margin: 0 !important;
    color: #ff5a3c;
    background: transparent;
    font-size: 14px;
    font-weight: 800;
}

.home-property-card__code {
    color: #64748b !important;
}

.home-property-card__title {
    font-size: 19px;
    font-weight: 900;
    line-height: 1.7;
    min-height: 42px;
    margin-bottom: 10px;
}

    .home-property-card__title a {
        color: #102a33;
    }

.home-property-card .product-img-location a {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.home-property-card .product-img-location i {
    color: #ff5a3c;
    margin-left: 5px;
}

.home-property-card__features {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0 !important;
    margin-top: 14px !important;
}

    .home-property-card__features li {
        float: none !important;
        list-style: none;
        flex: 1;
        min-height: 58px;
        padding: 8px 6px;
        border-radius: 12px;
        background: #f8fafc;
        text-align: center;
        font-size: 13px;
        font-weight: 700;
        color: #64748b;
    }

        .home-property-card__features li span {
            display: block;
            margin-top: 4px;
            color: #102a33;
            font-weight: 900;
        }

.home-property-card__call {
    background: #fff1ee !important;
    color: #ff5a3c !important;
}

    .home-property-card__call i {
        float: none !important;
        color: #ff5a3c !important;
        font-size: 22px !important;
    }

.home-property-card__footer {
    border-top: 1px solid #edf2f7;
    padding: 16px 18px;
    background: #fff;
}

    .home-property-card__footer .product-price {
        text-align: center;
    }

        .home-property-card__footer .product-price span {
            color: #ff5a3c;
            font-size: 16px;
            font-weight: 900;
            line-height: 1.9;
        }

/* اگر قالب اصلی روی همه عکس‌ها max-height داده باشد */
.home-property-card img {
    max-height: none !important;
}

/* موبایل */
@media (max-width: 768px) {
    .home-property-card {
        min-height: auto;
    }

    .home-property-card__image,
    .home-property-card__main-img {
        height: 210px !important;
    }

    .home-property-card__features {
        flex-wrap: wrap;
    }

        .home-property-card__features li {
            flex: 0 0 calc(50% - 5px);
        }
}