/* Huỳnh Như — hệ màu lấy theo ybmbooks.com */
:root {
	--color-primary: #1b6dda;
	--color-primary-hover: #1860c2;
	--color-primary-pressed: #1554ad;
	--color-canvas: #ffffff;
	--color-ink: #242424;
	--color-gray-800: #333333;
	--color-gray-700: #555555;
	--color-gray-600: #6f6f6f;
	--color-gray-500: #8b8b8b;
	--color-gray-400: #c1c1c1;
	--color-border-strong: #d9d9d9;
	--color-border: #ececec;
	--color-surface: #f2f2f2;
	--color-surface-light: #f7f7f7;
	--color-surface-cool: #f7f9fc;
	--color-tint-50: #f2f6fd;
	--color-tint-100: #eaf1fd;
	--color-line: #d9e4f5;
	--color-dark-bg: #0e1424;
	--color-dark-surface: #1a2338;
	--color-dark-text: rgba(255, 255, 255, .92);
	--color-dark-text-sub: rgba(255, 255, 255, .55);
	--color-coral: #ff5b4f;
	--color-amber: #f08c00;
	--color-green: #00a35a;
	--color-violet: #7c4dff;
	--color-point: #e73743;
	--mp3-deep: #cf1130;
	--mp3-base: #e73743;
	--mp3-bright: #ff5252;
	--color-overlay: rgba(33, 37, 41, .65);
	--font-base: "Be Vietnam Pro", Pretendard, "Noto Sans", Helvetica, Arial, sans-serif;
	--container: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font: 400 14px/1.57 var(--font-base);
	color: var(--color-ink);
	background: var(--color-canvas);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; }

.hn-container { max-width: var(--container); margin: 0 auto; padding: 0 40px; }

/* ===== Header ===== */
.hn-header { background: var(--color-canvas); border-bottom: 1px solid var(--color-border); }
.hn-header_row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.hn-logo { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.hn-logo_mark { flex: 0 0 auto; }
.hn-logo_text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hn-logo img { max-height: 44px; width: auto; }
.hn-logo_mark {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
	color: #fff; font-size: 15px;
	background: linear-gradient(135deg, var(--mp3-base), var(--color-primary));
}
.hn-header_actions { display: flex; align-items: center; gap: 20px; }
.hn-header_link { font-size: 15px; color: var(--color-gray-800); }
.hn-header_link:hover { color: var(--color-primary); }
.hn-btn-cta {
	display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; white-space: nowrap;
	height: 44px; padding: 0 20px; border-radius: 12px;
	font-size: 15px; font-weight: 600; color: #fff;
	background: linear-gradient(180deg, var(--mp3-bright) 0%, var(--mp3-base) 55%, var(--mp3-deep) 100%);
	box-shadow: 0 6px 16px rgba(231, 55, 67, .32), inset 0 1px 0 rgba(255, 255, 255, .25);
	transition: transform .15s, box-shadow .15s;
}
.hn-btn-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(231, 55, 67, .4), inset 0 1px 0 rgba(255, 255, 255, .25); }

