﻿/* =====================================================
   HOME PAGE SCOPE / TOKENS
   ===================================================== */
.home-page {
    --home-primary: #00B1FE;
    --home-danger: #ef4444;
    --home-text: #0f172a;
    --home-muted: #64748b;
    --home-border: #e5e7eb;
    --home-card-bg: #ffffff;
    --home-radius-sm: 10px;
    --home-radius-md: 14px;
    --home-radius-pill: 999px;
    --home-shadow-soft: 0 10px 30px rgba(15, 23, 42, .15);

    min-width: 0;
    background: #ededed;
}

.img_logo_header {
    width: auto;
    height: 3rem;
}

.view-count-wrapper span:first-child {
    margin-right: 8px;
}


.hn-global-back-btn {
   display:none !important;
    z-index: -1 !important;
}
.hn-chatbox {
    display: none
}
.home-page .fa-message {
    color: #fff;
}


/* =====================================================
   HOME VIEW HELPERS
   ===================================================== */
.home-account-caret {
    font-size: 12px;
    opacity: .8;
}

.home-city-select-source {
    display: none;
}

.home-load-more-sentinel {
    height: 1px;
}

.home-featured-section {
    margin: 0;
}

.home-featured-section--spaced {
    margin-bottom: 24px;
}

.property-view-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.property-view-count i {
    flex: 0 0 auto;
}

.property-view-count .js-view-count-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.property-view-count .js-view-count-number,
.property-view-count .js-view-count-label {
    display: inline-block;
    white-space: nowrap;
}


/* =====================================================
   HERO
   ===================================================== */
.home-hero {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 3 / 1;
    min-height: 0;
    overflow: hidden;
    background-color: #f5f7fb;
    background-image: var(--hero-bg, url('/Assets/Cities/Banner.jpg'));
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
    background-attachment: fixed;
}

    .home-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 2;
        background: rgba(0, 0, 0, .30);
        pointer-events: none;
    }

    .home-hero::before {
        content: none;
    }

    /* iOS fixed fallback */
    .home-hero.ios-fixed {
        background-image: none !important;
    }

        .home-hero.ios-fixed::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 1;
            background-image: var(--hero-bg, url('/Assets/Cities/Banner.jpg'));
            background-repeat: no-repeat;
            background-position: center center;
            background-size: cover;
            pointer-events: none;
        }

.home-hero-shell {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 90%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 28px 12px 120px;
    box-sizing: border-box;
}

.home-hero-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.home-header-left-box {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: .2rem;
    min-width: 0;
}

.home-header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.home-header-left-top {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .6) !important;
}

.home-header-left-tagline {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: .15rem;
    color: #fff;
    font-size: .75rem !important;
    line-height: 1.25;
    opacity: .9;
}

    .home-header-left-tagline span {
        display: inline-block;
    }

.home-header-right-box {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
    text-align: right;
}

.home-header-right-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    font-size:1.1rem;
}

    .home-header-right-top > * {
        flex: 0 0 auto;
    }

    .home-header-right-top > a,
    .home-header-right-top .account-trigger,
    .home-header-right-top .nav-post,
    .home-header-right-top .header-favorite-link,
    .home-header-right-top .favorite-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: clamp(33px, 3vw, 38px);
        padding: 0 clamp(12px, 1.4vw, 16px);
        color: white !important;
       /* background: rgba(255, 255, 255, .96);*/
        border: 1px solid rgba(46, 144, 250, .16);
        border-radius: 999px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
        font-size: clamp(.82rem, 1vw, .94rem);
        font-weight: 700;
        text-decoration: none !important;
        text-shadow: none !important;
        white-space: nowrap;
        transition: .2s ease;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

        .home-header-right-top > a:hover,
        .home-header-right-top .account-trigger:hover,
        .home-header-right-top .nav-post:hover,
        .home-header-right-top .header-favorite-link:hover,
        .home-header-right-top .favorite-link:hover {
            transform: translateY(-1px);
            border-color: rgba(46, 144, 250, .35);
            text-decoration: none !important;
        }

    .home-header-right-top .nav-post {
        color: #fff !important;
        background: var(--home-primary);
        border-color: transparent;
        box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
    }

        .home-header-right-top .nav-post:hover {
            background: var(--home-primary);
        }

