/* 
 * BLOG DETAIL STYLES
 * Design Philosophy: Storytelling & Conversion
 */

/* --- 1. GALLERY HEADER (Thay thế Header cũ) --- */

/* DESKTOP GRID */
.gallery-grid-desktop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px); /* Chiều cao cố định 400px tổng */
    gap: 8px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Item 1: Ảnh lớn bên trái (chiếm 2 cột, 2 dòng) */
.gallery-item.item-1 {
    grid-column: span 2;
    grid-row: span 2;
}

/* Fallback: Nếu chỉ có 1 ảnh thì full width */
.gallery-item.full-width {
    grid-column: span 4;
    grid-row: span 2;
}

/* Overlay cho ảnh lớn chứa tiêu đề */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.8) 100%);
    z-index: 2;
    pointer-events: none;
}

.gallery-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 3;
    color: white;
    pointer-events: none;
}

.gallery-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.gallery-meta {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Overlay "Xem thêm +N ảnh" */
.more-photos-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 4;
    transition: background 0.2s;
    cursor: pointer; /* [UPDATE] Hiển thị con trỏ tay để biết là nút bấm */
}
.more-photos-overlay:hover {
    background: rgba(0,0,0,0.7);
}

/* MOBILE SWIPER */
.hero-section-mobile {
    position: relative;
    height: 40vh; /* [UPDATE] Giảm chiều cao cho cân đối (Gốc 50vh) */
    min-height: 250px; /* [UPDATE] Giảm min-height */
    background-color: #333;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-hero-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    padding: 60px 0 20px 0;
    z-index: 10;
    color: white;
    pointer-events: none; /* [FIX] Cho phép click xuyên qua lớp phủ để mở ảnh */
}

.mobile-hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.3;
}

.mobile-hero-meta {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* [NEW] Mobile Image Badge */
.mobile-image-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 11;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none; /* [FIX] Không chặn thao tác vuốt/click */
}

/* [NEW] View All Photos Button (Compact & Modern) - Đồng bộ Location Detail */
.btn-view-all-photos {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6); /* Nền tối để nổi trên ảnh */
    backdrop-filter: blur(4px);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex; align-items: center; gap: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
    z-index: 20;
    cursor: pointer;
}

.btn-view-all-photos:hover { background: rgba(0, 0, 0, 0.8); transform: scale(1.05); }

/* --- 2. QUICK FACTS STRIP (Làm phẳng Single-Surface) --- */
.quick-facts-strip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.quick-fact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.quick-fact-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.quick-fact-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.quick-fact-label {
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.quick-fact-val {
    font-size: 0.95rem;
    font-weight: 750;
    color: #0f172a;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-fact-divider {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .quick-facts-strip {
        padding: 10px 12px;
        gap: 10px;
        border-radius: 10px;
        margin-bottom: 16px !important;
    }
    .quick-fact-item {
        gap: 8px;
    }
    .quick-fact-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.85rem;
    }
    .quick-fact-label {
        font-size: 0.62rem;
    }
    .quick-fact-val {
        font-size: 0.82rem;
    }
}

/* --- [NEW] MODERN BREADCRUMB (SEO Optimized & Sticky) --- */
.modern-breadcrumb {
    position: sticky;
    top: var(--site-header-height, 76px);
    z-index: 1020;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #eee;
    overflow: visible; /* [FIX] Để dropdown hiển thị được ra ngoài */
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; /* [FIX] Xóa transition layout để Popper tính toán tọa độ chính xác */
}

/* Mobile không có Navbar nên dính luôn sát top */
@media (max-width: 991.98px) {
    .modern-breadcrumb {
        top: 0 !important;
    }
}

/* [NEW] Trạng thái khi dính (cả Desktop và Mobile) */
.modern-breadcrumb.is-stuck {
    /* [FIX] Tràn viền chính xác bằng biến CSS do Javascript tính toán, khắc phục lỗi hụt nền bên phải trên Desktop */
    margin-left: var(--offset-left, 0px);
    margin-right: var(--offset-right, 0px);
    padding-left: calc(var(--offset-left, 0px) * -1 + 15px);
    padding-right: calc(var(--offset-right, 0px) * -1 + 15px);
    
    border-radius: 0; /* Bỏ bo góc */
    border-left: none;
    border-right: none;
    background: #ffffff; /* [FIX] Đổi nền trắng đặc để sửa lỗi Bootstrap Popper tính sai tọa độ fixed */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.modern-breadcrumb .home-icon {
    color: var(--primary-color);
    background-color: #eef4ff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    text-decoration: none;
}
.modern-breadcrumb .home-icon:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}
.modern-breadcrumb .cat-link {
    /* color: var(--primary-color); -> Đã set class text-dark ở HTML */
    text-decoration: none;
}
.modern-breadcrumb .dropdown-toggle-btn {
    color: #999;
    margin-left: 4px;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
.modern-breadcrumb .dropdown-toggle-btn:hover {
    background-color: #e9ecef;
    color: #333;
}
/* Dấu mũi tên ngăn cách (>) */
.modern-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "/"; /* [UPDATE] Đổi sang dấu gạch chéo */
    font-size: 1rem;
    line-height: 1;
    color: #ccc;
    padding-right: 0.5rem; /* Bootstrap mặc định có padding-left, thêm right cho cân */
}

