/* Trang chủ & chi tiết bài viết — typography kiểu báo điện tử */
:root {
    --wh-primary: #1e4d8c;
    --wh-primary-light: #2563eb;
    --wh-accent: #0ea5e9;
    --wh-surface: #ffffff;
    --wh-bg: #f5f5f5;
    --wh-text: #1a1a1a;
    --wh-text-body: #333333;
    --wh-muted: #777777;
    --wh-border: #e5e5e5;
    --wh-radius: 6px;
    --wh-radius-sm: 4px;
    --wh-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --wh-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --wh-content-width: 780px;
    --wh-font: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --wh-fs-body: 1.0625rem;
    --wh-fs-body-lg: 1.125rem;
    --wh-fs-meta: 0.875rem;
    --wh-fs-badge: 0.8125rem;
    --wh-lh-body: 1.65;
    --wh-lh-body-lg: 1.7;
    --wh-lh-title: 1.25;
    --wh-gap-block: 0.65rem;
    --wh-gap-media: 0.75rem;
    --wh-gap-section: 0.85rem;
}

body.wh-home-active,
body.wh-detail-active {
    font-family: var(--wh-font) !important;
    font-size: var(--wh-fs-body);
    line-height: var(--wh-lh-body);
    color: var(--wh-text-body);
    -webkit-font-smoothing: antialiased;
}

body.wh-home-active {
    background: var(--wh-bg) !important;
}

.wh-page-wrap,
.wh-detail-shell {
    font-family: var(--wh-font);
    color: var(--wh-text-body);
}

.wh-page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 2.5rem;
}

/* Toolbar tìm kiếm */
.wh-toolbar {
    border: 1px solid var(--wh-border) !important;
    border-radius: var(--wh-radius) !important;
    box-shadow: var(--wh-shadow) !important;
    margin-bottom: 1.25rem !important;
    background: var(--wh-surface) !important;
}

.wh-toolbar-inner {
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
}

.wh-toolbar-inner .form-select,
.wh-toolbar-inner .form-control {
    border-radius: var(--wh-radius-sm);
    border-color: var(--wh-border);
    min-height: 44px;
}

.wh-toolbar-inner .form-select:focus,
.wh-toolbar-inner .form-control:focus {
    border-color: var(--wh-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.wh-search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.wh-search-wrap .bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wh-muted);
    pointer-events: none;
}

.wh-search-wrap .form-control {
    padding-left: 2.5rem;
}

/* Loading */
.wh-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--wh-muted);
}

.wh-loading .spinner-border {
    color: var(--wh-primary);
}

/* Danh sách bài viết */
.wh-articles {
    margin: 0;
}

.wh-articles-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--wh-surface);
    border-radius: var(--wh-radius);
    box-shadow: var(--wh-shadow);
    color: var(--wh-muted);
}

.wh-articles-empty i {
    font-size: 3rem;
    color: var(--wh-border);
    display: block;
    margin-bottom: 1rem;
}

.wh-open-article:focus-visible {
    outline: 2px solid var(--wh-primary-light);
    outline-offset: 2px;
}

/* Bài nổi bật */
.wh-featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--wh-surface);
    border-radius: var(--wh-radius);
    box-shadow: var(--wh-shadow);
    overflow: hidden;
    margin-bottom: 1.25rem;
    transition: box-shadow 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--wh-border);
}

.wh-featured:hover {
    box-shadow: var(--wh-shadow-hover);
}

@media (min-width: 768px) {
    .wh-featured {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        align-items: start;
    }
}

.wh-featured-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
}

@media (min-width: 768px) {
    .wh-featured-media {
        aspect-ratio: 4 / 3;
        max-height: 280px;
        min-height: 0;
    }
}

.wh-featured-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.wh-featured-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #ea580c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.6rem;
    border-radius: var(--wh-radius-sm);
}

.wh-featured-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
    background: var(--wh-surface);
    color: var(--wh-text);
}

@media (min-width: 768px) {
    .wh-featured-body {
        padding: 1.1rem 1.35rem;
    }
}

