/*
Theme Name: Tam Ngữ — Trung tâm ngoại ngữ
Theme URI: https://mauwebsitedep.net/
Description: Mẫu website trung tâm ngoại ngữ (tiếng Nhật, Hàn, Trung). Theme con của vinasite, chạy WooCommerce ở chế độ danh mục. Bố cục chia theo ngôn ngữ rồi theo trình độ; đỏ đô với kem và nâu nhạt, tiêu đề phông serif, đường kẻ mảnh làm hoa văn phân khối.
Author: VinaSite
Author URI: https://vinasite.com.vn/
Template: vinasite
Version: 1.0.0
Text Domain: ngoaingu-mau-03
*/

/* =====================================================================
 * 1. BIẾN
 *
 * Bảng màu: đỏ đô làm màu chính, kem làm nền, nâu nhạt làm đường kẻ và chữ
 * phụ. KHÔNG CÓ VÀNG KIM ở bất cứ đâu trong mẫu — đó là chỗ cố ý khác hai mẫu
 * `trangsuc-mau-01` (Thuỵ Kim) và `nhahang-mau-01` (Mâm Son), hai mẫu cũng đi
 * đỏ + serif Á Đông nhưng dùng vàng kim làm màu nhấn.
 *
 * Ba khoang ngôn ngữ, mỗi khoang một màu nhấn riêng, cả ba vẫn trong hệ đỏ:
 * Nhật đỏ đô lạnh, Hàn đỏ gạch, Trung đỏ mận. Giá trị trùng với `mau` trong
 * `tng_ngon_ngu()` ở `inc/helpers.php` — đổi màu thì sửa cả hai nơi.
 * ===================================================================== */
:root {
	--tng-do:        #6E1522;   /* đỏ đô chính */
	--tng-do-sau:    #4A0E18;   /* đỏ đô sâu — chân trang, khối nền tối */
	--tng-do-nhat:   #8F2234;   /* đỏ đô sáng hơn một bậc — trạng thái rê chuột */
	--tng-kem:       #F7F1E8;   /* kem — nền trang */
	--tng-kem-dam:   #EFE5D6;   /* kem đậm — khối xen kẽ */
	--tng-trang:     #FFFCF7;   /* trắng ngả kem — mặt thẻ */
	--tng-nau:       #B0957C;   /* nâu nhạt — đường kẻ, hoa văn */
	--tng-nau-dam:   #8A6F57;   /* nâu đậm — chữ phụ, nhãn */
	--tng-muc:       #2A1F1C;   /* chữ chính */
	--tng-muc-nhat:  #5B4A43;   /* chữ phụ trên nền sáng */
	--tng-line:      #DFD2BF;   /* đường kẻ mảnh trên nền kem */
	--tng-line-toi:  rgba(247, 241, 232, .22); /* đường kẻ mảnh trên nền đỏ đô */

	/* Ba khoang ngôn ngữ */
	--tng-jp:        #7D1128;
	--tng-kr:        #9A3324;
	--tng-zh:        #5C1A33;

	/* Màu nhấn của khoang đang đứng; mỗi khối ngôn ngữ ghi đè biến này. */
	--tng-nhan:      var(--tng-do);

	/* Phông: serif cho tiêu đề, sans cho chữ chạy. Cùng siêu họ Noto nên
	   phần Latin khớp với ba tệp Noto Serif JP/KR/SC ở khối bảng chữ cái. */
	--tng-serif: 'Noto Serif', Georgia, 'Times New Roman', serif;
	--tng-sans:  'Noto Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	--tng-jp-font: 'Noto Serif JP', var(--tng-serif);
	--tng-kr-font: 'Noto Serif KR', var(--tng-serif);
	--tng-zh-font: 'Noto Serif SC', var(--tng-serif);

	/*
	 * THANG CHỮ — 6 bậc, đúng ngưỡng của chuẩn chung (mục 5: "không quá 6 cỡ
	 * chữ trên toàn site, bước nhảy đều"). Bước nhảy khoảng 1,25×.
	 *
	 * Hai cỡ CỐ Ý ngoài thang, ghi chú ngay tại chỗ dùng:
	 *   11px — nhãn nhỏ dưới tên thương hiệu (bậc 1 = 13px làm dòng này rộng
	 *          hơn cả tên thương hiệu, đẩy vỡ cột đầu của đầu trang)
	 *   clamp hero — tiêu đề hero phải lớn hơn bậc 6 để giữ vai trò của nó
	 */
	--tng-fs-1: 13px;    /* nhãn, chữ nhỏ */
	--tng-fs-2: 15px;    /* chữ phụ, meta */
	--tng-fs-3: 17px;    /* chữ chạy */
	--tng-fs-4: 21px;    /* tiêu đề thẻ, dẫn đề */
	--tng-fs-5: 27px;    /* tiêu đề nhỏ */
	--tng-fs-6: clamp(28px, 3.1vw, 42px);  /* tiêu đề khối và tiêu đề trang */
	--tng-fs-hero: clamp(34px, 4.4vw, 56px);

	/* THANG KHOẢNG CÁCH — bước 4px, không có số lẻ nào. */
	--tng-s-1: 4px;
	--tng-s-2: 8px;
	--tng-s-3: 12px;
	--tng-s-4: 16px;
	--tng-s-5: 24px;
	--tng-s-6: 32px;
	--tng-s-7: 48px;
	--tng-s-8: 72px;
	--tng-s-9: 96px;

	/* Bo góc: mẫu này gần như VUÔNG. Bố cục "tĩnh và chỉn chu" nên chỉ bo 2px
	   cho đỡ gắt, và 999px riêng cho nút hình viên thuốc. */
	--tng-bo: 2px;
	--tng-bo-nut: 999px;

	/* Bóng đổ nhẹ, CÙNG MỘT HƯỚNG (xuống dưới) ở mọi chỗ. */
	--tng-bong:    0 1px 2px rgba(42, 31, 28, .05);
	--tng-bong-2:  0 6px 18px rgba(42, 31, 28, .09);
	--tng-bong-3:  0 10px 28px rgba(42, 31, 28, .13);

	--tng-nhip: cubic-bezier(.2, .7, .3, 1);
	--tng-dau-trang: 80px;
}

/* =====================================================================
 * 2. NỀN
 * ===================================================================== */
body.tng {
	margin: 0;
	background: var(--tng-kem);
	color: var(--tng-muc);
	font-family: var(--tng-sans);
	font-size: var(--tng-fs-3);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

/*
 * BẪY SỐ 6. Theme mẹ có luật riêng cho h1–h3 trong nội dung và nhuộm chúng
 * xanh, thắng mọi khai báo một lớp. Khai `color: inherit` với HAI lớp thì vừa
 * thắng được, vừa để tiêu đề tự đúng màu trong cả khối nền sáng lẫn nền tối —
 * không phải liệt kê từng ngoại lệ.
 */
body.tng h1,
body.tng h2,
body.tng h3,
body.tng h4 {
	color: inherit;
	font-family: var(--tng-serif);
	font-weight: 600;
	letter-spacing: -.012em;
	line-height: 1.22;
	margin: 0;
	text-wrap: balance;
}

body.tng p { margin: 0 0 var(--tng-s-4); }
body.tng p:last-child { margin-bottom: 0; }

body.tng a { color: var(--tng-do); text-decoration-thickness: 1px; text-underline-offset: .18em; }
body.tng a:hover { color: var(--tng-do-nhat); }

body.tng img { max-width: 100%; height: auto; }

/* BẪY SỐ 10. Phông phải đặt cho CẢ TRANG PHỤ, đừng để chúng chạy phông theme
   mẹ. Trang giỏ hàng / thanh toán / tài khoản là block và không mang lớp của
   mẫu, nên bắt bằng vùng `.vs-scope` và vùng block của WooCommerce. */
body.tng .vs-scope,
body.tng .woocommerce,
body.tng .wp-block-woocommerce-cart,
body.tng .wc-block-checkout,
body.tng .woocommerce-account {
	font-family: var(--tng-sans);
}

/* Liên kết bỏ qua — đưa bàn phím vào thẳng nội dung. */
.tng-boqua {
	position: absolute;
	left: var(--tng-s-4);
	top: -100px;
	z-index: 999;
	padding: var(--tng-s-3) var(--tng-s-5);
	background: var(--tng-do);
	color: #fff;
	font-size: var(--tng-fs-2);
	text-decoration: none;
	transition: top .2s var(--tng-nhip);
}
.tng-boqua:focus { top: var(--tng-s-4); color: #fff; }

.tng-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--tng-s-5); box-sizing: border-box; }