/* [NEW] Style cuộn ngang cho Breadcrumb & Fix Dropdown bị nhỏ */
.breadcrumb-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.breadcrumb-scroll::-webkit-scrollbar { display: none; }
.modern-breadcrumb .dropdown-menu {
    min-width: 280px; /* Tăng chiều rộng để nội dung thoải mái hơn */
    white-space: normal; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important; /* Đổ bóng sâu, sang trọng */
    border: 1px solid rgba(0,0,0,0.05) !important;
    border-radius: 16px !important; /* [NEW] Bo góc mượt mà hơn */
}

/* [NEW] Custom Dropdown Menu for Breadcrumb */
.custom-dropdown-menu {
    padding: 10px 0;
    animation: dropdownFade 0.15s ease-out;
}
/* Chuyển hiệu ứng trượt vào các phần tử con để không xung đột vị trí với Bootstrap Popper */
.custom-dropdown-menu > li {
    animation: dropdownSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.custom-dropdown-menu .dropdown-item {
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 10px;
    width: calc(100% - 20px);
    background-color: transparent;
}
.custom-dropdown-menu .dropdown-item:hover,
.custom-dropdown-menu .dropdown-item:focus {
    background-color: #f8f9fa;
    transform: translateX(4px);
}
.custom-dropdown-menu .dropdown-item:active {
    background-color: #eef4ff;
    transform: scale(0.98);
}

/* Tùy chỉnh thanh cuộn cho dropdown nếu quá dài */
.custom-dropdown-menu::-webkit-scrollbar { width: 6px; }
.custom-dropdown-menu::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.custom-dropdown-menu::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
.custom-dropdown-menu::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* Chỉ giữ lại hiệu ứng mờ cho khung ngoài */
@keyframes dropdownFade { from { opacity: 0; } to { opacity: 1; } }
/* Hiệu ứng trượt cho các dòng bên trong */
@keyframes dropdownSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* --- 3. CONTENT STYLING --- */
.blog-content {
    font-size: 1.08rem;
    line-height: 1.8;
    color: #334155;
    letter-spacing: -0.01em;
}

/* [NEW] Blog Content Card Style (Sang trọng) */
.blog-content-card {
    background: #fff;
    padding: 28px 30px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
}

.blog-content h1, .blog-content h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 36px;
    margin-bottom: 16px;
    line-height: 1.32;
    letter-spacing: -0.02em;
    position: relative;
    padding-left: 14px;
    clear: both; /* [FIX] Đảm bảo tiêu đề luôn xuống dòng, không bị thẻ float đè lên */
}

.blog-content > h1:first-child, .blog-content > h2:first-child {
    margin-top: 4px;
}

.blog-content h1::before, .blog-content h2::before {
    content: '';
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 750;
    color: #1e293b;
    margin-top: 28px;
    margin-bottom: 12px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    clear: both; /* [FIX] Đảm bảo tiêu đề luôn xuống dòng */
}

.blog-content p { margin-bottom: 20px; }

.blog-content figure.image {
    display: block;
    clear: both;
    margin: 20px auto;
    text-align: center;
    max-width: 100%;
}

.blog-content figure.image.image-style-side,
.blog-content figure.image-style-side {
    float: none;
    max-width: 100%;
    margin: 20px auto;
}

.blog-content figure.image > a[data-fancybox] {
    display: inline-block;
    max-width: 100%;
}

.blog-content img:not(.embed-img),
.blog-content figure.image img {
    display: block;
    margin: 20px auto;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 520px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    cursor: zoom-in; /* [NEW] Hiển thị icon kính lúp khi rê chuột vào ảnh */
}

.blog-content figure.image img {
    margin: 0 auto;
}

.blog-content figure.image figcaption {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    text-align: center;
    margin-top: 8px;
    line-height: 1.5;
}

@media (max-width: 767.98px) {
    .blog-content figure.image,
    .blog-content figure.image.image-style-side,
    .blog-content figure.image-style-side {
        margin: 14px auto;
    }

    .blog-content img:not(.embed-img),
    .blog-content figure.image img {
        max-height: 68vh;
        border-radius: 10px;
    }
}

/* [FIX] Ẩn các thẻ p rỗng do trình soạn thảo sinh ra để tránh khoảng trắng thừa */
.blog-content p:empty {
    display: none;
    margin: 0;
}

/* [NEW] Drop Cap (Chữ cái đầu nghệ thuật - Magazine Style: Chuẩn cao đúng 2 hàng) */
.blog-content > p:first-of-type::first-letter {
    float: left;
    font-size: 3.5em;
    line-height: 0.88;
    font-weight: 800;
    margin-right: 8px;
    margin-top: 0;
    color: var(--primary-color);
    font-family: serif; /* Dùng font có chân cho sang trọng */
}

@media (max-width: 767.98px) {
    .blog-content > p:first-of-type::first-letter {
        font-size: 2.8em;
        line-height: 0.88;
        margin-top: 0;
        margin-right: 6px;
    }
}

