/* ==========================================================================
   2DT TECH — MODERN NEWS HUB & SEO ARTICLE UX/UI (SCOPED TO NEWS MODULE ONLY)
   Font: 'Be Vietnam Pro' (Full Vietnamese diacritics support)
   ========================================================================== */

.news-main,
.news-man,
.news-detail,
.news-viewlot,
.news-relates,
.tn-hub-wrap,
.tn-detail-wrap {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

.news-main *,
.news-man *,
.news-detail *,
.news-viewlot *,
.news-relates *,
.tn-hub-wrap *,
.tn-detail-wrap * {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Preserve icon fonts inside News module */
.news-main .icon,
.news-man .icon,
.news-detail .icon,
.news-viewlot .icon,
.news-relates .icon {
    font-family: 'icomoon' !important;
}

/* 1. HERO DASHBOARD BANNER INSIDE NEWS HUB */
.tn-hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #060d24 0%, #0d1f4d 52%, #0c3b6e 100%);
    padding: 34px 32px;
    margin-bottom: 28px;
    color: #ffffff;
    box-shadow: 0 20px 45px -15px rgba(6, 13, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(61, 177, 209, 0.25);
}

.tn-hero-banner::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 192, 74, 0.22) 0%, rgba(61, 177, 209, 0.08) 55%, transparent 72%);
    pointer-events: none;
}

.tn-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(245, 192, 74, 0.16);
    border: 1px solid rgba(245, 192, 74, 0.45);
    color: #ffe08a;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.tn-hero-title {
    font-size: clamp(22px, 2.6vw, 31px);
    font-weight: 800;
    line-height: 1.32;
    color: #ffffff !important;
    margin: 0 0 12px 0;
    letter-spacing: -0.015em;
}

.tn-hero-desc {
    font-size: 15px;
    line-height: 1.68;
    color: rgba(226, 232, 240, 0.92);
    margin: 0 0 22px 0;
    max-width: 780px;
}

.tn-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px;
}

.tn-stat-pill {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(8px);
}

.tn-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(245, 192, 74, 0.25), rgba(61, 177, 209, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.tn-stat-meta strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #ffe08a;
    line-height: 1.2;
}

.tn-stat-meta span {
    display: block;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.85);
    margin-top: 2px;
}

/* 2. SEARCH, SORT & CATEGORY FILTER TOOLBAR */
.tn-toolbar {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 26px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.07);
}

.tn-toolbar-top {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tn-search-box {
    position: relative;
    flex: 1 1 320px;
}

.tn-search-input {
    width: 100%;
    height: 46px;
    padding: 0 42px 0 42px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    font-size: 14.5px;
    font-weight: 500;
    color: #0f172a;
    transition: all 0.22s ease;
}

.tn-search-input:focus {
    outline: none;
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.tn-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #64748b;
    pointer-events: none;
}

.tn-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: #e2e8f0;
    color: #475569;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.tn-search-clear.is-visible {
    display: inline-flex;
}

.tn-sort-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tn-sort-select {
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
}

.tn-cate-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tn-cate-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.3;
}

.tn-cate-tab:hover {
    border-color: #38bdf8;
    color: #0369a1;
    background: #f0f9ff;
    transform: translateY(-1px);
}

.tn-cate-tab.is-active {
    background: linear-gradient(135deg, #060d24 0%, #0c3b6e 100%);
    color: #ffffff;
    border-color: #0c3b6e;
    box-shadow: 0 6px 16px -4px rgba(12, 59, 110, 0.35);
}

.tn-cate-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}

.tn-cate-tab.is-active .tn-cate-count {
    background: rgba(245, 192, 74, 0.25);
    color: #ffe08a;
}

/* 3. FEATURED SPOTLIGHT ARTICLE CARD */
.tn-spotlight-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 38px -14px rgba(15, 23, 42, 0.1);
    margin-bottom: 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tn-spotlight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px -14px rgba(12, 59, 110, 0.18);
}

.tn-spotlight-media {
    position: relative;
    min-height: 290px;
    overflow: hidden;
    background: #0f172a;
}

.tn-spotlight-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.tn-spotlight-card:hover .tn-spotlight-media img {
    transform: scale(1.05);
}

.tn-spotlight-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(6, 13, 36, 0.85);
    color: #ffe08a;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(245, 192, 74, 0.4);
}

.tn-spotlight-body {
    padding: 26px 26px 26px 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tn-spotlight-cate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 10px;
}

.tn-spotlight-title {
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 800;
    line-height: 1.38;
    color: #0f172a;
    margin: 0 0 12px 0;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tn-spotlight-title:hover {
    color: #0284c7;
}

.tn-spotlight-desc {
    font-size: 14.5px;
    line-height: 1.68;
    color: #475569;
    margin: 0 0 18px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tn-spotlight-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 18px;
}

.tn-spotlight-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #060d24 0%, #0c3b6e 100%);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.tn-spotlight-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 20px -6px rgba(12, 59, 110, 0.45);
}