.tng-sr {
	position: absolute; width: 1px; height: 1px; padding: 0;
	margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =====================================================================
 * 3. TIÊU ĐIỂM BÀN PHÍM
 *
 * `:focus-visible` chứ không `:focus`, nên người dùng chuột không thấy viền
 * nhảy ra sau mỗi lần bấm. Trên khối nền đỏ đô viền đổi sang kem — đỏ đô trên
 * đỏ đô thì không thấy gì.
 * ===================================================================== */
body.tng a:focus-visible,
body.tng button:focus-visible,
body.tng input:focus-visible,
body.tng select:focus-visible,
body.tng textarea:focus-visible,
body.tng summary:focus-visible,
body.tng [tabindex]:focus-visible {
	outline: 2px solid var(--tng-do);
	outline-offset: 3px;
	border-radius: var(--tng-bo);
}
.tng-btn:focus-visible,
.tng-chip:focus-visible { border-radius: var(--tng-bo-nut); }

.tng-hero a:focus-visible,
.tng-hero button:focus-visible,
.tng-chan a:focus-visible,
.tng-chan button:focus-visible,
.tng-chan input:focus-visible,
.tng-cta a:focus-visible,
.tng-top a:focus-visible,
.tng-nn--toi a:focus-visible {
	outline-color: var(--tng-kem);
}

/* =====================================================================
 * 4. NÚT
 * ===================================================================== */
.tng-btn,
body.tng .tng-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--tng-s-2);
	padding: var(--tng-s-3) var(--tng-s-5);
	border: 1px solid var(--tng-do);
	border-radius: var(--tng-bo-nut);
	background: var(--tng-do);
	color: #fff;
	font-family: var(--tng-sans);
	font-size: var(--tng-fs-2);
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background .22s var(--tng-nhip), transform .22s var(--tng-nhip),
	            box-shadow .22s var(--tng-nhip);
}
.tng-btn:hover,
body.tng .tng-btn:hover {
	background: var(--tng-do-nhat);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--tng-bong-2);
}
/* Phản hồi khi bấm — nút lún nhẹ. Loại chuyển động số 8. */
.tng-btn:active,
body.tng .tng-btn:active { transform: translateY(0) scale(.985); box-shadow: none; }

.tng-btn--vien,
body.tng .tng-btn--vien {
	background: transparent;
	color: var(--tng-do);
	border-color: var(--tng-nau);
}
.tng-btn--vien:hover,
body.tng .tng-btn--vien:hover { background: var(--tng-do); color: #fff; border-color: var(--tng-do); }

.tng-btn--sang,
body.tng .tng-btn--sang {
	background: var(--tng-kem);
	color: var(--tng-do);
	border-color: var(--tng-kem);
}
.tng-btn--sang:hover,
body.tng .tng-btn--sang:hover { background: #fff; color: var(--tng-do-sau); border-color: #fff; }

/* Mũi tên nhích khi rê chuột. */
.tng-mt { display: inline-flex; width: 16px; height: 16px; transition: transform .22s var(--tng-nhip); }
.tng-mt svg { width: 16px; height: 16px; }
.tng-btn:hover .tng-mt,
.tng-the:hover .tng-mt { transform: translateX(3px); }

/* =====================================================================
 * 5. ĐƯỜNG KẺ MẢNH LÀM HOA VĂN PHÂN KHỐI
 *
 * Dấu nhận diện phần nhìn của mẫu. Một đường ngang mảnh, cắt giữa bằng ba
 * vạch dọc ngắn; vẽ bằng SVG nội tuyến (`tng_ke()` trong `inc/helpers.php`).
 * Nét được vẽ dần bằng `stroke-dashoffset` khi khối vào khung nhìn — loại
 * chuyển động số 5, phần JS ở `assets/site.js`.
 * ===================================================================== */
.tng-ke { display: block; color: var(--tng-nhan); line-height: 0; }
.tng-ke svg { display: block; max-width: 100%; height: 12px; }
.tng-ke--giua { margin-left: auto; margin-right: auto; }
.tng-ke--mo { color: var(--tng-nau); }
.tng-ke--toi { color: var(--tng-line-toi); }

/* =====================================================================
 * 6. ĐẦU TRANG
 *
 * Dính, nhưng CHIỀU CAO KHÔNG ĐỔI ở cả bốn trạng thái: phần tử
 * `position: sticky` vẫn chiếm chỗ trong dòng chảy, nên thu chiều cao lúc
 * đang cuộn là kéo cả trang bên dưới nhích lên một nhịp thấy rõ. Chuẩn chung
 * cũng cấm animate `height`.
 *
 * Bốn trạng thái (loại chuyển động số 4):
 *   (không lớp)  y ≤ 8px                      nền kem trong, không bóng
 *   is-stuck     y > 8px                      nền kem đặc, có bóng
 *   is-past      đã rời hero                  kẻ mảnh màu đỏ đô vẽ ra ở chân thanh
 *   is-hidden    đang cuộn xuống, y > 1,6×cao trượt cả thanh đi bằng transform
 *
 * KHÔNG có biểu tượng giỏ hàng ở đây — mẫu chạy chế độ danh mục (brief bước 3).
 * ===================================================================== */
.tng-dau {
	position: sticky;
	top: 0;
	z-index: 60;
	min-height: var(--tng-dau-trang);
	background: color-mix(in srgb, var(--tng-kem) 86%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid transparent;
	transition: background .28s var(--tng-nhip), box-shadow .28s var(--tng-nhip),
	            border-color .28s var(--tng-nhip), transform .3s var(--tng-nhip);
}
.tng-dau.is-stuck { background: color-mix(in srgb, var(--tng-kem) 97%, transparent); box-shadow: var(--tng-bong); }
.tng-dau.is-past { background: var(--tng-kem); box-shadow: var(--tng-bong-2); border-bottom-color: var(--tng-line); }
.tng-dau.is-hidden { transform: translateY(-100%); }

/* Kẻ mảnh màu đỏ đô vẽ ra ở chân thanh khi đã rời hero — `transform` trên
   phần tử giả, không animate `width`. */
.tng-dau::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 2px;
	background: var(--tng-do);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .5s var(--tng-nhip);
}
.tng-dau.is-past::after { transform: scaleX(1); }

.tng-dau__in {
	display: flex;
	align-items: center;
	gap: var(--tng-s-5);
	min-height: var(--tng-dau-trang);
}

.tng-logo { display: inline-flex; align-items: center; gap: var(--tng-s-3); text-decoration: none; color: var(--tng-muc); }
.tng-logo:hover { color: var(--tng-do); }
.tng-logo svg { display: block; flex: 0 0 auto; }
.tng-logo__ten { display: block; font-family: var(--tng-serif); font-size: var(--tng-fs-4); font-weight: 700; line-height: 1.1; }
/* 11px — cỡ CỐ Ý ngoài thang. Lên bậc 1 (13px) là dòng này rộng hơn cả tên
   thương hiệu và đẩy vỡ cột đầu của đầu trang ở khoảng 1000–1180px. */
.tng-logo__nhan {
	display: block;
	margin-top: 2px;
	color: var(--tng-nau-dam);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .16em;
	line-height: 1.2;
}

.tng-nav { margin-left: auto; }
.tng-nav ul { display: flex; align-items: center; gap: var(--tng-s-5); margin: 0; padding: 0; list-style: none; }
.tng-nav a {
	position: relative;
	display: block;
	padding: var(--tng-s-2) 0;
	color: var(--tng-muc);
	font-size: var(--tng-fs-2);
	font-weight: 500;
	text-decoration: none;
}
.tng-nav a::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 1px;
	background: var(--tng-do);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .24s var(--tng-nhip);
}
.tng-nav a:hover::after,
.tng-nav a[aria-current]::after { transform: scaleX(1); }
.tng-nav a:hover { color: var(--tng-do); }

.tng-dau__nut { display: inline-flex; align-items: center; gap: var(--tng-s-3); }

/* Nút menu điện thoại — hai nét biến hình thành dấu X. */
.tng-burger {
	display: none;
	width: 44px; height: 44px;
	align-items: center; justify-content: center;
	padding: 0;
	border: 1px solid var(--tng-line);
	border-radius: var(--tng-bo);
	background: transparent;
	color: var(--tng-muc);
	cursor: pointer;
}
.tng-burger span { position: relative; display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .24s var(--tng-nhip), opacity .18s linear; }
.tng-burger span::before,
.tng-burger span::after {
	content: ''; position: absolute; left: 0; width: 18px; height: 1.5px; background: currentColor;
	transition: transform .24s var(--tng-nhip);
}
.tng-burger span::before { top: -6px; }
.tng-burger span::after { top: 6px; }
.tng-burger[aria-expanded="true"] span { opacity: 0; }
.tng-burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.tng-burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Menu điện thoại trôi xuống. Dùng `transform` + `opacity`, không animate
   `height`: `grid-template-rows` đổi một nhịp thì không có khung hình trung
   gian nào bị tính lại bố cục. */
.tng-mnav {
	display: none;
	border-top: 1px solid var(--tng-line);
	background: var(--tng-kem);
}
.tng-mnav ul { margin: 0; padding: var(--tng-s-3) 0 var(--tng-s-5); list-style: none; }
.tng-mnav a {
	display: block;
	padding: var(--tng-s-3) 0;
	border-bottom: 1px solid var(--tng-line);
	color: var(--tng-muc);
	font-size: var(--tng-fs-3);
	text-decoration: none;
}
.tng-mnav li:last-child a { border-bottom: 0; }

/*
 * Dưới 560px: ẩn nút "Đăng ký học thử" ở đầu trang.
 *
 * Đo được ở 375px: logo + nút + nút menu cộng lại rộng 385px trên khung nhìn
 * 375px, tức TRÀN NGANG 10px — cả trang cuộn ngang được. Nút này không mất
 * đường vào: nó vẫn có trong menu điện thoại (mục Liên hệ), ở hai nút hero, và
 * ở khối gọi hành động cuối mọi trang.
 *
 * Bộ chọn phải có `body.tng` ở đầu. Luật nút ở mục 4 khai
 * `body.tng .tng-btn { display: inline-flex }` — độ đặc hiệu (0,2,1). Viết
 * `.tng-dau__nut .tng-btn` ở đây chỉ được (0,2,0), THẤP HƠN, nên luật ẩn bị
 * luật kia thắng dù nằm sau trong tệp và dù nằm trong media query. Đã đo:
 * nút vẫn `display: flex` và trang vẫn tràn ngang.
 */
@media (max-width: 560px) {
	body.tng .tng-dau__nut .tng-btn { display: none; }
}

@media (max-width: 1000px) {
	.tng-nav { display: none; }
	.tng-burger { display: inline-flex; }
	.tng-dau__in { gap: var(--tng-s-3); }
	.tng-mnav.is-open { display: block; }
	.tng-mnav.is-open ul > li { animation: tng-mnav-vao .28s var(--tng-nhip) both; }
	.tng-mnav.is-open ul > li:nth-child(2) { animation-delay: .04s; }
	.tng-mnav.is-open ul > li:nth-child(3) { animation-delay: .08s; }
	.tng-mnav.is-open ul > li:nth-child(4) { animation-delay: .12s; }
	.tng-mnav.is-open ul > li:nth-child(5) { animation-delay: .16s; }
}
@keyframes tng-mnav-vao {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: none; }
}

