/* ==========================================================================
   TechPilot Editorial CSS (news.css) v1.1
   Sử dụng BEM và kế thừa các biến CSS từ design token tổng (style.css).
   Chỉ load ở /post và /post/detail/{slug}.
   ========================================================================== */

/* ── 1. Variables (scoped to .news-page) ─────────────────────────────────── */
.news-page {
    --news-primary:    var(--primary, #146EF5);
    --news-cyan:       #00C8FF;
    --news-ai-accent:  var(--techpilot-violet, #5B5BFF);
    --news-text-main:  var(--text-primary, #111827);
    --news-text-light: var(--text-secondary, #6B7280);
    --news-border:     var(--border, #E5E7EB);
    --news-page-bg:    var(--surface-page, #F3F4F6);
    --news-card-bg:    var(--surface-card, #FFFFFF);
    --news-muted-bg:   var(--surface-muted, #F9FAFB);
    --news-radius:     8px;
    --news-shadow:     var(--shadow-card, 0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06));
    --news-accent:     var(--news-primary);

    font-family: inherit;
    color: var(--news-text-main);
}

.news-detail-category-badge {
    margin-bottom: 12px;
    display: inline-block;
}

.news-empty__action {
    margin-top: 16px;
    display: inline-block;
}

/* ── 2. Layout & Grid ────────────────────────────────────────────────────── */
.news-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}
@media (min-width: 1024px) {
    .news-layout {
        grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
    }
}
.news-main {
    min-width: 0; /* Tránh tràn layout grid */
}
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ── 3. Content Category UI (Phase 3) ───────────────────────────────────── */
.news-category-section {
    margin-bottom: 35px;
}

/* Header Intro */
.news-intro-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.news-intro-text {
    flex: 1 1 320px;
    max-width: 680px;
}
.news-intro-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--news-text-main);
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.5px;
}
@media (max-width: 767px) {
    .news-intro-title {
        font-size: clamp(20px, 5vw, 24px);
    }
}
.news-intro-desc {
    font-size: 13px;
    color: var(--news-text-light);
    margin: 4px 0 0 0;
    line-height: 1.4;
}

/* Header Search Form */
.news-page .news-search-form {
    flex: 0 0 auto;
    width: 280px;
    max-width: 100%;
}
@media (max-width: 767px) {
    .news-page .news-search-form {
        width: 100%;
    }
}
.news-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.news-search-input-wrapper input {
    width: 100%;
    padding: 8px 36px 8px 14px;
    border: 1px solid var(--news-border);
    border-radius: 20px;
    background: var(--news-card-bg);
    color: var(--news-text-main);
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.news-search-input-wrapper input:focus {
    outline: none;
    border-color: var(--news-primary);
    box-shadow: 0 0 0 3px rgba(20, 110, 245, 0.15);
}
html.dark-mode .news-search-input-wrapper input:focus {
    border-color: #00C8FF;
    box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.2);
}
.news-search-submit-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--news-text-light);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 14px;
}
.news-search-submit-btn:hover {
    color: var(--news-primary);
}
.news-search-clear-btn {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--news-text-light);
    text-decoration: none;
    padding: 6px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.news-search-clear-btn:hover {
    color: #ef4444;
}
@media (max-width: 767px) {
    .news-search-input-wrapper input {
        min-height: 44px;
    }
    .news-search-submit-btn,
    .news-search-clear-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Streamlined Filter Controls */
.news-category-section--aaa {
    margin-bottom: 24px;
}
.news-filter-controls {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--news-border);
}
.news-type-pills--streamlined {
    display: flex;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 6px 2px;
}
.news-type-pills--streamlined::-webkit-scrollbar {
    display: none;
}

.news-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background-color: var(--news-card-bg);
    border: 1px solid var(--news-border);
    border-radius: 20px;
    color: var(--news-text-main);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    user-select: none;
}
.news-type-pill i {
    color: var(--news-primary);
    font-size: 14px;
    transition: color 0.2s ease;
}
.news-type-pill:hover {
    border-color: var(--news-primary);
    color: var(--news-primary);
    background-color: var(--news-page-bg);
}
.news-type-pill.is-active {
    background: linear-gradient(135deg, var(--news-primary) 0%, var(--news-ai-accent) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(20, 110, 245, 0.25);
}
.news-type-pill.is-active i {
    color: #fff;
}
.news-type-pill--ai {
    background: linear-gradient(135deg, rgba(91, 91, 255, 0.1) 0%, rgba(0, 200, 255, 0.1) 100%);
    border: 1px solid rgba(91, 91, 255, 0.35);
    color: var(--news-ai-accent, #5B5BFF);
}
html.dark-mode .news-type-pill--ai {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.15) 0%, rgba(91, 91, 255, 0.15) 100%);
    border-color: rgba(0, 200, 255, 0.4);
    color: #00C8FF;
}
.news-type-pill--ai i {
    color: #00C8FF;
}
.news-type-pill--ai:hover {
    background: linear-gradient(135deg, rgba(91, 91, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
    border-color: #00C8FF;
    color: #00C8FF;
}
.news-type-pill--ai.is-active {
    background: linear-gradient(135deg, #5B5BFF 0%, #00C8FF 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(91, 91, 255, 0.35);
}
.news-type-pill--ai.is-active i {
    color: #ffffff;
}
.news-type-pill:focus-visible {
    outline: 2px solid var(--news-cyan);
    outline-offset: 2px;
}
@media (max-width: 767px) {
    .news-type-pill {
        min-height: 44px;
        padding: 10px 16px;
    }
}

/* Tier 2: Topic Select Form */
.news-topic-form {
    display: inline-flex;
    align-items: center;
}
.news-topic-select-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.news-topic-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--news-text-light);
    white-space: nowrap;
}
.news-topic-select {
    padding: 6px 32px 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--news-text-main);
    background-color: var(--news-card-bg);
    border: 1px solid var(--news-border);
    border-radius: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
html.dark-mode .news-topic-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.news-topic-select:focus-visible {
    outline: 2px solid var(--news-primary);
    outline-offset: 1px;
}
.news-topic-submit-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
}
@media (max-width: 767px) {
    .news-topic-form {
        width: 100%;
    }
    .news-topic-select-wrapper {
        width: 100%;
        flex-wrap: wrap;
    }
    .news-topic-select {
        min-height: 44px;
        flex: 1 1 auto;
    }
    .news-topic-submit-btn {
        min-height: 44px;
    }
}

/* Hot Topics (Dual Placement Visibility Rules) */
.news-hot-topics-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.news-hot-topics-mobile::-webkit-scrollbar { display: none; }

.news-hot-topics-mobile .news-hot-topics__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--news-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.news-hot-topics-mobile .news-hot-topics__list {
    display: flex;
    gap: 8px;
}
.news-hot-topic-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--news-border);
    border-radius: 20px;
    color: var(--news-text-main);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.news-hot-topic-link:hover {
    border-color: var(--news-primary);
    color: var(--news-primary);
    background-color: var(--news-card-bg);
}

