/* HT Việt Nam – trang chủ. Đổi màu: sửa các biến dưới đây. */
:root {
  --green: #2F6B1F;        /* màu chính (theo logo) */
  --green-dark: #234D18;
  --green-text: #2E6420;
  --green-soft: #EAF2E3;
  --orange: #F28C3C;       /* màu nhấn trên nền tối */
  --ink: #0E1B2C;
  --muted: #4A5868;
  --line: #E3E8EE;
  --surface: #F4F6F9;
  --ph: #E2EADB;
  --dark: #13291A;
  --dark-2: #1B3A22;
  --dark-line: #2C4D33;
  --on-dark: #CBD8C9;
  --footer: #0D1F12;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--green-text); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
address { font-style: normal; }

.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.alt { background: var(--surface); }
.dark { background: var(--dark); color: #fff; }
.stack { display: flex; flex-direction: column; gap: 40px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 8px; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { border-color: #557058; color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { height: 44px; width: auto; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-text strong { font-size: 18px; font-weight: 700; letter-spacing: .5px; color: var(--green); line-height: 1.2; }
.brand-text small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 20px rgba(14,27,44,.22); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s, transform .2s, visibility .2s, background .15s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green-dark); }
.nav { display: flex; align-items: center; gap: 4px 28px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { color: #33404F; text-decoration: none; padding: 12px 0; }
.nav a:not(.btn):hover { color: var(--green-text); }
/* Menu thả xuống */
.nav-item { position: relative; }
.nav-drop { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-weight: 500; color: #33404F; background: none; border: 0; padding: 12px 0; cursor: pointer; }
.nav-drop:hover, .nav-item.open .nav-drop { color: var(--green-text); }
.nav-drop svg { transition: transform .15s; }
.nav-item.open .nav-drop svg { transform: rotate(180deg); }
.submenu { display: none; position: absolute; top: 100%; left: -16px; min-width: 290px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 32px rgba(14,27,44,.12); padding: 8px; z-index: 60; }
.nav-item.open .submenu { display: block; }
.nav .submenu a { display: block; padding: 12px 14px; border-radius: 6px; color: var(--ink); }
.nav .submenu a:hover { background: var(--surface); color: var(--green-text); }
@media (min-width: 901px) and (hover: hover) {
  .nav-item:hover .submenu { display: block; }
  .nav-item:hover .nav-drop svg { transform: rotate(180deg); }
}

/* Danh mục khóa đào tạo */
.catalog { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.catalog table { width: 100%; border-collapse: collapse; font-size: 15px; }
.catalog th { text-align: left; font-size: 13px; font-weight: 600; letter-spacing: .3px; color: var(--muted); background: var(--surface); padding: 14px 20px; white-space: nowrap; }
.catalog td { padding: 16px 20px; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.catalog td:nth-child(2) { color: var(--ink); font-weight: 600; }
.catalog td:first-child, .catalog th:first-child { width: 64px; text-align: center; }
.catalog tbody tr:hover { background: #FAFBFC; }

.version { font-size: 14px; }

.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }

/* Hero */
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 88px; padding-bottom: 96px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.15; font-weight: 700; letter-spacing: -0.5px; }
.lead { font-size: 18px; line-height: 1.65; color: var(--on-dark); max-width: 540px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-art { flex: 1 1 420px; min-width: 0; height: 400px; border-radius: 16px; overflow: hidden; border: 1px solid var(--dark-line); }
.hero-art svg { width: 100%; height: 100%; display: block; }
.rotor { animation: spin 9s linear infinite; }
.rotor-slow { animation-duration: 12s; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rotor { animation: none; } html { scroll-behavior: auto; } }

/* Eyebrow + headings */
.eyebrow { display: block; font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--green-text); margin-bottom: 12px; }
.eyebrow-light { color: var(--orange); margin-bottom: 0; }
h2 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 700; }
.muted { color: var(--muted); }
.lg { font-size: 17px; line-height: 1.7; }
.more { font-weight: 600; font-size: 16px; text-decoration: none; padding: 10px 0; display: inline-block; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }

/* Split layouts */
.split { display: flex; flex-wrap: wrap; gap: 56px 64px; }
.split-main { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split-main h2 { margin-top: -4px; }
.split-side { flex: 1.3 1 460px; min-width: 0; }

/* About tiles */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.tile { background: var(--surface); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; color: var(--green); }
.tile h3 { font-size: 18px; font-weight: 600; color: var(--ink); }
.tile p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Course + post cards */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.ph { height: 170px; background: var(--ph); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.ph-tall { height: 200px; border-radius: var(--radius); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.card h3, .post h3 { font-size: 19px; font-weight: 600; line-height: 1.4; }
.card p, .post p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.chip { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--green-text); background: var(--green-soft); padding: 4px 10px; border-radius: 999px; }
.card-meta { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.post { display: flex; flex-direction: column; gap: 14px; }
.post-meta { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.tag { font-weight: 600; color: var(--green-text); }

/* Capability */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--dark-line); border: 1px solid var(--dark-line); border-radius: var(--radius); overflow: hidden; }
.stats > div { background: var(--dark); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.stats strong { font-size: 36px; font-weight: 700; }
.stats span { font-size: 15px; color: var(--on-dark); }
.projects { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--dark-line); }
.projects li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 22px 0; border-top: 1px solid var(--dark-line); }
.p-name { font-size: 18px; font-weight: 600; }
.p-meta { font-size: 15px; color: var(--on-dark); }

/* Contact */
.contact { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.contact li { display: flex; gap: 16px; align-items: flex-start; }
.ic { flex: 0 0 44px; height: 44px; border-radius: 10px; background: var(--green-soft); color: var(--green-text); display: flex; align-items: center; justify-content: center; }
.contact small { display: block; font-size: 13px; color: var(--muted); }
.contact a { font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; word-break: break-word; }
.contact a:hover { color: var(--green-text); }
.contact address { font-size: 16px; font-weight: 600; line-height: 1.5; }

.form { background: var(--surface); border-radius: 16px; padding: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; font-size: 15px; padding: 13px 14px; border: 1px solid #CBD3DD; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.form-foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.note { font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: var(--footer); color: var(--on-dark); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-top: 44px; padding-bottom: 44px; font-size: 14px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand .mark { width: 48px; height: 48px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 6px; }
.foot-brand strong { display: block; color: #fff; }
.foot-brand small { font-size: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-links a { color: var(--on-dark); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.foot-links svg { color: var(--orange); flex: 0 0 auto; }
.foot-links a:hover { color: #fff; }

/* Mobile */
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; box-shadow: 0 12px 24px rgba(14,27,44,.08); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 16px; }
  .nav-drop { width: 100%; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .submenu { position: static; min-width: 0; border: 0; border-radius: 0; box-shadow: none; padding: 4px 0 4px 16px; border-bottom: 1px solid var(--line); }
  .nav .submenu a { border-bottom: 0; padding: 12px 0; font-size: 15px; color: #33404F; }

  /* Bảng danh mục thành thẻ trên điện thoại */
  .catalog { border: 0; overflow: visible; }
  .catalog thead { display: none; }
  .catalog table, .catalog tbody, .catalog tr, .catalog td { display: block; width: 100%; }
  .catalog tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px; margin-bottom: 12px; background: #fff; }
  .catalog td, .catalog td:first-child { border-top: 0; padding: 8px 0; text-align: left; width: 100%; display: flex; gap: 12px; }
  .catalog td::before { content: attr(data-label); flex: 0 0 96px; font-size: 13px; font-weight: 600; color: var(--muted); }
  .catalog td:first-child { display: none; }
  .header-row { position: relative; min-height: 68px; }
  .brand-mark { height: 38px; }
}
@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .hero-row { padding-top: 56px; padding-bottom: 64px; gap: 40px; }
  .hero-art { height: 280px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .form { padding: 24px; }
  .brand-text strong { font-size: 16px; }
  .brand-text small { font-size: 11px; }
  .to-top { right: 16px; bottom: 16px; }
}
@media (max-width: 400px) {
  .brand-text small { display: none; }
}

/* ===== 1.0.4: nội dung động, trang tin tức, trang bài viết ===== */
.pre { white-space: pre-line; }
.ph-icon { color: var(--green); opacity: .9; }
.card-img { width: 100%; height: 170px; object-fit: cover; }
.post-link { display: flex; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; height: 100%; }
.post-link:hover h3 { color: var(--green-text); text-decoration: underline; text-underline-offset: 3px; }
.post-img { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); }
.empty { color: var(--muted); grid-column: 1 / -1; margin: 0; padding: 24px 0; }
.catalog .empty-row td { text-align: center; color: var(--muted); font-weight: 400; padding: 28px 20px; }
.hero-art.has-img img { width: 100%; height: 100%; object-fit: cover; }

.skel .ph, .skel-line { background: linear-gradient(90deg, #E9EDF1 0%, #F4F6F9 50%, #E9EDF1 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skel-line { height: 18px; border-radius: 6px; margin-top: 4px; }
.skel-line.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel .ph, .skel-line { animation: none; } }

.btn-outline { border-color: #CBD3DD; color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--green); color: var(--green-text); }
.center { display: flex; justify-content: center; }

.page-head { background: var(--dark); color: #fff; padding: 64px 0 56px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); margin-top: 12px; }
.section-tight { padding-top: 56px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { font: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #CBD3DD; background: #fff; color: var(--ink); cursor: pointer; }
.filter:hover { border-color: var(--green); }
.filter.active { background: var(--green); border-color: var(--green); color: #fff; }

.article { max-width: 760px; padding-top: 48px; padding-bottom: 88px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green-text); }
.article-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.25; margin: 12px 0 16px; }
.article-lead { font-size: 19px; line-height: 1.65; color: var(--muted); margin-bottom: 28px; }
.article-cover { width: 100%; border-radius: var(--radius); margin-bottom: 32px; max-height: 480px; object-fit: cover; }
.preview-note { background: #FFF4E5; border: 1px solid #F5C58B; color: #7A4510; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; }
.not-found { text-align: center; padding: 48px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }

.prose { font-size: 17px; line-height: 1.8; color: #1F2B3A; word-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 26px; margin-top: 1.8em; }
.prose h3 { font-size: 21px; margin-top: 1.6em; }
.prose h4 { font-size: 18px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose img { border-radius: 10px; height: auto; margin: 1.4em auto; }
.prose figure { margin: 1.4em 0; }
.prose figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--green); color: var(--muted); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface); }
.prose a { text-underline-offset: 3px; }
.prose pre { background: var(--surface); padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
.catalog tr.empty-row td:first-child { display: table-cell; width: auto; text-align: center; }
@media (max-width: 900px) {
  .catalog tr.empty-row td:first-child { display: block; }
  .catalog tr.empty-row td::before { display: none; }
}

/* 1.0.5: liên kết Quản trị ở chân trang */
.foot-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.foot-admin { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #8FA38C; text-decoration: none; min-height: 28px; }
.foot-admin:hover { color: #fff; text-decoration: underline; }
@media (max-width: 900px) { .foot-mid { align-items: flex-start; } }
.foot-stats { display: inline-block; font-size: 13px; }
.foot-stats .live-dot { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.foot-stats b { color: #fff; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