/* =====================================================================
 * 7. HERO
 *
 * KHÔNG áp hiệu ứng ẩn/hiện cho hero. Ẩn hero là đẩy lùi LCP và hại trực tiếp
 * điểm tốc độ (chuẩn chung mục 2). Hero chỉ chuyển động SAU KHI ĐÃ HIỆN: chữ
 * vào theo dòng từ `opacity: 1` bằng `translate`, ảnh nền zoom rất chậm.
 * ===================================================================== */
.tng-hero {
	position: relative;
	overflow: hidden;
	background: var(--tng-do-sau);
	color: var(--tng-kem);
	isolation: isolate;
}
.tng-hero__anh {
	position: absolute;
	inset: 0;
	z-index: -2;
}
.tng-hero__anh img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
	/* Loại chuyển động số 1 — zoom rất chậm, 14 giây, chạy một lần. */
	animation: tng-hero-zoom 14s var(--tng-nhip) both;
}
@keyframes tng-hero-zoom {
	from { transform: scale(1.06); }
	to   { transform: scale(1); }
}
/* Lớp phủ: đỏ đô đặc bên trái cho chữ đủ tương phản, nhạt dần sang phải. */
.tng-hero__phu {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(100deg, rgba(74, 14, 24, .95) 0%, rgba(74, 14, 24, .82) 46%, rgba(74, 14, 24, .42) 100%);
}
.tng-hero__in { padding: var(--tng-s-9) 0; max-width: 760px; }
.tng-hero__nhan {
	display: inline-block;
	margin-bottom: var(--tng-s-5);
	padding: var(--tng-s-1) var(--tng-s-3);
	border: 1px solid var(--tng-line-toi);
	color: var(--tng-nau);
	font-size: var(--tng-fs-1);
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.tng-hero h1 { font-size: var(--tng-fs-hero); font-weight: 700; margin-bottom: var(--tng-s-5); }
.tng-hero__dan { font-size: var(--tng-fs-4); color: rgba(247, 241, 232, .9); margin-bottom: var(--tng-s-6); }
.tng-hero__nut { display: flex; flex-wrap: wrap; gap: var(--tng-s-3); }

/* Ba khoang ngôn ngữ ngay dưới hero — lối vào chính của cả site. */
.tng-hero__nn {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	margin-top: var(--tng-s-8);
	border-top: 1px solid var(--tng-line-toi);
	background: var(--tng-line-toi);
}
.tng-hero__nn a {
	display: block;
	padding: var(--tng-s-5) var(--tng-s-4);
	background: rgba(74, 14, 24, .55);
	color: var(--tng-kem);
	text-decoration: none;
	transition: background .24s var(--tng-nhip), transform .24s var(--tng-nhip);
}
.tng-hero__nn a:hover { background: rgba(74, 14, 24, .86); color: #fff; transform: translateY(-3px); }
.tng-hero__nn b { display: block; font-family: var(--tng-serif); font-size: var(--tng-fs-4); font-weight: 600; }
.tng-hero__nn span { display: block; margin-top: var(--tng-s-1); color: var(--tng-nau); font-size: var(--tng-fs-1); }

@media (max-width: 760px) {
	.tng-hero__in { padding: var(--tng-s-8) 0 var(--tng-s-7); }
	.tng-hero__nn { grid-template-columns: 1fr; margin-top: var(--tng-s-6); }
	.tng-hero__phu { background: linear-gradient(180deg, rgba(74, 14, 24, .9) 0%, rgba(74, 14, 24, .95) 100%); }
}

/* =====================================================================
 * 8. KHỐI CHUNG
 * ===================================================================== */
.tng-khoi { padding: var(--tng-s-9) 0; }
.tng-khoi--kem { background: var(--tng-kem-dam); }
.tng-khoi--toi { background: var(--tng-do-sau); color: var(--tng-kem); }
.tng-khoi--mong { padding: var(--tng-s-8) 0; }

.tng-dau-khoi { max-width: 680px; margin-bottom: var(--tng-s-7); }
.tng-dau-khoi--giua { margin-left: auto; margin-right: auto; text-align: center; }
.tng-dau-khoi__nhan {
	display: block;
	margin-bottom: var(--tng-s-3);
	color: var(--tng-nau-dam);
	font-size: var(--tng-fs-1);
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.tng-khoi--toi .tng-dau-khoi__nhan { color: var(--tng-nau); }
.tng-dau-khoi h2 { font-size: var(--tng-fs-6); margin-bottom: var(--tng-s-4); }
.tng-dau-khoi p { color: var(--tng-muc-nhat); margin-bottom: var(--tng-s-4); }
.tng-khoi--toi .tng-dau-khoi p { color: rgba(247, 241, 232, .82); }

/* =====================================================================
 * 9. KHOANG NGÔN NGỮ — bố cục chính của mẫu
 *
 * Mỗi ngôn ngữ một khoang, mỗi khoang ghi đè `--tng-nhan` nên đường kẻ, nhãn,
 * số thứ tự mốc và viền thẻ bên trong tự đổi màu theo. Đây là chỗ mẫu này
 * khác hẳn `trangsuc-mau-01` và `nhahang-mau-01`: không phải một bảng màu đỏ
 * duy nhất cho cả site, mà ba khoang đỏ khác nhau xếp nối tiếp.
 * ===================================================================== */
.tng-nn { padding: var(--tng-s-9) 0; border-top: 1px solid var(--tng-line); }
.tng-nn--jp { --tng-nhan: var(--tng-jp); }
.tng-nn--kr { --tng-nhan: var(--tng-kr); }
.tng-nn--zh { --tng-nhan: var(--tng-zh); }

/* Khoang xen kẽ nền: khoang 2 nền kem đậm để ba khoang không thành một khối
   dài không phân biệt được. */
.tng-nn:nth-of-type(even) { background: var(--tng-kem-dam); }

.tng-nn__dau {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: var(--tng-s-5);
	margin-bottom: var(--tng-s-7);
}
.tng-nn__nhan {
	display: inline-flex;
	align-items: center;
	gap: var(--tng-s-2);
	margin-bottom: var(--tng-s-3);
	color: var(--tng-nhan);
	font-size: var(--tng-fs-1);
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.tng-nn__nhan::before { content: ''; width: 20px; height: 1px; background: currentColor; }
.tng-nn__dau h2 { font-size: var(--tng-fs-6); color: var(--tng-nhan); margin-bottom: var(--tng-s-3); }
.tng-nn__dau p { max-width: 560px; color: var(--tng-muc-nhat); margin: 0; }
.tng-nn__ke { margin-top: var(--tng-s-4); }

@media (max-width: 760px) {
	.tng-nn__dau { grid-template-columns: 1fr; align-items: start; }
	.tng-nn { padding: var(--tng-s-8) 0; }
}

/* =====================================================================
 * 10. THẺ KHOÁ HỌC
 *
 * Loại chuyển động số 3: nâng thẻ 5px, ảnh bên trong phóng 1.05 trong khung
 * `overflow: hidden`, nút phụ "Xem khoá học" trượt lên hiện ra.
 *
 * HAI THUỘC TÍNH, KHÔNG MỘT. Hiệu ứng rê chuột dùng `transform`; hiệu ứng
 * hiện-dần-khi-cuộn dùng `translate` riêng (mục 15). Nếu cả hai cùng ghi vào
 * `transform` thì chúng tranh nhau một thuộc tính, và thẻ vừa hiện ra sẽ nâng
 * lên theo nhịp 700ms của hiện-dần chứ không phải 220ms của rê chuột — cảm
 * giác nặng và sai hẳn. Hai thuộc tính riêng thì trình duyệt cộng chúng lại.
 * ===================================================================== */
.tng-luoi {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--tng-s-5);
	margin: 0;
	padding: 0;
	list-style: none;
}
.tng-luoi--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tng-luoi--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1100px) { .tng-luoi, .tng-luoi--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .tng-luoi, .tng-luoi--2, .tng-luoi--4 { grid-template-columns: 1fr; } }

.tng-the {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--tng-line);
	border-radius: var(--tng-bo);
	background: var(--tng-trang);
	overflow: hidden;
	transition: transform .22s var(--tng-nhip), box-shadow .22s var(--tng-nhip),
	            border-color .22s var(--tng-nhip);
}
.tng-the:hover { transform: translateY(-5px); box-shadow: var(--tng-bong-3); border-color: var(--tng-nhan); }

/* Khung ảnh cố định tỉ lệ 4:3 — CLS bằng 0, và lưới không so le. */
.tng-the__anh {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--tng-kem-dam);
}
.tng-the__anh img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s var(--tng-nhip);
}
.tng-the:hover .tng-the__anh img { transform: scale(1.05); }