.wh-cat-badge {
    display: inline-block;
    font-size: var(--wh-fs-badge);
    font-weight: 500;
    color: var(--wh-primary);
    background: rgba(30, 77, 140, 0.08);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    margin-bottom: 0.65rem;
    width: fit-content;
}

.wh-featured-title {
    font-family: var(--wh-font);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--wh-text);
    line-height: 1.35;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .wh-featured-title {
        font-size: 1.1875rem;
    }
}

.wh-featured-excerpt {
    color: #4a4a4a;
    font-size: 1rem;
    line-height: var(--wh-lh-body);
    margin: 0 0 0.75rem;
    text-align: justify;
    text-justify: inter-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .wh-featured-excerpt {
        -webkit-line-clamp: 6;
        margin-bottom: 0.85rem;
    }
}

.wh-featured-body .wh-meta {
    margin-bottom: 0.35rem;
}

.wh-featured-body .wh-read-more {
    margin-top: 0.25rem;
}

.wh-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: var(--wh-fs-meta);
    color: var(--wh-muted);
    margin-bottom: 1rem;
}

.wh-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.wh-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--wh-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Lưới bài viết */
.wh-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.25rem;
}

@media (min-width: 576px) {
    .wh-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .wh-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.wh-card {
    background: var(--wh-surface);
    border-radius: var(--wh-radius);
    box-shadow: var(--wh-shadow);
    border: 1px solid var(--wh-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.wh-card:hover {
    box-shadow: var(--wh-shadow-hover);
    border-color: #94a3b8;
}

.wh-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    overflow: hidden;
}

.wh-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wh-card-body {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--wh-surface);
    color: var(--wh-text);
}

.wh-card-title {
    font-family: var(--wh-font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--wh-text);
    line-height: var(--wh-lh-title);
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.wh-card-excerpt {
    font-size: var(--wh-fs-body);
    color: #4a4a4a;
    line-height: var(--wh-lh-body);
    margin: 0 0 0.75rem;
    text-align: justify;
    text-justify: inter-word;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wh-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.65rem;
    border-top: 1px solid var(--wh-border);
    font-size: 0.8rem;
    color: var(--wh-muted);
}

.wh-card-link {
    color: var(--wh-primary);
    font-weight: 600;
    font-size: 0.8125rem;
}

/* Phân trang */
.wh-pagination-wrap {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.wh-pagination-wrap .pagination {
    gap: 0.35rem;
    flex-wrap: wrap;
}

.wh-pagination-wrap .page-link {
    border-radius: var(--wh-radius-sm) !important;
    border: 1px solid var(--wh-border) !important;
    color: var(--wh-primary) !important;
    min-width: 40px;
    text-align: center;
}

.wh-pagination-wrap .page-item.active .page-link {
    background: var(--wh-primary) !important;
    border-color: var(--wh-primary) !important;
    color: #fff !important;
}

/* ===== CHI TIẾT BÀI VIẾT ===== */
body.wh-detail-active {
    background: var(--wh-bg) !important;
}

.wh-detail-shell,
.wh-detail {
    animation: whFadeIn 0.35s ease;
}

.wh-detail-shell {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
}

.wh-detail-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0 0.75rem;
    flex-wrap: wrap;
}

.wh-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--wh-fs-meta);
    margin: 0;
}

.wh-crumb-link {
    border: none;
    background: var(--wh-surface);
    color: var(--wh-primary);
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    box-shadow: var(--wh-shadow);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.wh-crumb-link:hover {
    background: var(--wh-primary);
    color: #fff;
}

.wh-crumb-sep {
    color: var(--wh-muted);
}

.wh-crumb-current {
    color: var(--wh-muted);
    font-weight: 500;
}

.wh-btn-icon {
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--wh-shadow);
}

.wh-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 0;
}

@media (min-width: 992px) {
    .wh-detail-grid {
        grid-template-columns: minmax(0, 1fr) 300px;
        align-items: start;
    }
}

.wh-detail-main {
    min-width: 0;
}

.wh-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wh-sidebar-card {
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    box-shadow: var(--wh-shadow);
    padding: 1rem 1.1rem;
}

