/* =========================================================================
   NA Group Education – pages.css (FRONTEND-B)
   Trang trong, landing, CPT. Dựa trên token + UI kit của base.css (FRONTEND-A).
   Mobile-first · tương phản AA · vùng bấm ≥ 44px · tôn trọng prefers-reduced-motion.
   ========================================================================= */

/* ---------- 0. Khung trang ---------- */
.nag-page { overflow-x: clip; }
.nag-sec__foot { margin: clamp(24px, 3vw, 36px) 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.nag-sec__title { margin-bottom: 12px; }
.nag-mt { margin-top: 20px; }
.nag-small { font-size: .875rem; }
.nag-narrow { max-width: 820px; }
.nag-ico--text { display: inline-grid; place-items: center; font-size: 1.4rem; line-height: 1; width: auto; height: auto; }

/* Nền xen kẽ cho chuỗi section JSON (không áp cho navy / CTA). */
.nag-sections > .nag-sec:nth-child(even):not(.nag-section--navy):not(.nag-sec--cta):not(.nag-section--soft) { background: var(--soft); }
.nag-sections > .nag-sec--cta { padding-block: calc(var(--section-y) * .45); }
.nag-sections > .nag-sec--cta + .nag-sec--cta { padding-top: 0; }

/* ---------- 1. Hero trang trong (dựa trên .nag-page-head) ---------- */
.nag-hero-pg { position: relative; padding-top: clamp(24px, 4vw, 56px); padding-bottom: clamp(32px, 5vw, 64px); }
.nag-hero-pg::after { /* sọc cờ Đức mảnh dưới hero */
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
	background: linear-gradient(90deg, var(--ink) 0 33.3%, var(--red) 33.3% 66.6%, var(--gold) 66.6%); opacity: .9;
}
.nag-hero-pg__inner { display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; }
.nag-hero-pg__title { margin-bottom: 14px; max-width: 22ch; }
.nag-hero-pg--split .nag-hero-pg__title { max-width: none; }
.nag-hero-pg__lead { font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem); color: var(--body) !important; max-width: 62ch; }
.nag-hero-pg__cta { margin-top: 24px; }
.nag-hero-pg__cta .nag-btn { flex: 1 1 auto; }
.nag-hero-pg__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
.nag-hero-pg--compact { padding-bottom: clamp(24px, 3vw, 40px); }
.nag-hero-pg--compact .nag-hero-pg__title { max-width: none; font-size: clamp(1.8rem, 1.3rem + 2.4vw, 3rem); }
@media (min-width: 560px) { .nag-hero-pg__cta .nag-btn { flex: 0 0 auto; } }
@media (min-width: 960px) {
	.nag-hero-pg--split .nag-hero-pg__inner { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); }
}