/* Nhãn ngôn ngữ trên ảnh — màu của khoang đang đứng. */
.tng-the__nn {
	position: absolute;
	left: 0; top: var(--tng-s-3);
	padding: var(--tng-s-1) var(--tng-s-3);
	background: var(--tng-nhan);
	color: #fff;
	font-size: var(--tng-fs-1);
	font-weight: 600;
	letter-spacing: .04em;
}

/* Nút phụ trượt lên hiện ra. `position: absolute` nên không làm thẻ cao thêm,
   và khung trùm đúng khung ảnh. */
.tng-the__xem {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: var(--tng-s-3);
	background: rgba(42, 31, 28, .86);
	color: #fff;
	font-size: var(--tng-fs-2);
	font-weight: 600;
	text-align: center;
	transform: translateY(100%);
	opacity: 0;
	transition: transform .26s var(--tng-nhip), opacity .26s var(--tng-nhip);
}
.tng-the:hover .tng-the__xem,
.tng-the:focus-within .tng-the__xem { transform: none; opacity: 1; }

.tng-the__than { display: flex; flex-direction: column; flex: 1 1 auto; padding: var(--tng-s-5); }
.tng-the__md {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tng-s-2);
	margin-bottom: var(--tng-s-3);
	color: var(--tng-nau-dam);
	font-size: var(--tng-fs-1);
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.tng-the__md i { font-style: normal; color: var(--tng-line); }
.tng-the h3 { font-size: var(--tng-fs-4); margin-bottom: var(--tng-s-3); }
.tng-the h3 a { color: inherit; text-decoration: none; }
.tng-the h3 a:hover { color: var(--tng-nhan); }
.tng-the__mo { flex: 1 1 auto; color: var(--tng-muc-nhat); font-size: var(--tng-fs-2); margin-bottom: var(--tng-s-4); }

.tng-the__chan {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--tng-s-3);
	padding-top: var(--tng-s-4);
	border-top: 1px solid var(--tng-line);
}
.tng-the__ds { display: flex; flex-wrap: wrap; gap: var(--tng-s-1) var(--tng-s-3); color: var(--tng-muc-nhat); font-size: var(--tng-fs-1); }

/* =====================================================================
 * 11. HỌC PHÍ
 *
 * Luôn kèm chữ "Học phí minh hoạ" — xem `tng_gia_html()` trong `inc/shop.php`.
 * Không có chỗ nào trong mẫu hiện một con số học phí trần.
 * ===================================================================== */
.tng-gia { display: block; color: var(--tng-do); font-family: var(--tng-serif); font-size: var(--tng-fs-4); font-weight: 600; line-height: 1.25; }
.tng-gia__tu { color: var(--tng-nau-dam); font-family: var(--tng-sans); font-size: var(--tng-fs-1); font-weight: 600; }
.tng-gia__dv { color: var(--tng-nau-dam); font-family: var(--tng-sans); font-size: var(--tng-fs-1); font-weight: 500; }
.tng-gia__so { white-space: nowrap; }
.tng-gia__nhac { display: block; margin-top: 2px; color: var(--tng-nau-dam); font-size: var(--tng-fs-1); font-style: italic; }
.tng-gia--rong { font-size: var(--tng-fs-2); font-family: var(--tng-sans); }
body.tng .tng-gia .woocommerce-Price-amount { color: inherit; font-weight: inherit; }
body.tng .tng-gia bdi { white-space: nowrap; }

/* =====================================================================
 * 12. KHỐI BẢNG CHỮ CÁI — lật thẻ chữ
 *
 * Loại chuyển động số 7, phần sáng tạo RIÊNG của mẫu này: thẻ chữ lật quanh
 * trục dọc, mặt trước là ký tự nước ngoài, mặt sau là cách đọc theo tiếng
 * Việt. Lật khi rê chuột HOẶC khi được tiêu điểm bàn phím — KHÔNG tự lật vô
 * hạn: chuẩn chung cấm chuyển động vô hạn ở khu vực đọc nội dung, và một khối
 * tự lật liên tục thì đọc không kịp.
 *
 * Chữ Nhật, Hàn, Trung ở đây dùng ba phông Noto Serif JP/KR/SC nạp theo đúng
 * những ký tự có trên trang (xem `tng_font_cjk()`). Thiếu phông là ra ô vuông.
 * ===================================================================== */
