/* ==========================================
   TẮT HOVER TRÊN MÀN CẢM ỨNG (IOS SAFARI BUG)
========================================== */
@media (hover: none) {

    .result-card:hover,
    .hover-box:hover,
    .news-card:hover,
    .suggest-card:hover,
    .btn-gradient:hover,
    .btn-vhm-main:hover,
    .btn-primary:hover,
    .hover-zoom:hover,
    .transition-hover:hover,
    .album-grid-2 img:hover {
        transform: none !important;
    }
}

/* ==========================================
   MOBILE SIDEBAR & MEGAMENU
========================================== */
.mobile-sidebar {
    position: fixed !important;
    top: 0;
    right: -100%;
    width: 75vw;
    max-width: 320px;
    height: 100vh;
    background-color: #fff;
    z-index: 1055;
    display: block !important;
    padding-top: 60px;
    padding-bottom: 30px;
    overflow-y: auto !important;
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-sidebar.active-sidebar {
    right: 0;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.navbar-collapse {
    background: #fff;
    border-top: none !important;
    /* Xoá viền thừa */
    margin-top: 0 !important;
    /* Xóa khoảng trống 10px */
    padding-bottom: 15px;
}

.navbar-nav {
    gap: 0 !important;
}

.public-nav-link {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 15px !important;
    /* Giảm từ 15px 20px xuống */
    border-bottom: 1px solid #f5f5f5 !important;
    font-size: 0.95rem !important;
    /* Giảm từ 1.05rem xuống */
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 0 10px;
    cursor: pointer;
}

.show-menu>.nav-link .toggle-icon {
    transform: rotate(180deg);
    color: var(--accent-color);
}

.navbar .has-megamenu {
    position: relative;
}

.navbar .megamenu {
    padding: 10px 0;
    border: none;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.02);
    background: #fcfcfc;
    display: none;
    margin: 0;
    border-radius: 0;
    z-index: 1050;
}

.navbar .nav-item.has-megamenu.show-menu>.megamenu {
    display: block !important;
}

.megamenu-grid {
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    /* Đè bẹp lệnh hở 30px từ JS */
}

.megamenu-col {
    border-right: none;
    padding: 0;
    margin-bottom: 0 !important;
}

.megamenu-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    /* Giảm từ 0.95rem xuống */
    border-bottom: 1px solid #eee;
    padding: 8px 15px;
    /* Giảm padding */
    margin-bottom: 2px;
    /* Ép sát mép dưới */
    background: #f9f9f9;
}

.megamenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.megamenu-item {
    display: block;
    padding: 6px 15px;
    /* Giảm từ 8px 20px xuống */
    color: #555;
    text-decoration: none;
    border-bottom: 1px dashed #eee;
    font-size: 0.85rem;
    /* Giảm từ 0.9rem xuống */
}

.mm-level-1 {
    font-weight: 500;
    background-color: #fafafa;
}

.mm-level-2 {
    padding-left: 40px;
    font-size: 0.9rem;
}

.mm-icon {
    font-size: 0.6rem;
    margin-right: 6px;
    color: #aaa;
    transition: transform 0.2s;
    display: inline-block;
}

.mm-child-list {
    display: none;
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.mm-has-child.show-sub>.mm-child-list {
    display: block;
}

.mm-has-child.show-sub>a>.mm-icon {
    transform: rotate(90deg);
    color: var(--accent-color);
}

.megamenu-item-block {
    margin-bottom: 0px !important;
    /* Ép sát tuyệt đối */
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 2px !important;
}

.megamenu-item-block:last-child {
    border-bottom: none;
}

.megamenu-grid .megamenu-list {
    display: none;
    margin: 0;
    padding: 0;
    padding-left: 10px;
    margin-top: 0px !important;
    /* Xóa khoảng trống đỉnh */
}

.megamenu-grid .megamenu-item-block.show-sub-mobile .megamenu-list {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.megamenu-grid .title-arrow {
    transition: transform 0.3s ease;
}

.megamenu-grid .megamenu-item-block.show-sub-mobile .title-arrow {
    transform: rotate(180deg);
}

.megamenu-grid .mm-child-list {
    display: none;
    padding-left: 15px;
    padding-top: 5px;
}

.megamenu-grid .mm-has-child.show-sub .mm-child-list {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.megamenu-grid .mm-has-child.show-sub>a>.mm-icon {
    transform: rotate(90deg);
    color: var(--accent-color);
}

#main-nav .nav-item {
    display: block;
    width: 100%;
    margin-bottom: 5px;
}

#main-nav .dropdown-menu {
    display: none;
    position: static;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    box-shadow: none !important;
    padding-left: 1rem;
}

#main-nav .dropdown-menu.show {
    display: block;
}