/* Breakpoint visibility rules - strictly display: none !important */
@media (min-width: 1024px) {
    .news-hot-topics-mobile {
        display: none !important;
    }
}
@media (max-width: 1023px) {
    .news-hot-topics-sidebar {
        display: none !important;
    }
}

/* ── 4. Hero Grid (Featured + Popular) ──────────────────────────────────── */
.news-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}
@media (min-width: 992px) {
    .news-hero-grid {
        grid-template-columns: 2fr 1fr;
        align-items: stretch;
    }
}

/* Featured card */
.news-featured {
    position: relative;
    border-radius: var(--news-radius);
    overflow: hidden;
    background: var(--news-card-bg);
    border: 1px solid var(--news-border);
    display: flex;
    flex-direction: column;
    box-shadow: var(--news-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.news-featured:hover {
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
}
.news-featured__img {
    position: relative;
    display: block;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: var(--news-muted-bg);
    cursor: pointer;
}
@media (min-width: 768px) {
    .news-featured__img {
        height: 320px;
    }
}
.news-featured__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}
.news-featured:hover .news-featured__img img {
    transform: scale(1.03);
}
.news-featured::after {
    display: none;
}
.news-featured__content {
    position: relative;
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--news-text-main);
    background: var(--news-card-bg);
}
.news-featured__content h2 {
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-featured__content h2 a {
    color: var(--news-text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}
.news-featured__content h2 a:hover {
    color: var(--news-primary);
    text-decoration: none;
}
.news-featured__content p {
    color: var(--news-text-light);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-featured__content .news-meta {
    margin-top: auto;
    padding-top: 6px;
    color: var(--news-text-light);
    font-size: 13px;
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Hero popular items */
.news-hero-popular {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
}
.news-hero-popular-item {
    display: flex;
    gap: 14px;
    align-items: stretch;
    background: var(--news-card-bg);
    border: 1px solid var(--news-border);
    border-radius: var(--news-radius);
    overflow: hidden;
    flex: 1;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.news-hero-popular-item:hover {
    border-color: var(--news-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.news-hero-popular__img {
    width: 140px;
    height: 100%;
    min-height: 90px;
    flex-shrink: 0;
    overflow: hidden;
    display: block;
}
.news-hero-popular__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.news-hero-popular-item:hover .news-hero-popular__img img {
    transform: scale(1.05);
}
.news-hero-popular__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 14px 10px 0;
}
.news-hero-popular__content h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-hero-popular__content h4 a {
    color: var(--news-text-main);
    text-decoration: none;
}
.news-hero-popular__content h4 a:hover {
    color: var(--news-primary);
}
.news-hero-popular-item .news-meta {
    margin-top: 4px;
    font-size: 12px;
    gap: 12px;
}
.news-hero-popular-item .news-meta i.fa-user {
    color: var(--news-primary);
}

/* Badge styles */
.news-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: fit-content;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--news-primary) 0%, var(--news-ai-accent) 100%);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(20, 110, 245, 0.3);
    position: static;
    z-index: 3;
}
html.dark-mode .news-badge {
    background: linear-gradient(135deg, #00C8FF 0%, var(--news-primary) 100%);
    color: #0B0F19;
}
.news-badge-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--news-primary);
    text-transform: uppercase;
    letter-spacing: .5px;
    display: inline-block;
}

/* ── 5. Horizontal Cards (List) ─────────────────────────────────────────── */
.news-section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--news-border);
    position: relative;
    color: var(--news-text-main);
    text-transform: uppercase;
}
.news-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--news-accent);
}
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.news-horizontal-card {
    display: flex;
    flex-direction: column;
    background: var(--news-card-bg);
    border-radius: var(--news-radius);
    overflow: hidden;
    box-shadow: var(--news-shadow);
    border: 1px solid var(--news-border);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.news-horizontal-card:hover {
    border-color: var(--news-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
@media (min-width: 640px) {
    .news-horizontal-card {
        flex-direction: row;
        align-items: stretch;
        height: 170px; /* Cố định chiều cao tuyệt đối 170px cho tất cả các Card */
    }
}
.news-horizontal-card__img {
    height: 180px;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}
@media (min-width: 640px) {
    .news-horizontal-card__img {
        width: 260px; /* Cố định chiều rộng khung ảnh 260px */
        height: 170px; /* Cố định chiều cao khung ảnh 170px khớp 100% Card */
        flex-shrink: 0;
    }
}
.news-horizontal-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.news-horizontal-card:hover .news-horizontal-card__img img {
    transform: scale(1.04);
}
.news-horizontal-card__body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}
.news-horizontal-card__body h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--news-text-main);
}
.news-horizontal-card__body h4 a {
    color: inherit;
    text-decoration: none;
}
.news-horizontal-card__body h4 a:hover {
    color: var(--news-primary);
}
.news-horizontal-card__summary {
    font-size: 13px;
    color: var(--news-text-light);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
@media (max-width: 374px) {
    .news-horizontal-card__summary {
        display: none;
    }
}

/* ── 6. Meta (Tác giả, Ngày, Thời gian đọc, Lượt xem) ──────────────────── */
.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--news-text-light);
    flex-wrap: wrap;
    margin-top: auto;
}
.news-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── 7. Sidebar Widgets ──────────────────────────────────────────────────── */
.news-sidebar-widget {
    background: var(--news-card-bg);
    border-radius: var(--news-radius);
    padding: 20px;
    box-shadow: var(--news-shadow);
    border: 1px solid var(--news-border);
}
.widget-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--news-border);
    color: var(--news-text-main);
}

