/* 06/11/2026: Trang Học tiếng Trung - 8 TÍNH NĂNG NỔI BẬT có hình + KHO 20 VIDEO RQX.
   Thay cho khối "Học theo cách của bạn" và tab "Thế giới RQX". Tiền tố riêng tn2-/vk- để không đụng .tnc-* cũ. */
.tn2-sec { padding: 30px 0 18px; }
.tn2-anchor { display: block; height: 0; scroll-margin-top: 120px; }
#tinh-nang-chinh, #video-rqx { scroll-margin-top: 120px; }
.tn2-head { text-align: center; margin: 0 auto 18px; max-width: 760px; }
.tn2-kicker { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #E7F0FE; color: #0B6CF3; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; }
.tn2-head h2 { margin: 8px 0 4px; font-size: 30px; line-height: 1.2; color: #0F1F44; }
.tn2-head h2 em { font-style: normal; color: #0B6CF3; }
.tn2-head p { margin: 0; font-size: 15.5px; font-weight: 600; color: #64748B; }

.tn2-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tn2-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 20px; background: #fff; border: 1.5px solid #DCE7F5; box-shadow: 0 6px 20px rgba(15, 37, 71, .06); color: #1E293B; text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s; }
.tn2-card:hover, .tn2-card:focus-visible { transform: translateY(-4px); border-color: #7FB0F8; box-shadow: 0 16px 34px rgba(11, 108, 243, .16); }
.tn2-card:focus-visible { outline: 3px solid #0B6CF3; outline-offset: 2px; }
.tn2-pic { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: linear-gradient(150deg, #DCEBFF, #F4F8FF); }
.tn2-pic > img.cover { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.tn2-card:hover .tn2-pic > img.cover { transform: scale(1.05); }
.tn2-tag { position: absolute; left: 10px; top: 10px; z-index: 3; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #0B6CF3; font-size: 12px; font-weight: 800; box-shadow: 0 3px 10px rgba(15, 37, 71, .12); }
.tn2-tag.hot { background: #E11D48; color: #fff; }
.tn2-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 13px 15px 14px; }
.tn2-body b { font-size: 17px; line-height: 1.3; color: #0F1F44; }
.tn2-body span { font-size: 14.5px; line-height: 1.45; color: #475569; }
.tn2-body em { margin-top: auto; padding-top: 8px; font-style: normal; font-size: 13.5px; font-weight: 800; line-height: 1.35; color: #0B6CF3; }
.tn2-body em::after { content: " →"; transition: margin .15s; }
.tn2-card:hover .tn2-body em::after { margin-left: 4px; }

/* Ô App: ảnh máy tính làm nền + điện thoại nổi phía trước */
.c-app .tn2-pic { background: linear-gradient(150deg, #0B6CF3, #5AA2FF); }
.c-app .tn2-desk { position: absolute; left: 6%; top: 12%; width: 78%; border-radius: 8px; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); opacity: .96; }
.tn2-phone { position: absolute; right: 7%; bottom: -14%; width: 31%; aspect-ratio: 9 / 19; padding: 4px; border-radius: 18px; background: #0F172A; box-shadow: 0 14px 28px rgba(0, 0, 0, .35); transition: transform .3s; }
.tn2-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 14px; display: block; }
.tn2-card:hover .tn2-phone { transform: translateY(-6px) rotate(-2deg); }

/* Ô Giáo viên AI: ảnh cô Quỳnh Như + bong bóng lời chào + nút học thử */
.c-gv .tn2-pic > img.cover { object-position: center; }
.tn2-bubble { position: absolute; right: 8px; top: 12px; z-index: 2; max-width: 40%; padding: 7px 11px; border-radius: 14px 14px 4px 14px; background: #fff; color: #0F1F44; font-size: 13px; font-weight: 700; line-height: 1.35; box-shadow: 0 6px 16px rgba(15, 37, 71, .18); }
.tn2-bubble b { display: block; color: #E11D48; font-size: 15px; }
.tn2-play { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #0B6CF3; color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 6px 16px rgba(11, 108, 243, .4); }

/* Ô Minh Hà: điện thoại có màn hình Zalo đang nhắn tin */
.c-mh .tn2-pic { background: radial-gradient(circle at 20% 20%, #CFE3FF, #EAF3FF 60%); }
.tn2-zalo { position: absolute; left: 50%; top: 9%; width: 62%; transform: translateX(-50%); border-radius: 18px 18px 0 0; padding: 5px 5px 0; background: #0F172A; box-shadow: 0 14px 30px rgba(15, 37, 71, .3); transition: transform .3s; }
.tn2-card:hover .tn2-zalo { transform: translateX(-50%) translateY(-5px); }
.tn2-zalo .zh { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 14px 14px 0 0; background: #0068FF; color: #fff; font-size: 11px; font-weight: 800; line-height: 1.2; }
.tn2-zalo .zh i { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, #14B8A6, #0EA5E9); font-style: normal; font-size: 8.5px; }
.tn2-zalo .zh small { display: block; font-size: 9px; font-weight: 600; opacity: .85; }
.tn2-zalo .zb { display: flex; flex-direction: column; gap: 5px; height: 100%; min-height: 150px; padding: 7px 6px 10px; background: #E2E9F3; }
.tn2-zalo .m { max-width: 86%; padding: 5px 7px; border-radius: 9px; background: #fff; color: #1E293B; font-size: 10.5px; line-height: 1.35; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.tn2-zalo .m.me { align-self: flex-end; background: #D6E8FF; }
.tn2-zalo .m.hl { border: 1.5px solid #F59E0B; }

.tn2-more { display: flex; justify-content: center; margin-top: 14px; }

/* ===== KHO 20 VIDEO ===== */
.vk-sec { padding: 22px 0 34px; }
.vk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 12px; }
.vk-item { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 0; border: 0; background: none; font: inherit; text-align: left; color: #0F1F44; cursor: pointer; }
.vk-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #DCE7F5; box-shadow: 0 4px 12px rgba(15, 37, 71, .1); }
.vk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.vk-item:hover .vk-thumb img { transform: scale(1.06); }
.vk-thumb::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: 2; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(205, 231, 127, .96); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transition: transform .2s; }
.vk-thumb::after { content: ""; position: absolute; left: 50%; top: 50%; z-index: 3; margin: -7px 0 0 -4px; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #3F5A12; }
.vk-item:hover .vk-thumb::before { transform: scale(1.12); }
.vk-thumb small { position: absolute; right: 6px; bottom: 6px; z-index: 3; padding: 2px 6px; border-radius: 6px; background: rgba(15, 23, 42, .82); color: #fff; font-size: 11.5px; font-weight: 700; }
.vk-thumb .vk-cat { position: absolute; left: 6px; top: 6px; z-index: 3; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: #0B6CF3; font-size: 11px; font-weight: 800; }
.vk-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.38; }
.vk-item:focus-visible { outline: 3px solid #0B6CF3; outline-offset: 3px; border-radius: 12px; }
.vk-moreBtn { display: none; margin: 14px auto 0; padding: 10px 20px; border: 1.5px solid #9CC4FD; border-radius: 999px; background: #fff; color: #0B6CF3; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }

@media (max-width: 1100px) { .vk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .tn2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tn2-sec { padding: 20px 0 10px; }
  .tn2-head h2 { font-size: 22px; } .tn2-head p { font-size: 13.5px; }
  .tn2-grid { gap: 10px; }
  .tn2-card { border-radius: 16px; }
  .tn2-body { padding: 10px 11px 11px; gap: 3px; }
  .tn2-body b { font-size: 15px; } .tn2-body span { font-size: 13px; } .tn2-body em { font-size: 12.5px; padding-top: 6px; }
  .tn2-tag { font-size: 10.5px; padding: 3px 8px; left: 7px; top: 7px; }
  .tn2-bubble { right: 6px; top: 8px; max-width: 44%; font-size: 10.5px; padding: 5px 8px; } .tn2-bubble b { font-size: 13px; } .tn2-bubble i { display: none; }
  .tn2-play { font-size: 11.5px; padding: 5px 9px; left: 7px; bottom: 7px; }
  .tn2-zalo { width: 74%; } .tn2-zalo .m { font-size: 9px; } .tn2-zalo .zh { font-size: 9.5px; }
  .tn2-zalo .m:nth-child(n+3) { display: none; }
  .vk-sec { padding: 14px 0 26px; }
  .vk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .vk-title { font-size: 13px; }
  .vk-grid:not(.open) .vk-item:nth-child(n+9) { display: none; }
  .vk-grid:not(.open) + .vk-moreBtn { display: block; }
}
@media (max-width: 360px) {
  .tn2-grid { grid-template-columns: minmax(0, 1fr); }
  .tn2-pic { aspect-ratio: 16 / 9; }
  .tn2-zalo .m:nth-child(n+3) { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .tn2-card, .tn2-pic > img.cover, .tn2-phone, .tn2-zalo, .vk-thumb img { transition: none; }
}
/* chỉnh nhỏ sau khi chụp thử: điện thoại Zalo lệch phải khỏi nhãn, tên không xuống dòng, chữ trong bong bóng không nghiêng */
.tn2-bubble i { font-style: normal; }
.c-mh .tn2-zalo { left: 58%; }
.c-mh .tn2-card:hover .tn2-zalo, .tn2-card.c-mh:hover .tn2-zalo { transform: translateX(-50%) translateY(-5px); }
.tn2-zalo .zh span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 07/11/2026: Ô Giáo viên AI có 2 lựa chọn: cô Quỳnh Như (HSK) và anh Đậu Đậu (Kids/YCT) */
.c-gv2:hover { transform: none; }
.gv2-pic { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.gv2-half { position: relative; display: block; min-width: 0; overflow: hidden; color: #fff; text-decoration: none; }
.gv2-half img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s; }
.gv2-qn img { object-position: 52% 30%; }
.gv2-dd { background: #CFF4FF; border-left: 3px solid #fff; }
.gv2-dd img { object-fit: contain; padding: 6% 4% 22%; box-sizing: border-box; }
.gv2-half:hover img { transform: scale(1.06); }
.gv2-name { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px 6px 6px; background: linear-gradient(transparent, rgba(11, 27, 63, .82)); font-size: 13.5px; font-weight: 800; line-height: 1.2; text-align: center; }
.gv2-name small { display: block; font-size: 11px; font-weight: 700; opacity: .9; }
.c-gv2 .tn2-tag { pointer-events: none; }
.gv2-btns { display: flex; flex-direction: column; gap: 7px; margin-top: auto; padding-top: 8px; }
.gv2-btn { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 10px 6px 6px; border-radius: 999px; border: 1.5px solid #9CC4FD; background: #F2F7FF; color: #0B4FB8; font-size: 13.5px; font-weight: 800; line-height: 1.25; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.gv2-btn img { flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #CFF4FF; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(15, 37, 71, .2); }
.gv2-btn span { min-width: 0; }
.gv2-btn.qn img { object-position: 52% 22%; }
.gv2-btn.dd { border-color: #FDBA74; background: #FFF6EC; color: #B45309; }
.gv2-btn:hover, .gv2-btn:focus-visible { transform: translateX(2px); border-color: #0B6CF3; background: #E7F0FE; }
.gv2-btn.dd:hover, .gv2-btn.dd:focus-visible { border-color: #EA580C; background: #FFEBD6; }
.gv2-btn:focus-visible { outline: 3px solid #0B6CF3; outline-offset: 2px; }

/* 07/11/2026: video YouTube trong kho: tên kênh dưới tiêu đề, khung 16:9 khi bấm xem */
.vk-src { display: block; margin-top: -3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 600; color: #64748B; }
.vk-ytbox { position: relative; width: min(960px, 100%, calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.vk-ytbox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
  .gv2-name { font-size: 11.5px; padding: 12px 4px 5px; } .gv2-name small { font-size: 9.5px; }
  .gv2-btns { gap: 6px; padding-top: 6px; }
  .gv2-btn { gap: 6px; padding: 4px 8px 4px 4px; font-size: 12px; }
  .gv2-btn img { width: 24px; height: 24px; }
  .vk-src { font-size: 11px; }
  .vk-ytbox { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .gv2-half img, .gv2-btn { transition: none; } }