.account-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 clamp(12px, 1.4vw, 16px);
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

    .account-trigger i {
        text-shadow: none !important;
    }

.home-header-right-bottom {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 6px 12px;
    color: #64748b;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
    font-size: clamp(.78rem, .95vw, .86rem);
    font-weight: 700;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

    .home-header-right-bottom a {
        margin: 0;
        color: #64748b !important;
        text-decoration: none !important;
        text-shadow: none !important;
    }

        .home-header-right-bottom a:hover {
            color: #1e40af !important;
            text-decoration: none !important;
        }

        .lang-active,
        .home-header-right-bottom a.lang-active {
            color: #00B1FE !important;
            font-weight: 800;
            text-decoration: none !important;
        }

.home-hero-main {
    width: 100%;
    max-width: 900px;
    margin: auto auto 0;
}

.home-main-text {
    margin-bottom: 14px;
}

.home-main-title {
    margin: 0 auto;
    color: #fff;
    font-size: clamp(1.8rem, 2.5vw, 3rem);
    font-weight: 700;
    line-height: 1.18;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .6) !important;
}

.home-sub-title {
    width: min(92%, 900px);
    margin: 8px auto 0;
    color: #fff;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.35;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .6) !important;
}

.home-main-search {
    position: relative;
    margin-top: 18px;
    padding-top: 0;
}


/* =====================================================
   SEARCH
   ===================================================== */

.home-search-tabs-strip {
    width: 91%;
    margin: 0 auto .8rem;
}

.home-search-tabs {
    position: relative;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    padding: 2px 24px;
    background: transparent;
    border-radius: 4px 4px 0 0;
}

.home-search-tab-btn {
    padding: 0 16px;
    color: white;
    background: transparent;
    border: none;
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 500;
    cursor: pointer;
}

    .home-search-tab-btn.active {
        color: #fff;
        background: transparent;
        box-shadow: none;
        font-weight: bold;
        text-shadow: 0 2px 4px rgba(0, 0, 0, .6) !important;
    }

.home-search-tabs-pointer {
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 0;
    border-color: #fff transparent transparent;
    opacity: 0;
    transform: translateX(-50%);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.home-search-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 90%;
    max-width: 1080px;
    min-width: 0;
    margin: 0 auto;
    padding: 8px 10px 6px;
    box-sizing: border-box;
    background: var(--home-card-bg);
    border-radius: 12px;
    box-shadow: var(--home-shadow-soft);
    overflow: hidden;
}

.home-search-top {
    display: flex;
    align-items: center;
    gap: clamp(6px, .9vw, 12px);
    min-width: 0;
    padding: 2px 4px 0;
    border-radius: var(--home-radius-sm);
}

.home-search-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 8px;
    border-radius: var(--home-radius-sm);
}

    .home-search-input-wrap input {
        width: 100%;
        min-width: 0;
        height: 38px;
        color: #111827;
        background: transparent;
        border: none;
        outline: none;
        border-radius: 20px;
        font-size: clamp(13px, .9vw, 14px);
    }

.home-search-btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    color: #fff;
    background: var(--home-primary);
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
}

    .home-search-btn-main:hover {
        background: var(--home-primary);
    }

.home-search-bottom {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: clamp(8px, 1vw, 12px);
    width: 100%;
    min-width: 0;
    margin-top: 2px;
    padding: 4px 8px 2px;
    border-top: 1px solid var(--home-border);
    border-radius: var(--home-radius-sm);
}

.home-search-filter {
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    color: #4b5563;
    font-size: .8rem;
    border-radius: var(--home-radius-sm);
}

.home-search-bottom > .home-search-filter:first-child {
    flex: 0 0 clamp(110px, 12vw, 150px);
    max-width: clamp(110px, 12vw, 150px);
}

.home-search-filter-city-fixed {
    width: clamp(110px, 12vw, 150px);
    min-width: clamp(110px, 12vw, 150px);
    max-width: clamp(110px, 12vw, 150px);
}