/* Popular list (Scrollable đến vị trí thứ 10) */
.news-popular-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--news-border) transparent;
}
.news-popular-list::-webkit-scrollbar {
    width: 4px;
}
.news-popular-list::-webkit-scrollbar-track {
    background: transparent;
}
.news-popular-list::-webkit-scrollbar-thumb {
    background: var(--news-border);
    border-radius: 4px;
}
.news-popular-list::-webkit-scrollbar-thumb:hover {
    background: var(--news-primary);
}
.news-popular-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.popular-rank {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    color: var(--news-border);
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}
.popular-rank.rank-1 { color: #F59E0B; }
.popular-rank.rank-2 { color: #9CA3AF; }
.popular-rank.rank-3 { color: #D97706; }
.popular-info { min-width: 0; }
.popular-info h5 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.popular-info h5 a {
    color: var(--news-text-main);
    text-decoration: none;
}
.popular-info h5 a:hover {
    color: var(--news-primary);
}
.popular-info h5 a:focus-visible {
    outline: 2px solid var(--news-primary);
    outline-offset: 2px;
    border-radius: 2px;
}
.popular-views {
    font-size: 11px;
    color: var(--news-text-light);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Related list (trong sidebar chi tiết) */
.news-related-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.news-related-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.news-related-item:hover {
    background: var(--news-muted-bg);
    border-color: var(--news-border);
}
.news-related-img {
    flex-shrink: 0;
    width: 72px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    background: var(--news-muted-bg);
}
.news-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.news-related-item:hover .news-related-img img {
    transform: scale(1.05);
}
.news-related-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.news-related-content h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--news-text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-bottom: 1px;
    transition: color 0.2s ease;
}
.news-related-item:hover .news-related-content h5 {
    color: var(--news-primary);
}
.news-related-content h5 a {
    color: inherit;
    text-decoration: none;
}
.news-related-content span {
    font-size: 11px;
    color: var(--news-text-light);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── 8. Buying Needs ─────────────────────────────────────────────────────── */
.news-buying-needs {}
.buying-needs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.buying-needs-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: var(--news-muted-bg);
    border-radius: 6px;
    color: var(--news-text-main);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: background-color .2s, color .2s;
    border: 1px solid transparent;
}
.buying-needs-list li a i {
    color: var(--news-primary);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.buying-needs-list li a:hover {
    background: var(--news-primary);
    color: #fff;
    border-color: var(--news-primary);
}
.buying-needs-list li a:hover i {
    color: #fff;
}
.buying-needs-list li a:focus-visible {
    outline: 2px solid var(--news-primary);
    outline-offset: 2px;
}

/* ── 9. Pagination ───────────────────────────────────────────────────────── */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.news-pagination .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--news-card-bg);
    border: 1px solid var(--news-border);
    color: var(--news-text-main);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}
.news-pagination .page-btn:hover,
.news-pagination .page-btn.is-active {
    background: var(--news-primary);
    color: #fff;
    border-color: var(--news-primary);
}
.news-pagination .page-btn:focus-visible {
    outline: 2px solid var(--news-primary);
    outline-offset: 2px;
}

/* ── 10. Empty State ─────────────────────────────────────────────────────── */
.news-empty {
    text-align: center;
    padding: 60px 24px;
    background: var(--news-card-bg);
    border-radius: var(--news-radius);
    border: 1px dashed var(--news-border);
    color: var(--news-text-main);
}
.news-empty i {
    font-size: 48px;
    color: var(--news-text-light);
    margin-bottom: 16px;
    opacity: 0.4;
    display: block;
}
.news-empty h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}
.news-empty p {
    color: var(--news-text-light);
    font-size: 14px;
}

/* ── 11. Article Detail ──────────────────────────────────────────────────── */
.news-detail-card {
    min-width: 0;
    padding: 0;
}
.news-detail-title {
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 14px 0;
    color: var(--news-text-main);
}
.news-detail-summary {
    font-size: clamp(16px, 1.5vw, 19px);
    color: var(--news-text-light);
    line-height: 1.65;
    margin: 0 0 16px 0;
    font-weight: 400;
}
.news-detail-meta {
    border-bottom: 1px solid var(--news-border);
    padding-bottom: 16px;
    margin-bottom: 24px;
    font-size: 13px;
}
.news-detail-image {
    width: 100%;
    border-radius: var(--news-radius);
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid var(--news-border);
    aspect-ratio: 16 / 9;
    max-height: 520px;
}
.news-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-detail-content {
    font-size: clamp(15px, 1.3vw, 17px);
    line-height: 1.8;
    color: var(--news-text-main);
    text-align: left;
    max-width: 760px;
    word-break: break-word;
    overflow-wrap: break-word;
}
.news-detail-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 36px 0 16px 0;
    color: var(--news-text-main);
    scroll-margin-top: 80px;
}
.news-detail-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 28px 0 12px 0;
    color: var(--news-text-main);
    scroll-margin-top: 80px;
}
.news-detail-content p {
    margin-bottom: 20px;
}
.news-detail-content p:last-child {
    margin-bottom: 0;
}
.news-detail-content a {
    color: var(--news-primary);
    text-decoration: none;
    font-weight: 600;
}
.news-detail-content a:hover {
    text-decoration: underline;
}
.news-detail-content ul, 
.news-detail-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}
.news-detail-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}
.news-detail-content blockquote {
    margin: 30px 0;
    padding: 16px 24px;
    background-color: var(--news-muted-bg);
    border-left: 4px solid var(--news-primary);
    border-radius: 4px;
    color: var(--news-text-main);
    font-style: italic;
}
.news-detail-content blockquote p:last-child {
    margin-bottom: 0;
}
.news-detail-content .news-code-block {
    margin: 30px 0;
    border-radius: 8px;
    background: #1e1e1e;
    overflow-x: auto;
}
.news-detail-content .news-code-block pre {
    margin: 0;
    padding: 16px 24px;
}
.news-detail-content .news-code-block code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #d4d4d4;
    white-space: pre;
}
.news-detail-content .youtube-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 30px 0;
    border-radius: 8px;
    background: #000;
}
.news-detail-content .youtube-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 28px auto;
    display: block;
}
.news-detail-content figure {
    margin: 30px 0;
    text-align: center;
}
.news-detail-content figure img {
    margin: 0 auto 10px auto;
}
.news-detail-content figcaption {
    font-size: 14px;
    color: var(--news-text-light);
    font-style: italic;
}
.news-detail-content .article-table-wrap,
.news-detail-content .table-responsive {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 6px;
}
.news-detail-content table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}
.news-detail-content table th, 
.news-detail-content table td {
    padding: 14px 18px;
    border: 1px solid var(--news-border);
    text-align: left;
    line-height: 1.5;
}
.news-detail-content table th {
    background-color: var(--news-muted-bg);
    font-weight: 700;
}
.news-detail-content .callout {
    margin: 30px 0;
    padding: 20px 24px;
    border-radius: 8px;
    background-color: rgba(20, 110, 245, 0.05);
    border: 1px solid rgba(20, 110, 245, 0.15);
}
html.dark-mode .news-detail-content .callout {
    background-color: rgba(0, 200, 255, 0.05);
    border-color: rgba(0, 200, 255, 0.15);
}
.news-detail-content .callout-info {
    border-left: 4px solid var(--news-cyan);
}
.news-detail-content .pros-cons-block {
    margin: 30px 0;
    padding: 20px 24px;
    border-radius: 8px;
    background-color: var(--news-muted-bg);
    border: 1px solid var(--news-border);
}
.news-detail-content .pros-cons-block h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.news-detail-content .pros-cons-block ul {
    margin: 0;
}
.news-detail-content .pros-block {
    border-top: 4px solid var(--news-green, #10b981);
}
.news-detail-content .cons-block {
    border-top: 4px solid var(--news-red, #ef4444);
}
.news-toc {
    background: var(--news-muted-bg);
    border: 1px solid var(--news-border);
    border-radius: 8px;
    padding: 20px 24px;
    margin: 10px 0 40px 0;
    display: inline-block;
    min-width: 320px;
    max-width: 100%;
}
.news-toc-header {
    font-size: 16px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.news-toc-toggle {
    display: none;
}
.news-toc-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
    display: block;
}
.news-toc-item {
    margin-bottom: 8px !important;
    line-height: 1.45 !important;
    position: relative;
    padding-left: 12px;
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.news-toc-item:last-child {
    margin-bottom: 0 !important;
}
.news-toc-item a {
    color: var(--news-text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 14.5px;
    display: block;
}
.news-toc-item a:hover {
    color: var(--news-primary);
    text-decoration: none;
}
.news-toc-item.is-active {
    border-left-color: var(--news-primary, #146ef5);
}
.news-toc-item.is-active a {
    color: var(--news-primary, #146ef5) !important;
    font-weight: 700;
}
html.dark-mode .news-toc-item.is-active {
    border-left-color: #00C8FF;
}
html.dark-mode .news-toc-item.is-active a {
    color: #00C8FF !important;
}
.news-toc-level-3 {
    padding-left: 24px;
    font-size: 13.5px;
}

@media (max-width: 767px) {
    .news-toc {
        width: 100%;
        min-width: 0;
    }
    .news-toc-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
    }
    .news-toc-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
        padding: 0 10px;
        background: transparent;
        border: none;
        color: var(--news-text-main);
        cursor: pointer;
        font-size: 16px;
    }
    .news-toc-toggle i {
        transition: transform 0.25s ease;
    }
    .news-toc-toggle:focus-visible {
        outline: 2px solid var(--news-primary);
        outline-offset: 2px;
        border-radius: 4px;
    }
    html.js .news-toc-list {
        display: none;
        margin-top: 14px !important;
    }
    html.js .news-toc.is-open .news-toc-list {
        display: block;
    }
    .news-toc.is-open .news-toc-toggle i {
        transform: rotate(180deg);
    }
}
.news-detail-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--news-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--news-text-light);
}

/* ── 12. Toast notification ──────────────────────────────────────────────── */
.toast-message {
    position: fixed;
    bottom: 80px; /* Tránh che mobile bottom nav */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
}
.toast-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}
@media (min-width: 768px) {
    .toast-message {
        bottom: 32px;
    }
}

/* ── 13. Reading Progress Bar ────────────────────────────────────────────── */
/* Nằm NGOÀI .news-page nên phải dùng fallback value cho biến CSS */
.news-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}
.news-reading-progress-bar {
    height: 100%;
    /* Fallback values cho --news-cyan và --news-primary khi nằm ngoài .news-page */
    background: linear-gradient(
        90deg,
        var(--news-cyan, #00C8FF) 0%,
        var(--news-primary, #146EF5) 100%
    );
    width: 0%;
    transition: width 0.15s ease-out;
}

/* ── 13. Dark Mode ───────────────────────────────────────────────────────── */
html.dark-mode .news-page {
    --news-page-bg:  var(--surface-page, #111827);
    --news-card-bg:  var(--surface-card, #1F2937);
    --news-muted-bg: var(--surface-muted, #1A2332);
    --news-border:   var(--border, #374151);
    --news-text-main:  var(--text-primary, #F3F4F6);
    --news-text-light: var(--text-secondary, #9CA3AF);
}
html.dark-mode .news-tag-pill {
    background-color: var(--news-card-bg);
    color: var(--news-text-main);
    border-color: var(--news-border);
}
html.dark-mode .news-tag-pill:hover,
html.dark-mode .news-tag-pill.is-active {
    background-color: var(--news-primary);
    color: #fff;
    border-color: var(--news-primary);
}
html.dark-mode .news-featured,
html.dark-mode .news-hero-popular-item,
html.dark-mode .news-horizontal-card,
html.dark-mode .news-sidebar-widget {
    background: var(--news-card-bg);
    border-color: var(--news-border);
}
html.dark-mode .news-empty {
    background: var(--news-card-bg);
    border-color: var(--news-border);
}
html.dark-mode .buying-needs-list li a {
    background: var(--news-muted-bg);
    color: var(--news-text-main);
}
html.dark-mode .buying-needs-list li a:hover {
    background: var(--news-primary);
    color: #fff;
}
html.dark-mode .news-pagination .page-btn {
    background: var(--news-card-bg);
    border-color: var(--news-border);
    color: var(--news-text-main);
}
html.dark-mode .news-detail-content {
    color: var(--news-text-main);
}
html.dark-mode .toast-message {
    background: #F9FAFB;
    color: #111827;
}
/* Dark mode: code block */
html.dark-mode .news-detail-content .news-code-block {
    background: #0d1117;
    border: 1px solid #374151;
}
html.dark-mode .news-detail-content .news-code-block code {
    color: #e6edf3;
}
/* Dark mode: YouTube embed – chỉ border */
html.dark-mode .news-detail-content .youtube-embed-wrapper {
    background: #000;
}
/* Dark mode: Pros/Cons */
html.dark-mode .news-detail-content .pros-cons-block {
    background-color: var(--news-muted-bg);
    border-color: var(--news-border);
}

/* ── 14. Reduced Motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .news-featured__img img,
    .news-hero-popular__img img,
    .news-horizontal-card__img img,
    .news-related-img img {
        transition: none;
    }
    .toast-message {
        transition: opacity .1s;
    }
    /* Tắt transition progress bar khi user prefer reduced motion */
    .news-reading-progress-bar {
        transition: none;
    }
    /* Tắt animation icon rotate trong TOC toggle */
    .news-toc-toggle i {
        transition: none !important;
    }
}

/* ── 15. Mobile Responsive ───────────────────────────────────────────────── */
@media (max-width: 575px) {
    .news-detail-title {
        font-size: 24px;
    }
    .news-detail-content {
        font-size: 15px;
    }
    .news-horizontal-card__img {
        height: 160px;
    }
    .news-sidebar {
        margin-top: 0;
    }
    /* Thêm padding bottom cho main content tránh bị mobile bottom nav che */
    .news-page {
        padding-bottom: 80px;
    }
}
@media (max-width: 374px) {
    .news-horizontal-card__body {
        padding: 12px;
    }
}

/* ── 16. Contextual Commerce CTA Box ──────────────────────────────────── */
.article-cta-box {
    margin: 36px 0;
    padding: 24px;
    background: linear-gradient(135deg, rgba(20, 110, 245, 0.06) 0%, rgba(91, 91, 255, 0.09) 100%);
    border: 1px solid rgba(20, 110, 245, 0.25);
    border-radius: var(--news-radius);
    position: relative;
    overflow: hidden;
}
html.dark-mode .article-cta-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.12);
}
.article-cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--news-primary);
}
.article-cta-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.article-cta-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--news-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.article-cta-title i {
    color: var(--news-primary);
    font-size: 18px;
}
.article-cta-desc {
    font-size: 14px;
    color: var(--news-text-light);
    margin: 0;
    line-height: 1.6;
}
.article-cta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.article-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    background-color: var(--news-primary, #146ef5) !important;
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 12px rgba(20, 110, 245, 0.3);
    transition: all 0.2s ease;
}
.article-cta-btn i {
    color: #ffffff !important;
    transition: transform 0.2s ease;
}
.article-cta-btn:hover {
    background-color: #0f58ca !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(20, 110, 245, 0.4);
}
.article-cta-btn:hover i {
    transform: translateX(3px);
}
.article-cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--news-text-main);
    background: transparent;
    border: 1px solid var(--news-border);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.article-cta-btn-secondary:hover {
    background: var(--news-muted-bg);
    border-color: var(--news-primary);
    color: var(--news-primary);
}
.article-cta-btn-secondary:focus-visible {
    outline: 2px solid var(--news-primary);
    outline-offset: 2px;
}

@media (max-width: 575px) {
    .article-cta-box {
        padding: 18px;
    }
    .article-cta-title {
        font-size: 16px;
    }
    .article-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .article-cta-btn,
    .article-cta-btn-secondary {
        justify-content: center;
        width: 100%;
        min-height: 44px;
    }
}

/* ==========================================================================
   Editorial Article Experience Extensions
   ========================================================================== */

/* ── 13. Variables update for .news-page ── */
.news-page {
    --news-sticky-offset: 140px; /* Measured: site-header (80px) + main-nav (40px) + 20px gap */
}

/* ── 14. Dual TOC & Sidebar Widget ── */
.news-sidebar-toc-widget {
    position: static;
    top: auto;
    max-height: none;
    overflow-y: visible;
    z-index: auto;
    margin-bottom: 0;
}

/* Desktop vs Mobile visibility for Dual TOC */
@media (min-width: 1024px) {
    .news-mobile-toc-wrapper {
        display: none !important;
    }
    .news-sidebar-toc-widget {
        display: block !important;
    }
}
@media (max-width: 1023px) {
    .news-mobile-toc-wrapper {
        display: block !important;
    }
    .news-sidebar-toc-widget {
        display: none !important;
    }
}

/* TOC Styling adjustments for Desktop Sidebar and Mobile */
.news-toc {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    background: var(--news-muted-bg);
    border: 1px solid var(--news-border);
    border-radius: 8px;
    padding: 18px 20px;
}
.news-sidebar-toc-widget .news-toc {
    display: block;
    margin: 0;
}

/* No-JS (default): List is visible, toggle button is hidden */
.news-toc-list {
    display: block;
}
.news-toc-toggle {
    display: none;
}

/* Progressive enhancement with JS (when html.js is active) */
html.js .news-toc--mobile .news-toc-toggle {
    display: inline-flex;
}
html.js .news-toc--mobile .news-toc-list {
    display: none;
}
html.js .news-toc--mobile.is-open .news-toc-list {
    display: block;
}

.news-sidebar-toc-widget .news-toc-list {
    display: block !important;
}

/* ── 15. Quick Summary Box (:::summary) ── */
.article-quick-summary {
    background: linear-gradient(135deg, rgba(20, 110, 245, 0.06) 0%, rgba(0, 200, 255, 0.06) 100%);
    border: 1px solid rgba(20, 110, 245, 0.2);
    border-left: 4px solid var(--news-primary);
    border-radius: 8px;
    padding: 18px 20px;
    margin: 20px 0 30px 0;
}
.article-quick-summary .article-summary-title,
.article-quick-summary h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--news-primary);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-quick-summary .summary-body {
    font-size: 15px;
    line-height: 1.6;
    color: var(--news-text-main);
}
.article-quick-summary .summary-body p:last-child,
.article-quick-summary .summary-body ul:last-child,
.article-quick-summary .summary-body ol:last-child {
    margin-bottom: 0;
}

/* Dark mode for Quick Summary */
html.dark-mode .article-quick-summary {
    background: linear-gradient(135deg, rgba(20, 110, 245, 0.15) 0%, rgba(0, 200, 255, 0.1) 100%);
    border-color: rgba(0, 200, 255, 0.3);
    border-left-color: var(--news-cyan);
}
html.dark-mode .article-quick-summary .article-summary-title,
html.dark-mode .article-quick-summary h2 {
    color: var(--news-cyan);
}

/* ── 16. Sources Block (:::sources) ── */
.article-sources-block {
    background: var(--news-muted-bg);
    border: 1px solid var(--news-border);
    border-radius: 8px;
    padding: 18px 20px;
    margin: 35px 0;
}
.article-sources-block .article-sources-title,
.article-sources-block h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--news-text-main);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.article-sources-block ul,
.article-sources-block ol {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.6;
}
.article-sources-block li {
    margin-bottom: 6px;
}
.article-sources-block li:last-child {
    margin-bottom: 0;
}
.article-sources-block a {
    color: var(--news-primary);
    text-decoration: underline;
    overflow-wrap: anywhere;
}
.article-sources-block a:hover {
    color: var(--news-cyan);
}