.tng-bang { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tng-s-6); }
@media (max-width: 900px) { .tng-bang { grid-template-columns: 1fr; gap: var(--tng-s-7); } }

.tng-bang__nhom--jp { --tng-nhan: var(--tng-jp); }
.tng-bang__nhom--kr { --tng-nhan: var(--tng-kr); }
.tng-bang__nhom--zh { --tng-nhan: var(--tng-zh); }

.tng-bang__dau { margin-bottom: var(--tng-s-5); }
.tng-bang__mau { display: block; color: var(--tng-nhan); font-size: var(--tng-fs-5); line-height: 1.2; }
.tng-bang__mau--jp { font-family: var(--tng-jp-font); }
.tng-bang__mau--kr { font-family: var(--tng-kr-font); }
.tng-bang__mau--zh { font-family: var(--tng-zh-font); }
.tng-bang__dau h3 { margin-top: var(--tng-s-3); font-size: var(--tng-fs-4); }
.tng-bang__dau p { margin: var(--tng-s-2) 0 0; color: var(--tng-muc-nhat); font-size: var(--tng-fs-2); }

.tng-bang__the { display: flex; flex-wrap: wrap; gap: var(--tng-s-2); margin-top: var(--tng-s-4); padding: 0; list-style: none; }

.tng-lat {
	width: 60px;
	height: 60px;
	perspective: 420px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}
.tng-lat__in {
	position: relative;
	width: 100%; height: 100%;
	transform-style: preserve-3d;
	transition: transform .42s var(--tng-nhip);
}
.tng-lat:hover .tng-lat__in,
.tng-lat:focus-visible .tng-lat__in,
.tng-lat.is-lat .tng-lat__in { transform: rotateY(180deg); }

.tng-lat__mat {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--tng-line);
	border-radius: var(--tng-bo);
	background: var(--tng-trang);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}
.tng-lat__mat--truoc { color: var(--tng-nhan); font-size: 26px; line-height: 1; }
.tng-lat__mat--truoc.is-jp { font-family: var(--tng-jp-font); }
.tng-lat__mat--truoc.is-kr { font-family: var(--tng-kr-font); }
.tng-lat__mat--truoc.is-zh { font-family: var(--tng-zh-font); }
.tng-lat__mat--sau {
	transform: rotateY(180deg);
	background: var(--tng-nhan);
	border-color: var(--tng-nhan);
	color: #fff;
	font-family: var(--tng-sans);
	font-size: var(--tng-fs-4);
	font-weight: 600;
}
.tng-bang__nhac { margin-top: var(--tng-s-4); color: var(--tng-nau-dam); font-size: var(--tng-fs-1); }

/* =====================================================================
 * 13. LỘ TRÌNH — năm mốc trình độ
 *
 * Năm bước xếp dọc, nối nhau bằng một đường kẻ mảnh. Số thứ tự mốc là một
 * chuyển động "nét vẽ dần" nữa: vòng tròn quanh số được vẽ bằng
 * `stroke-dashoffset`.
 * ===================================================================== */