#main-nav .dropdown-item {
    padding: 10px 15px;
    border-radius: 5px;
    color: #ffffff !important;
    opacity: 0.85;
    transition: 0.2s;
}

/* ==========================================
   SCROLL NGANG (QUỸ CĂN & PAGE BUILDER)
========================================== */
.property-horizontal-scroll,
.mobile-horizontal-scroll {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.property-horizontal-scroll::-webkit-scrollbar,
.mobile-horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.property-scroll-item {
    flex: 0 0 230px !important;
    scroll-snap-align: start;
}

.mobile-horizontal-scroll>.col-md-6 {
    flex: 0 0 85% !important;
    max-width: 85% !important;
    scroll-snap-align: center;
}

.mobile-horizontal-scroll>.col-12 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    scroll-snap-align: center;
}

/* ==========================================
   THU NHỎ GIAO DIỆN VÀ PADDING
========================================== */
body {
    padding-bottom: 80px !important;
}

.container-fluid {
    padding: 10px;
}

.card-header-custom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

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

.border-end {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.kygui-input-col {
    margin-bottom: 10px;
}

.floating-search-bar {
    margin-top: 20px;
}

#public-hero-section {
    padding-bottom: 30px !important;
    min-height: 350px !important;
    height: 350px !important;
}

.prop-hero-section {
    min-height: 300px !important;
    height: 300px !important;
}

#dynamic-hero-text {
    min-height: auto !important;
    padding-top: 1rem !important;
}

#dynamic-hero-text h1,
#dynamic-hero-text h2,
.carousel-caption h1,
.carousel-caption h2,
.carousel-caption .h1 {
    font-size: 1.7rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.75rem !important;
}

#dynamic-hero-text h3,
.carousel-caption h3 {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1rem !important;
}

#dynamic-hero-text p,
.carousel-caption p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
}

#dynamic-hero-text .btn,
.carousel-caption .btn {
    font-size: 0.85rem !important;
    padding: 10px 20px !important;
}

#hero-slider-container {
    height: 100% !important;
}

/* ==========================================
   TÙY CHỈNH CÁC KHỐI CHI TIẾT (ĐỒNG BỘ CHÚ THÍCH ẢNH)
========================================== */
/* 1. Gỡ bỏ overflow: hidden của backend để hiện chữ rớt xuống bên dưới ảnh */
.article-content .custom-album-wrapper,
.seo-content-block .custom-album-wrapper {
    overflow: visible !important;
}

.article-content .carousel-caption,
.seo-content-block .carousel-caption,
.article-content .custom-mobile-caption,
.article-content figcaption {
    position: static !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-top: 6px !important;

    /* Tăng padding trái/phải lên 10% để chữ thụt vào so với mép ảnh */
    padding: 0px 10% 15px 10% !important;

    display: block !important;
    white-space: normal !important;
    text-align: center !important;
    /* Căn giữa khối */
    background: transparent !important;
}

/* 3. Chỉnh lại chữ (Căn giữa tuyệt đối khi rớt dòng) */
.article-content .carousel-caption p,
.seo-content-block .carousel-caption p,
.article-content .custom-mobile-caption p,
.article-content figcaption p {
    margin: 0 auto !important;
    color: #888888 !important;
    opacity: 0.9 !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    /* Tăng khoảng cách dòng lên 1 chút cho dễ đọc */
    text-shadow: none !important;
    display: block !important;
    -webkit-line-clamp: unset !important;

    /* Ép chữ luôn luôn căn giữa dù có rớt xuống 2-3 dòng */
    text-align: center !important;
}