/* Thẻ thông tin bên phải hero (ngành, khóa học, sự kiện, câu chuyện) */
.nag-hero-card {
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
	box-shadow: var(--shadow); padding: clamp(20px, 2.6vw, 28px); display: grid; gap: 16px;
}
.nag-hero-card__title { margin: 0; font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.nag-hero-card > a.nag-small { display: inline-flex; align-items: center; min-height: 44px; justify-self: start; }
.nag-hero-card__note { margin: 0; font-size: .82rem; color: var(--text-muted); }

/* Danh sách thông số (dl) */
.nag-specs { margin: 0; display: grid; gap: 12px; }
.nag-specs__item { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; }
.nag-specs__ico { grid-row: span 2; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--navy-soft); color: var(--navy); }
.nag-specs__ico svg { width: 20px; height: 20px; }
.nag-specs dt { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.nag-specs dd { margin: 0; font-weight: 700; color: var(--ink); line-height: 1.45; }
.nag-specs dd small { font-weight: 500; color: var(--text-muted); }
.nag-specs__item:not(:has(.nag-specs__ico)) { grid-template-columns: 1fr; }
.nag-specs--legal { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
@media (min-width: 720px) { .nag-specs--legal { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }

/* ---------- 2. Richtext / split ---------- */
.nag-split { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.nag-split__media img { width: 100%; border-radius: var(--radius-lg); }
@media (min-width: 960px) { .nag-split { grid-template-columns: 1.15fr 1fr; } }
.nag-sec--richtext .nag-section-head { margin-bottom: 18px; }
.nag-legacy__thumb { margin: 0 0 28px; }
.nag-legacy__thumb img { width: 100%; border-radius: var(--radius-lg); max-height: min(70vh, 640px); object-fit: cover; }
/* QA-B: ảnh đại diện ngành (thường ảnh dọc) → khung 16:9, không chiếm cả màn hình */
.nag-legacy__thumb--cover img { aspect-ratio: 16 / 9; height: auto; object-fit: cover; object-position: 50% 45%; }

/* ---------- 3. Thẻ tính năng (section cards) ---------- */
.nag-feature-grid { list-style: none; margin: 0; padding: 0; }
.nag-card--feature .nag-card__body { gap: 12px; }
.nag-card--feature .nag-icon-box { margin-bottom: 4px; }
.nag-card__text > :last-child { margin-bottom: 0; }
.nag-card__text p { margin: 0 0 .6em; }
.nag-feature-num { font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--red); letter-spacing: -.02em; }
.nag-grid__cell { display: flex; }
.nag-grid__cell > .nag-card { flex: 1; }
.nag-grid { list-style: none; padding: 0; margin: 0; }

/* Thẻ ngành: placeholder khi chưa có ảnh */
.nag-card--nganh .nag-card__media { aspect-ratio: 16 / 9; }
.nag-card--nganh .nag-nganh__ph { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; }
.nag-card--nganh .nag-nganh__ph svg { width: 44px; height: 44px; opacity: .85; }

/* Thẻ khóa học */
.nag-level {
	align-self: flex-start; display: inline-flex; align-items: center; justify-content: center;
	min-width: 48px; padding: 6px 12px; border-radius: 10px; font-weight: 800; font-size: .95rem; letter-spacing: .02em;
	background: var(--navy); color: #fff;
}
.nag-level--a1 { background: #0f7a3d; }
.nag-level--a2 { background: #0b6b78; }
.nag-level--b1 { background: var(--navy); }
.nag-level--b2 { background: var(--red-aa); }
.nag-level--luyen-thi { background: #ffce00; color: var(--ink); }
.nag-level--sm { min-width: 0; padding: 2px 8px; font-size: .74rem; border-radius: 6px; vertical-align: middle; margin-right: 6px; }
.nag-kv { margin: 6px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.nag-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.nag-kv dt { color: var(--text-muted); }
.nag-kv dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.nag-kv__fee dd { color: var(--red-aa); }

/* Thẻ câu chuyện */
.nag-card--story .nag-card__media { position: relative; }
.nag-card__play { position: absolute; inset: auto auto 12px 12px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(13, 15, 20, .72); color: #fff; }
.nag-card__play svg { width: 18px; height: 18px; }
.nag-card__quote { margin: 0; color: var(--ink); font-size: .98rem; line-height: 1.6; }
.nag-card__quote::before { content: "\201C"; display: block; font: 700 2.6rem/0.6 Georgia, serif; color: var(--red); margin-bottom: 6px; }
.nag-card__quote p { margin: 0; }
.nag-card--story .nag-badge { align-self: flex-start; }
.nag-card--story .nag-badge svg { width: 12px; height: 12px; }

/* Thẻ sự kiện */
.nag-event-card { flex-direction: row !important; align-items: flex-start; gap: 16px !important; }
.nag-event-card__date { flex: none; }
.nag-event-card__main { display: grid; gap: 8px; min-width: 0; }
.nag-event-card__main .nag-badge { justify-self: start; }
.nag-card--event.is-past { opacity: .88; }
.nag-card--event.is-past .nag-class__date { background: var(--text-muted); }

/* Thẻ liên kết nhanh */
.nag-card--quick .nag-icon-box { width: 44px; height: 44px; border-radius: 12px; }
.nag-card--quick .nag-icon-box svg { width: 22px; height: 22px; }

/* ---------- 4. Steps: biến thể timeline dọc ---------- */
.nag-step__body > :last-child { margin-bottom: 0; }
.nag-step__text p { margin: 0 0 .5em; }
.nag-step__dur svg, .nag-steps .nag-badge svg { width: 14px; height: 14px; }
.nag-steps--timeline { max-width: 860px; gap: 0; position: relative; }
.nag-steps--timeline::before { /* trục dọc */
	content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px;
	background: linear-gradient(var(--navy) 0 60%, var(--line-strong));
}
.nag-steps--timeline > li { background: none; border: 0; padding: 0 0 clamp(20px, 3vw, 32px) 64px; border-radius: 0; }
.nag-steps--timeline > li:last-child { padding-bottom: 0; }
.nag-steps--timeline > li::before {
	content: counter(s); position: absolute; left: 0; top: 0; margin: 0;
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	background: var(--navy); color: #fff; font-size: 1.05rem; box-shadow: 0 0 0 6px var(--paper);
}
.nag-sections > .nag-sec:nth-child(even) .nag-steps--timeline > li::before,
.nag-section--soft .nag-steps--timeline > li::before { box-shadow: 0 0 0 6px var(--soft); }
.nag-steps--timeline .nag-step__body { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; }
.nag-steps--timeline .nag-step__title { font-size: 1.1rem; margin-bottom: 6px; }
.nag-steps--timeline .nag-step__dur { order: -1; align-self: flex-start; margin: 0 0 10px; }
.nag-steps--timeline > li:last-child::before { background: var(--red-aa); }
@media (min-width: 960px) {
	.nag-sec--steps-timeline .nag-section-head { margin-inline: auto; text-align: center; }
	.nag-sec--steps-timeline .nag-section-head .nag-eyebrow { justify-content: center; }
	.nag-sec--steps-timeline .nag-steps--timeline { margin-inline: auto; }
	.nag-steps--timeline::before { left: 27px; }
	.nag-steps--timeline > li { padding-left: 84px; }
	.nag-steps--timeline > li::before { width: 56px; height: 56px; font-size: 1.25rem; }
	.nag-steps--timeline .nag-step__body { padding: 22px 26px; }
}

/* ---------- 5. Checklist dạng thẻ ---------- */
.nag-checklist--card { gap: 12px; }
.nag-checklist--card:not(.nag-checklist--2col) { max-width: 820px; }
.nag-checklist--card li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 14px 50px; }
.nag-checklist--card li::before { left: 16px; top: 15px; }
@media (min-width: 720px) { .nag-checklist--2col { grid-template-columns: 1fr 1fr; } }
.nag-box h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 16px; }
.nag-box h3 svg { width: 22px; height: 22px; color: var(--red-aa); }

/* ---------- 6. Bảng: thành thẻ trên mobile ---------- */
.nag-table th[scope="row"] { color: var(--ink); font-weight: 700; background: transparent; }
.nag-table__num { font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (max-width: 639.98px) {
	.nag-table-wrap:has(.nag-table--stack) { border: 0; overflow: visible; border-radius: 0; }
	.nag-table--stack { min-width: 0; }
	.nag-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.nag-table--stack tbody, .nag-table--stack tr, .nag-table--stack th, .nag-table--stack td { display: block; width: 100%; }
	.nag-table--stack tr { background: var(--paper) !important; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
	.nag-table--stack th[scope="row"] { background: var(--navy-soft); color: var(--navy-dark); padding: 12px 16px; }
	.nag-table--stack td { padding: 10px 16px; border-bottom: 1px solid var(--line); }
	.nag-table--stack td:last-child { border-bottom: 0; }
	.nag-table--stack td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
	.nag-table--stack td:empty { display: none; }
	.nag-table__num { white-space: normal; }
}
.nag-cta-inline {
	margin-top: 24px; padding: clamp(18px, 2.6vw, 26px); border-radius: var(--radius);
	background: var(--red-soft); display: grid; gap: 16px; align-items: center;
}
.nag-cta-inline p { margin: 0; color: var(--ink); }
@media (min-width: 760px) { .nag-cta-inline { grid-template-columns: 1fr auto; } }

/* ---------- 7. FAQ (<details>) ---------- */
.nag-faq-layout { display: grid; gap: 24px; }
@media (min-width: 960px) {
	.nag-faq-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 56px; align-items: start; }
	.nag-faq-layout__head { position: sticky; top: calc(var(--header-h) + 24px); }
}
.nag-faq-layout__more { color: var(--text-muted); margin: 0; }
.nag-faq-layout__more a { font-weight: 700; }
.nag-faq__q { justify-content: space-between; gap: 16px; min-height: 56px; line-height: 1.45; }
.nag-faq__q:focus-visible { border-radius: var(--radius); }
.nag-faq__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--red-soft); }
.nag-faq__icon svg { width: 18px; height: 18px; }
.nag-faq__a > :last-child { margin-bottom: 0; }

/* ---------- 8. CTA: dải navy + form trong CTA ---------- */
.nag-cta-band { display: grid; gap: 20px; }
.nag-cta-band__text { max-width: 720px; }
.nag-cta-band__text p { color: #d7e1f2; }
@media (min-width: 900px) { .nag-cta-band { grid-template-columns: 1fr auto; align-items: center; } }
.nag-cta-form { display: grid; gap: clamp(24px, 4vw, 48px); padding: clamp(22px, 4vw, 48px); border-radius: var(--radius-lg); background: var(--navy-soft); }
@media (min-width: 960px) { .nag-cta-form { grid-template-columns: .9fr 1.1fr; align-items: start; } }

/* ---------- 9. Khối form cuối trang (#dang-ky) ---------- */
.nag-lead__inner { display: grid; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (min-width: 960px) { .nag-lead__inner { grid-template-columns: .9fr 1.1fr; } }
.nag-lead__title { color: #fff; }
.nag-lead__text { color: #d7e1f2; font-size: 1.05rem; }
.nag-lead__points { margin-top: 20px; }
.nag-lead__points li { color: #fff; }
.nag-lead__points li::before {
	background: rgba(255, 255, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffce00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.nag-lead__contact { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 6px; }
.nag-lead__contact a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #fff; text-decoration: none; }
.nag-lead__contact a:hover { color: var(--gold); }
.nag-lead__contact svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.nag-lead__contact strong { font-weight: 800; }
.nag-lead__form { min-width: 0; }
.nag-section--navy .nag-lead__form .nag-form__box, .nag-lead__form .nag-form--fallback { color: var(--body); }
.nag-form--fallback { background: #fff; border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.nag-form--fallback .nag-field { display: grid; gap: 6px; }
.nag-form--fallback label { font-weight: 600; color: var(--ink); font-size: .92rem; }
.nag-form--fallback input, .nag-form--fallback select, .nag-form--fallback textarea { min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; width: 100%; }

/* ---------- 10. Nguồn tham khảo + ngày cập nhật ---------- */
.nag-sources { padding: 28px 0 40px; background: var(--paper); border-top: 1px solid var(--line); font-size: .9rem; }
.nag-sources__box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.nag-sources__box summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 18px; cursor: pointer; list-style: none; font-weight: 700; color: var(--ink); }
.nag-sources__box summary::-webkit-details-marker { display: none; }
.nag-sources__box summary > svg:first-child { width: 18px; height: 18px; color: var(--navy); }
.nag-sources__chev { margin-left: auto; width: 18px; height: 18px; transition: transform var(--t); }
.nag-sources__box[open] .nag-sources__chev { transform: rotate(180deg); }
.nag-sources__list { margin: 0; padding: 0 18px 8px 40px; display: grid; gap: 6px; }
.nag-sources__list a { word-break: break-word; }
.nag-sources__note { margin: 0; padding: 0 18px 16px; color: var(--text-muted); font-size: .84rem; }
.nag-sources__updated { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--text-muted); }
.nag-sources__updated svg { width: 16px; height: 16px; }

/* ---------- 11. Lịch khai giảng ---------- */
.nag-class--row { flex-wrap: wrap; align-items: flex-start; }
.nag-class--row .nag-class__body { flex: 1 1 200px; }
.nag-class--row .nag-class__body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nag-class--row .nag-class__body h3 a { color: var(--ink); text-decoration: none; }
.nag-class--row .nag-class__body h3 a:hover { color: var(--red-aa); text-decoration: underline; }
.nag-class--row .nag-card__meta { margin: 2px 0 0; }
.nag-class__side { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.nag-class.is-full .nag-class__date { background: var(--text-muted); }
.nag-class__date small { display: block; }
@media (min-width: 560px) {
	.nag-classes--list .nag-class--row { align-items: center; flex-wrap: nowrap; }
	.nag-classes--list .nag-class__side { flex: none; flex-direction: column; align-items: flex-end; padding-top: 0; border-top: 0; }
}
.nag-classes--list { grid-template-columns: 1fr !important; }
.nag-classes__empty { margin: 0; padding: 20px; text-align: center; color: var(--text-muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.nag-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 0 0 20px; padding: 16px; border-radius: var(--radius); background: var(--soft); }
.nag-filter__field { display: grid; gap: 4px; flex: 1 1 200px; }
.nag-filter__field label { font-size: .82rem; font-weight: 700; color: var(--ink); }
.nag-filter select {
	min-height: 44px; width: 100%; padding: 8px 40px 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff;
	appearance: none; -webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23013274' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.nag-filter__reset { flex: none; }
.nag-filter__count { flex: 1 1 100%; margin: 0; font-size: .88rem; color: var(--text-muted); }
.nag-filter__count:empty { display: none; }

/* ---------- 12. Văn phòng (.nag-branch) ---------- */
.nag-branches { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.nag-branch { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--navy); }
.nag-branch.is-hq { border-top-color: var(--red-aa); }
.nag-branch__name { font-size: 1.05rem; margin: 0 0 4px; line-height: 1.35; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nag-branch__line { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: .95rem; }
.nag-branch__line svg { width: 18px; height: 18px; margin-top: 3px; color: var(--navy); flex: none; }
.nag-branch__line a { font-weight: 700; min-height: 24px; }
.nag-branch__map { margin-top: auto; align-self: flex-start; }
.nag-sections > .nag-sec:nth-child(even) .nag-branch { background: var(--paper); }

/* Kênh liên hệ nhanh */
.nag-sec--contact { padding-block: clamp(28px, 4vw, 48px) 0; }
.nag-contact-quick { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.nag-contact-quick__item { display: flex; align-items: center; gap: 14px; height: 100%; min-height: 76px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; transition: border-color var(--t), box-shadow var(--t); }
a.nag-contact-quick__item:hover { border-color: var(--navy); box-shadow: var(--shadow-sm); color: var(--ink); }
.nag-contact-quick__ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--red-soft); color: var(--red-aa); }
.nag-contact-quick__ico svg { width: 22px; height: 22px; }
.nag-contact-quick__item small { display: block; font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.nag-contact-quick__item strong { display: block; font-size: 1.02rem; word-break: break-word; }

/* ---------- 13. Giấy phép + lightbox ---------- */
.nag-permits { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.nag-permit figure { margin: 0; height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.nag-permit__zoom { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--soft); }
.nag-permit__zoom img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.nag-permit__hint { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(1, 32, 76, .88); color: #fff; font-size: .8rem; font-weight: 700; }
.nag-permit__hint svg { width: 14px; height: 14px; }
.nag-permit__zoom:focus-visible { border-radius: 0; }
.nag-permit__ph { display: grid; place-items: center; aspect-ratio: 3 / 4; background: var(--navy-soft); color: var(--navy); }
.nag-permit__ph svg { width: 48px; height: 48px; }
.nag-permit figcaption { padding: 14px 16px; display: grid; gap: 2px; font-size: .88rem; color: var(--text-muted); }
.nag-permit figcaption strong { color: var(--ink); font-size: .95rem; }

.nag-lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.nag-lightbox::backdrop { background: rgba(5, 10, 20, .88); }
.nag-lightbox__inner { box-sizing: border-box; width: 100%; height: 100%; display: grid; place-items: center; grid-template-rows: auto auto; align-content: center; padding: 64px 16px 24px; gap: 12px; } /* QA-B: chú thích sát ảnh, không dạt xuống đáy màn hình */
.nag-lightbox img { max-width: min(100%, 1100px); max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #fff; }
.nag-lightbox__cap { margin: 0; color: #fff; text-align: center; font-size: .95rem; }
.nag-lightbox__close { position: fixed; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; }
.nag-lightbox__close svg { width: 22px; height: 22px; }

/* ---------- 14. Trạng thái trống, pháp lý ---------- */
.nag-empty__ico { width: 44px; height: 44px; color: var(--navy); }
.nag-empty--left { display: flex; gap: 18px; align-items: flex-start; text-align: left; }
.nag-empty--left .nag-empty__ico { flex: none; }
.nag-legal-teaser { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--paper); }
.nag-legal-teaser__ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--green-soft); color: var(--green); }
.nag-legal-teaser__ico svg { width: 28px; height: 28px; }
.nag-legal-teaser__text p { margin: 0; color: var(--text-muted); }
.nag-legal-teaser__text .nag-sec__title { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); margin-bottom: 6px; }
@media (min-width: 860px) { .nag-legal-teaser { grid-template-columns: auto 1fr auto; align-items: center; } }

/* ---------- 15. Landing có mục lục ---------- */
.nag-doc { padding-block: clamp(24px, 4vw, 48px); }
.nag-doc .nag-section { padding: clamp(28px, 4vw, 48px) 0; background: none !important; }
.nag-doc .nag-section + .nag-section { border-top: 1px solid var(--line); }
.nag-doc .nag-section > .nag-container { padding: 0; max-width: none; }
.nag-doc .nag-sec--cta { border-top: 0 !important; }
.nag-doc:not(.nag-doc--toc) .nag-doc__main { max-width: 900px; margin-inline: auto; }
.nag-doc__main { min-width: 0; }
.nag-doc .nag-faq-layout { grid-template-columns: 1fr; gap: 16px; }
.nag-doc .nag-faq-layout__head { position: static; }
.nag-doc .nag-split { grid-template-columns: 1fr; }
.nag-doc .nag-sec--steps-timeline .nag-section-head { text-align: left; margin-inline: 0; }
.nag-doc .nag-sec--steps-timeline .nag-section-head .nag-eyebrow { justify-content: flex-start; }
.nag-doc .nag-steps--timeline { margin-inline: 0; }
.nag-doc__aside .nag-toc__title { min-height: 48px; }
.nag-toc .nag-toc__list a { min-height: 44px; display: flex; align-items: center; }
.nag-toc a.nag-toc__cta { display: none; border-left: 0; padding: 10px 18px; color: #fff; justify-content: center; }
.nag-toc a.nag-toc__cta:hover { color: #fff; }
@media (min-width: 1024px) {
	.nag-doc--toc { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 56px; align-items: start; }
	.nag-doc__aside { position: sticky; top: calc(var(--header-h) + 20px); }
	.nag-doc__aside .nag-toc summary { pointer-events: none; }
	.nag-doc__aside .nag-toc summary svg { display: none; }
	.nag-doc__aside .nag-toc ol { max-height: calc(100vh - var(--header-h) - 200px); }
	.nag-toc .nag-toc__list a { min-height: 34px; }
	.nag-toc a.nag-toc__cta { display: flex; margin: 0 18px 18px; width: auto; }
	.nag-doc .nag-section:first-child { padding-top: 0; }
}

/* ---------- 16. Video lười, trích dẫn ---------- */
.nag-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); margin: 0 0 28px; }
.nag-video img, .nag-video iframe, .nag-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.nag-video__play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .25)); display: grid; place-items: center; cursor: pointer; }
.nag-video__btn { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--red-aa); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: transform var(--t); }
.nag-video__btn svg { width: 30px; height: 30px; margin-left: 4px; }
.nag-video__play:hover .nag-video__btn { transform: scale(1.06); }
.nag-video__play:focus-visible { box-shadow: inset 0 0 0 4px var(--gold); border-radius: 0; }
.nag-video--native video { object-fit: contain; }
.nag-pullquote { margin: 0 0 28px; padding: 22px 24px 22px 28px; border-left: 5px solid var(--red-aa); background: var(--soft); border-radius: 0 var(--radius) var(--radius) 0; }
.nag-pullquote p { margin: 0; font-size: 1.2rem; line-height: 1.6; color: var(--ink); font-weight: 600; }
.nag-pullquote footer { margin-top: 10px; color: var(--text-muted); font-size: .92rem; }

/* ---------- 17. Tài liệu (lead magnet) ---------- */
.nag-docs .nag-card__body { gap: 12px; }
.nag-card--doc.is-selected { border-color: var(--red-aa); box-shadow: 0 0 0 2px var(--red-soft); }
.nag-doc-cover { position: relative; display: grid; place-items: center; width: 64px; height: 80px; border-radius: 8px 18px 8px 8px; background: var(--navy); color: #fff; }
.nag-doc-cover svg { width: 30px; height: 30px; }
.nag-doc-cover em { position: absolute; bottom: -8px; right: -10px; padding: 2px 8px; border-radius: 6px; background: var(--red-aa); color: #fff; font-style: normal; font-size: .7rem; font-weight: 800; }
.nag-docs .nag-btn { margin-top: auto; }
.nag-grid--1 { max-width: 720px; }

/* ---------- 18. Quiz, cảm ơn ---------- */
.nag-quiz-box { max-width: 860px; margin-inline: auto; }
.nag-thanks { padding: clamp(40px, 7vw, 96px) 0 clamp(24px, 4vw, 48px); text-align: center; background: linear-gradient(180deg, var(--green-soft), var(--paper)); }
.nag-thanks__ico { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: #fff; margin-bottom: 20px; box-shadow: 0 12px 30px rgba(15, 122, 61, .25); }
.nag-thanks__ico svg { width: 42px; height: 42px; stroke-width: 3; }
.nag-thanks__title { font-size: clamp(1.8rem, 1.3rem + 2.4vw, 2.8rem); }
.nag-thanks__lead { font-size: 1.1rem; max-width: 60ch; margin-inline: auto; }
.nag-thanks__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.nag-thanks__cta .nag-btn { flex: 1 1 260px; max-width: 340px; }
.nag-sec--next .nag-sec__title { text-align: center; margin-bottom: 28px; }

/* ---------- 19. Nội dung cũ (Flatsome/khác) ---------- */
.nag-prose--legacy { overflow-wrap: anywhere; }
.nag-prose--legacy img { max-width: 100% !important; height: auto !important; }
.nag-prose--legacy iframe, .nag-prose--legacy embed, .nag-prose--legacy object, .nag-prose--legacy video { max-width: 100% !important; border: 0; }
.nag-prose--legacy iframe[src*="youtube"], .nag-prose--legacy iframe[src*="youtu.be"], .nag-prose--legacy iframe[src*="vimeo"], .nag-prose--legacy iframe[src*="facebook.com/plugins/video"] { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; }
.nag-prose--legacy iframe[src*="google.com/maps"] { width: 100% !important; min-height: 320px; }
.nag-prose--legacy [style*="width"] { max-width: 100% !important; }
.nag-prose--legacy .wp-caption, .nag-prose--legacy figure { max-width: 100% !important; width: auto !important; }
.nag-prose--legacy table { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.nag-prose--legacy td, .nag-prose--legacy th { min-width: 90px; }
.nag-prose--legacy .row, .nag-prose--legacy .col, .nag-prose--legacy .section { display: block; width: auto !important; margin: 0 !important; padding: 0 !important; }
.nag-prose--legacy .gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.nag-prose--legacy .gallery-item { margin: 0 !important; width: auto !important; }
.nag-prose--legacy pre { overflow-x: auto; }
.nag-legacy__updated { margin-top: 32px; }
.nag-pagelinks { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.nag-pagelinks a, .nag-pagelinks > span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- 20. Số liệu (stats) trong trang ---------- */
.nag-stats--single { grid-template-columns: 1fr !important; max-width: 320px; margin-inline: auto; }
.nag-stat__note { display: block; margin-top: 6px; font-size: .78rem; color: #c3d0e6; }
.nag-sec--src-stats .nag-section-head { margin-bottom: 24px; }

/* ---------- 21. Chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
	.nag-faq__icon, .nag-sources__chev, .nag-video__btn, .nag-contact-quick__item { transition: none !important; }
}

/* ---------- 22. In ấn ---------- */
@media print {
	.nag-lead, .nag-doc__aside, .nag-hero-pg__cta, .nag-filter { display: none !important; }
	.nag-faq__item:not([open]) .nag-faq__a { display: block; }
}

/* Album ảnh thật (template-parts/global/gallery.php) */
.nag-gallery__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.nag-gallery__item { margin: 0; border-radius: var(--radius, 16px); overflow: hidden; aspect-ratio: 4 / 3; background: var(--soft, #f5f6f8); }
.nag-gallery__item--big { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.nag-gallery__item a { display: block; height: 100%; }
/* QA-B: li overflow:hidden cắt mất vòng focus của <a> → vẽ vòng focus lên ô */
.nag-gallery__item a:focus-visible { box-shadow: none; }
.nag-gallery__item:has(a:focus-visible) { box-shadow: var(--focus); }
.nag-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.nag-gallery__item a:hover img, .nag-gallery__item a:focus-visible img { transform: scale(1.04); }
@media (min-width: 900px) {
	.nag-gallery__grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
	.nag-gallery__item--big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
}
@media (prefers-reduced-motion: reduce) { .nag-gallery__item img { transition: none; } }
/* QA-B: nút tư vấn trong hero ngành chỉ cần trên mobile (desktop đã có nút trong thẻ Thông tin nhanh bên phải) */
@media (min-width: 960px) { .nag-hero-pg--nganh .nag-hero-pg__cta { display: none; } }