.tng-lo { display: grid; gap: 0; max-width: 900px; margin: 0 auto; }
.tng-lo__b {
	position: relative;
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: var(--tng-s-5);
	padding: var(--tng-s-5) 0;
	border-top: 1px solid var(--tng-line);
}
.tng-lo__b:last-child { border-bottom: 1px solid var(--tng-line); }
.tng-lo__so {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px; height: 56px;
	color: var(--tng-do);
	font-family: var(--tng-serif);
	font-size: var(--tng-fs-4);
	font-weight: 600;
}
.tng-lo__so svg { position: absolute; inset: 0; width: 56px; height: 56px; }
.tng-lo__so span { position: relative; }
.tng-lo__b h3 { font-size: var(--tng-fs-4); margin-bottom: var(--tng-s-2); }
.tng-lo__b p { color: var(--tng-muc-nhat); font-size: var(--tng-fs-2); margin: 0; }
.tng-lo__b dl { display: flex; flex-wrap: wrap; gap: var(--tng-s-1) var(--tng-s-5); margin: var(--tng-s-3) 0 0; font-size: var(--tng-fs-1); }
.tng-lo__b dt { color: var(--tng-nau-dam); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.tng-lo__b dd { margin: 0 var(--tng-s-3) 0 0; color: var(--tng-muc); }

@media (max-width: 640px) {
	.tng-lo__b { grid-template-columns: 1fr; gap: var(--tng-s-3); }
	.tng-lo__so { width: 48px; height: 48px; }
	.tng-lo__so svg { width: 48px; height: 48px; }
}

/* =====================================================================
 * 14. SỐ LIỆU ĐẾM LÊN
 *
 * Loại chuyển động số 5. Bốn số dưới đây đều là SỐ ĐẾM ĐƯỢC TỪ CHÍNH DỮ LIỆU
 * CỦA SITE — ba ngôn ngữ, số khoá đang có, năm mốc trình độ, sĩ số tối đa của
 * một lớp. Cố ý KHÔNG có số học viên, số năm hoạt động hay tỉ lệ đạt chứng
 * chỉ: những số đó mẫu này không có cơ sở gì để nêu.
 * ===================================================================== */
.tng-so { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--tng-line-toi); }
.tng-so__o { padding: var(--tng-s-6) var(--tng-s-4); background: var(--tng-do-sau); text-align: center; }
.tng-so__n {
	display: block;
	color: var(--tng-kem);
	font-family: var(--tng-serif);
	font-size: var(--tng-fs-6);
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
.tng-so__t { display: block; margin-top: var(--tng-s-2); color: var(--tng-nau); font-size: var(--tng-fs-1); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 760px) { .tng-so { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =====================================================================
 * 15. CHUYỂN ĐỘNG THEO CUỘN
 *
 * Loại chuyển động số 2. Dịch lên 20px + mờ dần 700ms, lệch nhịp 80ms giữa
 * các phần tử cùng hàng.
 *
 * BỘ CHỌN KHAI Ở HAI NƠI và phải khớp từng chữ: ba hằng `SEL`, `SEL_CON` và
 * `SEL_KE` ở đầu `assets/site.js`, và ba bộ chọn cùng nghĩa ngay dưới đây.
 * Lệch một chữ là có phần tử ẩn vĩnh viễn.
 *
 * BA ĐƯỜNG DỰ PHÒNG — thiếu một đường là nội dung có thể ẩn vĩnh viễn:
 *   1. Lớp `tng-js` gắn bằng script NỘI TUYẾN trong `<head>` (header.php).
 *      CSS chỉ giấu khi có lớp này, nên tắt JS là thấy đủ nội dung. Không
 *      được đợi tệp JS `defer` mới gắn — đợi là chớp nội dung một nhịp.
 *   2. `prefers-reduced-motion: reduce` → tắt hẳn luật giấu (cuối tệp này).
 *   3. Hẹn giờ 2,5 giây → gắn `tng-hien-het` nếu IntersectionObserver chưa
 *      kích hoạt lần nào. Cũng ở script nội tuyến trong `<head>`. Đây là rủi
 *      ro thật: trong khung xem của công cụ trình duyệt, IO không kích hoạt
 *      lần nào.
 * ===================================================================== */
.tng-js [data-tng-vao],
.tng-js [data-tng-rise] > * {
	opacity: 0;
	translate: 0 20px;
	transition: opacity .7s var(--tng-nhip), translate .7s var(--tng-nhip);
}
.tng-js [data-tng-vao].is-vao,
.tng-js [data-tng-rise] > .is-vao {
	opacity: 1;
	translate: none;
}

/* Đường dự phòng số 3 — hẹn giờ 2,5s ép hiện hết. */
.tng-hien-het [data-tng-vao],
.tng-hien-het [data-tng-rise] > * {
	opacity: 1 !important;
	translate: none !important;
}

/* Nét vẽ dần (loại số 6). `stroke-dashoffset` là thuộc tính SVG, không buộc
   trình duyệt tính lại bố cục trang. */
.tng-js [data-tng-ke] svg path,
.tng-js [data-tng-vong] circle {
	stroke-dasharray: var(--tng-dash, 400);
	stroke-dashoffset: var(--tng-dash, 400);
	transition: stroke-dashoffset .9s var(--tng-nhip);
}
.tng-js [data-tng-ke].is-ve svg path,
.tng-js [data-tng-vong].is-ve circle { stroke-dashoffset: 0; }
.tng-hien-het [data-tng-ke] svg path,
.tng-hien-het [data-tng-vong] circle { stroke-dashoffset: 0 !important; }

/* Hero vào trang (loại số 1) — chạy từ `opacity: 1`, KHÔNG ẩn hero.
   Chỉ `translate`, nên phần tử LCP đã hiện ngay từ khung hình đầu. */
.tng-js .tng-hero__nhan,
.tng-js .tng-hero h1,
.tng-js .tng-hero__dan,
.tng-js .tng-hero__nut,
.tng-js .tng-hero__nn { animation: tng-hero-vao .72s var(--tng-nhip) both; }
.tng-js .tng-hero h1        { animation-delay: .08s; }
.tng-js .tng-hero__dan      { animation-delay: .16s; }
.tng-js .tng-hero__nut      { animation-delay: .24s; }
.tng-js .tng-hero__nn       { animation-delay: .32s; }
@keyframes tng-hero-vao {
	from { translate: 0 14px; }
	to   { translate: none; }
}

/* =====================================================================
 * 16. CỬA HÀNG — trang danh sách khoá học
 * ===================================================================== */
.tng-page__head { padding: var(--tng-s-8) 0 var(--tng-s-6); border-bottom: 1px solid var(--tng-line); background: var(--tng-kem-dam); }
.tng-crumb { margin-bottom: var(--tng-s-4); color: var(--tng-nau-dam); font-size: var(--tng-fs-1); }
.tng-crumb a { color: var(--tng-nau-dam); }
.tng-crumb a:hover { color: var(--tng-do); }
.tng-crumb span[aria-hidden] { margin: 0 var(--tng-s-2); color: var(--tng-line); }
.tng-page__title { font-size: var(--tng-fs-6); }
.tng-page__dan { max-width: 640px; margin-top: var(--tng-s-4); color: var(--tng-muc-nhat); }
.tng-page__body { padding: var(--tng-s-8) 0; }
.tng-page__body > :last-child { margin-bottom: 0; }

/* Hàng lọc. Là một `<form method="get">` thuần — tắt JS vẫn lọc được. */
.tng-loc { padding: var(--tng-s-5) 0; border-bottom: 1px solid var(--tng-line); }
.tng-loc__hang { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tng-s-3); }
.tng-loc__nhan { color: var(--tng-nau-dam); font-size: var(--tng-fs-1); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tng-loc__nhom { display: flex; flex-wrap: wrap; gap: var(--tng-s-2); }
.tng-loc__cuoi { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--tng-s-3); }
.tng-loc__dem { color: var(--tng-muc-nhat); font-size: var(--tng-fs-2); }

.tng-chip {
	display: inline-flex;
	align-items: center;
	padding: 6px var(--tng-s-4);
	border: 1px solid var(--tng-line);
	border-radius: var(--tng-bo-nut);
	background: var(--tng-trang);
	color: var(--tng-muc);
	font-size: var(--tng-fs-2);
	font-weight: 500;
	text-decoration: none;
	transition: background .2s var(--tng-nhip), color .2s var(--tng-nhip),
	            border-color .2s var(--tng-nhip), transform .2s var(--tng-nhip);
}
.tng-chip:hover { border-color: var(--tng-do); color: var(--tng-do); transform: translateY(-1px); }
.tng-chip[aria-current="true"] { background: var(--tng-do); border-color: var(--tng-do); color: #fff; }
.tng-chip[aria-current="true"]:hover { background: var(--tng-do-nhat); color: #fff; }
.tng-chip--jp[aria-current="true"] { background: var(--tng-jp); border-color: var(--tng-jp); }
.tng-chip--kr[aria-current="true"] { background: var(--tng-kr); border-color: var(--tng-kr); }
.tng-chip--zh[aria-current="true"] { background: var(--tng-zh); border-color: var(--tng-zh); }
.tng-chip--bo { border-style: dashed; color: var(--tng-nau-dam); }

.tng-sel {
	padding: 7px var(--tng-s-4);
	border: 1px solid var(--tng-line);
	border-radius: var(--tng-bo);
	background: var(--tng-trang);
	color: var(--tng-muc);
	font-family: var(--tng-sans);
	font-size: var(--tng-fs-2);
}
.tng-loc__gui { display: none; }
/* Tắt JS thì ô sắp xếp cần một nút Áp dụng, nếu không nó không gửi được form. */
.no-js .tng-loc__gui,
html:not(.tng-js) .tng-loc__gui { display: inline-flex; }

@media (max-width: 760px) {
	.tng-loc__cuoi { margin-left: 0; width: 100%; }
}

/* Lưới sản phẩm của WooCommerce dùng chung thẻ với lưới tự dựng. */
body.tng ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--tng-s-5);
	margin: 0;
	padding: 0;
	list-style: none;
}
body.tng ul.products::before,
body.tng ul.products::after { content: none; display: none; }
body.tng ul.products li.product { width: auto; margin: 0; float: none; }
@media (max-width: 1100px) { body.tng ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { body.tng ul.products { grid-template-columns: 1fr; } }

/* Phân trang. */
body.tng .woocommerce-pagination { margin-top: var(--tng-s-7); }
body.tng .woocommerce-pagination ul { display: flex; flex-wrap: wrap; gap: var(--tng-s-2); margin: 0; padding: 0; border: 0; list-style: none; }
body.tng .woocommerce-pagination li { border: 0; margin: 0; }
body.tng .woocommerce-pagination a,
body.tng .woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	padding: var(--tng-s-2) var(--tng-s-3);
	border: 1px solid var(--tng-line);
	border-radius: var(--tng-bo);
	background: var(--tng-trang);
	color: var(--tng-muc);
	font-size: var(--tng-fs-2);
	text-decoration: none;
}
body.tng .woocommerce-pagination span.current { background: var(--tng-do); border-color: var(--tng-do); color: #fff; }
body.tng .woocommerce-pagination a:hover { border-color: var(--tng-do); color: var(--tng-do); }

/* =====================================================================
 * 17. TRANG RỖNG
 *
 * Chuẩn chung mục 5 nói đúng: đây là chỗ hay bị bỏ quên và hay rớt tương phản
 * màu nhất. Dùng CHUNG một khối cho kết quả lọc rỗng, tìm kiếm rỗng và 404 nên
 * ba trang rỗng trông cùng một nhà.
 * ===================================================================== */
.tng-trong { max-width: 560px; margin: var(--tng-s-8) auto; padding: var(--tng-s-7) var(--tng-s-5); border: 1px solid var(--tng-line); border-radius: var(--tng-bo); background: var(--tng-trang); text-align: center; }
.tng-trong svg { display: block; margin: 0 auto var(--tng-s-5); color: var(--tng-nau); }
.tng-trong h2 { font-size: var(--tng-fs-5); margin-bottom: var(--tng-s-3); }
.tng-trong p { color: var(--tng-muc-nhat); margin-bottom: var(--tng-s-5); }
.tng-trong__nut { display: flex; flex-wrap: wrap; gap: var(--tng-s-3); justify-content: center; }

/* =====================================================================
 * 18. TRANG KHOÁ HỌC
 * ===================================================================== */
.tng-sp { padding: var(--tng-s-8) 0; }
.tng-sp__luoi { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--tng-s-8); align-items: start; }
@media (max-width: 900px) { .tng-sp__luoi { grid-template-columns: 1fr; gap: var(--tng-s-6); } }

body.tng .woocommerce-product-gallery { margin: 0; }
body.tng .woocommerce-product-gallery__wrapper { margin: 0; }
body.tng .woocommerce-product-gallery img { border-radius: var(--tng-bo); display: block; }
.tng-sp__anh { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--tng-line); border-radius: var(--tng-bo); background: var(--tng-kem-dam); }
.tng-sp__anh img { width: 100%; height: 100%; object-fit: cover; display: block; }

body.tng .product_title { font-size: var(--tng-fs-6); margin-bottom: var(--tng-s-4); }
body.tng .woocommerce-product-details__short-description { color: var(--tng-muc-nhat); margin-bottom: var(--tng-s-5); }
body.tng .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }

