/* ============================================================
   school.css — trang công khai trường (hub / list / detail).
   Dùng biến của style.css (--primary...) + biến cục bộ ps-* để
   bật/tắt dark mode an toàn qua [data-theme="dark"].
   ============================================================ */

/* RESET FONT: <button>/<input>/<textarea>/<select> KHÔNG kế thừa font của trang theo mặc định
   trình duyệt (dùng font hệ thống) → chữ trong nút/ô nhập lệch khỏi Inter của trang ("lỗi font").
   Ép kế thừa cho mọi phần tử tương tác trên trang trường + các overlay (modal/lightbox/sticky CTA). */
.ps-wrap button, .ps-wrap input, .ps-wrap textarea, .ps-wrap select,
.ps-modal button, .ps-modal input, .ps-modal textarea,
.ps-lb button, .ps-sticky-cta { font-family: inherit; }

/* Token khai báo cho CẢ vùng nội dung (.ps-wrap) LẪN modal (.ps-modal).
   Modal nằm NGOÀI <main class="ps-wrap"> nên KHÔNG kế thừa biến qua DOM —
   thiếu khai báo này thì var(--ps-surface) vô định → .ps-modal-box mất nền (trong suốt). */
.ps-wrap,
.ps-modal {
  --ps-surface: #ffffff;
  --ps-border: #e7e3da;
  --ps-muted: #6b7280;
  --ps-text: #1a1a24;
  --ps-soft: #f6f4ee;
  --ps-primary: var(--primary, #4361ee);
}

.ps-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 88px 20px 64px;
  color: var(--ps-text);
}

[data-theme="dark"] .ps-wrap,
[data-theme="dark"] .ps-modal {
  --ps-surface: #1d1f2a;
  --ps-border: #2c2f3d;
  --ps-muted: #9aa0b0;
  --ps-text: #e8e9f0;
  --ps-soft: #16171f;
}

/* ---- breadcrumb ---- */
.ps-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--ps-muted);
  margin-bottom: 18px;
}
.ps-breadcrumb a { color: var(--ps-muted); text-decoration: none; }
.ps-breadcrumb a:hover { color: var(--ps-primary); }

/* ---- hero ---- */
.ps-hero { margin-bottom: 22px; }
.ps-hero h1 {
  font-size: clamp(22px, 3.4vw, 32px);
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--ps-text);
}
.ps-sub { color: var(--ps-muted); font-size: 15px; margin: 0; max-width: 760px; }

/* ---- hub stats + search ---- */
.ps-hub-stats { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.ps-hub-stats span { font-size: 14px; color: var(--ps-muted); }
.ps-hub-stats strong { color: var(--ps-primary); font-size: 19px; margin-right: 2px; }
.ps-hub-search { position: relative; margin: 18px 0 4px; max-width: 360px; }
.ps-hub-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ps-muted); font-size: 14px; }
.ps-hub-search input {
  width: 100%; padding: 11px 14px 11px 38px;
  border: 1px solid var(--ps-border); border-radius: 10px;
  background: var(--ps-surface); color: var(--ps-text); font-size: 14px;
}
.ps-hub-search input:focus { outline: none; border-color: var(--ps-primary); }
.ps-hub-noresult { color: var(--ps-muted); text-align: center; padding: 20px; }

/* ---- province hub grid ---- */
.ps-province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
.ps-province-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ps-province-card:hover {
  border-color: var(--ps-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(67, 97, 238, .12);
}
.ps-prov-name { font-weight: 600; color: var(--ps-text); }
.ps-prov-count { font-size: 13px; color: var(--ps-muted); }

/* ---- district chips ---- */
.ps-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ps-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--ps-border);
  border-radius: 999px;
  background: var(--ps-surface);
  color: var(--ps-text);
  font-size: 13px;
  text-decoration: none;
  transition: all .15s;
}
.ps-chip:hover { border-color: var(--ps-primary); color: var(--ps-primary); }
.ps-chip.active { background: var(--ps-primary); border-color: var(--ps-primary); color: #fff; }
.ps-chip-n { opacity: .7; font-size: 12px; }
.ps-chip.active .ps-chip-n { opacity: .9; }

/* ---- filter bar ---- */
.ps-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 16px;
  background: var(--ps-soft);
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  margin-bottom: 20px;
}
.ps-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ps-muted); }
.ps-filter select {
  padding: 8px 10px;
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  background: var(--ps-surface);
  color: var(--ps-text);
  font-size: 14px;
  min-width: 150px;
}