/* ── 17. Author Box (_author_box.php) ── */
.news-author-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--news-muted-bg);
    border: 1px solid var(--news-border);
    border-radius: 8px;
    padding: 18px 20px;
    margin: 30px 0;
}
.news-author-avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--news-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.news-author-info {
    flex: 1;
    min-width: 0;
}
.news-author-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--news-text-light);
    display: block;
    margin-bottom: 2px;
}
.news-author-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--news-text-main);
    margin: 0 0 4px 0;
    display: block;
}
.news-author-note {
    font-size: 13px;
    color: var(--news-text-light);
    margin: 0;
    line-height: 1.4;
}

/* Cover Image Optimization - aspect-ratio & max-width */
.news-detail-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
}

/* ── 18. Empty Article Fallback Notice ───────────────────────────────────── */
.article-content-empty {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 2.5rem 1.25rem;
    border: 1px solid var(--news-border);
    border-radius: 8px;
    background: var(--news-card-bg, var(--news-muted-bg));
    text-align: center;
}

.article-content-empty__icon {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: var(--news-muted-bg);
    color: var(--news-primary);
    font-size: 1.5rem;
}

.article-content-empty h2,
.article-content-empty p {
    margin: 0;
}

.article-content-empty h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--news-text-main);
}

.article-content-empty p {
    max-width: 38rem;
    color: var(--news-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── 19. Compact Author Box (Signature Badge) ────────────────────────────── */
.news-author-box--compact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background-color: var(--news-muted-bg);
    border: 1px solid var(--news-border);
    border-radius: 24px;
    margin-top: 24px;
    margin-bottom: 8px;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.news-author-avatar-compact {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(20, 110, 245, 0.1);
    color: var(--news-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
html.dark-mode .news-author-avatar-compact {
    background-color: rgba(0, 200, 255, 0.15);
    color: #00C8FF;
}
.news-author-compact-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--news-text-light);
}
.news-author-compact-by {
    font-weight: 500;
}
.news-author-compact-name {
    color: var(--news-text-main);
    font-weight: 700;
}
.news-author-compact-divider {
    opacity: 0.4;
}
.news-author-compact-verified {
    color: #10B981;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── 20. Bottom Related Articles Horizontal Carousel Slider ─────────────── */
.news-related-bottom-section {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--news-border);
}
.news-related-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.news-section-subtitle {
    font-size: 13px;
    color: var(--news-text-light);
    display: block;
    margin-top: 4px;
}
.news-carousel-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.news-carousel-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--news-border);
    background-color: var(--news-card-bg);
    color: var(--news-text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}
.news-carousel-btn:hover {
    background-color: var(--news-primary);
    color: #ffffff;
    border-color: var(--news-primary);
    transform: scale(1.05);
}
.news-carousel-btn:focus-visible {
    outline: 2px solid var(--news-primary);
    outline-offset: 2px;
}

/* Horizontal Track Slider */
.news-related-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 6px 2px 16px 2px;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
}
.news-related-carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.news-related-carousel-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.news-related-grid-card {
    flex: 0 0 85%; /* Mobile sneak-peek */
    scroll-snap-align: start;
    background: var(--news-card-bg);
    border-radius: var(--news-radius);
    border: 1px solid var(--news-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--news-shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
@media (min-width: 640px) {
    .news-related-grid-card {
        flex: 0 0 calc(50% - 10px); /* Tablet: 2 cards */
    }
}
@media (min-width: 992px) {
    .news-related-grid-card {
        flex: 0 0 calc(33.333% - 14px); /* Desktop: 3 cards */
    }
}
@media (min-width: 1200px) {
    .news-related-grid-card {
        flex: 0 0 calc(25% - 15px); /* Large Desktop: 4 cards */
    }
}

.news-related-grid-card:hover {
    transform: translateY(-3px);
    border-color: var(--news-primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.news-related-grid-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: block;
}
.news-related-grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.news-related-grid-card:hover .news-related-grid-img img {
    transform: scale(1.05);
}
.news-related-grid-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(17, 24, 39, 0.85);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    backdrop-filter: blur(4px);
}
.news-related-grid-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 12px;
}
.news-related-grid-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-related-grid-title a {
    color: var(--news-text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}
.news-related-grid-title a:hover {
    color: var(--news-primary);
}
.news-related-grid-meta {
    font-size: 11.5px;
}

/* Toast Message Notification */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #111827;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
html.dark-mode .toast-message {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.toast-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