/* Khối thông tin khoá học — `tng_single_thong_tin()` in ra. */
.tng-ttk { margin: var(--tng-s-5) 0; padding: var(--tng-s-5); border: 1px solid var(--tng-line); border-radius: var(--tng-bo); background: var(--tng-trang); }
.tng-ttk__h { margin-bottom: var(--tng-s-4); color: var(--tng-nau-dam); font-size: var(--tng-fs-1); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.tng-ttk dl { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: var(--tng-s-3) var(--tng-s-5); margin: 0; font-size: var(--tng-fs-2); }
.tng-ttk dt { color: var(--tng-muc-nhat); }
.tng-ttk dd { margin: 0; font-weight: 600; }
@media (max-width: 480px) { .tng-ttk dl { grid-template-columns: 1fr; gap: var(--tng-s-1); } .tng-ttk dd { margin-bottom: var(--tng-s-3); } }

.tng-dk { margin-top: var(--tng-s-5); padding: var(--tng-s-5); border: 1px solid var(--tng-do); border-radius: var(--tng-bo); background: color-mix(in srgb, var(--tng-do) 5%, var(--tng-trang)); }
.tng-dk p { color: var(--tng-muc-nhat); font-size: var(--tng-fs-2); margin-bottom: var(--tng-s-4); }
.tng-dk__nhac { margin: var(--tng-s-4) 0 0 !important; font-size: var(--tng-fs-1) !important; font-style: italic; }

/* Thẻ Mô tả. */
body.tng .woocommerce-tabs { margin-top: var(--tng-s-8); padding-top: var(--tng-s-7); border-top: 1px solid var(--tng-line); }
body.tng .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: var(--tng-s-5); margin: 0 0 var(--tng-s-5); padding: 0; border: 0; list-style: none; }
body.tng .woocommerce-tabs ul.tabs::before,
body.tng .woocommerce-tabs ul.tabs li::before,
body.tng .woocommerce-tabs ul.tabs li::after { content: none; display: none; }
body.tng .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 0; background: none; border-radius: 0; box-shadow: none; }
body.tng .woocommerce-tabs ul.tabs li a { padding: var(--tng-s-2) 0; border-bottom: 2px solid transparent; color: var(--tng-muc-nhat); font-size: var(--tng-fs-2); font-weight: 600; text-decoration: none; }
body.tng .woocommerce-tabs ul.tabs li.active a { border-bottom-color: var(--tng-do); color: var(--tng-do); }
body.tng .woocommerce-tabs .panel { max-width: 760px; margin: 0; padding: 0; }
body.tng .woocommerce-tabs .panel h2 { font-size: var(--tng-fs-5); margin-bottom: var(--tng-s-4); }
body.tng .woocommerce-tabs table.shop_attributes { width: 100%; border: 0; font-size: var(--tng-fs-2); }
body.tng .woocommerce-tabs table.shop_attributes th,
body.tng .woocommerce-tabs table.shop_attributes td { padding: var(--tng-s-3) 0; border-bottom: 1px solid var(--tng-line); text-align: left; }
body.tng .woocommerce-tabs table.shop_attributes td p { margin: 0; }

/* Khối khoá liên quan. */
body.tng .related { margin-top: var(--tng-s-8); padding-top: var(--tng-s-7); border-top: 1px solid var(--tng-line); }
body.tng .related > h2 { font-size: var(--tng-fs-6); margin-bottom: var(--tng-s-6); }

/* =====================================================================
 * 19. BIỂU MẪU
 * ===================================================================== */
.tng-form { display: grid; gap: var(--tng-s-4); }
.tng-form__hang { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tng-s-4); }
@media (max-width: 640px) { .tng-form__hang { grid-template-columns: 1fr; } }
.tng-form label { display: block; margin-bottom: var(--tng-s-2); color: var(--tng-muc-nhat); font-size: var(--tng-fs-1); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.tng-form input,
.tng-form select,
.tng-form textarea {
	width: 100%;
	padding: var(--tng-s-3) var(--tng-s-4);
	border: 1px solid var(--tng-line);
	border-radius: var(--tng-bo);
	background: var(--tng-trang);
	color: var(--tng-muc);
	font-family: var(--tng-sans);
	font-size: var(--tng-fs-3);
	box-sizing: border-box;
	transition: border-color .2s var(--tng-nhip), box-shadow .2s var(--tng-nhip);
}
.tng-form input:focus,
.tng-form select:focus,
.tng-form textarea:focus { border-color: var(--tng-do); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tng-do) 14%, transparent); outline: none; }
.tng-form textarea { min-height: 120px; resize: vertical; }
.tng-form__nhac { color: var(--tng-nau-dam); font-size: var(--tng-fs-1); }

/* Lời nhắn sau khi bấm Gửi — trôi vào từ dưới. */
.tng-toast {
	position: fixed;
	left: var(--tng-s-4);
	right: var(--tng-s-4);
	bottom: var(--tng-s-4);
	z-index: 90;
	max-width: 520px;
	margin: 0 auto;
	padding: var(--tng-s-4) var(--tng-s-5);
	border-radius: var(--tng-bo);
	background: var(--tng-muc);
	color: var(--tng-kem);
	font-size: var(--tng-fs-2);
	box-shadow: var(--tng-bong-3);
	animation: tng-toast-vao .4s var(--tng-nhip) both;
}
@keyframes tng-toast-vao {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: none; }
}

/* Lời nhắn chế độ danh mục trên trang giỏ hàng / thanh toán. */
.tng-nhac {
	margin: 0 0 var(--tng-s-6);
	padding: var(--tng-s-4) var(--tng-s-5);
	border-left: 3px solid var(--tng-do);
	background: var(--tng-kem-dam);
	color: var(--tng-muc);
	font-size: var(--tng-fs-2);
}

/* =====================================================================
 * 20. CHÂN TRANG
 * ===================================================================== */
.tng-chan { background: var(--tng-do-sau); color: rgba(247, 241, 232, .82); }
.tng-chan a { color: var(--tng-kem); text-decoration: none; }
.tng-chan a:hover { color: #fff; text-decoration: underline; }
.tng-chan__tren { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--tng-s-7); padding: var(--tng-s-8) 0; }
@media (max-width: 900px) { .tng-chan__tren { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tng-s-6); } }
@media (max-width: 560px) { .tng-chan__tren { grid-template-columns: 1fr; } }

.tng-chan__logo { display: inline-flex; align-items: center; gap: var(--tng-s-3); margin-bottom: var(--tng-s-4); color: var(--tng-kem); }
.tng-chan__logo:hover { text-decoration: none; }
.tng-chan__logo b { font-family: var(--tng-serif); font-size: var(--tng-fs-4); font-weight: 700; }
.tng-chan__mo { font-size: var(--tng-fs-2); max-width: 36ch; }
.tng-chan h3 { margin-bottom: var(--tng-s-4); color: var(--tng-nau); font-size: var(--tng-fs-1); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.tng-chan ul { margin: 0; padding: 0; list-style: none; }
.tng-chan li { margin-bottom: var(--tng-s-3); font-size: var(--tng-fs-2); }
.tng-chan__duoi { padding: var(--tng-s-5) 0 var(--tng-s-6); border-top: 1px solid var(--tng-line-toi); font-size: var(--tng-fs-1); }
.tng-chan__duoi p { margin-bottom: var(--tng-s-2); }
.tng-chan__duoi p:last-child { margin-bottom: 0; }
.tng-chan__mau { color: var(--tng-nau); }

/* =====================================================================
 * 21. KHỐI GỌI HÀNH ĐỘNG
 * ===================================================================== */
.tng-cta { padding: var(--tng-s-8) 0; background: var(--tng-do); color: var(--tng-kem); }
.tng-cta__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--tng-s-6); }
.tng-cta h2 { font-size: var(--tng-fs-6); margin-bottom: var(--tng-s-3); }
.tng-cta p { color: rgba(247, 241, 232, .88); margin: 0; max-width: 52ch; }
.tng-cta__nut { display: flex; flex-wrap: wrap; gap: var(--tng-s-3); }
@media (max-width: 860px) { .tng-cta__in { grid-template-columns: 1fr; } }