/* =========================================================
   FIX CÂN ĐỐI ICON & CHỮ THANH STICKY MENU (MOBILE)
========================================================= */
#vhm-sticky-nav {
    top: 85px !important;
    border-radius: 12px;
    height: auto;
    min-height: 55px !important;
}

#dynamic-anchor-nav {
    padding-right: 45px;
    flex-wrap: nowrap !important;
}

#dynamic-anchor-nav .nav-item {
    flex-shrink: 0 !important;
}

/* Đưa về cấu trúc Dọc (Column), Căn giữa tuyệt đối, Màu xám */
#dynamic-anchor-nav .nav-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
    gap: 4px !important;
    color: #475569 !important;
    border-bottom: 3px solid transparent !important;
}

/* Chỉnh Icon to lên một chút để cân xứng */
#dynamic-anchor-nav .nav-link i {
    margin: 0 !important;
    font-size: 1.15rem !important;
    line-height: 1 !important;
}

/* Chỉnh Chữ nhỏ lại một chút cho thanh lịch */
#dynamic-anchor-nav .nav-link span.nav-text {
    font-size: 0.75rem !important;
    font-weight: 600;
    line-height: 1 !important;
    white-space: nowrap !important;
}

/* Hiệu ứng khi đang xem (Active) */
#dynamic-anchor-nav .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom: 3px solid var(--primary-color) !important;
}

#dynamic-anchor-nav .separator {
    height: 20px;
}

/* Các cấu hình ảnh chung */
.album-grid-2 img {
    height: 200px !important;
}

.album-gallery .album-main {
    height: 250px !important;
}

.album-gallery .album-thumbs {
    justify-content: flex-start;
}

/* ==========================================
   HIỆU ỨNG ẢNH TRÀN LỀ (EDGE-TO-EDGE) CHO MOBILE
========================================== */
@media (max-width: 767px) {

    /* Ép khối ảnh rộng hơn thẻ cha và kéo dãn ra 2 bên mép màn hình */
    .article-content .custom-album-wrapper,
    .article-content>figure,
    .article-content>img {
        width: calc(100% + 3rem) !important;
        /* Phá vỡ chiều rộng (cộng thêm 1.5rem x 2) */
        max-width: none !important;
        margin-left: -1.5rem !important;
        /* Âm margin bù lại padding p-4 của thẻ cha */
        margin-right: -1.5rem !important;
        border-radius: 0 !important;
        /* Xóa bo góc để ảnh vuông vắn sát mép */
    }

    /* Xóa bo góc của ảnh bên trong Slider */
    .article-content .custom-album-wrapper .carousel-inner,
    .article-content .custom-album-wrapper img,
    .article-content>figure img {
        border-radius: 0 !important;
    }

    /* Đẩy phần chữ chú thích (caption) lùi vào trong một chút để không bị dính sát mép điện thoại */
    .article-content .custom-mobile-caption,
    .article-content figcaption {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* ==========================================
   FIX RESPONSIVE CHỮ QUÁ KHỔ TRÊN MOBILE (TYPOGRAPHY)
========================================== */

@media (max-width: 767px) {

    /* 1. Ép lại các thẻ Heading toàn cục (Thu nhỏ 30-40% so với PC) */
    h1,
    .h1 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }

    h2,
    .h2,
    .section-title {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }

    h3,
    .h3 {
        font-size: 1.15rem !important;
        line-height: 1.4 !important;
    }

    h4,
    .h4 {
        font-size: 1.05rem !important;
        line-height: 1.4 !important;
    }

    h5,
    .h5 {
        font-size: 0.95rem !important;
    }

    h6,
    .h6 {
        font-size: 0.85rem !important;
    }

    /* 2. Tiêu đề Hero Banner (Chữ to đùng ở Slider Trang chủ & Trang phụ) */
    #dynamic-hero-text h1,
    #dynamic-hero-text h2,
    .carousel-caption h1,
    .carousel-caption h2,
    .prop-hero-section h1 {
        font-size: 1.5rem !important;
        /* Ép từ 2.8rem xuống */
        margin-bottom: 8px !important;
    }

    #dynamic-hero-text h3,
    .carousel-caption p {
        font-size: 0.9rem !important;
        /* Thu gọn chữ mô tả */
        line-height: 1.4 !important;
    }

    /* 3. Tiêu đề & Nội dung trong các Thẻ thông tin (Page Builder) */
    #subpage-dynamic-sections .card:not(.result-card) .card-body h2,
    #homepage-sections .card:not(.result-card) .card-body h2,
    #subpage-dynamic-sections .card:not(.result-card) .card-body h3,
    #homepage-sections .card:not(.result-card) .card-body h3 {
        font-size: 1.15rem !important;
        /* Hạ gục các class fs-2, fs-3 */
    }

    #subpage-dynamic-sections .card:not(.result-card) .card-body p,
    #homepage-sections .card:not(.result-card) .card-body p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }

    /* 4. Giá tiền & Tiêu đề trong Thẻ Bất Động Sản (Ngoài danh sách) */
    .result-card .card-body h2,
    .result-card .card-body .fs-4 {
        font-size: 1.15rem !important;
        /* Thu nhỏ giá tiền (VD: 2.11 Tỷ) */
    }

    .result-card .card-body h6,
    .result-card .card-body h5 {
        font-size: 0.9rem !important;
        /* Đảm bảo Mã căn/Tòa không rớt dòng */
    }

    /* 5. Chữ SIÊU TO ở Trang Chi Tiết Căn Hộ (2.2rem) */
    .bg-white.p-3.rounded-4 span[style*="font-size: 2.2rem"],
    .bg-white.p-4 span[style*="font-size: 2.2rem"] {
        font-size: 1.5rem !important;
        /* Bóp giá tiền khổng lồ ở trang chi tiết */
    }

    /* Thu nhỏ tên căn hộ ở trang chi tiết */
    h1[style*="font-size: 1.8rem"] {
        font-size: 1.3rem !important;
    }
}