.wh-sidebar-sticky {
    position: sticky;
    top: 1rem;
}

.wh-sidebar-head {
    font-family: var(--wh-font);
    font-weight: 700;
    font-size: 1rem;
    color: var(--wh-text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--wh-primary);
}

.wh-sidebar-cta {
    border-radius: var(--wh-radius-sm) !important;
    font-weight: 600;
}

.wh-side-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wh-side-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 54px;
    text-decoration: none;
    color: inherit;
    padding: 0.35rem;
    border-radius: var(--wh-radius-sm);
    transition: background 0.2s;
}

.wh-side-item:hover {
    background: var(--wh-bg);
    color: var(--wh-primary);
}

.wh-side-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 54px;
    border-radius: var(--wh-radius-sm);
    overflow: hidden;
    background: var(--wh-bg);
}

.wh-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.wh-side-text {
    flex: 1;
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}

.wh-side-title {
    font-family: var(--wh-font);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wh-side-date {
    font-size: 0.75rem;
    line-height: 1.2;
    color: var(--wh-muted);
    white-space: nowrap;
}

.wh-hero-caption {
    position: absolute;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 2;
}

.wh-cat-badge--light {
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--wh-primary) !important;
}

.wh-hero-pattern {
    min-height: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, #1e4d8c 0%, #2b6cb8 50%, #0ea5e9 100%),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 12px,
            rgba(255, 255, 255, 0.04) 12px,
            rgba(255, 255, 255, 0.04) 24px
        );
}

.wh-detail-hero .wh-hero-img-error {
    display: none;
}

.wh-detail-lead {
    font-size: var(--wh-fs-body-lg);
    line-height: var(--wh-lh-body-lg);
    color: #4a4a4a;
    margin: 0 0 0.5rem;
    text-align: justify;
    text-justify: inter-word;
}

.wh-toc-box {
    background: #f8fafc;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.wh-toc-head {
    font-family: inherit;
    font-weight: 700;
    font-size: inherit;
    line-height: inherit;
    margin-bottom: 0.5rem;
    color: var(--wh-text);
}

.wh-toc-head i {
    font-size: 1em;
}

.wh-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.wh-toc-link {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: var(--wh-primary-light) !important;
    text-decoration: none;
    padding: 0.2rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
    transition: border-color 0.2s, color 0.2s;
}

.wh-toc-link:hover {
    color: var(--wh-primary) !important;
    border-left-color: var(--wh-accent);
}

.wh-toc-level-3 { padding-left: 1rem; }
.wh-toc-level-4,
.wh-toc-level-5,
.wh-toc-level-6 { padding-left: 1.5rem; }

/* Sidebar mục lục — cùng cỡ nội dung bài */
.wh-detail-sidebar .wh-sidebar-card .wh-toc-nav,
.wh-detail-sidebar .wh-sidebar-card .wh-toc-link {
    font-family: var(--wh-font) !important;
    font-size: var(--wh-fs-body) !important;
    line-height: var(--wh-lh-body-lg) !important;
}

@media (min-width: 768px) {
    .wh-detail-sidebar .wh-sidebar-card .wh-toc-nav,
    .wh-detail-sidebar .wh-sidebar-card .wh-toc-link {
        font-size: var(--wh-fs-body-lg) !important;
    }
}

body.wh-detail-active #whTocInlineWrap,
body.wh-detail-active #whTocInlineWrap .wh-toc-head,
body.wh-detail-active #whTocInlineWrap .wh-toc-nav,
body.wh-detail-active #whTocInlineWrap .wh-toc-link,
body.wh-detail-active #whTocSidebar,
body.wh-detail-active #whTocSidebar .wh-toc-link {
    font-family: var(--wh-font) !important;
    font-size: var(--wh-fs-body) !important;
    line-height: var(--wh-lh-body-lg) !important;
}

@media (min-width: 768px) {
    body.wh-detail-active #whTocInlineWrap,
    body.wh-detail-active #whTocInlineWrap .wh-toc-head,
    body.wh-detail-active #whTocInlineWrap .wh-toc-nav,
    body.wh-detail-active #whTocInlineWrap .wh-toc-link,
    body.wh-detail-active #whTocSidebar,
    body.wh-detail-active #whTocSidebar .wh-toc-link {
        font-size: var(--wh-fs-body-lg) !important;
    }
}