@supports (initial-letter: 2) or (-webkit-initial-letter: 2) {
    .blog-content > p:first-of-type::first-letter {
        float: none;
        -webkit-initial-letter: 2;
        initial-letter: 2;
        font-size: inherit;
        line-height: inherit;
        margin-top: 0;
        margin-right: 8px;
    }
    @media (max-width: 767.98px) {
        .blog-content > p:first-of-type::first-letter {
            margin-right: 6px;
        }
    }
}

/* [NEW] Clearfix để văn bản bao quanh thẻ float không bị tràn ra ngoài */
.blog-content::after {
    content: "";
    display: table;
    clear: both;
}

.blog-content ul, .blog-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.blog-content li {
    margin-bottom: 8px;
    line-height: 1.7;
    color: #334155;
}

/* [NEW] Blockquote Styling (Trích dẫn nổi bật) */
.blog-content blockquote {
    background: #f8fafc;
    border-left: 4px solid var(--secondary-color);
    margin: 24px 0;
    padding: 16px 22px;
    font-style: italic;
    color: #475569;
    font-size: 1.02rem;
    line-height: 1.7;
    border-radius: 0 10px 10px 0;
    position: relative;
    border-top: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}
.blog-content blockquote::before {
    content: "\201C"; /* Dấu ngoặc kép */
    font-family: serif;
    font-size: 3rem;
    color: rgba(0,0,0,0.08);
    position: absolute;
    top: -10px;
    left: 10px;
}

/* [NEW] Responsive Tables (Bảng biểu không vỡ trên mobile) */
.blog-content table {
    display: block;
    width: 100%;
    overflow-x: auto; /* Cho phép cuộn ngang */
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin-bottom: 20px;
    white-space: nowrap; /* Giữ nội dung trên 1 dòng để dễ đọc */
}
.blog-content table th, .blog-content table td {
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
}
.blog-content table th {
    background-color: #f3f4f6;
    font-weight: 700;
    color: #374151;
}

.blog-content li { margin-bottom: 10px; }

/* --- 4. EMBEDDED SERVICE CARD (Content-to-Commerce) --- */
.embedded-service-card, .embedded-location-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin: 0px 0; /* [UPDATE] Giảm tiếp khoảng cách dọc (Gốc 20px) */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: transform 0.2s;
    position: relative; /* [FIX] Để neo ảnh tuyệt đối */
    min-height: 70px; /* [UPDATE] Slim Horizontal: Giảm chiều cao tối thiểu */
    cursor: pointer; /* [FIX] Thêm con trỏ tay để biết click được */
}

.embedded-service-card:hover, .embedded-location-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* [FIX] Target cụ thể để ghi đè style mặc định của .blog-content img */
.embedded-service-card .embed-img, .embedded-location-card .embed-img {
    /* [UPDATE] Mobile: Reset position để stack dọc hoặc ngang tùy media query */
    position: relative; 
    width: 100%; 
    height: 180px;
    object-fit: cover;
    margin: 0; /* Loại bỏ margin mặc định của ảnh trong bài viết */
    border-radius: 0; /* Loại bỏ bo góc riêng của ảnh để khớp với thẻ */
    box-shadow: none;
    max-width: none;
}