/* ---- card grid ---- */
.ps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.ps-card {
  display: flex;
  flex-direction: column;
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ps-card:hover {
  border-color: var(--ps-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(67, 97, 238, .12);
}
.ps-card-thumb {
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: var(--ps-soft);
  display: flex; align-items: center; justify-content: center;
}
.ps-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }

/* placeholder khi chưa có ảnh */
.ps-thumb-ph { background: linear-gradient(135deg, var(--ps-primary), #7209b7); }
.ps-thumb-letter { font-size: 2.4rem; font-weight: 800; color: rgba(255, 255, 255, .92); line-height: 1; }

.ps-card-name { font-size: 16px; font-weight: 700; margin: 0; color: var(--ps-text); line-height: 1.3; }
.ps-card-addr { font-size: 13px; color: var(--ps-muted); display: flex; gap: 6px; }
.ps-card-addr i { margin-top: 2px; }
.ps-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-card-go { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--ps-primary); }

/* ---- tags ---- */
.ps-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--ps-soft);
  border: 1px solid var(--ps-border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ps-text);
}
.ps-tag-fee { background: rgba(6, 214, 160, .12); border-color: rgba(6, 214, 160, .3); color: #0a9b76; }
[data-theme="dark"] .ps-tag-fee { color: #4ee0b6; }
.ps-tag-cat { background: rgba(67, 97, 238, .1); border-color: rgba(67, 97, 238, .28); color: var(--ps-primary); }

/* bộ 13 tiêu chí — lưới mini-card đồng bộ .ps-fact: ô icon xoay tông + dấu "có" xanh */
.ps-crit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 10px; }
.ps-crit-card {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: 12px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.ps-crit-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 20, 50, .08); border-color: rgba(67, 97, 238, .35); }
.ps-crit-ic {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
  color: var(--ps-primary); background: rgba(67, 97, 238, .10);
}
.ps-crit-lb { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--ps-text); }
.ps-crit-ck { flex: 0 0 auto; font-size: 13px; color: #06d6a0; opacity: .9; }
/* 6 tông xoay vòng cho ô icon — phá đơn điệu nhưng vẫn hài hoà thương hiệu */
.ps-crit-c0 .ps-crit-ic { color: var(--ps-primary); background: rgba(67, 97, 238, .12); }
.ps-crit-c1 .ps-crit-ic { color: #0a9b76; background: rgba(6, 214, 160, .14); }
.ps-crit-c2 .ps-crit-ic { color: #7209b7; background: rgba(114, 9, 183, .12); }
.ps-crit-c3 .ps-crit-ic { color: #d97706; background: rgba(245, 158, 11, .14); }
.ps-crit-c4 .ps-crit-ic { color: #0891b2; background: rgba(8, 145, 178, .12); }
.ps-crit-c5 .ps-crit-ic { color: #db2777; background: rgba(219, 39, 119, .12); }
[data-theme="dark"] .ps-crit-c2 .ps-crit-ic { color: #c98bef; }
[data-theme="dark"] .ps-crit-c5 .ps-crit-ic { color: #f472b6; }
[data-theme="dark"] .ps-crit-card:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }

/* ---- pager ---- */
.ps-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 36px; }
.ps-page {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  background: var(--ps-surface);
  color: var(--ps-text);
  text-decoration: none;
  font-size: 14px;
}
.ps-page:hover { border-color: var(--ps-primary); color: var(--ps-primary); }
.ps-page-info { font-size: 14px; color: var(--ps-muted); }

/* ---- empty ---- */
.ps-empty { text-align: center; padding: 48px 20px; color: var(--ps-muted); }
.ps-empty i { font-size: 32px; margin-bottom: 12px; opacity: .5; }
.ps-empty p { margin: 0; }

/* ---- claim CTA ---- */
.ps-claim {
  background: linear-gradient(135deg, rgba(67, 97, 238, .08), rgba(114, 9, 183, .06));
  border: 1px solid var(--ps-border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 8px;
}
.ps-claim-head h2 { margin: 0 0 8px; font-size: 20px; color: var(--ps-text); }
.ps-claim-head p { margin: 0 0 16px; color: var(--ps-muted); font-size: 14.5px; line-height: 1.55; }
.ps-claim-form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.ps-claim-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ps-claim-row input { flex: 1 1 180px; }
.ps-claim-form input,
.ps-claim-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  background: var(--ps-surface);
  color: var(--ps-text);
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
.ps-cta-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 18px 10px 10px;
  border: 0;
  border-radius: 999px;
  font-family: inherit; /* <button> KHÔNG kế thừa font mặc định → ép theo Inter của trang (sửa lỗi lệch font) */
  background: linear-gradient(135deg, var(--ps-primary), #7c3aed);
  color: #fff;
  box-shadow: 0 14px 32px rgba(67, 97, 238, .24);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.ps-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(67, 97, 238, .30);
  color: #fff;
}
.ps-cta-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, .18), 0 18px 38px rgba(67, 97, 238, .30);
}
.ps-cta-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.ps-cta-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .18);
}
.ps-cta-icon i { font-size: 14px; line-height: 1; }
.ps-cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.15;
}
.ps-cta-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}
.ps-cta-text small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
  opacity: .84;
}
.ps-claim-btn { align-self: flex-start; }
.ps-claim-msg { font-size: 13.5px; min-height: 18px; }
.ps-claim-msg.ok { color: #0a9b76; }
.ps-claim-msg.err { color: #ef476f; }

/* ============================================================
   DETAIL — trang trường: thiết kế "WOW" cho chủ trường.
   Một cột giữa, hero cao cấp, intro ấm, preview vàng-trên-tối.
   ============================================================ */
.ps-detail { display: flex; flex-direction: column; }
.ps-bc-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---- HERO ---- */
.ps-hero-v2 {
  position: relative;
  min-height: clamp(280px, 42vw, 420px);
  border-radius: var(--radius-lg, 24px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg, 0 12px 36px rgba(17, 17, 26, .10));
}
.ps-hero-media { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.ps-hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(23, 24, 31, .85) 0%, rgba(23, 24, 31, .42) 42%, rgba(23, 24, 31, .05) 100%);
}
.ps-hero-media--mono {
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-primary, linear-gradient(135deg, #4361ee, #7209b7));
}
.ps-hero-media--mono::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, .10) 0 2px, transparent 2px) 0 0 / 26px 26px,
    linear-gradient(to top, rgba(23, 24, 31, .5), rgba(23, 24, 31, .02));
}
.ps-hero-watermark {
  position: absolute; right: -2%; bottom: -12%;
  font-size: clamp(150px, 30vw, 330px); color: rgba(255, 255, 255, .10); z-index: 0; line-height: 1;
}
.ps-hero-mono {
  position: relative; z-index: 1;
  font-size: clamp(72px, 13vw, 130px); font-weight: 800;
  color: rgba(255, 255, 255, .92); line-height: 1; text-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}