/* ==========================================
   FIX ÉP SIZE CHỮ TOÀN TẬP BÀI VIẾT & TRANG (CHỐNG LỖI CKEDITOR)
========================================== */
@media (max-width: 767px) {

    /* 1. ÉP KÍCH THƯỚC CHỮ CHUẨN ĐỌC BÁO TRÊN MOBILE (15px) */
    .article-content,
    .seo-content-block {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    /* Đè bẹp mọi định dạng font-size rác (inline styles) do copy-paste từ Word/Web khác */
    .article-content p,
    .article-content span,
    .article-content li,
    .article-content div,
    .article-content a,
    .seo-content-block p,
    .seo-content-block span,
    .seo-content-block li,
    .seo-content-block div {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    /* 2. THU NHỎ CÁC TIÊU ĐỀ (HEADING) BÊN TRONG BÀI VIẾT */
    .article-content h1,
    .seo-content-block h1 {
        font-size: 1.35rem !important;
        margin-top: 1.2rem !important;
        line-height: 1.4 !important;
    }

    .article-content h2,
    .seo-content-block h2,
    #article-content-body h2 {
        font-size: 1.25rem !important;
        margin-top: 1.2rem !important;
        line-height: 1.4 !important;
    }

    .article-content h3,
    .seo-content-block h3,
    #article-content-body h3 {
        font-size: 1.1rem !important;
        margin-top: 1rem !important;
        line-height: 1.4 !important;
    }

    .article-content h4,
    .seo-content-block h4 {
        font-size: 1rem !important;
        margin-top: 1rem !important;
        line-height: 1.4 !important;
    }

    /* 3. XỬ LÝ BẢNG (TABLE) TRONG BÀI VIẾT TRÁNH BỊ TRÀN VIỀN */
    .article-content table {
        font-size: 13px !important;
    }

    .article-content th,
    .article-content td {
        padding: 6px !important;
        font-size: 13px !important;
    }

    /* 4. ÉP SIZE CHỮ TIÊU ĐỀ SECTION & ĐƯỜNG DẪN (BREADCRUMB) */
    .section-title {
        font-size: 1.2rem !important;
    }

    .breadcrumb {
        font-size: 0.75rem !important;
    }

    /* 5. THU NHỎ LOGO & CHỮ Ở HEADER / FOOTER */
    .navbar-brand {
        font-size: 1.2rem !important;
    }

    .navbar-brand img {
        height: 35px !important;
    }

    /* Thu nhỏ logo thanh điều hướng */

    #ft_company_name {
        font-size: 1.2rem !important;
    }

    footer h6 {
        font-size: 0.9rem !important;
        margin-bottom: 12px !important;
    }

    footer p,
    footer li,
    footer a,
    footer span {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
}