.embed-body {
    padding: 6px 12px; /* [UPDATE] Giảm padding dọc tối đa để thẻ gọn hơn */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 0;
    min-width: 0; /* [FIX] Cho phép co nhỏ trên Desktop để không đẩy nút ra ngoài */
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.embed-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.4; /* [FIX] Tăng line-height để không bị cắt ngọn chữ */
    padding-top: 2px; /* [FIX] Thêm padding an toàn */
    white-space: nowrap; /* [FIX] Ép label trên 1 hàng */
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.embed-title {
    font-size: 0.92rem; /* [UPDATE] Giảm nhẹ cỡ chữ cho cân đối */
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.35;
    white-space: normal; /* [FIX] Cho phép xuống tối đa 2 dòng để không tràn ngang thẻ */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.embed-title a {
    display: inline;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.embed-price {
    color: var(--danger-color);
    font-weight: 800;
    font-size: 1rem; /* [UPDATE] Giảm nhẹ cỡ chữ giá */
}

.embed-btn {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    align-self: center;
    margin-right: 15px;
    flex-shrink: 0; /* [FIX] Ngăn nút bị co lại hoặc đẩy mất khi màn hình nhỏ */
}

/* Style riêng cho Location Card */
.embed-btn.btn-location {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.embed-btn.btn-location:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* [NEW] Action link cho thẻ nhúng (Hiển thị liền mạch không phá vỡ layout) */
.embed-action-link {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.embedded-service-card:hover .embed-action-link {
    transform: translateX(2px);
}

/* --- 5. STICKY SIDEBAR & TOC --- */
.blog-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 85px;
}

.toc-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.toc-title {
    font-size: 0.95rem;
    font-weight: 750;
    color: #0f172a;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 45vh;
    overflow-y: auto;
}

.toc-list::-webkit-scrollbar {
    width: 4px;
}
.toc-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.toc-list li {
    margin-bottom: 3px;
}

.toc-list a {
    text-decoration: none;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.35;
    transition: all 0.2s ease;
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 2px solid transparent;
}

.toc-list a:hover {
    color: var(--primary-color);
    background-color: #f0f7ff;
}

.toc-list a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background-color: #eef4ff;
    font-weight: 700;
}

/* Category Pill Tags in Sidebar */
.sidebar-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #475569;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.sidebar-cat-pill:hover, .sidebar-cat-pill.active {
    background: #eef4ff;
    color: var(--primary-color);
    border-color: #bfdbfe;
}
.sidebar-cat-pill .badge-count {
    font-size: 0.7rem;
    color: #64748b;
    background: #ffffff;
    padding: 1px 6px;
    border-radius: 10px;
}

/* --- RESPONSIVE --- */
@media (max-width: 991.98px) {
    .blog-header-section { height: 50vh; }
    .blog-title { font-size: 1.8rem; }

    /* [FIX] Reset layout thẻ nhúng trên mobile */
    .embedded-service-card, .embedded-location-card { flex-direction: column; min-height: auto; }
    .embedded-service-card .embed-img, .embedded-location-card .embed-img { position: relative; width: 100%; height: 180px; }
    .embed-body { margin-left: 0; }
    
    .embed-btn { width: 100%; margin: 0 15px 15px 15px; text-align: center; align-self: stretch; }
    .mobile-toc-btn { display: flex; }

    /* [NEW] Giảm khoảng cách trừ hao trên mobile vì không có Navbar dính */
    .blog-content h2, .blog-content h3 { scroll-margin-top: 80px; }

    /* [FIX] Mobile: Breadcrumb nằm gọn trong container, không dùng 100vw để tránh cuộn ngang */
    .modern-breadcrumb,
    .modern-breadcrumb.is-stuck {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 8px !important;
        border: 1px solid #eee !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* [NEW] Style cho bài viết liên quan */
.hover-shadow:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Utility for smooth transform */
.transition-transform {
    transition: transform 0.2s ease;
}
.transition-transform:hover {
    transform: scale(1.1);
}

/* [NEW] Facebook Share Button Style */
.btn-share-fb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #1877F2;
    color: white !important;
    border-radius: 50%;
    text-decoration: none;
    border: none;
    outline: none;
    transition: transform 0.2s ease;
}
.btn-share-fb:hover {
    transform: scale(1.1);
    color: white !important;
}

/* --- DESKTOP SPECIFIC STYLES (Khôi phục giao diện Desktop) --- */
@media (min-width: 992px) {
    /* 1. Sidebar Styling (Khôi phục khung viền) */
    .sidebar-booking-box {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 30px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    }
    
    .sidebar-box-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #111827;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #f3f4f6;
    }

    /* 3. Embedded Card (Khôi phục layout ngang) */
    .embedded-service-card, .embedded-location-card {
        flex-direction: row;
        align-items: center;
        min-height: 80px; /* [UPDATE] Slim Desktop (Gốc 120px) */
        height: auto;
    }
    .embedded-service-card .embed-img, .embedded-location-card .embed-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100px; /* [UPDATE] Ảnh nhỏ lại (Gốc 140px) */
        height: 100%;
    }
    .embed-body {
        margin-left: 100px; /* [UPDATE] Chừa chỗ cho ảnh nhỏ hơn */
        width: calc(100% - 100px);
        max-width: calc(100% - 100px);
        overflow: hidden;
        padding: 10px 15px; /* [UPDATE] Padding gọn hơn */
    }
    /* [UPDATE] Ẩn nút xem chi tiết trên Desktop để thẻ gọn hơn */
    .embed-btn {
        display: none !important;
    }

    /* 2. Related Posts Grid (Chuyển từ trượt ngang sang lưới) */
    .related-posts-section .mobile-horizontal-scroll {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 cột */
        gap: 24px;
        overflow: visible;
        padding-bottom: 0;
    }

    /* Biến thẻ ngang (Mobile) thành thẻ dọc (Desktop) */
    .related-posts-section .mobile-service-card {
        display: flex;
        flex-direction: column; /* Xếp dọc */
        min-width: 0;
        max-width: none;
        height: 100%;
        border: 1px solid #eee;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .related-posts-section .mobile-service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        border-color: var(--primary-color);
    }

    .related-posts-section .mobile-service-card .img-col {
        width: 100%;
        height: 200px; /* Chiều cao ảnh cố định */
        position: relative;
    }
    /* [FIX] Bổ sung style cho ảnh trên Desktop để không bị vỡ */
    .related-posts-section .mobile-service-card .img-col img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .related-posts-section .mobile-service-card .content-col {
        padding: 20px;
        flex-grow: 1;
    }

    .related-posts-section .m-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
        line-height: 1.4;
        /* [FIX] Reset line-clamp cho tiêu đề dài trên Desktop */
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        overflow: visible;
        text-overflow: initial;
        height: auto;
    }

    /* [NEW] Sidebar Horizontal Card (Giống Mobile nhưng cho Desktop Sidebar) */
    .sidebar-service-card {
        display: flex;
        align-items: center;
        background: #fff;
        border: 1px solid #f0f0f0;
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 12px;
        transition: all 0.2s;
        height: 90px; /* Chiều cao cố định gọn gàng */
        text-decoration: none;
        color: #333;
    }
    .sidebar-service-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border-color: var(--primary-color);
        color: #333;
    }
    .sidebar-service-card .img-col {
        width: 90px;
        height: 100%;
        flex-shrink: 0;
        position: relative;
    }
    .sidebar-service-card .img-col img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .sidebar-service-card .content-col {
        padding: 10px;
        flex-grow: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .sidebar-service-card .title { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .sidebar-service-card .meta { font-size: 0.75rem; color: #666; }

    /* [NEW] Sidebar Location Grid (2 Columns) */
    .sidebar-location-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    /* Điều chỉnh thẻ card khi nằm trong lưới 2 cột */
    .sidebar-location-grid .sidebar-service-card {
        flex-direction: row; /* [UPDATE] Quay lại xếp ngang (Ảnh trái - Chữ phải) */
        height: 70px; /* [UPDATE] Chiều cao nhỏ gọn hơn (Gốc là 90px) */
        margin-bottom: 0;
    }
    
    .sidebar-location-grid .sidebar-service-card .img-col {
        width: 50px; /* [UPDATE] Thu nhỏ ảnh để nhường chỗ cho text */
        height: 100%;
    }
    
    .sidebar-location-grid .sidebar-service-card .content-col {
        width: auto;
        padding: 5px 8px; /* Padding nhỏ */
        flex: 1;
    }
    
    .sidebar-location-grid .sidebar-service-card .title {
        font-size: 0.8rem; /* Font nhỏ hơn */
        margin-bottom: 2px;
        line-height: 1.2;
    }
    
    .sidebar-location-grid .sidebar-service-card .meta {
        font-size: 0.65rem;
        /* [UPDATE] Ép loại hình trên 1 dòng */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    /* [NEW] Sidebar Category Accordion Styles */
    .sidebar-category-accordion .accordion-button {
        background-color: transparent;
        padding: 10px 0;
        color: #333;
        font-weight: 600;
        font-size: 0.95rem;
        border-bottom: 1px dashed #eee;
    }
    .sidebar-category-accordion .accordion-button:not(.collapsed) {
        color: var(--primary-color);
        background-color: transparent;
        box-shadow: none;
        border-bottom: none;
    }
    .sidebar-category-accordion .accordion-button::after {
        background-size: 0.8rem;
        opacity: 0.5;
        margin-left: auto;
    }
    .sidebar-category-accordion .accordion-button:focus {
        box-shadow: none;
        border-color: rgba(0,0,0,0.125);
    }
    .sidebar-category-accordion .accordion-body {
        padding: 0 0 15px 10px;
    }
    .sidebar-category-accordion .post-link {
        display: block;
        padding: 3px 0;
        color: #666;
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.2s;
        line-height: 1.4;
    }
    .sidebar-category-accordion .post-link:hover {
        color: var(--primary-color);
        transform: translateX(3px);
    }
    .sidebar-category-accordion .post-link.active {
        color: var(--primary-color);
        font-weight: 700;
    }
    .mobile-booking-bar,
    .floating-toc-btn,
    .toc-popup {
        display: none !important;
    }
}

/* [NEW] Mobile Horizontal Scroll for Services */
@media (max-width: 991.98px) {
    /* Snap Scroll Effect */
    .snap-scroll {
        scroll-snap-type: x mandatory;
        padding-right: 20px; /* Padding phải để thẻ cuối không dính lề */
    }

    .mobile-horizontal-scroll {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none;  /* IE 10+ */
    }
    .mobile-horizontal-scroll::-webkit-scrollbar { 
        display: none; /* Chrome/Safari */
    }
    
    .mobile-service-card {
        /* [UPDATE] Chuyển sang thẻ ngang (Horizontal) */
        min-width: 85vw; /* Chiếm 85% chiều rộng màn hình */
        max-width: 85vw;
        height: 100px; /* Chiều cao cố định */
        display: flex;
        flex-direction: row; /* Xếp ngang */
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        flex-shrink: 0;
        scroll-snap-align: start; /* Snap vào đầu thẻ */
    }
    
    .mobile-service-card .img-col {
        width: 100px; /* Ảnh vuông bên trái */
        height: 100%;
        flex-shrink: 0;
        position: relative;
    }
    .mobile-service-card .img-col img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mobile-service-card .content-col {
        padding: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex-grow: 1;
        min-width: 0; /* Để text truncate hoạt động */
    }
    
    .m-title {
        font-size: 0.95rem;
        font-weight: 700;
        margin-bottom: 4px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #333;
    }
    
    .m-price {
        color: var(--danger-color);
        font-weight: 700;
        font-size: 0.9rem;
    }

    /* Fix cho thẻ bài viết liên quan */
    .related-posts-section .col-10 {
        scroll-snap-align: center;
    }

    /* [UPDATE] Mobile Location Grid (Horizontal Scroll - 2 items visible) */
    .mobile-location-grid {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .mobile-location-grid::-webkit-scrollbar { display: none; }
    
    .location-card-compact {
        min-width: 45vw !important; /* [FIX] Hiển thị ~2 thẻ trên 1 hàng (90% + gap) */
        max-width: 45vw !important;
        width: 45vw !important;
        height: 80px; /* Chiều cao nhỏ gọn hơn */
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .location-card-compact .img-col { width: 80px; } /* Ảnh vuông nhỏ hơn */
    .location-card-compact .m-title { font-size: 0.85rem; }
    /* [UPDATE] Ép loại hình trên 1 dòng */
    .location-card-compact .content-col .text-muted {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }
}

@media (max-width: 576px) {
    .blog-header-section { height: 40vh; /* [UPDATE] Giảm chiều cao header */ }
    .blog-title { font-size: 1.4rem; }
    .blog-content-card { padding: 16px 14px; border-radius: 12px; }
    .blog-content { font-size: 0.98rem; line-height: 1.72; }
    .blog-content h2 { font-size: 1.25rem; margin-top: 24px; margin-bottom: 10px; }
    .blog-content h3 { font-size: 1.1rem; margin-top: 20px; margin-bottom: 8px; }
    .blog-content p { margin-bottom: 14px; }
}

/* --- MOBILE STICKY FOOTER (Đồng bộ với Location/Service/Mobile Nav) --- */
.mobile-booking-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1030;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom);
    gap: 8px;
}

@media (min-width: 992px) {
    .mobile-booking-bar {
        display: none !important;
    }
}

.nav-item-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0 8px;
    flex: 1;
    height: 100%;
    color: #343a40;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}
.nav-item-detail:hover {
    color: var(--primary-color);
}
.nav-item-detail .nav-icon {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 4px;
}
.nav-item-detail .nav-text {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

.sheet-handle {
    width: 40px;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin: 10px auto 0 auto;
}

/* [NEW] TOC Popup (Mobile Pop-out - Mở từ góc phải) */
.toc-popup {
    position: fixed;
    bottom: 140px;
    right: 15px; /* Mở từ góc phải màn hình */
    left: auto;
    width: 85vw;
    max-width: 290px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.85) translateY(15px);
    transform-origin: bottom right; /* Bouncy pop từ góc dưới phải */
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}
.toc-popup.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}
.toc-popup-header {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 14px 14px 0 0;
}
.toc-popup-body {
    padding: 4px 0;
    max-height: 45vh;
    overflow-y: auto;
}

/* [NEW] Compact TOC List Styles */
.toc-list li {
    margin-bottom: 0;
    border-bottom: 1px solid #f1f5f9;
}
.toc-list a {
    padding: 8px 14px;
    font-size: 0.85rem;
    display: block;
    color: #334155;
    line-height: 1.35;
}
.toc-list a:hover, .toc-list a.active {
    background-color: #f0f7ff;
    color: var(--primary-color);
    border-left: none;
    font-weight: 600;
}

/* [NEW] Floating TOC Button (Nút Mục lục nổi - Đặt ở góc phải màn hình) */
.floating-toc-btn {
    position: fixed;
    bottom: 85px; /* Sát trên thanh footer mobile */
    right: 15px; /* Chuyển sang góc phải thuận tay ngón cái */
    left: auto;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1040;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    font-size: 1.1rem;
    transition: transform 0.2s, background-color 0.2s;
}
.floating-toc-btn:active {
    transform: scale(0.92);
    background-color: #f1f5f9;
}

/* [FIX] Sidebar Drawer Styles (Fix lỗi hiển thị ở bottom) */
.sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 85vw;
    max-width: 320px;
    background: #fff;
    z-index: 3000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0,0,0,0.1);
}
.sidebar-drawer.open { transform: translateX(0); }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}
.sidebar-backdrop.open { opacity: 1; visibility: visible; }