.home-search-city-display {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    height: 26px;
    min-height: 26px;
    padding: 0 7px;
    box-sizing: border-box;
    color: #00B1FE;
    font-size: clamp(12px, .85vw, 14px);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-search-city-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 14px;
    min-width: 14px;
    color: #ef4444;
    font-size: 13px;
    font-style: normal;
    line-height: 1;
}

.home-search-city-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-search-filter-ward {
    flex: 0 0 clamp(170px, 22vw, 284px);
    max-width: clamp(170px, 22vw, 284px);
}

.home-search-filter-select2 {
    flex: 1 1 clamp(145px, 18vw, 280px);
    min-width: 0;
}

.home-search-filter-select {
    width: 100%;
    height: 26px;
    padding-left: 7px;
    color: #4b5563;
    background: transparent;
    border: none;
    outline: none;
    font-size: .8rem;
    cursor: pointer;
    appearance: none;
}

.home-search-wrapper,
.home-search-top,
.home-search-bottom,
.home-search-filter,
.home-search-city-display,
.home-search-city-text,
.home-search-filter-ward,
.home-search-filter-select2 {
    min-width: 0;
    max-width: 100%;
}


    /* =====================================================
   SELECT2
   ===================================================== */

    .home-search-filter-ward .select2-container,
    .home-search-filter-select2 .select2-container,
    .home-search-filter-ward-fixed .select2-container {
        width: 100% !important;
    }

    .home-search-filter-ward .select2-selection--single,
    .home-search-filter-select2 .select2-selection--single {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        height: 26px !important;
        min-height: 26px !important;
        padding-left: 5%;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .home-search-filter-ward .select2-selection__rendered,
    .home-search-filter-select2 .select2-selection__rendered {
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 22px !important;
        padding-left: 0 !important;
        box-sizing: border-box !important;
        color: #4b5563 !important;
        font-size: .8rem !important;
        line-height: 26px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .home-search-filter-ward .select2-selection__arrow,
    .home-search-filter-select2 .select2-selection__arrow {
        right: 0 !important;
        height: 26px !important;
    }

    .home-search-filter-ward .select2-selection--single:has(.select2-selection__clear) .select2-selection__arrow,
    .home-search-filter-select2 .select2-selection--single:has(.select2-selection__clear) .select2-selection__arrow {
        display: none !important;
    }

    .home-search-filter-ward .select2-container--default.select2-container--focus .select2-selection--single,
    .home-search-filter-ward .select2-container--open .select2-selection--single,
    .home-search-filter-select2 .select2-container--default.select2-container--focus .select2-selection--single,
    .home-search-filter-select2 .select2-container--open .select2-selection--single {
        border: none !important;
        box-shadow: none !important;
    }

    .home-search-filter-ward .select2-selection__clear,
    .home-search-filter-select2 .select2-selection__clear {
        position: absolute !important;
        top: 45% !important;
        right: 1px !important;
        z-index: 3 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 18px !important;
        height: 18px !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #4b5563 !important;
        border-radius: 999px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        transform: translateY(-50%) !important;
    }

        .home-search-filter-ward .select2-selection__clear:hover,
        .home-search-filter-select2 .select2-selection__clear:hover {
            color: #ef4444 !important;
        }

.select2-dropdown {
    overflow: hidden;
    border: 1px solid #dbe3ee !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.select2-search--dropdown {
    padding: 10px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
}

    .select2-search--dropdown .select2-search__field {
        padding: 8px 10px !important;
        border: 1px solid #dbe3ee !important;
        border-radius: 8px !important;
        font-size: 14px !important;
    }

.select2-results__option {
    padding: 10px 12px !important;
    font-size: 11px !important;
}

.select2-results__option--highlighted[aria-selected] {
    color: #fff !important;
    background: #2563eb !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #000 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    width: 100% !important;
    color: #00B1FE !important;
}

.select2-container.select2-container--default.select2-container--open {
    margin-right: 2%;
}


/* =====================================================
   SEARCH RESULT / FEATURED SWITCH
   ===================================================== */

.search-results-desktop,
.home-featured-desktop {
    display: block;
}

.search-results-mobile,
.home-featured-mobile {
    display: none;
}

.home-featured-mobile {
    margin-top: 16px;
}


/* =====================================================
   BODY / SECTION
   ===================================================== */

.body-content {
    display: flow-root;
}

.home-body-container {
    position: relative;
    z-index: 1;
    display: flow-root;
    clear: both;
    max-width: 1200px;
    margin: 24px auto 0px;
    box-sizing: border-box;
    padding-bottom: 20px;
}

.search-results-desktop,
.search-results-mobile,
.home-featured-desktop,
.home-featured-mobile,
.featured-mobile-list,
.property-row-list {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

    .search-results-mobile::after,
    .home-featured-mobile::after,
    .featured-mobile-list::after,
    .property-row-list::after,
    .home-body-container::after {
        content: "";
        display: block;
        clear: both;
    }

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

    .home-section-header h2 {
        position: relative;
        margin: 0;
        padding-left: 18px;
        color: #111827;
        font-size: 30px;
        font-weight: 800;
        line-height: 1.25;
        letter-spacing: -.2px;
    }

        .home-section-header h2::before {
            content: "";
            position: absolute;
            top: 50%;
            left: 0;
            width: 6px;
            height: 30px;
            background: var(--home-danger);
            border-radius: 999px;
            box-shadow: 0 4px 10px rgba(239, 68, 68, .22);
            transform: translateY(-50%);
        }

.home-section-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #374151 !important;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all .18s ease;
}

    .home-section-more:hover {
        color: #111827 !important;
        border-color: #d1d5db;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .10);
        text-decoration: none !important;
        transform: translateY(-1px);
    }

    .home-section-more i {
        font-size: 12px;
        opacity: .9;
    }

.property-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}


/* =====================================================
   FEATURED MOBILE TABS
   ===================================================== */

.featured-mobile-tabs {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 2px;
    margin: 0;
    background: #e5e7eb;
    border-radius: 999px;
    white-space: nowrap;
}

.fm-tab-btn {
    padding: 6px 14px;
    color: var(--home-text);
    background: transparent;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

    .fm-tab-btn.active {
        color: #fff;
        background: #0f172a;
        font-weight: 700;
    }

.featured-mobile-list {
    display: none !important;
}

    .featured-mobile-list.active {
        display: block !important;
    }

        .featured-mobile-list.active > .property-row-list {
            display: flex !important;
            flex-direction: column;
            gap: 16px;
        }

.home-section-header-mobile-featured {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .home-section-header-mobile-featured h2 {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
    }

    .home-section-header-mobile-featured .featured-mobile-tabs {
        flex: 0 0 auto;
        margin-left: auto;
    }

.home-featured-more-mobile-wrap {
    display: none;
}


/* =====================================================
   ACCOUNT POPUP
   ===================================================== */

.account-hover {
    position: relative;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
}


/* =====================================================
   SCROLL TOP
   ===================================================== */

.scroll-top-btn {
    position: fixed;
    right: 40px;
    bottom: 198px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    background: rgba(15, 23, 42, .85);
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
}

    .scroll-top-btn.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }


/* =====================================================
   FOOTER SAFETY
   Chống footer chen giữa danh sách nhà trên mobile/tablet
   ===================================================== */

.footer-section {
    position: relative;
    z-index: 5;
    clear: both;
}


/* =====================================================
   MOBILE ROW TITLE SUPPORT
   Không ảnh hưởng nếu view chưa có các class này
   ===================================================== */

.p-title-mobile {
    display: none;
}


/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 1000px) {
    .home-search-input-wrap input,
    .select2-search--dropdown .select2-search__field {
        font-size: 16px !important;
    }

    .home-hero {
        aspect-ratio: 2 / 1;
        background-image: url('/Assets/Cities/ninhbinh_pad2_1.JPG') !important;
        background-repeat: no-repeat;
        background-position: center top;
        background-size: 100% auto;
        background-attachment: fixed;
    }

    .home-hero-shell {
        width: 100%;
    }

    .home-featured-desktop,
    .search-results-desktop {
        display: none !important;
    }

    .home-featured-mobile,
    .search-results-mobile {
        display: block !important;
    }

    .home-featured-mobile {
        width: min(100%, 95%);
        margin: auto;
    }

    .home-main-search {
        padding-top: 0;
    }

    .home-hero-header {
        margin-bottom: 1%;
    }

    .home-body-container {
        width: 100%;
    }

    .home-search-wrapper,
    .home-main-search .home-search-wrapper {
        border-radius: 5px !important;
    }

    .home-featured-mobile .home-section-header-mobile-featured {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px;
        margin-bottom: 12px;
    }

        .home-featured-mobile .home-section-header-mobile-featured h2 {
            flex: 1 1 auto;
            min-width: 0;
            margin: 0;
            padding-left: 14px;
            font-size: 20px;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

            .home-featured-mobile .home-section-header-mobile-featured h2::before {
                width: 5px;
                height: 22px;
            }

        .home-featured-mobile .home-section-header-mobile-featured .featured-mobile-tabs {
            margin: 0 0 0 auto;
        }

    .home-featured-more-mobile-wrap {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        clear: both;
        margin: 2px auto;
        padding: 0;
    }

        .home-featured-more-mobile-wrap .home-section-more,
        .home-section-more-mobile-bottom {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-width: 150px;
            min-height: 42px;
            padding: 0 24px;
            color: #ef4444 !important;
            background: #fff;
            border: 1px solid #f1f5f9;
            border-radius: 20px;
            box-shadow: none;
            font-size: 14px;
            font-weight: 500;
            line-height: 1;
            text-decoration: none !important;
            white-space: nowrap;
        }

            .home-featured-more-mobile-wrap .home-section-more:hover,
            .home-section-more-mobile-bottom:hover {
                color: #dc2626 !important;
                border-color: #e5e7eb;
                text-decoration: none !important;
                transform: none;
            }
}

@media (min-width: 1001px) {
    .home-featured-desktop,
    .search-results-desktop {
        display: block !important;
    }

    .home-featured-mobile,
    .search-results-mobile {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .property-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-header-right-box {
        max-width: 70%;
        gap: 6px;
    }

    .home-header-right-top {
        gap: 6px;
    }

        .home-header-right-top > a,.select2-selection__rendered, .select2-search__field
        .home-header-right-top .account-trigger,
        .home-header-right-top .nav-post,
        .home-header-right-top .header-favorite-link,
        .home-header-right-top .favorite-link {
            min-height: 34px;
            padding: 0 14px;
            font-size: .8rem;
        }

    .home-header-right-bottom {
        gap: 6px;
        padding: 4px 10px;
        font-size: .72rem;
    }

    .home-search-bottom {
        flex-wrap: nowrap;
        gap: 8px;
    }

        .home-search-bottom > .home-search-filter:first-child {
            flex: 0 0 108px;
            max-width: 108px;
        }

    .home-search-filter-ward {
        flex: 0 0 190px;
        max-width: 190px;
    }

    .home-search-filter-select2 {
        flex: 1 1 150px;
    }

    .home-body-container {
        width: 100%;
    }
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 770px) {
    .home-hero {
        aspect-ratio: 4 / 2;
        min-height: 300px;
        background-attachment: scroll;
    }

    .home-hero-shell {
        position: relative;
        z-index: 3;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 95%;
        height: 100%;
        margin: 0 auto;
        padding: 9px 0 37px;
        box-sizing: border-box;
    }

    .home-hero-header {
        gap: 10px;
    }

    .home-header-left-top {
        font-size: 18px;
    }

    .home-header-right-box {
        max-width: 70%;
        gap: 6px;
    }

    .home-header-right-top {
        gap: 6px;
        font-size: 1.1rem;
    }

        .home-header-right-top > a,
        .home-header-right-top .account-trigger,
        .home-header-right-top .nav-post,
        .home-header-right-top .header-favorite-link,
        .home-header-right-top .favorite-link {
            min-height: 32px;
            border-radius: 999px;
          
        }

    .account-trigger {
        gap: 6px;
        padding: 0 9px;
    }

    .home-header-right-bottom {
        gap: 5px;
        padding: 4px 9px;
        font-size: .68rem;
    }

    .home-main-title {
        width: 75%;
        margin: 3% auto 0;
        font-size: 25px;
        line-height: 1.25;
        text-align: center;
    }

    .home-sub-title {
        padding: 1%;
        font-size: 13px;
        text-align: center;
    }

    .home-search-wrapper {
        width: 95%;
        padding: 8px 10px 6px;
    }

    .home-search-top {
        gap: 6px;
        padding-right: 2px;
    }

    .home-search-bottom {
        display: grid !important;
        grid-template-columns: 0.85fr 1.18fr .9fr .9fr;
        gap: 0 !important;
        margin-top: 6px;
        padding: 6px 0 0 !important;
        overflow: visible !important;
        border-top: 1px solid #e5e7eb;
    }

        .home-search-bottom::-webkit-scrollbar {
            display: none !important;
        }

        .home-search-bottom > .home-search-filter:first-child,
        .home-search-filter-ward,
        .home-search-filter-select2,
        .home-search-filter-city-fixed {
            flex: initial !important;
            width: auto !important;
            min-width: 0 !important;
            max-width: none !important;
        }

    .home-search-filter {
        min-width: 0;
    }

        .home-search-filter + .home-search-filter {
            border-left: 1px solid #eef2f7;
        }

    .home-search-city-display {
        height: 34px;
        min-height: 34px;
        padding: 0 6px;
        font-size: 11px;
    }

    .home-search-filter-select {
        font-size: .78rem;
    }

    .home-search-filter-ward .select2-selection--single,
    .home-search-filter-select2 .select2-selection--single {
        height: 34px !important;
        min-height: 34px !important;
    }

    .home-search-filter-ward .select2-selection__rendered,
    .home-search-filter-select2 .select2-selection__rendered {
        font-size: 11px !important;
        line-height: 34px !important;
    }

    .home-search-btn-main {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
    }

    .home-search-input-wrap input {
        font-size: 16px;
    }

    .home-section-header {
        margin-bottom: 14px;
    }

        .home-section-header h2 {
            padding-left: 16px;
            font-size: 28px;
        }

            .home-section-header h2::before {
                width: 5px;
                height: 24px;
            }

    .home-section-more {
        padding: 9px 13px;
        font-size: 13px;
    }
}

@media (max-width: 767px), (hover: none), (pointer: coarse) {
    .p-title-desktop {
        display: none !important;
    }

    .p-title-mobile {
        display: -webkit-box !important;
        width: 100%;
        margin: 0;
        overflow: hidden;
        color: var(--home-text);
        font-size: clamp(12px, 3.3vw, 15px);
        font-weight: 800;
        line-height: 1.28;
        text-decoration: none !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .p-row > .p-title-mobile {
        grid-column: 1 / -1;
        order: -1;
    }
}

@media (max-width: 700px) {
    .home-hero {
        aspect-ratio: 750 / 500;
        background-image: url('/Assets/Cities/ninhbinh_mobile.JPG') !important;
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
        background-attachment: scroll;
    }

        .home-hero.ios-fixed {
            background-image: none !important;
        }

            .home-hero.ios-fixed::before {
                content: "";
                position: absolute;
                inset: 0;
                z-index: 1;
                background-image: url('/Assets/Cities/ninhbinh_mobile.JPG') !important;
                background-repeat: no-repeat;
                background-position: center center;
                background-size: cover;
                pointer-events: none;
            }

    .home-featured-mobile {
        display: block;
        width: 100% !important;
        margin: auto;
    }
}

@media (max-width: 575px) {

    .property-grid {
        grid-template-columns: 1fr;
    }

    .home-body-container {
        width: 95%;
    }

    .home-section-header h2 {
        font-size: 20px;
    }

    .home-search-city-display {
        padding: 0 5px;
    }

    .fm-tab-btn {
        font-size: 11px;
    }

    .home-featured-mobile .home-section-header-mobile-featured {
        gap: 8px;
    }

        .home-featured-mobile .home-section-header-mobile-featured h2 {
            padding-left: 12px;
            font-size: 18px;
        }

        .home-featured-mobile .home-section-header-mobile-featured .featured-mobile-tabs {
            padding: 2px;
        }

        .home-featured-mobile .home-section-header-mobile-featured .fm-tab-btn {
            padding: 8px 15px;
            font-size: 12px;
        }
    .home-search-input-wrap input,
    .select2-search--dropdown .select2-search__field {
        font-size: 12px !important;
    }

}

@media (max-width: 500px) {
    .home-hero {
        min-height: 306px;
    }

    .home-main-search {
        padding-top: 0;
    }

    .home-hero-header {
        align-items: flex-start;
        margin-bottom: 0;
    }

    .home-header-right-box {
        max-width: 70%;
        gap: 5px;
    }

    .home-header-right-top {
        gap: 5px;
    }

        .home-header-right-top > a,
        .home-header-right-top .account-trigger,
        .home-header-right-top .nav-post,
        .home-header-right-top .header-favorite-link,
        .home-header-right-top .favorite-link {
            min-height: 30px;
      /*      padding: 0 8px;
            font-size: .68rem;*/
        }

    .home-header-right-bottom {
        gap: 4px;
        padding: 3px 8px;
        font-size: .64rem;
    }

    .scroll-top-btn {
        right: 12px;
        bottom: 154px;
    }

    .home-search-tabs-strip {
        width: 100%;
        margin: 0 auto .6rem;
    }

    .home-search-tabs {
        padding: 0;
    }

    .home-search-tab-btn {
        padding: 6px 9px;
        font-size: .76rem;
    }

    .home-search-tabs-pointer {
        bottom: -7px;
    }

    .img_logo_header {
        width: auto;
        height: 40px !important;
    }

    .home-header-left-tagline {
        font-size: .6rem !important;
    }

    .home-main-title {
        width: 90%;
        margin: 2% auto 0;
        font-size: 14px;
        line-height: 1;
        text-align: center;
    }

    .home-sub-title {
        padding: 1%;
        font-size: 8px;
        font-weight: 700;
        text-align: center;
    }

    .home-search-wrapper {
        gap: 0;
        padding: 0;
    }
}

@media (max-width: 430px) {
    .home-hero {
        background-image: url('/Assets/Cities/ninhbinh_mobile.JPG') !important;
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
        background-attachment: scroll;
    }

        .home-hero.ios-fixed {
            background-image: none !important;
        }

            .home-hero.ios-fixed::before {
                content: "";
                position: absolute;
                inset: 0;
                z-index: 1;
                background-image: url('/Assets/Cities/ninhbinh_mobile.JPG') !important;
                background-repeat: no-repeat;
                background-position: center center;
                background-size: cover;
                pointer-events: none;
            }
}

@media (max-width: 391px) {
    .home-search-bottom {
        grid-template-columns: 1fr 1.15fr .9fr .9fr !important;
    }

    .home-search-city-display {
        font-size: 10px;
    }

    .home-section-header h2 {
        font-size: 19px;
    }

    .home-search-filter-ward .select2-selection__rendered,
    .home-search-filter-select2 .select2-selection__rendered {
        font-size: 10px !important;
    }

    .home-featured-mobile .home-section-header-mobile-featured {
        gap: 6px;
    }

        .home-featured-mobile .home-section-header-mobile-featured h2 {
            padding-left: 11px;
            font-size: 17px;
        }

        .home-featured-mobile .home-section-header-mobile-featured .fm-tab-btn {
            padding: 6px 10px;
            font-size: 10px;
        }
}

@media (max-width: 345px) {
    .home-body-container {
        width: min(1200px, 100%) !important;
    }
}


/* =========================================================
   HOME MOBILE SEARCH FILTER TEXT SIZE
   Chỉ chỉnh chữ hiển thị ở hàng filter trang Home.
   Không ảnh hưởng input thật nên không gây zoom lại.
   ========================================================= */

@media (max-width: 770px) {
    .home-page .home-main-search .home-search-bottom
    .home-search-filter-ward
    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered,
    .home-page .home-main-search .home-search-bottom
    .home-search-filter-select2
    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
        font-size: 12px !important;
        line-height: 34px !important;
    }

    .home-page .home-main-search .home-search-bottom
    .home-search-filter-ward
    .select2-selection__placeholder,
    .home-page .home-main-search .home-search-bottom
    .home-search-filter-select2
    .select2-selection__placeholder {
        font-size: 12px !important;
    }
}
