/* Trang Tin tức (/tin-tuc và bài ở /{slug}) — 28/10/2026, dựng lại đúng bố cục Tin tức của SEOFix bằng CSS thường, đổi xanh lá sang xanh dương của phần mềm.
   Dùng chung thanh đầu, chân trang từ trang-chu.css; mọi lớp riêng bắt đầu bằng tt- (riêng .noi-dung-bai là nội dung bài gửi từ app viet-bai-seo). */
.tg-dau nav a.dang-o { background: var(--xanh-nhat); color: var(--xanh-dam); }

.tt { --slate-900: #0f172a; --slate-800: #1e293b; --slate-700: #334155; --slate-600: #475569; --slate-500: #64748b; --slate-400: #94a3b8;
      --slate-200: #e2e8f0; --slate-100: #f1f5f9; }
.tt-than { background: #f6f8fc; padding: 32px 0 72px; }

/* ===== Trang danh sách ===== */
.tt-dau-ds { max-width: 42rem; margin: 0 auto; padding-top: 8px; text-align: center; }
.tt .tt-dau-ds h1 { margin: 0; font-size: clamp(30px, 4vw, 36px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; color: var(--slate-900); }
.tt .tt-dau-ds p { margin-top: 12px; color: var(--slate-600); }
.tt-trong { max-width: 28rem; margin: 40px auto 0; padding: 32px; border-radius: 16px; background: #fff; text-align: center; color: var(--slate-500);
    box-shadow: 0 1px 2px rgba(15,23,42,.05); border: 1px solid var(--slate-200); }

/* Lưới thẻ bài: 3 cột máy tính, 2 cột máy tính bảng, 1 cột điện thoại */
.tt-luoi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.tt-the { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: #fff; color: inherit;
    box-shadow: 0 1px 2px rgba(15,23,42,.05); outline: 1px solid var(--slate-200); outline-offset: -1px;
    transition: transform .15s, box-shadow .15s, outline-color .15s; }
.tt-the:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(15,23,42,.18); outline-color: var(--xanh-vien); color: inherit; }
.tt-the-anh { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--xanh-nhat), #eef6ff); display: flex; align-items: center; justify-content: center; }
.tt-the-anh img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tt-the:hover .tt-the-anh img { transform: scale(1.03); }
.tt-the-anh img.tt-logo-mo { width: auto; height: 44px; object-fit: contain; opacity: .45; }
.tt-the:hover .tt-the-anh img.tt-logo-mo { transform: none; }
.tt-the-than { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; min-width: 0; }
.tt .tt-the-than h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.375; color: var(--slate-900); text-wrap: balance; overflow-wrap: anywhere; }
.tt-the:hover .tt-the-than h3 { color: var(--xanh-dam); }
.tt .tt-the-than p { font-size: 14px; line-height: 1.45; color: var(--slate-600);
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.tt-the-than time { margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--slate-400); }

/* Phân trang */
.tt-phan-trang { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.tt-phan-trang a, .tt-phan-trang b, .tt-phan-trang span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.tt-phan-trang a { background: #fff; color: var(--slate-700); border: 1px solid var(--slate-200); }
.tt-phan-trang a:hover { border-color: var(--xanh); color: var(--xanh-dam); }
.tt-phan-trang b { background: var(--xanh); color: #fff; }
.tt-phan-trang span { color: var(--slate-400); padding: 0 4px; min-width: 0; }

/* ===== Trang bài: cột trái "Xem nhiều nhất" 17rem + bài (máy tính); điện thoại: bài trước, cột xem nhiều xuống dưới ===== */
.tt-bai-luoi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 48rem; margin: 0 auto; padding-top: 4px; }
.tt-bai { order: 1; min-width: 0; }
.tt-xem-nhieu { order: 2; min-width: 0; }
@media (min-width: 1024px) {
    .tt-bai-luoi { grid-template-columns: 17rem minmax(0, 1fr); gap: 48px; max-width: none; }
    .tt-bai { order: 2; max-width: 48rem; }
    .tt-xem-nhieu { order: 1; }
    .tt-xn-khung { position: sticky; top: 92px; }
}

.tt-duong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--slate-500); }
.tt-duong a { color: var(--slate-500); }
.tt-duong a:hover { color: var(--xanh-dam); }
.tt .tt-bai h1 { margin: 12px 0 0; font-size: clamp(28px, 4vw, 36px); line-height: 1.25; font-weight: 800; letter-spacing: -.02em; color: var(--slate-900); text-wrap: balance; overflow-wrap: anywhere; }
.tt-bai-ngay { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 12px; font-size: 14px; color: var(--slate-500); }
.tt-bai-bia { display: block; width: 100%; height: auto; margin-top: 24px; border-radius: 16px; background: var(--slate-100); object-fit: cover;
    box-shadow: 0 1px 2px rgba(15,23,42,.05); outline: 1px solid var(--slate-200); outline-offset: -1px; }

/* Khung kêu gọi dùng thử cuối bài */
.tt-keu-goi { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 48px; padding: 24px; border-radius: 16px; color: #fff;
    background: linear-gradient(135deg, #0266fc, #014ed1); box-shadow: 0 10px 24px -14px rgba(2,102,252,.8); }
.tt-keu-goi > div { flex: 1; min-width: 0; }
.tt-keu-goi b { display: block; font-size: 18px; font-weight: 800; line-height: 1.35; }
.tt .tt-keu-goi p { margin-top: 4px; font-size: 14px; color: rgba(255,255,255,.9); }
.tt-keu-goi a { flex: none; padding: 10px 20px; border-radius: 12px; background: #fff; color: var(--xanh-dam); font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.15); white-space: nowrap; }
.tt-keu-goi a:hover { background: var(--xanh-nhat); color: var(--xanh-dam); }
@media (min-width: 640px) { .tt-keu-goi { flex-direction: row; align-items: center; } }

/* Cột "Xem nhiều nhất" */
.tt-xn-khung { padding: 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.05); border: 1px solid var(--slate-200); }
.tt .tt-xn-khung h2 { display: flex; align-items: center; gap: 8px; margin: 0; max-width: none; font-size: 16px; line-height: 1.4; font-weight: 800; letter-spacing: 0; color: var(--slate-900); }
.tt-xn-khung h2 span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: #ffe4e6; font-size: 14px; }
.tt-xn-khung ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.tt-xn-khung li a { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: 12px; color: inherit; transition: background .15s; }
.tt-xn-khung li a:hover { background: var(--xanh-nhat); }
.tt-xn-so { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 8px;
    color: #fff; font-size: 12px; font-weight: 900; box-shadow: 0 1px 2px rgba(15,23,42,.15); }
.tt-xn-anh { position: relative; flex: none; width: 5.5rem; height: 3.5rem; overflow: hidden; border-radius: 8px; background: linear-gradient(135deg, var(--xanh-nhat), #d5e5ff); }
.tt-xn-anh img { position: absolute; max-width: none; }
.tt-xn-anh img.tt-logo-mo { inset: 0; margin: auto; width: auto; height: 22px; opacity: .5; }
.tt-xn-chu { min-width: 0; }
.tt-xn-ten { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
    font-size: 14px; font-weight: 600; line-height: 1.375; color: var(--slate-800); overflow-wrap: anywhere; }
.tt-xn-khung li a:hover .tt-xn-ten { color: var(--xanh-dam); }
.tt-xn-luot { display: block; margin-top: 2px; font-size: 12px; color: var(--slate-400); }

/* "Bài viết khác" */
.tt-khac { max-width: 64rem; margin: 56px auto 0; }
.tt .tt-khac h2 { margin: 0; max-width: none; font-size: 20px; line-height: 1.4; font-weight: 800; letter-spacing: 0; color: var(--slate-900); }
.tt-khac .tt-luoi { margin-top: 16px; }

@media (max-width: 1023px) { .tt-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
    .tt-than { padding: 24px 0 56px; }
    .tt-luoi { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Nội dung bài (HTML gửi từ app viet-bai-seo, đã lọc ở App\Support\NoiDungBai) ===== */
.tt .noi-dung-bai { margin-top: 32px; color: var(--slate-700); font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.tt .noi-dung-bai > * { margin-top: 0; margin-bottom: 0; }
.tt .noi-dung-bai > * + * { margin-top: 1.1em; }
.tt .noi-dung-bai h2 { margin-top: 2em; max-width: none; font-size: 24px; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; color: var(--slate-900); text-wrap: balance; }
.tt .noi-dung-bai h3 { margin-top: 1.6em; font-size: 19px; line-height: 1.4; font-weight: 700; color: var(--slate-900); }
.tt .noi-dung-bai h4, .tt .noi-dung-bai h5, .tt .noi-dung-bai h6 { margin-top: 1.4em; font-size: 17px; font-weight: 700; color: var(--slate-900); }
.tt .noi-dung-bai a { color: var(--xanh-dam); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tt .noi-dung-bai a:hover { color: #033aa0; }
.tt .noi-dung-bai strong, .tt .noi-dung-bai b { color: var(--slate-900); font-weight: 700; }
.tt .noi-dung-bai ul, .tt .noi-dung-bai ol { padding-left: 1.4em; }
.tt .noi-dung-bai ul { list-style: disc; }
.tt .noi-dung-bai ol { list-style: decimal; }
.tt .noi-dung-bai li + li { margin-top: .4em; }
.tt .noi-dung-bai li::marker { color: var(--xanh); }
.tt .noi-dung-bai img { max-width: 100%; height: auto; margin-inline: auto; border-radius: 12px; }
.tt .noi-dung-bai figure { margin-inline: 0; text-align: center; }
.tt .noi-dung-bai figure img { display: block; }
.tt .noi-dung-bai figcaption { margin-top: .5em; font-size: 14px; color: var(--slate-500); }
.tt .noi-dung-bai blockquote { margin-inline: 0; border-left: 4px solid var(--xanh); background: var(--xanh-nhat); padding: .8em 1.1em; border-radius: 0 12px 12px 0; color: var(--slate-800); }
/* Bảng rộng hơn màn hình thì tự cuộn ngang trong khung của nó, trang không bị kéo ngang */
.tt .noi-dung-bai table { display: block; width: auto; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.tt .noi-dung-bai th, .tt .noi-dung-bai td { border: 1px solid var(--slate-200); padding: .55em .8em; text-align: left; vertical-align: top; white-space: normal; font-size: inherit; overflow-wrap: normal; }
.tt .noi-dung-bai th { background: var(--xanh-nhat); color: var(--slate-900); font-weight: 700; }
.tt .noi-dung-bai tbody tr:hover td { background: transparent; }
.tt .noi-dung-bai code { background: var(--slate-100); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
.tt .noi-dung-bai pre { overflow-x: auto; background: var(--slate-900); color: #e2e8f0; padding: 1em; border-radius: 12px; overflow-wrap: normal; }
.tt .noi-dung-bai pre code { background: none; padding: 0; }
.tt .noi-dung-bai hr { border: 0; border-top: 1px solid var(--slate-200); }
.tt .noi-dung-bai .aligncenter { margin-inline: auto; text-align: center; }
.tt .noi-dung-bai iframe { max-width: 100%; }
/* Khung video co giãn 16:9 (dòng link YouTube → khung video) */
.tt .noi-dung-bai .video-co-gian { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.tt .noi-dung-bai .video-co-gian iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 639px) {
    .tt .noi-dung-bai { font-size: 16.5px; }
    .tt .noi-dung-bai h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .tt-the, .tt-the-anh img, .tt-xn-khung li a { transition: none; } .tt-the:hover { transform: none; } }