.ps-hero-overlay { position: relative; z-index: 2; width: 100%; padding: clamp(20px, 3.5vw, 38px); color: #fff; }
.ps-hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; margin-bottom: 12px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #fff;
}
.ps-hero-title {
  margin: 0 0 10px; color: #fff;
  font-size: clamp(24px, 4.4vw, 40px); font-weight: 800;
  line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}
.ps-hero-addr {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 15px; color: rgba(255, 255, 255, .92); margin-bottom: 14px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}
.ps-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 13.5px; font-weight: 600; color: #fff;
}

/* Hero "WOW": Ken Burns — ảnh từ từ thu zoom về cover (1.08 -> 1.0) tạo chiều sâu điện ảnh.
   Chỉ áp cho ảnh thật (không phải ô gradient --mono). Tôn trọng prefers-reduced-motion. */
@keyframes psHeroKenBurns { from { transform: scale(1.08); } to { transform: scale(1); } }
.ps-hero-media:not(.ps-hero-media--mono) {
  transform: scale(1.08); transform-origin: 50% 45%;
  animation: psHeroKenBurns 20s ease-out forwards; will-change: transform;
}
/* vignette mềm 4 góc -> tiêu điểm vào tiêu đề, ảnh "đắt" hơn */
.ps-hero-v2::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 18%, transparent 55%, rgba(15, 17, 26, .28) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .ps-hero-media:not(.ps-hero-media--mono) { animation: none; transform: none; }
}

