/* ============================================================== */
/* TRANG CHI TIẾT BÀI VIẾT BLOG - 2 BỐ CỤC + STICKY SIDEBAR        */
/* ============================================================== */

.blog-detail-wrapper,
.blog-detail-wrapper * {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    box-sizing: border-box;
}

.blog-detail-wrapper {
    max-width: 1200px;
    margin: 24px auto 60px;
    padding: 0 16px;
    color: #334155;
    font-size: 15.5px;
    line-height: 1.8;
}

/* KHUNG LƯỚI 2 CỘT CHÍNH */
.blog-layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 36px;
    align-items: start;
}

/* ============================================================== */
/* CỘT TRÁI: ĐÓNG KHUNG CARD SANG TRỌNG, THOÁNG ĐÃNG KHÔNG SÁT LỀ   */
/* ============================================================== */
.blog-main-content {
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 36px 40px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

/* BREADCRUMB */
.blog-breadcrumb {
    font-size: 13.5px;
    color: #64748b;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.blog-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}
.blog-breadcrumb a:hover {
    color: #0284c7;
}
.blog-breadcrumb-current {
    color: #0f172a;
    font-weight: 500;
}

/* TIÊU ĐỀ BÀI VIẾT */
.blog-post-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 16px 0;
    letter-spacing: -0.025em;
}

/* META BÀI VIẾT ĐƯỢC KẺ VIỀN RÕ RÀNG */
.blog-meta-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.blog-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.blog-meta-sep {
    color: #cbd5e1;
}

/* ĐOẠN TÓM TẮT ĐẦU BÀI: NỔI BẬT VIỀN ĐỎ THƯƠNG HIỆU */
.blog-lead-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4.5px solid #e60012;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15.5px;
    color: #334155;
    margin-bottom: 28px;
    line-height: 1.7;
    font-style: italic;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* ẢNH COVER ĐẦU BÀI */
.blog-cover-frame {
    margin-bottom: 28px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.blog-cover-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* ============================================================== */
/* NỘI DUNG CHÍNH (TYPOGRAPHY & ĐỊNH DẠNG BẢNG ĐẸP MẮT)            */
/* ============================================================== */
.blog-body-text {
    font-size: 16px;
    line-height: 1.85;
    color: #1e293b;
    padding: 0;
    word-break: break-word;
}
.blog-body-text h2 {
    font-size: 1.45rem;
    font-weight: 600;
    color: #0f172a;
    margin: 30px 0 14px;
    letter-spacing: -0.02em;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.blog-body-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 24px 0 12px;
    letter-spacing: -0.015em;
}
.blog-body-text p {
    margin-bottom: 18px;
}
.blog-body-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid #e2e8f0;
}
.blog-body-text ul,
.blog-body-text ol {
    margin: 0 0 18px 24px;
}
.blog-body-text li {
    margin-bottom: 8px;
}
.blog-body-text a {
    color: #0284c7;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.blog-body-text blockquote {
    margin: 18px 0;
    padding: 12px 18px;
    background: #f8fafc;
    border-left: 4px solid #0284c7;
    border-radius: 0 6px 6px 0;
    color: #475569;
}

/* ĐỊNH DẠNG BẢNG (TABLE) BÀI VIẾT RÕ RÀNG, SANG TRỌNG */
.blog-body-text table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 24px 0 !important;
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
    font-size: 14.5px !important;
}

.blog-body-text table thead tr,
.blog-body-text table tr:first-child:not(tbody tr:not(:first-child)) {
    background: #f8fafc !important;
}

.blog-body-text table th,
.blog-body-text table tr:first-child td {
    padding: 12px 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    text-align: left;
    letter-spacing: -0.01em;
}

.blog-body-text table td {
    padding: 13px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155 !important;
    vertical-align: middle !important;
    line-height: 1.6 !important;
}

.blog-body-text table tbody tr:last-child td {
    border-bottom: none !important;
}

.blog-body-text table tbody tr:hover {
    background-color: #fbfcfe;
}

/* Cột đầu tiên (Tên gói/dịch vụ) đậm nét */
.blog-body-text table td:first-child {
    font-weight: 600;
    color: #0f172a;
}

/* Cột giá tiền (cột cuối) */
.blog-body-text table td:last-child {
    font-weight: 600;
    color: #e60012;
    white-space: nowrap;
}

/* KHỐI BÀI VIẾT LIÊN QUAN */
.blog-related-section {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
}
.blog-related-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}
.blog-related-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.blog-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}
.blog-related-thumb {
    display: block;
    height: 135px;
    overflow: hidden;
    background: #f8fafc;
}
.blog-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.blog-related-card:hover .blog-related-thumb img {
    transform: scale(1.04);
}
.blog-related-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-related-link {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-related-link:hover {
    color: #0284c7;
}
.blog-related-date {
    font-size: 12px;
    color: #94a3b8;
    margin-top: auto;
}

/* ============================================================== */
/* CỘT PHẢI: STICKY SIDEBAR (CÁCH HEADER ĐỎ AN TOÀN)            */
/* ============================================================== */
.blog-sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* KHUNG CARD SIDEBAR */
.sidebar-widget-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}
.sidebar-widget-header {
    font-size: 14.5px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #f1f5f9;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* DANH SÁCH DANH MỤC */
.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-cat-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: #334155;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.sidebar-cat-item a:hover {
    background: #f8fafc;
    color: #0284c7;
}
.sidebar-cat-item.active a {
    background: #f0f9ff;
    color: #0284c7;
    font-weight: 600;
}
.sidebar-cat-count {
    font-size: 11.5px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 500;
}
.sidebar-cat-item.active .sidebar-cat-count {
    background: #bae6fd;
    color: #0369a1;
}

/* WIDGET HỖ TRỢ / HOTLINE KỸ THUẬT */
.sidebar-support-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.support-box-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}
.support-box-desc {
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.5;
}
.support-phone-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 12px;
    background: #e60012;
    color: #ffffff;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.15s ease;
}
.support-phone-btn:hover {
    background: #cc0010;
}

/* ============================================================== */
/* RESPONSIVE DI ĐỘNG & IPAD                                      */
/* ============================================================== */
@media (max-width: 991px) {
    .blog-layout-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .blog-sidebar-sticky {
        position: static;
        top: 0;
    }
    .blog-main-content {
        padding: 24px 20px 32px;
        border-radius: 12px;
    }
    .blog-post-title {
        font-size: 1.65rem;
    }
    .blog-body-text table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .blog-main-content {
        padding: 18px 14px 24px;
    }
    .blog-post-title {
        font-size: 1.45rem;
    }
    .blog-lead-summary {
        padding: 12px 14px;
        font-size: 14.5px;
    }
}