/* Mục lục / danh sách link do editor chèn trong nội dung bài */
.wh-detail-shell .bai-viet-content :is(ul, ol) a,
.wh-detail .bai-viet-content :is(ul, ol) a {
    font-size: inherit !important;
    line-height: inherit !important;
}

.wh-author-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
}

.wh-author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--wh-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.wh-author-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wh-muted);
    font-weight: 600;
}

.wh-author-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--wh-text);
}

.wh-author-desc {
    font-size: 0.88rem;
    color: var(--wh-muted);
    margin: 0.35rem 0 0;
}

@media print {
    .wh-detail-sidebar,
    .wh-detail-top,
    .wh-related,
    .wh-toc-box--inline {
        display: none !important;
    }
    .wh-detail-grid {
        grid-template-columns: 1fr !important;
    }
}

@keyframes whFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wh-detail-back {
    margin-bottom: 1.25rem;
}

.wh-detail-back .btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
}

.wh-detail-hero {
    position: relative;
    border-radius: var(--wh-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 240px;
    background: #e2e8f0;
}

@media (min-width: 768px) {
    .wh-detail-hero {
        aspect-ratio: 21 / 9;
        max-height: 320px;
    }
}

.wh-detail-hero img,
.wh-detail-hero .wh-hero-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.wh-detail-header-card {
    background: var(--wh-surface);
    border-radius: var(--wh-radius);
    box-shadow: var(--wh-shadow);
    border: 1px solid var(--wh-border);
    padding: 0.9rem 1rem;
    margin-top: 0;
    margin-bottom: 0.65rem;
}

.wh-detail-header-card .wh-cat-badge {
    margin-bottom: 0.4rem;
}

@media (min-width: 768px) {
    .wh-detail-header-card {
        padding: 1.15rem 1.35rem;
    }
}

.wh-detail-title {
    font-family: var(--wh-font);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--wh-text);
    line-height: 1.35;
    margin: 0 0 0.45rem;
    letter-spacing: normal;
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

@media (min-width: 768px) {
    .wh-detail-title {
        font-size: 2rem;
        line-height: var(--wh-lh-title);
    }
}

.wh-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    font-size: var(--wh-fs-meta);
    color: var(--wh-muted);
    padding-top: 0.45rem;
    margin-bottom: 0;
    border-top: 1px solid var(--wh-border);
}

.wh-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.wh-detail-content-wrap {
    margin: 0;
    background: var(--wh-surface);
    border-radius: var(--wh-radius);
    box-shadow: var(--wh-shadow);
    border: 1px solid var(--wh-border);
    padding: 0.9rem 1rem 1.35rem;
    font-family: var(--wh-font);
    font-size: var(--wh-fs-body);
    line-height: var(--wh-lh-body-lg);
    color: var(--wh-text-body);
}

@media (min-width: 768px) {
    .wh-detail-content-wrap {
        padding: 1.15rem 1.35rem 1.75rem;
        font-size: var(--wh-fs-body-lg);
    }
}

.wh-detail-content-wrap .wh-toc-box {
    margin-bottom: var(--wh-gap-block);
}

.wh-detail-shell .bai-viet-content,
.wh-detail .bai-viet-content {
    font-family: var(--wh-font);
    font-size: var(--wh-fs-body);
    line-height: var(--wh-lh-body-lg);
    color: var(--wh-text-body);
    display: flex;
    flex-direction: column;
    gap: var(--wh-gap-block);
    align-items: stretch;
}

/* Khối con cấp 1: bỏ margin rời — dùng gap đồng đều */
.wh-detail-shell .bai-viet-content > *,
.wh-detail .bai-viet-content > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

@media (min-width: 768px) {
    .wh-detail-shell .bai-viet-content,
    .wh-detail .bai-viet-content {
        font-size: var(--wh-fs-body-lg);
    }
}