/* ==========================================
   FIX DỨT ĐIỂM KHOẢNG HỞ THANH STICKY MENU
========================================== */
@media (max-width: 767px) {

    /* 1. Kéo thanh Sticky bám sát lên Header mới (Bù trừ khe hở 31px do Header bị thu nhỏ) */
    #vhm-sticky-nav {
        top: 54px !important;
        /* Header hiện tại cao khoảng 54px */
        border-radius: 0 !important;
        /* Ép vuông vức 2 cạnh */
        height: 56px !important;
        min-height: 56px !important;
    }

    /* 2. Kéo ngược nội dung bên dưới lên để lấp đầy khoảng hở 1.5rem (24px) đang bị code cứng trong HTML */
    #vhm-sticky-nav+.container {
        margin-top: -1.5rem !important;
    }

    /* 3. Ép vạch màu xanh (active) bám sát mép đáy của thanh Menu */
    #vhm-sticky-nav .container,
    #vhm-sticky-nav .container>.d-flex {
        height: 100% !important;
    }

    #dynamic-anchor-nav {
        height: 100% !important;
        align-items: stretch !important;
    }

    #dynamic-anchor-nav .nav-item {
        height: 100% !important;
        display: flex !important;
    }

    #dynamic-anchor-nav .nav-link {
        height: 100% !important;
        justify-content: center !important;
        border-bottom: 3px solid transparent !important;
    }
}

/* ==========================================
   FIX HERO SECTION TRÊN MOBILE (VỊ TRÍ CHỮ & CHIỀU CAO ẢNH)
========================================== */
@media (max-width: 767px) {

    /* 1. Đẩy cụm chữ ở Trang Chủ (và trang Tìm kiếm) thấp xuống giữa ảnh */
    #dynamic-hero-text {
        padding-top: 160px !important;
        /* Đè lại lệnh 1rem cũ, đẩy chữ mạnh xuống dưới */
    }

    /* 2. Đồng bộ chiều cao ảnh bìa trang Dự án, Phân khu, Tòa bằng với Trang chủ (350px) */
    div[style*="height: 55vh"] {
        height: 350px !important;
        min-height: 350px !important;
        max-height: 350px !important;
    }

    /* 3. Tinh chỉnh lại vị trí chữ (Tên dự án) bên trong ảnh bìa cho cân đối với chiều cao mới */
    div[style*="height: 55vh"]>.position-absolute.bottom-0 {
        padding-bottom: 1.5rem !important;
        padding-left: 15px !important;
    }

    /* Thu nhỏ bớt chữ Tên Dự án/Tòa trên mobile cho thanh lịch */
    div[style*="height: 55vh"]>.position-absolute.bottom-0 h1,
    .prop-hero-section h1 {
        font-size: 1.69rem !important;
        /* Thu nhỏ từ 2rem xuống 1.4rem cho thanh lịch */
    }

    /* Thu nhỏ nhẹ phần mô tả đi kèm nếu có */
    div[style*="height: 55vh"]>.position-absolute.bottom-0 p,
    .prop-hero-section p {
        font-size: 0.85rem !important;
    }
}

/* ==========================================
   TẠO NÚT TRÒN CHO MŨI TÊN XỔ MENU (MOBILE)
========================================== */
.toggle-icon-wrapper,
.title-arrow-wrapper {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    background-color: #f1f5f9;
    /* Nền xám nhạt làm nổi bật nút */
    border-radius: 50%;
    /* Bo tròn tuyệt đối */
    border: 1px solid #e2e8f0;
    /* Viền mỏng tinh tế */
    transition: all 0.3s ease;
    padding: 0 !important;
    /* Ghi đè padding cũ */
    margin-left: 8px;
}

