/* ============================================================
   Trang "Tuyển sinh" (Admission) — module admission
   Port từ _design-reference/.../page-hero-shared.css (chính — hf-adm-*,
   hf-method-*, hf-scholar-*, hf-step*, hf-reg*) + program-detail-blocks.css
   (hf-explore-*) + tokens-and-header.css (hf-section.blue, hf-tag) +
   app-shell.css (hf-reveal stagger).
   Conditional enqueue: chỉ trang có block acf_fc_layout tiền tố "admission_".
   ============================================================ */

/* ---- Design tokens (mỗi component CSS conditional-load độc lập —
   không kế thừa token từ about-page.css/home-page.css). ---- */
:root {
  --blue:      #17479D;
  --orange:    #EE6823;
  --blue-700:  #0f3270;
  --blue-50:   #eef3fb;
  --blue-100:  #dde7f6;
  --orange-50: #fdf0e7;
  --ink:       #14213d;
  --ink-soft:  #4a5a76;
  --muted:     #7a879c;
  --line:      #e4eaf2;
  --bg-soft:   #f5f8fc;
  --radius:    4px;
  --radius-lg: 6px;
  --shadow-sm: 0 2px 8px rgba(20,33,61,.06);
  --shadow-md: 0 10px 30px rgba(20,33,61,.10);
  --shadow-lg: 0 10px 28px rgba(20,33,61,.10);
  --maxw:      1360px;
  --gut:       32px;
  --ease:      cubic-bezier(.22,.61,.36,1);
}

.hf-adm-hero, .hf-method-grid, .hf-scholar-grid, .hf-adm-photos-row, .hf-steps,
.hf-explore-grid, .hf-reg, .hf-adm-bar {
  font-family: 'Mulish', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Resets có phạm vi, giống about-page.css ----
   :not(.hf-btn) — tránh reset đè màu chữ nút CTA (.hf-btn-white/.hf-btn-orange
   có specificity 1 class, thua a{} nếu không loại trừ, gây nút trắng-trên-trắng). */
.hf-adm-hero a:not(.hf-btn), .hf-reg a:not(.hf-btn), .hf-adm-bar a:not(.hf-btn),
.hf-adm-hero button:not(.hf-btn), .hf-reg button:not(.hf-btn), .hf-adm-bar button:not(.hf-btn) { color: inherit; text-decoration: none; }
.hf-adm-hero h1, .hf-adm-hero h2, .hf-adm-hero h3,
.hf-method-grid h1, .hf-method-grid h2, .hf-method-grid h3,
.hf-scholar-grid h1, .hf-scholar-grid h2, .hf-scholar-grid h3,
.hf-steps h1, .hf-steps h2, .hf-steps h3, .hf-steps h4,
.hf-explore-grid h1, .hf-explore-grid h2, .hf-explore-grid h3,
.hf-reg h1, .hf-reg h2, .hf-reg h3,
.hf-adm-bar strong {
  margin: 0; line-height: 1.16; letter-spacing: -.01em; font-weight: 700;
}

.hf-adm-shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); width: 100%; }

/* ---- Section wrapper dùng chung ---- */
.hf-section { padding: 80px 0; }
.hf-section.soft { background: var(--bg-soft); }
.hf-section.blue { background: var(--blue); color: #fff; }
.hf-head { margin-bottom: 40px; }
.hf-head.center { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.hf-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 10px; }
.hf-head p { font-size: 16px; color: var(--ink-soft); margin-top: 10px; }
.hf-section.blue .hf-head p { color: #c9d8f1; }

.hf-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--orange);
}
.hf-eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--orange); }
.hf-eyebrow.center { justify-content: center; }

.hf-btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border-radius: 4px; font-weight: 800; font-size: 15px; white-space: nowrap; transition: transform .16s var(--ease), box-shadow .2s, background .2s; cursor: pointer; }
.hf-btn-orange { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(238,104,35,.32); }
.hf-btn-orange:hover { box-shadow: 0 12px 26px rgba(238,104,35,.42); }
.hf-btn-white { background: #fff; color: var(--blue); }
.hf-btn-lg { padding: 16px 30px; font-size: 16.5px; }
.hf-btn:hover { transform: translateY(-2px); }

.hf-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; padding: 5px 11px; border-radius: 4px; }

