/* =========================================================
 * KTXD - Dong thoi gian "dai anh sang" (15/10/2026)
 * Che do mac dinh (dien thoai / giam chuyen dong / chua chay JS): danh sach doc.
 * .tl3--3d (may tinh): san khau dinh co dinh, the bay theo chieu sau khi cuon.
 * ========================================================= */
.tl3 {
	--tl-bg1: #120b05; --tl-bg2: #2a1607; --tl-or: #ff9a1f; --tl-or2: #ffc46b;
	position: relative; background: radial-gradient(120% 80% at 50% 0%, var(--tl-bg2) 0%, var(--tl-bg1) 60%);
	color: #f6ecdf;
}
.tl3-intro, .tl3-rail, .tl3-fx { display: none; }

/* ---------- Che do doc (mac dinh) ---------- */
.tl3-stage { padding: 56px 0 64px; }
.tl3-cards {
	list-style: none; margin: 0 auto; padding: 0 16px 0 52px; max-width: 760px; position: relative;
}
.tl3-cards::before { /* dai sang doc */
	content: ""; position: absolute; left: 26px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px;
	background: linear-gradient(180deg, transparent, var(--tl-or) 6%, var(--tl-or2) 50%, var(--tl-or) 94%, transparent);
	box-shadow: 0 0 12px 2px rgba(255, 154, 31, .55);
}
.tl3-cards::after { /* xung sang chay doc */
	content: ""; position: absolute; left: 21px; top: 0; width: 13px; height: 90px; border-radius: 10px;
	background: linear-gradient(180deg, transparent, #fff 50%, transparent); filter: blur(3px); opacity: .85;
	animation: tl3-run 3.2s linear infinite;
}
@keyframes tl3-run { from { transform: translateY(0); } to { transform: translateY(var(--tl-h, 1600px)); } }
.tl3-card {
	position: relative; margin: 0 0 22px; padding: 18px 20px 18px 22px;
	background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 170, 70, .22); border-radius: 14px;
	backdrop-filter: blur(4px); opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease, border-color .4s;
}
.tl3-card.is-in { opacity: 1; transform: none; }
.tl3-card::before { /* moc sang tren dai */
	content: ""; position: absolute; left: -33px; top: 24px; width: 13px; height: 13px; border-radius: 50%;
	background: #fff; box-shadow: 0 0 0 4px rgba(255, 154, 31, .35), 0 0 16px 4px var(--tl-or);
}
.tl3-year { display: block; font-size: 1.6rem; font-weight: 800; color: var(--tl-or); letter-spacing: .02em; line-height: 1.1; text-shadow: 0 0 18px rgba(255, 154, 31, .45); }
.tl3-card h3 { color: #fff; font-size: 1.12rem; margin: 6px 0 8px; line-height: 1.4; }
.tl3-card p { color: #e5d8c6; font-size: .93rem; line-height: 1.7; margin: 0; }
.tl3-idx { position: absolute; right: 16px; top: 16px; font-size: .72rem; color: rgba(255, 210, 160, .55); letter-spacing: .1em; }
@media (prefers-reduced-motion: reduce) {
	.tl3-card { opacity: 1; transform: none; transition: none; }
	.tl3-cards::after { display: none; }
}

/* ---------- Che do 3D (may tinh) ---------- */
.tl3--3d .tl3-stage {
	position: absolute; left: 0; top: 0; width: 100%; height: calc(100vh - var(--tl-top, 72px)); padding: 0; overflow: hidden; z-index: 2;
	background: radial-gradient(90% 70% at 70% 20%, #1a1206 0%, #07050a 55%, #020204 100%);
}
.tl3--3d .tl3-fx { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.tl3--3d .tl3-cards { position: absolute; inset: 0; max-width: none; padding: 0; margin: 0; pointer-events: none; }
.tl3--3d .tl3-cards::before, .tl3--3d .tl3-cards::after { display: none; }
.tl3--3d .tl3-card {
	position: absolute; left: 0; top: 0; width: min(420px, 34vw); margin: 0; padding: 20px 22px;
	opacity: 0; transform-origin: 50% 50%; transition: opacity .35s ease, border-color .35s, box-shadow .35s, background .35s;
	background: rgba(12, 8, 4, .72); border-color: rgba(255, 200, 110, .2); will-change: transform, opacity; pointer-events: none;
	backdrop-filter: blur(3px);
}
.tl3--3d .tl3-card::before { display: none; }
.tl3--3d .tl3-card.is-on {
	pointer-events: auto; border-color: rgba(255, 205, 120, .7); background: rgba(16, 10, 4, .86);
	box-shadow: 0 0 0 1px rgba(255, 190, 90, .2), 0 18px 50px -12px rgba(255, 170, 50, .45);
}
.tl3--3d .tl3-year { font-size: 2.6rem; }
.tl3--3d .tl3-card h3 { font-size: 1.22rem; }
.tl3--3d .tl3-card p { font-size: .95rem; }

.tl3--3d .tl3-intro {
	display: flex; flex-direction: column; align-items: center; gap: 8px; position: absolute; left: 50%; bottom: 92px;
	transform: translateX(-50%); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 220, 180, .7);
	transition: opacity .4s; pointer-events: none;
}
.tl3--3d .tl3-intro i { width: 2px; height: 26px; background: linear-gradient(var(--tl-or), transparent); animation: tl3-hint 1.4s ease-in-out infinite; }
@keyframes tl3-hint { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(8px); opacity: 1; } }
.tl3--3d.is-moving .tl3-intro { opacity: 0; }

.tl3--3d .tl3-rail {
	display: flex; justify-content: space-between; align-items: center; gap: 4px; position: absolute; left: 50%; bottom: 22px;
	transform: translateX(-50%); width: min(980px, 92vw); padding: 10px 14px; border-radius: 999px;
	background: rgba(10, 6, 2, .55); border: 1px solid rgba(255, 170, 70, .18); backdrop-filter: blur(6px);
}
.tl3-rail-track { position: absolute; left: 22px; right: 22px; top: 50%; height: 2px; background: rgba(255, 255, 255, .1); transform: translateY(-50%); }
.tl3-rail-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--tl-or), var(--tl-or2)); box-shadow: 0 0 10px var(--tl-or); }
.tl3-rail button {
	position: relative; z-index: 1; border: 0; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 700;
	padding: 5px 8px; border-radius: 999px; color: rgba(255, 225, 190, .65); background: rgba(18, 11, 5, .9); transition: color .25s, background .25s, transform .25s;
}
.tl3-rail button:hover { color: #fff; }
.tl3-rail button.is-on { color: #1a0f05; background: var(--tl-or); transform: scale(1.12); box-shadow: 0 0 14px rgba(255, 154, 31, .7); }
.tl3-rail button:focus-visible { outline: 2px solid var(--tl-or2); outline-offset: 2px; }

/* Phan dau / cuoi trang lich su */
.tl3-head { text-align: center; padding: 56px 16px 8px; }
.tl3-head .eyebrow {
	display: inline-block; background: var(--orange-light); color: var(--orange-dark); padding: 5px 14px;
	border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .1em;
}
.tl3-head h2 { font-size: 2rem; margin: 12px 0 10px; }
.tl3-head p { color: var(--text-gray); max-width: 680px; margin: 0 auto 28px; }
.tl3-next { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 44px 16px 64px; }
.tl3-next .btn { display: inline-flex; align-items: center; gap: 8px; }
.tl3-next .btn .ki { width: 18px; height: 18px; }

/* Dien thoai: san khau soi anh sang (15/10/2026) */
@media (max-width: 699px) {
	.tl3--3d .tl3-card { width: calc(100vw - 32px); padding: 16px 16px 16px; }
	.tl3--3d .tl3-year { font-size: 1.9rem; }
	.tl3--3d .tl3-card h3 { font-size: 1.05rem; margin: 4px 0 6px; }
	.tl3--3d .tl3-card p { font-size: .88rem; line-height: 1.6; }
	.tl3--3d .tl3-intro { bottom: 70px; font-size: .7rem; }
	.tl3--3d .tl3-rail {
		bottom: 10px; width: calc(100vw - 20px); justify-content: flex-start; gap: 2px; padding: 7px 8px;
		overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 14px;
	}
	.tl3--3d .tl3-rail::-webkit-scrollbar { display: none; }
	.tl3--3d .tl3-rail button { flex: 0 0 auto; font-size: .74rem; padding: 5px 9px; }
	.tl3--3d .tl3-rail-track { display: none; }
}

/* Keo chuot / vuot (15/10/2026) */
.tl3--3d .tl3-stage { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tl3--3d .tl3-stage.is-drag, .tl3--3d .tl3-stage.is-drag .tl3-fx { cursor: grabbing !important; }
.tl3--3d .tl3-card { user-select: text; -webkit-user-select: text; }

/* Nen the dac de soi anh sang khong xuyen qua chu */
.tl3--3d .tl3-card, .tl3--3d .tl3-card.is-on { background: rgba(10, 6, 3, .95); backdrop-filter: none; }