/* Tiêu đề mục trong bài: cùng cỡ nội dung, chỉ đậm hơn (mọi cấp H1–H6) */
.wh-detail-shell .bai-viet-content h1,
.wh-detail-shell .bai-viet-content h2,
.wh-detail-shell .bai-viet-content h3,
.wh-detail-shell .bai-viet-content h4,
.wh-detail-shell .bai-viet-content h5,
.wh-detail-shell .bai-viet-content h6,
.wh-detail .bai-viet-content h1,
.wh-detail .bai-viet-content h2,
.wh-detail .bai-viet-content h3,
.wh-detail .bai-viet-content h4,
.wh-detail .bai-viet-content h5,
.wh-detail .bai-viet-content h6 {
    font-size: 1em !important;
    font-weight: 700 !important;
    line-height: inherit !important;
    color: var(--wh-text) !important;
    margin: 0 !important;
    padding: 0;
    text-align: justify;
    text-justify: inter-word;
    letter-spacing: normal;
}

/* Gỡ cỡ chữ inline trong tiêu đề (CKEditor / Word) */
.wh-detail-shell .bai-viet-content :is(h1, h2, h3, h4, h5, h6) :is(span, font, strong, b, em, i, u),
.wh-detail .bai-viet-content :is(h1, h2, h3, h4, h5, h6) :is(span, font, strong, b, em, i, u) {
    font-size: inherit !important;
    line-height: inherit !important;
}

.wh-detail-shell .bai-viet-content :is(h1, h2, h3, h4, h5, h6) :is(strong, b),
.wh-detail .bai-viet-content :is(h1, h2, h3, h4, h5, h6) :is(strong, b) {
    font-weight: 700 !important;
}

.wh-detail-shell .bai-viet-content :is(h1, h2, h3, h4, h5, h6).wh-heading-caps,
.wh-detail .bai-viet-content :is(h1, h2, h3, h4, h5, h6).wh-heading-caps,
.wh-detail-shell .bai-viet-content .wh-content-subhead.wh-heading-caps,
.wh-detail .bai-viet-content .wh-content-subhead.wh-heading-caps {
    font-size: 1em !important;
    letter-spacing: 0.01em;
    word-spacing: normal;
}

/* Gỡ cỡ chữ inline còn sót (CKEditor / Word) */
.wh-detail-shell .bai-viet-content [style*="font-size"]:not(img):not(video):not(iframe),
.wh-detail .bai-viet-content [style*="font-size"]:not(img):not(video):not(iframe),
.wh-detail-shell .bai-viet-content font,
.wh-detail .bai-viet-content font {
    font-size: inherit !important;
    line-height: inherit !important;
}

.wh-detail-shell .bai-viet-content .wh-content-subhead,
.wh-detail .bai-viet-content .wh-content-subhead {
    font-size: 1em !important;
    font-weight: 700 !important;
    line-height: inherit !important;
    color: var(--wh-text) !important;
    margin: 0 !important;
    text-align: justify;
    text-justify: inter-word;
}

.wh-detail-shell .bai-viet-content .wh-content-subhead :is(strong, b),
.wh-detail .bai-viet-content .wh-content-subhead :is(strong, b) {
    font-size: inherit !important;
    font-weight: 700 !important;
}

.wh-detail-shell .bai-viet-content strong,
.wh-detail-shell .bai-viet-content b,
.wh-detail .bai-viet-content strong,
.wh-detail .bai-viet-content b {
    font-weight: 700;
    font-size: inherit;
}

.wh-detail-shell .bai-viet-content p,
.wh-detail .bai-viet-content p,
.wh-detail-shell .bai-viet-content li,
.wh-detail .bai-viet-content li,
.wh-detail-shell .bai-viet-content blockquote,
.wh-detail .bai-viet-content blockquote,
.wh-detail-shell .bai-viet-content figcaption,
.wh-detail .bai-viet-content figcaption,
.wh-detail-shell .bai-viet-content td,
.wh-detail .bai-viet-content td {
    text-align: justify;
    text-justify: inter-word;
}

.wh-detail-shell .bai-viet-content p:empty,
.wh-detail .bai-viet-content p:empty {
    display: none;
}