/* 4. MODERN RESPONSIVE NEWS CARD GRID */
.tn-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.tn-results-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tn-results-count {
    font-size: 13.5px;
    font-weight: 600;
    color: #64748b;
}

.tn-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}

.tn-article-card,
.news2-item,
.news-item {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    padding-bottom: 0 !important;
    position: relative;
}

.tn-article-card:hover,
.news2-item:hover,
.news-item:hover {
    transform: translateY(-6px);
    border-color: rgba(2, 132, 199, 0.4);
    box-shadow: 0 20px 38px -14px rgba(12, 59, 110, 0.16);
}

.tn-card-thumb,
.news2-image,
.news-image {
    position: relative;
    width: 100%;
    height: 215px;
    overflow: hidden;
    background: #0f172a;
    flex-shrink: 0;
}

.news-image::before {
    display: none !important;
}

.tn-card-thumb img,
.news2-image img,
.news-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    border-radius: 0 !important;
    transition: transform 0.5s ease;
}

.tn-article-card:hover .tn-card-thumb img,
.news2-item:hover .news2-image img,
.news-item:hover .news-image img {
    transform: scale(1.06);
}

.tn-card-cate-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(6, 13, 36, 0.82);
    color: #ffe08a !important;
    font-size: 11.5px;
    font-weight: 700;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 224, 138, 0.35);
    text-decoration: none;
    z-index: 2;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tn-card-spec-pill {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.tn-card-body,
.news2-content,
.news-overlay {
    position: static !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 20px 20px 22px 20px !important;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    background: #ffffff;
}

.tn-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
}

.tn-card-title,
.news2-title,
.news-overlay-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.44 !important;
    color: #0f172a !important;
    text-align: left !important;
    margin: 0 0 10px 0 !important;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.tn-card-title:hover,
.news2-title:hover,
.news-overlay-title:hover {
    color: #0284c7 !important;
}

.tn-card-desc,
.news2-desc,
.news-desc {
    font-size: 14px !important;
    line-height: 1.62 !important;
    color: #475569 !important;
    margin: 0 0 16px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
}

.tn-card-desc p,
.news2-desc p,
.news-desc p {
    margin: 0 !important;
}

.tn-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 13px;
    border-top: 1px dashed #e2e8f0;
    margin-top: auto;
}

.tn-card-author {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.tn-card-link,
.news2-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #0284c7 !important;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.tn-card-link:hover,
.news2-btn:hover {
    color: #0c3b6e !important;
    transform: translateX(3px);
}

/* 5. MODERN PAGINATION CONTROLS */
.tn-pagination,
._paginate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 28px 0 12px 0;
    padding: 0;
    list-style: none;
}

.tn-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tn-page-btn:hover:not(:disabled) {
    border-color: #0284c7;
    color: #0284c7;
    background: #f0f9ff;
}

.tn-page-btn.is-active {
    background: linear-gradient(135deg, #060d24 0%, #0c3b6e 100%);
    color: #ffffff;
    border-color: #0c3b6e;
    box-shadow: 0 6px 14px -4px rgba(12, 59, 110, 0.35);
}

.tn-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 6. RIGHT SIDEBAR "TIN XEM NHIỀU" UPGRADE */
.news-viewlot {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px -12px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

.news-viewlot .box-header._custom2 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.news-viewlot .box-header._custom2 span {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

.news-viewlot-menu .news2-item,
.news-viewlot-menu .news-viewlot-item {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0 !important;
    border: none !important;
    border-bottom: 1px dashed #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.news-viewlot-menu .news2-item:last-child,
.news-viewlot-menu .news-viewlot-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.news-viewlot-menu .news2-image,
.news-viewlot-menu .news-viewlot-image {
    width: 82px !important;
    height: 64px !important;
    border-radius: 10px !important;
    overflow: hidden;
    flex-shrink: 0;
}

.news-viewlot-menu .news2-content,
.news-viewlot-menu .news-viewlot-content {
    padding: 0 !important;
    flex: 1 1 auto;
}

.news-viewlot-menu .news2-title,
.news-viewlot-menu .news-viewlot-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    line-height: 1.42 !important;
    color: #0f172a !important;
    margin: 0 0 4px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-viewlot-menu .news2-desc,
.news-viewlot-menu .news2-btn {
    display: none !important;
}

@media (max-width: 991px) {
    .tn-spotlight-card {
        grid-template-columns: 1fr;
    }
    .tn-spotlight-body {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .tn-hero-banner {
        padding: 24px 20px;
    }
    .tn-cards-grid {
        grid-template-columns: 1fr;
    }
}