/* ---- SHARE ---- */
.ps-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 30px; }
.ps-share-label { font-size: 14px; color: var(--ps-muted); font-weight: 600; }
.ps-share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none;
  border: 1px solid var(--ps-border); background: var(--ps-surface); color: var(--ps-text);
  transition: transform .15s, box-shadow .15s, border-color .15s; font-family: inherit;
}
.ps-share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(17, 17, 26, .10); }
.ps-share-fb { color: #1877f2; border-color: rgba(24, 119, 242, .35); }
.ps-share-fb:hover { background: rgba(24, 119, 242, .08); }
.ps-share-zalo { color: #0068ff; border-color: rgba(0, 104, 255, .35); }
.ps-share-zalo:hover { background: rgba(0, 104, 255, .08); }
.ps-share-copy:hover { border-color: var(--ps-primary); color: var(--ps-primary); }
.ps-share-done { font-size: 13px; color: #0a9b76; font-weight: 600; }

/* ---- INTRO (ấm áp, theo cấp học) ---- */
.ps-intro {
  background: linear-gradient(135deg, rgba(67, 97, 238, .07), rgba(114, 9, 183, .05));
  border: 1px solid var(--ps-border);
  border-radius: var(--radius-lg, 24px);
  padding: clamp(22px, 3.4vw, 38px);
  margin-bottom: 30px; text-align: center;
}
.ps-intro-badge { margin-bottom: 14px; }
.ps-intro-lead {
  max-width: 720px; margin: 0 auto 24px;
  font-size: clamp(17px, 2.2vw, 22px); font-weight: 600;
  line-height: 1.5; color: var(--ps-text); letter-spacing: -.01em;
}
.ps-value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.ps-value {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; text-align: left;
  background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: 14px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ps-value:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 20, 50, .08); border-color: rgba(67, 97, 238, .35); }
.ps-value-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient-primary, linear-gradient(135deg, #4361ee, #7209b7));
  color: #fff; font-size: 17px; transition: transform .16s ease;
}
.ps-value:hover .ps-value-ic { transform: scale(1.08) rotate(-3deg); }
.ps-value-t { font-weight: 700; font-size: 15px; color: var(--ps-text); }

/* ---- section heading ---- */
.ps-sec-head { margin-bottom: 16px; }
.ps-sec-head h2 {
  font-size: clamp(20px, 2.6vw, 26px); font-weight: 800;
  margin: 0 0 4px; color: var(--ps-text); letter-spacing: -.02em;
}
.ps-sec-head p { margin: 0; color: var(--ps-muted); font-size: 14px; }

/* ---- info / facts ---- */
.ps-info, .ps-location { margin-bottom: 30px; }
.ps-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ps-fact {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: 14px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ps-fact:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 20, 50, .08); border-color: rgba(67, 97, 238, .28); }
.ps-fact-ic {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--ps-primary); background: rgba(67, 97, 238, .10);
  transition: transform .16s ease;
}
.ps-fact:hover .ps-fact-ic { transform: scale(1.06); }
.ps-fact-ic--fee { color: #0a9b76; background: rgba(6, 214, 160, .12); }
.ps-fact-ic--age { color: #7209b7; background: rgba(114, 9, 183, .10); }
.ps-fact-ic--cat { color: var(--ps-primary); background: rgba(67, 97, 238, .10); }
.ps-fact-ic--meal { color: #d97706; background: rgba(245, 158, 11, .12); }
[data-theme="dark"] .ps-fact-ic--fee { color: #4ee0b6; }
[data-theme="dark"] .ps-fact-ic--age { color: #c98bef; }
.ps-fact-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ps-fact-l { font-size: 12.5px; color: var(--ps-muted); }
.ps-fact-v { font-size: 16px; font-weight: 700; color: var(--ps-text); overflow-wrap: anywhere; }

.ps-amenities { margin-top: 20px; }
.ps-sub-h { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--ps-text); }

/* caption mờ dưới bộ tiêu chí — chỉ hiện khi trường CHƯA xác nhận */
.ps-crit-note {
  display: flex; align-items: center; gap: 6px;
  margin: 10px 0 0; font-size: 12.5px; font-style: italic;
  color: var(--ps-muted); opacity: .8;
}
.ps-crit-note i { font-size: 12px; }
[data-theme="dark"] .ps-crit-note { opacity: .72; }

/* ---- map / address ---- */
.ps-map iframe {
  width: 100%; height: 340px; border: 1px solid var(--ps-border);
  border-radius: var(--radius, 16px); display: block;
}
/* bản đồ nhỏ khi chỉ có địa chỉ (không toạ độ) — nhúng inline ngay tại trang */
.ps-map--addr { margin-bottom: 12px; }
.ps-map--addr iframe { height: 240px; }
.ps-map-link {
  display: inline-flex; gap: 6px; align-items: center; margin-top: 10px;
  font-size: 13.5px; color: var(--ps-primary); text-decoration: none; font-weight: 600;
}
.ps-addr-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px;
  background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: 14px;
}

/* ---- preview "khi nhận trang" (panel tối sang, vàng) ---- */
.ps-preview {
  background: var(--ink, #17181f);
  background-image: radial-gradient(circle at 85% 0%, rgba(194, 161, 77, .16), transparent 55%);
  border: 1px solid rgba(220, 189, 104, .22);
  border-radius: var(--radius-lg, 24px);
  padding: clamp(26px, 4vw, 46px);
  margin-bottom: 24px; color: #ece9e1;
}
.ps-preview-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; margin-bottom: 16px; border-radius: 999px;
  background: rgba(220, 189, 104, .14); border: 1px solid rgba(220, 189, 104, .4);
  color: var(--gold-bright, #dcbd68); font-size: 13px; font-weight: 700;
}
.ps-preview-title {
  margin: 0 0 12px; color: #fff;
  font-size: clamp(22px, 3.2vw, 32px); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere;
}
.ps-preview-lead { margin: 0 0 26px; max-width: 640px; color: rgba(236, 233, 225, .78); font-size: 15.5px; line-height: 1.6; }
.ps-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ps-preview-item { display: flex; align-items: flex-start; gap: 14px; }
.ps-preview-ic {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient-gold, linear-gradient(135deg, #b8924a, #e6c877, #b8924a));
  color: #2a2208; font-size: 18px;
}
.ps-preview-tx { display: flex; flex-direction: column; gap: 3px; }
.ps-preview-tx strong { color: #fff; font-size: 15.5px; font-weight: 700; }
.ps-preview-tx span { color: rgba(236, 233, 225, .66); font-size: 13.5px; line-height: 1.5; }
.ps-preview--live .ps-preview-badge { background: rgba(6, 214, 160, .16); border-color: rgba(6, 214, 160, .45); color: #4ee0b6; }

/* ---- claim band ---- */
.ps-claim-band { margin-bottom: 24px; }
.ps-claim-band .ps-claim { margin-top: 0; }

/* ---- source note (cuối trang, nhỏ/nhạt) ---- */
.ps-source-note {
  font-size: 13px; color: var(--ps-muted);
  background: var(--ps-soft); border: 1px solid var(--ps-border);
  border-radius: 8px; padding: 8px 12px;
  display: inline-flex; gap: 8px; align-items: flex-start;
}
.ps-source-note--foot { margin-top: 8px; }

/* ---- responsive ---- */
@media (max-width: 560px) {
  .ps-wrap { padding-top: 80px; }
  .ps-filter { gap: 10px; }
  .ps-filter select { min-width: 120px; }
  .ps-share-label { flex-basis: 100%; }
  .ps-hero-overlay { padding: 18px; }
}

/* ============================================================
   EDIT (nút bút chì) + SEED (khu "mồi" rỗng) + MODAL liên hệ.
   Thêm vào trang detail; tái dùng token ps-* / :root sẵn có.
   ============================================================ */

/* ---- nút bút chì ✏️ (tinh tế, hover rõ) ---- */
.ps-edit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 auto;
  padding: 0; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--ps-border);
  background: var(--ps-surface); color: var(--ps-muted);
  font-size: 13px; line-height: 1;
  transition: color .15s, border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.ps-edit-btn:hover {
  color: #fff; background: var(--ps-primary); border-color: var(--ps-primary);
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(67, 97, 238, .28);
}
.ps-edit-btn:focus-visible { outline: 2px solid var(--ps-primary); outline-offset: 2px; }

/* nút inline cạnh fact / heading: nhỏ hơn, đẩy về cuối hàng */
.ps-edit-btn--inline { width: 28px; height: 28px; margin-left: auto; }
.ps-fact--fee { position: relative; }
.ps-fact--fee .ps-edit-btn--inline { align-self: center; }

/* nút trên ảnh hero (góc trên phải) */
.ps-edit-btn--hero {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 36px; height: 36px; font-size: 14px;
  background: rgba(255, 255, 255, .92); color: #1a1a24; border-color: rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ps-edit-btn--hero:hover { background: var(--ps-primary); color: #fff; border-color: var(--ps-primary); }

/* nút cạnh tiêu đề trên nền tối (hero title) */
.ps-edit-btn--ondark {
  width: 30px; height: 30px; font-size: 13px; vertical-align: middle;
  background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .4);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ps-edit-btn--ondark:hover { background: #fff; color: var(--ps-primary); border-color: #fff; }

/* heading có hàng nút */
.ps-sec-head--row { display: flex; align-items: center; gap: 12px; }
.ps-sec-head--row h2 { margin: 0; }
.ps-sec-head--row .ps-edit-btn { margin-left: auto; }

/* ============================================================
   HỒ SƠ TRƯỜNG — mỗi mục dựng đúng khung trình bày THẬT; trường
   chưa nhập → skeleton trung thực (bóng mờ shimmer), KHÔNG bịa data.
   Nền trắng (--ps-surface) để hết "trùng nền" như bản menu cũ.
   ============================================================ */

/* ---- skeleton primitive (shimmer) ---- */
.ps-sk { position: relative; overflow: hidden; background: #e9e5db; border-radius: 7px; }
.ps-sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: psShimmer 1.6s infinite;
}
@keyframes psShimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ps-sk::after { animation: none; } }
[data-theme="dark"] .ps-sk { background: #2a2e3c; }
[data-theme="dark"] .ps-sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); }
.ps-sk-line { display: block; height: 13px; border-radius: 6px; }
.ps-sk-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; }
.ps-sk-ic--sm { width: 28px; height: 28px; border-radius: 8px; }

/* ---- khung mỗi mục ---- */
.ps-prof {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--radius-lg, 24px);
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 16px;
}
.ps-prof-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ps-prof-head h2 { margin: 0; font-size: clamp(18px, 2.3vw, 22px); font-weight: 800; color: var(--ps-text); letter-spacing: -.01em; }
.ps-prof-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
  color: var(--ps-primary); background: rgba(67, 97, 238, .10);
}
.ps-prof-ic.t0 { color: var(--ps-primary); background: rgba(67, 97, 238, .12); }
.ps-prof-ic.t1 { color: #0a9b76; background: rgba(6, 214, 160, .14); }
.ps-prof-ic.t2 { color: #7209b7; background: rgba(114, 9, 183, .12); }
.ps-prof-ic.t3 { color: #d97706; background: rgba(245, 158, 11, .14); }
.ps-prof-ic.t4 { color: #0891b2; background: rgba(8, 145, 178, .12); }
.ps-prof-ic.t5 { color: #db2777; background: rgba(219, 39, 119, .12); }
[data-theme="dark"] .ps-prof-ic.t2 { color: #c98bef; }
[data-theme="dark"] .ps-prof-ic.t5 { color: #f472b6; }

/* giới thiệu (prose) */
.ps-prof-prose { display: flex; flex-direction: column; gap: 11px; }

/* chương trình (cards) */
.ps-prof-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.ps-prof-card { display: flex; flex-direction: column; gap: 9px; padding: 16px; border: 1px solid var(--ps-border); border-radius: 14px; background: var(--ps-soft); }

/* hình ảnh (gallery) */
.ps-prof-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.ps-prof-photo { aspect-ratio: 4 / 3; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.ps-prof-photo i { position: relative; z-index: 1; font-size: 24px; color: var(--ps-muted); opacity: .35; }

/* ảnh THẬT: phủ kín khung 4:3 (cover), canh giữa, hover nổi + nhãn zoom-in */
.ps-prof-photo--real {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  border: 1px solid var(--ps-border); box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  cursor: zoom-in; overflow: hidden; position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ps-prof-photo--real::after {
  content: "\f00e"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  color: #fff; background: rgba(15, 23, 42, .55); border-radius: 8px;
  opacity: 0; transform: scale(.85); transition: opacity .18s ease, transform .18s ease;
}
.ps-prof-photo--real:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.ps-prof-photo--real:hover::after { opacity: 1; transform: scale(1); }

/* cơ sở vật chất (feats) */
.ps-prof-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.ps-prof-feat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--ps-border); border-radius: 12px; background: var(--ps-soft); }
.ps-prof-feat .ps-sk-ic { width: 34px; height: 34px; }
.ps-prof-feat .ps-sk-line { flex: 1; height: 11px; }

/* đội ngũ GV (team) */
.ps-prof-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.ps-prof-member { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 18px 12px; border: 1px solid var(--ps-border); border-radius: 14px; background: var(--ps-soft); }
.ps-prof-avatar { width: 64px; height: 64px; border-radius: 50%; }

/* giờ & liên hệ (2 cột) */
.ps-prof-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ps-prof-col { display: flex; flex-direction: column; gap: 11px; padding: 16px 18px; border: 1px solid var(--ps-border); border-radius: 14px; background: var(--ps-soft); }
.ps-prof-coltitle { font-size: 13px; font-weight: 700; color: var(--ps-muted); }
.ps-prof-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ps-prof-row--ic { justify-content: flex-start; }

/* học phí chi tiết (table) */
.ps-prof-table { border: 1px solid var(--ps-border); border-radius: 14px; overflow: hidden; }
.ps-prof-trow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--ps-border); }
.ps-prof-trow:last-child { border-bottom: none; }
.ps-prof-thead { background: var(--ps-soft); font-size: 12.5px; font-weight: 700; color: var(--ps-muted); }

/* dòng "chưa cập nhật" + nút bổ sung */
.ps-prof-empty {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 15px; border-top: 1px dashed var(--ps-border);
  font-size: 13.5px; color: var(--ps-muted);
}
.ps-prof-empty > i { color: var(--ps-primary); font-size: 14px; }
.ps-prof-empty > span { flex: 1; min-width: 160px; }
.ps-edit-btn.ps-prof-cta {
  width: auto; height: auto; gap: 7px; padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ps-primary); white-space: nowrap;
}
.ps-edit-btn.ps-prof-cta:hover { color: #fff; }

/* ---- MODAL liên hệ ---- */
.ps-modal { position: fixed; inset: 0; z-index: 1100; display: none; }
.ps-modal.is-open { display: block; }
body.ps-modal-lock { overflow: hidden; }
.ps-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(17, 17, 26, .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  animation: psFade .18s ease;
}
.ps-modal-box {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow-y: auto;
  margin: 7vh auto 0;
  background: var(--ps-surface, #fff);
  border: 1px solid var(--ps-border, #e7e3da);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(17, 17, 26, .32);
  padding: 22px 22px 20px;
  animation: psPop .2s ease;
}
@keyframes psFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes psPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ps-modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.ps-modal-title { margin: 0; flex: 1; font-size: 19px; font-weight: 800; color: var(--ps-text); display: inline-flex; align-items: center; gap: 9px; }
.ps-modal-title i { color: var(--ps-primary); }
.ps-modal-x {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--ps-border); background: var(--ps-soft); color: var(--ps-muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  transition: color .15s, background .15s, border-color .15s;
}
.ps-modal-x:hover { color: #fff; background: #ef476f; border-color: #ef476f; }
.ps-modal-sub { margin: 0 0 16px; color: var(--ps-muted); font-size: 13.5px; line-height: 1.55; }
.ps-modal-form { display: flex; flex-direction: column; gap: 12px; }
.ps-modal-label { font-size: 12.5px; font-weight: 600; color: var(--ps-muted); }
.ps-req { color: #ef476f; }
.ps-modal-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ps-modal-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 180px; }
.ps-modal-form input,
.ps-modal-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--ps-border);
  border-radius: 9px;
  background: var(--ps-surface);
  color: var(--ps-text);
  font-size: 14px; font-family: inherit; width: 100%;
}
.ps-modal-form textarea { resize: vertical; min-height: 64px; }
.ps-modal-form input:focus,
.ps-modal-form textarea:focus { outline: none; border-color: var(--ps-primary); box-shadow: 0 0 0 3px rgba(67, 97, 238, .14); }
.ps-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.ps-modal-send { align-self: flex-start; }
.ps-modal-cancel {
  background: var(--ps-soft); border: 1px solid var(--ps-border); color: var(--ps-text);
}
.ps-modal-cancel:hover { border-color: var(--ps-primary); color: var(--ps-primary); }
.ps-modal-msg { font-size: 13.5px; min-height: 18px; }
.ps-modal-msg.ok { color: #0a9b76; }
.ps-modal-msg.err { color: #ef476f; }
[data-theme="dark"] .ps-modal-msg.ok { color: #4ee0b6; }

/* ---- dark mode ---- */
[data-theme="dark"] .ps-edit-btn--hero { background: rgba(40, 42, 54, .9); color: #e8e9f0; border-color: rgba(255, 255, 255, .2); }
[data-theme="dark"] .ps-edit-btn--hero:hover { background: var(--ps-primary); color: #fff; border-color: var(--ps-primary); }
[data-theme="dark"] .ps-modal-backdrop { background: rgba(0, 0, 0, .66); }
[data-theme="dark"] .ps-modal-box { box-shadow: 0 24px 64px rgba(0, 0, 0, .55); }
[data-theme="dark"] .ps-cta-btn { box-shadow: 0 14px 32px rgba(17, 24, 39, .32); }
[data-theme="dark"] .ps-cta-btn:hover { box-shadow: 0 18px 38px rgba(17, 24, 39, .40); }
[data-theme="dark"] .ps-cta-icon { background: rgba(255, 255, 255, .12); }

/* ---- responsive modal ---- */
@media (max-width: 560px) {
  .ps-modal-box { margin: 4vh auto 0; padding: 18px 16px 16px; }
  .ps-modal-row { gap: 10px; }
  .ps-modal-actions .btn { flex: 1 1 auto; justify-content: center; }
  .ps-cta-btn { width: 100%; justify-content: center; }
  .ps-cta-text { align-items: flex-start; }
}

/* ============================================================
   LIGHTBOX gallery — phóng ảnh full màn, prev/next/phím/vuốt.
   ============================================================ */
.ps-lb { position: fixed; inset: 0; z-index: 1300; display: none;
  align-items: center; justify-content: center; background: rgba(8, 10, 18, .92);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .22s ease; }
.ps-lb.is-open { display: flex; opacity: 1; }
.ps-lb-img { max-width: 92vw; max-height: 86vh; border-radius: 12px; object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55); transform: scale(.96); transition: transform .22s ease;
  background: #0b0d16; }
.ps-lb.is-open .ps-lb-img { transform: scale(1); }
.ps-lb-btn { position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s, transform .15s; }
.ps-lb-btn:hover { background: rgba(255, 255, 255, .24); }
.ps-lb-prev { left: max(14px, 3vw); }
.ps-lb-next { right: max(14px, 3vw); }
.ps-lb-close { position: absolute; top: max(14px, 2.5vh); right: max(14px, 3vw);
  width: 46px; height: 46px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.ps-lb-close:hover { background: rgba(255, 255, 255, .24); }
.ps-lb-count { position: absolute; bottom: max(16px, 3vh); left: 50%; transform: translateX(-50%);
  padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .02em; }
@media (max-width: 560px) { .ps-lb-btn { width: 42px; height: 42px; font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .ps-lb, .ps-lb-img { transition: none; } }

/* ============================================================
   STICKY CTA "Nhận trang" — chỉ mobile, nổi đáy, cuộn tới form.
   ============================================================ */
.ps-sticky-cta { position: fixed; left: 50%; transform: translateX(-50%) translateY(140%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 1150; width: min(440px, 92vw);
  display: none; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 18px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--gradient-primary, linear-gradient(135deg, #4361ee, #7209b7)); color: #fff;
  font-size: 15px; font-weight: 800; box-shadow: 0 12px 30px rgba(67, 97, 238, .42);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; }
.ps-sticky-cta.is-show { transform: translateX(-50%) translateY(0); }
.ps-sticky-cta i { font-size: 16px; }
@media (max-width: 768px) { .ps-sticky-cta { display: flex; } }
@media (prefers-reduced-motion: reduce) { .ps-sticky-cta { transition: opacity .2s ease; } }