.drawer-header {
    padding: 15px;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-close-drawer { background: none; border: none; color: white; font-size: 1.2rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px; }
.drawer-nav { list-style: none; padding: 0; margin: 0; }
.drawer-nav li { margin-bottom: 8px; }
.drawer-link {
    display: block; padding: 10px 15px;
    background: #f8f9fa; border-radius: 8px;
    color: #333; text-decoration: none; font-weight: 600;
}
.drawer-link.active { background: #eef4ff; color: var(--primary-color); }
.drawer-link i { width: 20px; text-align: center; margin-right: 10px; color: var(--primary-color); }

/* [FIX] Embedded Card Mobile: Force Horizontal */
@media (max-width: 991.98px) {
    .text-card-split-view {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
    }
    .blog-content blockquote .bq-embedded-cards-grid,
    .service-content blockquote .bq-embedded-cards-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 12px;
        width: 100%;
    }
    .embedded-service-card, .embedded-location-card { 
        float: none !important;
        clear: both !important;
        flex-direction: row; /* [FIX] Ngang trên mobile */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        height: auto; /* [FIX] Để chiều cao tự động co giãn theo nội dung, tránh che chữ */
        min-height: 76px; /* [UPDATE] Đủ chiều cao cho tiêu đề 2 dòng + giá */
        margin: 6px 0; /* [UPDATE] Giảm margin tối đa, khoảng cách sẽ do thẻ p quyết định */
    }
    .embedded-service-card .embed-img, .embedded-location-card .embed-img { 
        width: 110px; /* [UPDATE] Tăng chiều rộng để ảnh cân đối hơn (Hình chữ nhật/Vuông) */
        height: 100%; 
        position: absolute; /* [FIX] Neo tuyệt đối để không đẩy chiều cao thẻ */
        top: 0;
        left: 0;
        object-fit: cover;
    }
    .embed-body { 
        margin-left: 110px; /* [FIX] Chừa chỗ cho ảnh tuyệt đối */
        width: calc(100% - 110px);
        max-width: calc(100% - 110px);
        overflow: hidden;
        padding: 8px 10px; /* [UPDATE] Padding gọn hơn */
        justify-content: center;
        min-width: 0; /* [FIX] Đảm bảo text dài tự xuống dòng, không bị che mất */
    }
    .embed-btn { 
        display: none; /* Ẩn nút trên thẻ nhúng mobile cho gọn, click vào thẻ là được */
    }

    /* [NEW] Fix layout khi ảnh được bọc bởi Fancybox Link & Thêm icon gợi ý */
    .embedded-service-card > a[data-fancybox], .embedded-location-card > a[data-fancybox] {
        position: absolute; /* [FIX] Neo tuyệt đối giống Desktop */
        top: 0;
        left: 0;
        height: 100%;
        width: 110px; /* [UPDATE] Đồng bộ width mobile */
        display: block;
        overflow: hidden;
    }
    .embedded-service-card > a[data-fancybox] .embed-img, .embedded-location-card > a[data-fancybox] .embed-img {
        width: 100%;
        height: 100%;
        position: static; /* Reset absolute nếu có */
    }
}

/* [NEW] DESKTOP AUTO-GRID LAYOUT (Giao diện lưới tự động) */
@media (min-width: 992px) {
    /* Container lưới 2 cột */
    .embedded-card-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Chia đôi màn hình */
        gap: 20px; /* Khoảng cách giữa các thẻ */
        margin: 25px 0;
    }

    /* Khi thẻ nằm trong lưới */
    .embedded-card-grid .embedded-service-card, .embedded-card-grid .embedded-location-card {
        margin: 0; /* Bỏ margin cũ */
        height: 100%; /* Cân bằng chiều cao */
    }

    /* [UPDATE] Khi thẻ đứng một mình (Single) -> Float sang phải để văn bản bao quanh */
    .embedded-service-card.embedded-card-single, .embedded-location-card.embedded-card-single {
        float: right; /* Đẩy sang phải */
        width: 42%; /* Chiếm 42% chiều rộng */
        max-width: 360px; /* Giới hạn max-width */
        margin: 4px 0 16px 24px; /* Canh lề: Trái 24px để tách văn bản */
        border-left: 4px solid var(--primary-color); /* Thêm điểm nhấn viền trái */
        clear: right; /* Tránh chồng chéo */
        z-index: 10;
    }

    /* [NEW] Thẻ nhúng nằm trong mục danh sách (LI): Float Text-Wrap tự nhiên sang phải */
    .blog-content li.has-embedded-card::after,
    .service-content li.has-embedded-card::after {
        content: "";
        display: table;
        clear: both;
    }

    .blog-content li.has-embedded-card,
    .service-content li.has-embedded-card {
        margin-bottom: 18px;
    }

    .blog-content li .embedded-service-card,
    .blog-content li .embedded-location-card,
    .service-content li .embedded-service-card,
    .service-content li .embedded-location-card {
        float: right !important;
        width: clamp(290px, 45%, 360px) !important;
        max-width: 360px !important;
        margin: 2px 0 10px 20px !important;
        clear: right !important;
        border-left: 4px solid var(--primary-color) !important;
        z-index: 5;
    }

    .blog-content li .embedded-service-card .embed-body,
    .blog-content li .embedded-location-card .embed-body,
    .service-content li .embedded-service-card .embed-body,
    .service-content li .embedded-location-card .embed-body {
        padding: 6px 10px !important;
    }

    /* [NEW] Thẻ nhúng nằm trong trích dẫn (BLOCKQUOTE):
       - 1 thẻ: Float Text-Wrap tự nhiên sang phải (như trong LI)
       - Từ 2 thẻ trở lên: Xếp thành lưới 2 cột cân xứng trên cùng 1 hàng */
    .blog-content blockquote.has-embedded-card-single::after,
    .service-content blockquote.has-embedded-card-single::after {
        content: "";
        display: table;
        clear: both;
    }

    .blog-content blockquote.has-embedded-card-single,
    .service-content blockquote.has-embedded-card-single {
        display: flow-root;
        position: relative;
    }

    .blog-content blockquote.has-embedded-card-single .embedded-service-card,
    .blog-content blockquote.has-embedded-card-single .embedded-location-card,
    .service-content blockquote.has-embedded-card-single .embedded-service-card,
    .service-content blockquote.has-embedded-card-single .embedded-location-card {
        float: right !important;
        width: clamp(280px, 42%, 360px) !important;
        max-width: 360px !important;
        margin: 2px 0 10px 20px !important;
        clear: right !important;
        border-left: 4px solid var(--primary-color) !important;
        z-index: 5;
    }

    .blog-content blockquote.has-embedded-card-single .embedded-service-card .embed-body,
    .blog-content blockquote.has-embedded-card-single .embedded-location-card .embed-body,
    .service-content blockquote.has-embedded-card-single .embedded-service-card .embed-body,
    .service-content blockquote.has-embedded-card-single .embedded-location-card .embed-body {
        padding: 6px 10px !important;
    }

    .blog-content blockquote.has-embedded-card-grid,
    .service-content blockquote.has-embedded-card-grid {
        display: block;
    }

    .blog-content blockquote .bq-embedded-cards-grid,
    .service-content blockquote .bq-embedded-cards-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-top: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .blog-content blockquote .bq-embedded-cards-grid .embedded-service-card,
    .blog-content blockquote .bq-embedded-cards-grid .embedded-location-card,
    .service-content blockquote .bq-embedded-cards-grid .embedded-service-card,
    .service-content blockquote .bq-embedded-cards-grid .embedded-location-card {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        clear: none !important;
        border-left: 4px solid var(--primary-color) !important;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    /* [NEW] 2-column layout for a paragraph and a single embedded card */
    .text-card-split-view {
        width: 100%; /* Đảm bảo grid chiếm toàn bộ chiều rộng */
        display: grid;
        grid-template-columns: 1fr 45%; /* Text chiếm phần còn lại, thẻ chiếm 45% */
        gap: 25px; /* Khoảng cách giữa 2 cột */
        align-items: start; /* Căn các item lên trên cùng */
        margin: 25px 0;
        clear: both; /* Đảm bảo layout này không bị ảnh hưởng bởi float khác */
    }

    /* [FIX] Định vị cứng vị trí cột để tránh lỗi hiển thị */
    .text-card-split-view > *:first-child {
        grid-column: 1 / 2; /* Phần tử đầu tiên (Text) nằm ở Cột 1 */
        text-align: left;   /* Canh trái văn bản */
        min-width: 0;       /* Ngăn vỡ layout nếu có từ quá dài */
    }
    .text-card-split-view > *:last-child {
        grid-column: 2 / 3; /* Phần tử thứ hai (Thẻ) nằm ở Cột 2 */
        min-width: 0;
    }

    .text-card-split-view > p {
        margin: 0; /* Reset margin của thẻ p bên trong grid */
    }

    .text-card-split-view .embedded-service-card, .text-card-split-view .embedded-location-card {
        margin: 0; /* Reset margin của thẻ */
        width: 100%; /* Thẻ chiếm 100% chiều rộng của cột grid */
        max-width: none; /* Ghi đè max-width cũ */
        float: none; /* Ghi đè float */
        clear: none; /* Ghi đè clear */
        border-left: 4px solid var(--primary-color); /* Giữ lại viền nhấn mạnh */
    }

    /* Tinh chỉnh nội dung thẻ Location khi ở Desktop để đỡ trống */
    .embedded-service-card .embed-body, .embedded-location-card .embed-body {
        padding: 8px 15px; /* [UPDATE] Giảm padding dọc trên Desktop */
    }

    /* [NEW] Fix layout Fancybox Link trên Desktop */
    .embedded-service-card > a[data-fancybox], .embedded-location-card > a[data-fancybox] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100px; /* [UPDATE] Đồng bộ width desktop */
        height: 100%;
    }
    
    /* Nếu là thẻ Location (có nút btn-location) thì làm gọn hơn nữa */
    /* Sử dụng :has() selector (Hỗ trợ hầu hết trình duyệt hiện đại) */
    .embedded-service-card:has(.btn-location).embedded-card-single, .embedded-location-card:has(.btn-location).embedded-card-single {
        max-width: 70%; /* Location thường ít chữ, cho nhỏ hơn nữa */
        background-color: #f9fafb; /* Nền xám nhẹ cho khác biệt */
    }
}

/* [GLOBAL] Icon kính lúp gợi ý phóng to cho thẻ nhúng (Áp dụng cả Mobile & Desktop) */
.embedded-service-card > a[data-fancybox]::after, .embedded-location-card > a[data-fancybox]::after {
    content: '\f065'; /* [UPDATE] Đổi sang icon fa-expand (Mở rộng) cho tinh tế hơn */
    font-family: "Font Awesome 7 Free", "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 24px; /* [UPDATE] Tăng nhẹ kích thước */
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; /* [UPDATE] Giảm size icon chút cho thanh thoát */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255,255,255,0.5);
    -webkit-font-smoothing: antialiased; /* [NEW] Làm mượt icon */
    pointer-events: none;
    z-index: 5;
}

/* [NEW] Reading Progress Bar Styles */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 10000; /* Cao hơn tất cả */
    pointer-events: none;
}
.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); /* Gradient đẹp mắt */
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* [FIX] Ẩn thanh điều hướng toàn cục (Global Nav) để tránh đè lên thanh footer của bài viết */
@media (max-width: 991.98px) {
     /* Chừa chỗ cho thanh footer bài viết */
}