.wh-detail-shell .bai-viet-content ul,
.wh-detail-shell .bai-viet-content ol,
.wh-detail .bai-viet-content ul,
.wh-detail .bai-viet-content ol {
    padding-left: 1.35rem;
}

.wh-detail-shell .bai-viet-content li,
.wh-detail .bai-viet-content li {
    margin-bottom: 0.25rem;
}

.wh-detail-shell .bai-viet-content li:last-child,
.wh-detail .bai-viet-content li:last-child {
    margin-bottom: 0;
}

.wh-detail-shell .bai-viet-content blockquote,
.wh-detail .bai-viet-content blockquote {
    padding: 0.65rem 0.85rem;
}

/* Ảnh / video: khoảng cách chuẩn với khổ chữ (gap cha + ảnh trong đoạn hỗn hợp) */
.wh-detail-shell .bai-viet-content > :is(.wh-media-block, .wh-media-wrap, figure, .video-wrapper, .table-responsive),
.wh-detail .bai-viet-content > :is(.wh-media-block, .wh-media-wrap, figure, .video-wrapper, .table-responsive) {
    margin: 0 !important;
}

.wh-detail-shell .bai-viet-content figure,
.wh-detail .bai-viet-content figure {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.wh-detail-shell .bai-viet-content :is(.wh-media-block, .wh-media-wrap, figure) img,
.wh-detail .bai-viet-content :is(.wh-media-block, .wh-media-wrap, figure) img {
    margin: 0 auto !important;
    display: block;
    max-width: 100%;
    height: auto;
}

.wh-detail-shell .bai-viet-content .video-wrapper,
.wh-detail .bai-viet-content .video-wrapper {
    margin: 0 !important;
}

.wh-detail-shell .bai-viet-content .wh-mixed-block img,
.wh-detail-shell .bai-viet-content .wh-mixed-block iframe,
.wh-detail-shell .bai-viet-content .wh-mixed-block video,
.wh-detail-shell .bai-viet-content .wh-mixed-block .video-wrapper,
.wh-detail .bai-viet-content .wh-mixed-block img,
.wh-detail .bai-viet-content .wh-mixed-block iframe,
.wh-detail .bai-viet-content .wh-mixed-block video,
.wh-detail .bai-viet-content .wh-mixed-block .video-wrapper {
    margin: 0.45rem auto !important;
    display: block;
    max-width: 100%;
}

.wh-detail-shell .bai-viet-content p:not(.wh-media-block):not(.wh-mixed-block) img,
.wh-detail .bai-viet-content p:not(.wh-media-block):not(.wh-mixed-block) img {
    margin: 0.45rem auto !important;
    display: block;
}

.wh-detail-shell .bai-viet-content a,
.wh-detail .bai-viet-content a {
    font-size: inherit !important;
    line-height: inherit;
    color: var(--wh-primary-light);
}

/* Link / danh sách trong bài: cùng cỡ nội dung (gỡ cỡ nhỏ từ editor) */
.wh-detail-shell .bai-viet-content :is(ul, ol) a,
.wh-detail .bai-viet-content :is(ul, ol) a,
.wh-detail-shell .bai-viet-content .small,
.wh-detail .bai-viet-content .small,
.wh-detail-shell .bai-viet-content small,
.wh-detail .bai-viet-content small {
    font-size: inherit !important;
}

.wh-related {
    margin: 2.5rem 0 0;
    padding: 0;
}

#baiVietContainer.wh-detail-mode,
body.wh-detail-active #baiVietContainer {
    display: block !important;
    max-width: 100%;
}

.wh-related-title {
    font-family: var(--wh-font);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--wh-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--wh-primary);
    display: inline-block;
}

/* Trạng thái lỗi / không tìm thấy */
.wh-state-card {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--wh-surface);
    border-radius: var(--wh-radius);
    box-shadow: var(--wh-shadow);
    max-width: 480px;
    margin: 2rem auto;
}

.wh-state-card i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
}

.wh-state-card h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.wh-state-card .btn {
    border-radius: 999px;
    margin-top: 0.5rem;
}