.hn-social { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hn-social_item { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 14px; transition: background .15s; }
.hn-social_item:hover { background: var(--color-surface-light); }
.hn-social_icon {
	display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px;
	border-radius: 12px; background: var(--color-surface);
}
.hn-social_text { display: flex; flex-direction: column; font-size: 11px; line-height: 1.35; color: var(--color-gray-500); white-space: nowrap; }
.hn-social_text strong { font-size: 13px; font-weight: 700; color: var(--color-ink); }
.hn-header_actions { margin-left: 8px; }
@media (max-width: 1280px) { .hn-social_text { display: none; } .hn-social_item { padding: 0; } }
@media (max-width: 720px) {
	.hn-social { gap: 4px; }
	.hn-social_icon { flex-basis: 32px; width: 32px; height: 32px; border-radius: 9px; }
	.hn-social_icon svg { width: 18px; height: 18px; }
	.hn-header_actions { margin-left: 4px; }
	.hn-logo_text { display: none; }
}

.hn-gnb { border-top: 1px solid var(--color-border); }
.hn-gnb_list { display: flex; gap: 40px; height: 56px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.hn-gnb_list::-webkit-scrollbar { display: none; }
.hn-gnb_list a { font-size: 16px; font-weight: 500; white-space: nowrap; color: var(--color-ink); position: relative; }
.hn-gnb_list a:hover { color: var(--color-primary); }
.hn-gnb_list li:first-child a, .hn-gnb_list a.is-point { color: var(--color-point); }
.hn-gnb_list li:first-child a::after, .hn-gnb_list a.is-point::after {
	content: ""; position: absolute; top: -2px; right: -7px; width: 5px; height: 5px; border-radius: 50%; background: var(--color-point);
}
.hn-gnb_list li:last-child a { color: var(--color-primary); }

/* ===== Section head ===== */
.hn-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.hn-head_title { flex: 1 1 auto; font-size: 22px; line-height: 1.57; font-weight: 700; letter-spacing: -.01em; color: var(--color-ink); }
.hn-head_sub { flex: 0 0 auto; max-width: 260px; font-size: 16px; line-height: 1.57; color: var(--color-gray-700); }
.hn-head_more { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 500; color: var(--color-gray-700); white-space: nowrap; }
.hn-head_more:hover { color: var(--color-primary); }

/* ===== Bài giảng miễn phí ===== */
.hn-free { padding: 40px 0; }
.hn-free_grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hn-free_card {
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; flex-direction: column; gap: 12px;
	height: 100%; padding: 8px; border-radius: 24px;
	background: var(--color-ink); color: var(--color-dark-text);
}
.hn-free_blur {
	position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px);
	object-fit: cover; z-index: -1; pointer-events: none;
	filter: blur(28px) brightness(.48) saturate(1.3);
}
.hn-free_thumb {
	position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
	padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
	background: var(--color-surface);
}
.hn-free_thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.hn-free_thumb:hover img { transform: scale(1.03); }
.hn-free_play {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	display: flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 999px; color: #fff;
	background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px);
	transition: background .2s, transform .2s;
}
.hn-free_thumb:hover .hn-free_play { background: rgba(0, 0, 0, .7); transform: translate(-50%, -50%) scale(1.06); }
.hn-free_body { display: flex; align-items: center; gap: 12px; padding: 0 8px 8px; }
.hn-free_cover { flex: 0 0 44px; width: 44px; height: 62px; object-fit: cover; border-radius: 4px; background: var(--color-surface); }
.hn-free_info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hn-free_meta { font-size: 11px; line-height: 1.57; font-weight: 600; color: var(--color-dark-text-sub); }
.hn-free_name {
	font-size: 15px; line-height: 21px; font-weight: 600; color: var(--color-dark-text);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hn-free_body:hover .hn-free_name { text-decoration: underline; text-underline-offset: 3px; }

/* ===== Tài liệu tuyển chọn ===== */
.hn-pick { padding: 40px 0; }
.hn-pick_wrap { position: relative; }
.hn-pick_viewport { overflow: hidden; border-radius: 24px; }
.hn-pick_track { display: flex; transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.hn-pick_slide { flex: 0 0 100%; min-width: 0; }
.hn-pick_panel {
	display: grid; grid-template-columns: 27.2% 1fr; overflow: hidden;
	background: var(--color-canvas); border: 1px solid var(--color-border); border-radius: 24px;
}
.hn-pick_theme {
	display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
	padding: 40px 24px 40px 48px; background: var(--color-surface-cool);
	border-right: 1px solid var(--color-border);
}
.hn-pick_label { font-size: 12px; line-height: 1.57; font-weight: 700; color: var(--color-primary); margin-bottom: 8px; }
.hn-pick_title { font-size: 24px; line-height: 1.4; font-weight: 700; letter-spacing: -.02em; color: var(--color-ink); }
.hn-pick_desc { margin: 32px 0 0; font-size: 14px; line-height: 1.6; color: var(--color-gray-600); }
.hn-pick_more {
	display: inline-flex; align-items: center; gap: 4px; margin-top: 24px; height: 40px; padding: 0 16px;
	border: 1px solid var(--color-border-strong); border-radius: 999px; background: var(--color-canvas);
	font-size: 13px; font-weight: 600; color: var(--color-ink); transition: border-color .15s, color .15s;
}
.hn-pick_more:hover { border-color: var(--color-primary); color: var(--color-primary); }
.hn-pick_books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding: 48px; }
.hn-pick_book { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; }
.hn-pick_stage {
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	width: 100%; aspect-ratio: 241 / 302; margin-bottom: 16px; border-radius: 16px;
	background: linear-gradient(155deg, #f2f6fd 0%, #eaf1fd 100%);
}
.hn-pick_blur {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
	transform: scale(1.3); filter: blur(30px) saturate(1.6); opacity: .55; pointer-events: none;
}
.hn-pick_step {
	position: absolute; top: 0; left: 0; width: 72px; height: 72px; z-index: 2; overflow: hidden;
	clip-path: polygon(0 0, 100% 0, 0 100%);
	background: linear-gradient(135deg, #7ea6f5 0%, var(--color-primary) 62%, var(--color-primary-pressed) 100%);
}
.hn-pick_step_txt {
	position: absolute; top: 18px; left: -10px; width: 72px; transform: rotate(-45deg);
	font-size: 11px; line-height: 1.2; font-weight: 700; color: #fff; white-space: nowrap; text-align: center;
}
.hn-pick_pair { display: flex; gap: 6px; align-items: center; justify-content: center; width: 100%; padding: 0 12px; }
.hn-pick_cover {
	width: 52%; aspect-ratio: 103 / 145; object-fit: cover; border-radius: 8px;
	box-shadow: 0 10px 24px rgba(14, 20, 36, .16); transition: transform .3s;
}
.hn-pick_pair.is-two .hn-pick_cover { width: 43%; }
.hn-pick_book:hover .hn-pick_cover { transform: translateY(-4px); }
.hn-pick_copy {
	margin-bottom: 4px; font-size: 18px; line-height: 1.4; font-weight: 700; color: var(--color-ink);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hn-pick_name {
	font-size: 14px; line-height: 1.35; font-weight: 400; color: var(--color-gray-500);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hn-pick_dl {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	margin-top: auto; padding: 0 18px; height: 40px; border-radius: 999px;
	font-size: 14px; font-weight: 600; color: #fff; background: var(--color-primary);
	box-shadow: 0 6px 14px rgba(27, 109, 218, .24); transition: background .15s, transform .15s;
}
.hn-pick_copy, .hn-pick_name { flex: 0 0 auto; }
.hn-pick_name { margin-bottom: 16px; }
.hn-pick_copy:has(+ .hn-pick_dl) { margin-bottom: 16px; }
.hn-pick_dl:hover { background: var(--color-primary-hover); transform: translateY(-1px); }
.hn-pick_dl:active { background: var(--color-primary-pressed); }
.hn-pick_dl.is-off { background: var(--color-surface); color: var(--color-gray-500); box-shadow: none; cursor: default; transform: none; }
.hn-pick_nav {
	position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
	border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-canvas);
	color: var(--color-ink); cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}
.hn-pick_nav:hover { color: var(--color-primary); border-color: var(--color-line); }
.hn-pick_nav:disabled { opacity: .35; cursor: default; }
.hn-pick_prev { left: -68px; }
.hn-pick_next { right: -68px; }
@media (max-width: 1440px) {
	.hn-pick_prev { left: -22px; }
	.hn-pick_next { right: -22px; }
}

/* ===== Video modal ===== */
.hn-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: var(--color-overlay); }
.hn-modal[hidden] { display: none; }
.hn-modal_box { position: relative; width: min(960px, 100%); }
.hn-modal_frame { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.hn-modal_frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.hn-modal_close {
	position: absolute; top: -44px; right: 0; width: 36px; height: 36px; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .15); color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.hn-modal.is-vertical .hn-modal_box { width: min(400px, 100%, calc((100vh - 120px) * 9 / 16)); }
.hn-modal.is-vertical .hn-modal_frame { aspect-ratio: 9 / 16; }
body.hn-noscroll { overflow: hidden; }

/* ===== Shorts ===== */
.hn-shorts { padding: 40px 0; }
.hn-shorts_title { display: flex; align-items: center; gap: 4px; }
.hn-shorts_grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.hn-shorts_item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hn-shorts_frame { position: relative; aspect-ratio: 295 / 443; border-radius: 24px; overflow: hidden; background: var(--color-surface); }
.hn-shorts_card { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.hn-shorts_thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hn-shorts_card:hover .hn-shorts_thumb { transform: scale(1.04); }
.hn-shorts_card::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
.hn-shorts_badge {
	position: absolute; top: 12px; left: 12px; z-index: 1; display: flex; align-items: center; height: 24px; padding: 0 8px;
	border-radius: 6px; background: #fff; font-size: 11px; line-height: 1; font-weight: 600; color: var(--color-gray-800);
}
.hn-shorts_play {
	position: absolute; top: 50%; left: 50%; z-index: 1; transform: translate(-50%, -50%);
	display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 999px;
	color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s;
}
.hn-shorts_card:hover .hn-shorts_play, .hn-shorts_card:focus-visible .hn-shorts_play { opacity: 1; }
.hn-shorts_cap {
	position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1;
	font-size: 15px; line-height: 1.4; font-weight: 700; color: #fff;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hn-shorts_book { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 12px; background: var(--color-surface); transition: background .15s; }
.hn-shorts_book:hover { background: var(--color-tint-100); }
.hn-shorts_cover { flex: 0 0 38px; width: 38px; height: 53px; object-fit: cover; border-radius: 4px; background: #fff; }
.hn-shorts_bookinfo { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.hn-shorts_booklabel { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; font-size: 11px; line-height: 1.57; font-weight: 600; color: var(--color-gray-500); }
.hn-shorts_bookname { font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--color-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hn-shorts_chev { flex: 0 0 auto; color: var(--color-gray-500); }

/* ===== Trang thường ===== */
.hn-page { padding: 48px 40px; }
.hn-entry_title { font-size: 28px; margin-bottom: 16px; }
.hn-footer { margin-top: 40px; padding: 32px 0; border-top: 1px solid var(--color-border); color: var(--color-gray-600); font-size: 13px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
	.hn-free_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hn-head_sub { display: none; }
	.hn-pick_panel { grid-template-columns: 1fr; }
	.hn-pick_theme { padding: 32px; border-right: 0; border-bottom: 1px solid var(--color-border); }
	.hn-pick_desc { margin-top: 12px; }
	.hn-pick_books { gap: 24px; padding: 32px; }
	.hn-shorts_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
	.hn-container { padding: 0 16px; }
	.hn-header_row { height: 64px; }
	.hn-header_link { display: none; }
	.hn-logo { font-size: 16px; }
	.hn-logo_mark { width: 34px; height: 34px; font-size: 13px; border-radius: 9px; }
	.hn-btn-cta { height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; gap: 6px; }
	.hn-gnb_list { gap: 24px; height: 48px; }
	.hn-gnb_list a { font-size: 15px; }
	.hn-free { padding: 28px 0; }
	.hn-head { margin-bottom: 16px; align-items: flex-start; }
	.hn-head_title { font-size: 18px; }
	.hn-head_more { padding-top: 2px; font-size: 13px; }
	.hn-free_grid {
		display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
		margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none;
	}
	.hn-free_grid::-webkit-scrollbar { display: none; }
	.hn-free_item { flex: 0 0 82%; scroll-snap-align: start; }
	.hn-free_card { border-radius: 20px; }
	.hn-page { padding: 32px 16px; }
	.hn-pick { padding: 28px 0; }
	.hn-pick_viewport, .hn-pick_panel { border-radius: 20px; }
	.hn-pick_theme { padding: 24px 20px; }
	.hn-pick_title { font-size: 20px; }
	.hn-pick_more { margin-top: 16px; }
	.hn-pick_books {
		display: flex; gap: 16px; padding: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	}
	.hn-pick_books::-webkit-scrollbar { display: none; }
	.hn-pick_item { flex: 0 0 64%; scroll-snap-align: start; }
	.hn-pick_copy { font-size: 16px; }
	.hn-pick_name { font-size: 13px; }
	.hn-pick_nav { top: 28px; transform: none; width: 36px; height: 36px; border-radius: 12px; }
	.hn-shorts { padding: 28px 0; }
	.hn-shorts_grid {
		display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
		margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none;
	}
	.hn-shorts_grid::-webkit-scrollbar { display: none; }
	.hn-shorts_item { flex: 0 0 62%; scroll-snap-align: start; }
	.hn-shorts_frame { border-radius: 20px; }
	.hn-shorts_play { opacity: 1; width: 44px; height: 44px; }
	.hn-pick_prev { left: auto; right: 56px; }
	.hn-pick_next { right: 12px; }
}