/* ============ Breadcrumb (dùng trong hero) ============ */
.hf-adm-hero .hf-crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,.7); margin-bottom: 10px; flex-wrap: wrap; }
.hf-adm-hero .hf-crumb.light { color: rgba(255,255,255,.78); }
.hf-adm-hero .hf-crumb a:hover { color: #fff; }
.hf-adm-hero .hf-crumb span[aria-current] { color: #fff; }

/* ============ Hero ============ */
.hf-adm-hero { position: relative; min-height: 46vh; display: flex; align-items: flex-start; overflow: hidden; color: #fff; }
.hf-adm-hero-bg { position: absolute; inset: 0; z-index: 0; }
.hf-adm-hero-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hf-adm-hero-ov { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(180,70,15,.92) 0%, rgba(238,104,35,.65) 45%, rgba(238,104,35,.12) 72%, transparent 90%); }
.hf-adm-hero-in { position: relative; z-index: 1; max-width: 680px; padding: 46px 0 56px; }
.hf-adm-hero-in .hf-tag { background: rgba(255,255,255,.2); color: #fff; margin-bottom: 10px; }
.hf-adm-hero-in h1 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; margin: 16px 0 14px; color: #fff; }
.hf-adm-hero-in p { font-size: 16.5px; line-height: 1.6; color: #fff0e6; max-width: 560px; }
.hf-phero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
@media (max-width: 720px) { .hf-adm-hero { min-height: 40vh; } }

/* ============ Phương thức xét tuyển ============ */
.hf-method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hf-method-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.hf-method-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.hf-method-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hf-method-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bg-soft); color: var(--blue); transition: transform .25s var(--ease), background .25s, color .25s; }
.hf-method-card:hover .hf-method-ic { transform: rotate(-8deg) scale(1.1); background: linear-gradient(150deg, var(--blue), var(--orange)); color: #fff; }
.hf-method-code { font-size: 22px; font-weight: 700; color: var(--blue-100); }
.hf-method-card h3 { font-size: 17px; margin-bottom: 8px; line-height: 1.25; }
.hf-method-card p { font-size: 14px; color: var(--ink-soft); }

/* ============ Học bổng ============ */
.hf-scholar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hf-scholar-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; text-align: center; box-shadow: var(--shadow-sm); }
.hf-scholar-card.feat { background: var(--blue-700); color: #fff; border-color: transparent; box-shadow: var(--shadow-md); }
.hf-scholar-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--orange); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 14px; border-radius: 4px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hf-scholar-card h3 { font-size: 18px; }
.hf-scholar-val { font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: var(--orange); margin: 10px 0 10px; letter-spacing: -.02em; }
.hf-scholar-card.feat .hf-scholar-val { color: #ffd9bf; }
.hf-scholar-card p { font-size: 14px; color: var(--ink-soft); }
.hf-scholar-card.feat p { color: #c9d8f1; }

/* ============ 2 ảnh + Hướng dẫn nhập học ============ */
.hf-adm-photos-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: -10px; }
.hf-adm-photo { position: relative; overflow: hidden; border-radius: 20px; aspect-ratio: 16 / 9; background: var(--bg-soft); }
.hf-adm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .hf-adm-photos-row { grid-template-columns: 1fr; } }

.hf-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.hf-step { position: relative; padding-top: 8px; transition: transform .2s var(--ease); }
.hf-step:hover { transform: translateY(-4px); }
.hf-step-num { width: 52px; height: 52px; border-radius: 14px; background: var(--orange-50); color: var(--orange); display: grid; place-items: center; font-size: 22px; font-weight: 700; margin-bottom: 16px; transition: background .25s, color .25s, transform .25s var(--ease); }
.hf-step:hover .hf-step-num { background: var(--orange); color: #fff; transform: scale(1.08); }
.hf-step h4 { font-size: 17px; margin-bottom: 8px; }
.hf-step p { font-size: 14.5px; color: var(--ink-soft); }
.hf-step:not(:last-child)::after { content: ""; position: absolute; top: 34px; left: 64px; right: -10px; height: 2px; background: repeating-linear-gradient(90deg, var(--blue-100) 0 8px, transparent 8px 16px); }

/* ============ Trước khi quyết định ============ */
.hf-explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hf-explore-card { display: block; text-align: left; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm); transition: transform .18s var(--ease), box-shadow .18s; }
.hf-explore-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.hf-explore-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 4px; background: var(--bg-soft); color: var(--orange); margin-bottom: 16px; }
.hf-explore-card h3 { font-size: 18px; margin-bottom: 8px; }
.hf-explore-card p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 14px; }
.hf-explore-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; color: var(--blue); transition: gap .16s; }
.hf-explore-card:hover .hf-explore-link { gap: 12px; }