/* =====================================================================
 * 22. TRANG GIỚI THIỆU · LIÊN HỆ
 * ===================================================================== */
.tng-gt__hai { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tng-s-8); align-items: center; }
@media (max-width: 860px) { .tng-gt__hai { grid-template-columns: 1fr; gap: var(--tng-s-6); } }
.tng-gt__anh { aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--tng-line); border-radius: var(--tng-bo); background: var(--tng-kem-dam); }
.tng-gt__anh img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tng-gt__van h2 { font-size: var(--tng-fs-6); margin-bottom: var(--tng-s-4); }
.tng-gt__van p { color: var(--tng-muc-nhat); }

.tng-ds { margin: 0; padding: 0; list-style: none; }
.tng-ds li { position: relative; padding: var(--tng-s-3) 0 var(--tng-s-3) var(--tng-s-6); border-bottom: 1px solid var(--tng-line); font-size: var(--tng-fs-2); }
.tng-ds li:last-child { border-bottom: 0; }
.tng-ds li::before { content: ''; position: absolute; left: 0; top: 50%; width: 16px; height: 1px; background: var(--tng-nhan); }

.tng-lh__luoi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--tng-s-8); align-items: start; }
@media (max-width: 900px) { .tng-lh__luoi { grid-template-columns: 1fr; gap: var(--tng-s-6); } }
.tng-lh__o { padding: var(--tng-s-5); border: 1px solid var(--tng-line); border-radius: var(--tng-bo); background: var(--tng-trang); }
.tng-lh__o + .tng-lh__o { margin-top: var(--tng-s-4); }
.tng-lh__o h3 { margin-bottom: var(--tng-s-2); font-size: var(--tng-fs-4); }
.tng-lh__o a { font-size: var(--tng-fs-4); font-family: var(--tng-serif); }
.tng-lh__o p { margin: var(--tng-s-2) 0 0; color: var(--tng-muc-nhat); font-size: var(--tng-fs-2); }

/*
 * BIỂU MẪU CHỈ TRÊN MÁY TÍNH, giống các mẫu khác trong bộ. Dưới 960px biểu mẫu
 * ẩn và thay bằng khối gọi nhanh. Ẩn bằng `display: none` nên biểu mẫu cũng
 * rời khỏi thứ tự tiêu điểm bàn phím — không có cảnh tab vào một ô nhập vô
 * hình.
 */
.tng-goi { display: none; }
@media (max-width: 960px) {
	.tng-form--may { display: none; }
	.tng-goi { display: block; padding: var(--tng-s-5); border: 1px solid var(--tng-do); border-radius: var(--tng-bo); background: color-mix(in srgb, var(--tng-do) 5%, var(--tng-trang)); text-align: center; }
	.tng-goi p { color: var(--tng-muc-nhat); font-size: var(--tng-fs-2); }
}

/* =====================================================================
 * 23. BẪY SỐ 7 — NÚT CỦA TRANG GIỎ HÀNG / THANH TOÁN / TÀI KHOẢN
 *
 * WooCommerce 8+ dựng ba trang này bằng BLOCK, và nút của block lấy màu từ
 * `theme.json` chứ không từ CSS của theme con — nên mặc định ra xanh dương
 * của theme mẹ. Nút của block KHÔNG mang lớp `.button`, nên phải liệt kê đủ
 * các họ lớp dưới đây.
 * ===================================================================== */
body.tng .button,
body.tng .wp-block-button__link,
body.tng .wp-element-button,
body.tng .wc-block-components-button,
body.tng .wc-block-cart__submit-button,
body.tng .wc-block-components-checkout-place-order-button,
body.tng .wc-block-components-product-button a,
body.tng .woocommerce-button,
body.tng button.woocommerce-form-login__submit,
body.tng input.button,
body.tng button[type="submit"].button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--tng-s-2);
	padding: var(--tng-s-3) var(--tng-s-5);
	border: 1px solid var(--tng-do);
	border-radius: var(--tng-bo-nut);
	background: var(--tng-do);
	background-image: none;
	color: #fff;
	font-family: var(--tng-sans);
	font-size: var(--tng-fs-2);
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background .22s var(--tng-nhip), transform .22s var(--tng-nhip);
}
body.tng .button:hover,
body.tng .wp-block-button__link:hover,
body.tng .wp-element-button:hover,
body.tng .wc-block-components-button:hover,
body.tng .wc-block-cart__submit-button:hover,
body.tng .wc-block-components-checkout-place-order-button:hover,
body.tng .wc-block-components-product-button a:hover,
body.tng .woocommerce-button:hover,
body.tng input.button:hover {
	background: var(--tng-do-nhat);
	color: #fff;
	transform: translateY(-2px);
}
body.tng .wc-block-components-button__text { color: inherit; }

/* Thông báo của WooCommerce. */
body.tng .woocommerce-message,
body.tng .woocommerce-info,
body.tng .woocommerce-error,
body.tng .wc-block-components-notice-banner {
	border-radius: var(--tng-bo);
	border-left: 3px solid var(--tng-do);
	background: var(--tng-kem-dam);
	color: var(--tng-muc);
	font-size: var(--tng-fs-2);
}
body.tng .woocommerce-message::before,
body.tng .woocommerce-info::before { color: var(--tng-do); }

/* Bảng và ô nhập của ba trang ấy, cho khỏi lọt phông và viền của theme mẹ. */
body.tng .woocommerce table.shop_table,
body.tng .wc-block-cart-items { border-radius: var(--tng-bo); border-color: var(--tng-line); }
body.tng .woocommerce form .form-row input.input-text,
body.tng .woocommerce form .form-row textarea,
body.tng .woocommerce form .form-row select,
body.tng .wc-block-components-text-input input {
	border: 1px solid var(--tng-line);
	border-radius: var(--tng-bo);
	background: var(--tng-trang);
	font-family: var(--tng-sans);
	color: var(--tng-muc);
}
body.tng .wc-block-components-totals-item__value,
body.tng .woocommerce-Price-amount { color: var(--tng-do); font-weight: 600; }

/* =====================================================================
 * 24. ĐƯỜNG DỰ PHÒNG SỐ 2 — prefers-reduced-motion
 *
 * Hiện hết ngay, bỏ mọi chuyển động. Phải TẮT HẲN LUẬT GIẤU ở mục 15, không
 * chỉ rút thời lượng về 0: rút thời lượng mà vẫn giữ `opacity: 0` là nội dung
 * ẩn vĩnh viễn với đúng những người đã xin bớt chuyển động.
 * ===================================================================== */
@media (prefers-reduced-motion: reduce) {
	.tng-js [data-tng-vao],
	.tng-js [data-tng-rise] > * {
		opacity: 1 !important;
		translate: none !important;
		transition: none !important;
	}
	.tng-js [data-tng-ke] svg path,
	.tng-js [data-tng-vong] circle {
		stroke-dasharray: none !important;
		stroke-dashoffset: 0 !important;
		transition: none !important;
	}
	body.tng *,
	body.tng *::before,
	body.tng *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.tng-hero__anh img { animation: none !important; transform: none !important; }
	.tng-the:hover { transform: none; }
	.tng-the:hover .tng-the__anh img { transform: none; }
	.tng-lat:hover .tng-lat__in,
	.tng-lat:focus-visible .tng-lat__in,
	.tng-lat.is-lat .tng-lat__in { transform: rotateY(180deg); }
}

/* =====================================================================
 * 25. IN GIẤY — bỏ phần trang trí, giữ nội dung đọc được
 * ===================================================================== */
@media print {
	.tng-dau, .tng-mnav, .tng-chan, .tng-cta, .tng-loc, .tng-boqua, .tng-toast { display: none !important; }
	body.tng { background: #fff; color: #000; }
	.tng-the { break-inside: avoid; }
}