/* Căn chỉnh lại icon mũi tên bên trong */
.toggle-icon,
.title-arrow {
    font-size: 14px !important;
    color: var(--primary-color) !important;
    /* Đổi sang màu xanh chủ đạo cho rõ */
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.3s ease;
}

/* Hiệu ứng khi bấm MỞ menu (Active) */
.show-menu>.nav-link .toggle-icon-wrapper,
.show-sub-mobile>a .title-arrow-wrapper {
    background-color: var(--primary-light);
    /* Đổi màu nền sáng hơn khi mở */
    border-color: var(--primary-color);
}

.show-menu>.nav-link .toggle-icon,
.show-sub-mobile>a .title-arrow {
    transform: rotate(180deg);
    /* Mũi tên quay ngược lên */
    color: var(--primary-color) !important;
}

/* ==========================================
   FIX: KÉO CHỮ TRÀN RA SÁT MÉP & CĂN CHỈNH DANH SÁCH / CHÚ THÍCH
========================================== */
@media (max-width: 767px) {

    /* 1. Kéo đoạn văn và tiêu đề dạt ra sát mép khung */
    .article-content p,
    .article-content h1,
    .article-content h2,
    .article-content h3,
    .article-content h4,
    .seo-content-block p,
    .seo-content-block h1,
    .seo-content-block h2,
    .seo-content-block h3,
    .seo-content-block h4 {
        margin-left: -1rem !important;
        margin-right: -1rem !important;
    }

    /* 2. ĐẶC TRỊ DANH SÁCH (ul, ol) - Tránh tràn trái/phải */
    .article-content ul,
    .article-content ol,
    .seo-content-block ul,
    .seo-content-block ol {
        margin-left: -1rem !important;
        margin-right: -1rem !important;
        padding-left: 2.5rem !important;
        /* Kéo thụt dấu chấm vào trong màn hình an toàn */
        padding-right: 1rem !important;
        /* Tránh cho chữ dính sát viền phải điện thoại */
    }

    /* Căn đều 2 bên cho các dòng danh sách */
    .article-content li,
    .seo-content-block li {
        text-align: justify !important;
        margin-bottom: 10px !important;
    }
}

/* ==========================================
   FIX DỨT ĐIỂM CỘT PHẢI (SIDEBAR) BỊ CẮT XÉN VÀ ÉP CHỮ TRÊN MOBILE
========================================== */
@media (max-width: 991px) {

    /* 1. Gỡ bỏ "chiếc lồng" max-height và tắt sticky. 
       Giúp Form tư vấn bung hết cỡ, không bị cắt mất nút "Nhận tư vấn ngay" ở đáy */
    .col-lg-4 .sticky-top {
        max-height: none !important;
        overflow-y: visible !important;
        position: static !important;
        top: auto !important;
    }

    /* 2. Thu hẹp lề trong (padding) từ p-4 (24px) xuống còn 15px.
       Giải phóng không gian thở cho danh sách căn hộ bên trong */
    .col-lg-4 .bg-white.p-4 {
        padding: 15px !important;
    }

    /* 3. Tinh chỉnh các thẻ Căn hộ / Tin tức trong cột phải */
    #sidebar-hot-properties .d-flex,
    #sidebar-cheap-properties .d-flex,
    #seo-sidebar-news-list .d-flex {
        gap: 12px !important;
        /* Rút gọn khoảng cách giữa ảnh và chữ */
    }

    /* 4. Fix ảnh thumbnail căn hộ để nhường diện tích cho chữ (như Ảnh 1) */
    #sidebar-hot-properties .d-flex>div:first-child,
    #sidebar-cheap-properties .d-flex>div:first-child {
        width: 50px !important;
        height: 50px !important;
    }

    /* Đảm bảo khung chữ bên phải (chứa giá tiền, mã căn) co giãn linh hoạt */
    #sidebar-hot-properties .flex-grow-1,
    #sidebar-cheap-properties .flex-grow-1 {
        min-width: 0 !important;
        /* Kích hoạt text-truncate chuẩn xác */
        width: calc(100% - 62px) !important;
    }

    /* 5. Gọn gàng lại form nhập liệu */
    .col-lg-4 input.form-control {
        font-size: 14px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .col-lg-4 button.btn.w-100 {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        font-size: 1rem !important;
    }
}