/* ============ Đăng ký xét tuyển ============ */
.hf-reg { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.hf-reg-copy h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 14px 0 14px; color: #fff; }
.hf-reg-copy > p { font-size: 16.5px; color: #c9d8f1; }
.hf-reg-perks { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; list-style: none; padding: 0; margin-left: 0; }
.hf-reg-perks li { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 15.5px; }
.hf-reg-perks svg { color: #6fe0a8; flex-shrink: 0; }
.hf-reg-form { background: #fff; border-radius: var(--radius-lg); padding: 32px; color: var(--ink); box-shadow: var(--shadow-lg); }
.hf-reg-form h3 { font-size: 21px; margin-bottom: 20px; }

/* Override style mặc định Gravity Forms (CSS mặc định GF đã tắt qua
   pre_option_rg_gforms_disable_css ở trang này — xem hf_admission_disable_gform_css()) */
.hf-reg-form .gform_wrapper { font-family: inherit; }
/* Grid 2 cột — thay thế .gform-grid-col mặc định của GF (đã tắt cùng CSS gốc).
   .gfield--width-half (SĐT/Email) chiếm 1 cột, .gfield--width-full chiếm cả hàng.
   !important bắt buộc: JS theme của Gravity Forms (gform_gravityforms.js) tự chèn
   style="grid-template-columns:...px ...px" inline lên #gform_fields_N để tính
   layout responsive riêng — inline style thắng mọi CSS ngoài trừ khi có !important. */
.hf-reg-form .gform_fields { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 0 14px; list-style: none; margin: 0; padding: 0; }
.hf-reg-form .gfield { margin-bottom: 14px; list-style: none; grid-column: span 2 !important; }
.hf-reg-form .gfield--width-half { grid-column: span 1 !important; }
.hf-reg-form .gfield_label { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink-soft); margin-bottom: 7px; }
/* Design không hiện chỉ báo "(Required)"/dấu * cạnh nhãn — ẩn đi cho khớp. */
.hf-reg-form .gfield_required { display: none; }
@media (max-width: 480px) {
  /* Chỉ 1 cột ở mobile — .gfield mặc định "span 2" (base rule) phải hạ về
     "span 1", nếu không grid tự thêm cột ẩn (implicit) để đáp ứng span 2
     dù chỉ khai báo 1 cột, gây layout lệch (đã gặp lỗi này thật khi test). */
  .hf-reg-form .gform_fields { grid-template-columns: 1fr !important; }
  .hf-reg-form .gfield { grid-column: span 1 !important; }
  .hf-reg-form .gfield--width-half { grid-column: span 1 !important; }
}
.hf-reg-form input[type="text"], .hf-reg-form input[type="email"], .hf-reg-form input[type="tel"],
.hf-reg-form input[type="number"], .hf-reg-form select, .hf-reg-form textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 4px;
  font-size: 15px; font-family: inherit; font-weight: 600; outline: none; transition: border-color .15s; background: #fff;
}
.hf-reg-form input:focus, .hf-reg-form select:focus, .hf-reg-form textarea:focus { border-color: var(--blue); }
.hf-reg-form .gform_footer { margin-top: 6px; padding: 0; }
.hf-reg-form .gform_footer input[type="submit"], .hf-reg-form .gform_button {
  width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 4px; font-weight: 800; font-size: 15px; border: none; cursor: pointer;
  background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(238,104,35,.32); transition: transform .16s var(--ease), box-shadow .2s;
}
.hf-reg-form .gform_footer input[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(238,104,35,.42); }
.hf-reg-form .validation_error, .hf-reg-form .gfield_description.validation_message { color: #d92d20; font-size: 13px; margin-top: 6px; }
/* Confirmation message (AJAX submit thành công) — style khớp .hf-reg-done/.hf-reg-check của design */
.hf-reg-form .gform_confirmation_wrapper, .hf-reg-form .gform_confirmation_message { text-align: center; padding: 24px 0; }

@media (max-width: 860px) {
  .hf-reg { grid-template-columns: 1fr; }
}

/* ============ Thanh CTA phụ cố định ============ */
.hf-adm-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20,33,61,.1);
  transform: translateY(110%); transition: transform .35s var(--ease); pointer-events: none;
}
.hf-adm-bar.show { transform: translateY(0); pointer-events: auto; }
.hf-adm-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px var(--gut); flex-wrap: wrap; }
.hf-adm-bar-text { display: flex; flex-direction: column; }
.hf-adm-bar-text strong { font-size: 15.5px; color: var(--ink); }
.hf-adm-bar-text small { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ============ Reveal animation ============ */
.hf-reveal {
  opacity: 0; transform: translateY(56px) scale(.97); filter: blur(6px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  will-change: opacity, transform, filter;
}
.hf-reveal.in { opacity: 1; transform: none; filter: blur(0); }
.hf-reveal .hf-method-card, .hf-reveal .hf-scholar-card, .hf-reveal .hf-step, .hf-reveal .hf-explore-card {
  opacity: 0; transform: translateY(26px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.hf-reveal.in .hf-method-card, .hf-reveal.in .hf-scholar-card, .hf-reveal.in .hf-step, .hf-reveal.in .hf-explore-card {
  opacity: 1; transform: none;
}
.hf-reveal :is(.hf-method-card, .hf-scholar-card, .hf-step, .hf-explore-card):nth-child(1) { transition-delay: .04s; }
.hf-reveal :is(.hf-method-card, .hf-scholar-card, .hf-step, .hf-explore-card):nth-child(2) { transition-delay: .10s; }
.hf-reveal :is(.hf-method-card, .hf-scholar-card, .hf-step, .hf-explore-card):nth-child(3) { transition-delay: .16s; }
.hf-reveal :is(.hf-method-card, .hf-scholar-card, .hf-step, .hf-explore-card):nth-child(4) { transition-delay: .22s; }
.hf-reveal :is(.hf-method-card, .hf-scholar-card, .hf-step, .hf-explore-card):nth-child(n+5) { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .hf-reveal, .hf-reveal * { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hf-method-grid { grid-template-columns: repeat(2, 1fr); }
  .hf-steps { grid-template-columns: repeat(2, 1fr); }
  .hf-step::after { display: none; }
}
@media (max-width: 860px) {
  .hf-scholar-grid, .hf-explore-grid { grid-template-columns: 1fr; }
  .hf-scholar-card.feat { transform: none; }
}
@media (max-width: 720px) {
  .hf-method-grid { grid-template-columns: 1fr; }
}

/* ===== Anchor scroll (module mapping-page, đợt Tuyển sinh) ===== */
/* 140px = 134px chiều cao .hf-header cố định (xem org-structure.css) + 6px đệm.
   Áp cho CẢ #hocbong/#dangky có sẵn (hero page tự link, trước đây chưa có offset —
   tiện sửa luôn bug che-header cho 2 CTA đó cùng lúc). */
.hf-section[id] { scroll-margin-top: 140px; }
/* Selector "html" trông global nhưng file này CHỈ enqueue khi hf_admission_page_has_admission_blocks()
   = true (hf_admission_assets(), wp_enqueue_scripts) — hiệu lực thực tế chỉ trên trang có block admission_*. */
html { scroll-behavior: smooth; }
