/* ============================================================================
   PUBLIC.CSS — khung chung cho các trang công khai không có sidebar (blog, 404…):
   reset nhẹ, nút, thanh điều hướng cố định và chân trang. Dùng cùng academic.css.
   ========================================================================== */
/* Font Be Vietnam Pro đã được nạp và gán cho --serif-display/--serif-body trong academic.css. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); overflow-x: hidden; font-family: var(--serif-body); }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1140px, 92vw); margin: 0 auto; }
h1, h2, h3, h4 { font-family: var(--serif-display); font-weight: 700; letter-spacing: -.015em; color: var(--ink); }

.btn-solid, .btn-ghost { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.02rem; padding: 14px 24px; border-radius: var(--r); border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s, color .15s; cursor: pointer; font-family: var(--serif-body); }
.btn-solid { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-solid:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn-ghost { background: var(--paper-raised); color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--blue-tint); border-color: #bcd0f7; color: var(--blue-deep); transform: translateY(-1px); }

/* ---------- NAV ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 18px 0; border-bottom: 1px solid transparent; transition: background .3s, box-shadow .3s, padding .3s, border-color .3s; }
.nav.scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom-color: var(--rule); padding: 11px 0; }
/* Trang chủ để nav trong suốt trên ảnh hero — phủ một lớp nền nhạt mờ dần để chữ luôn đọc được. */
.nav:not(.scrolled):not(.solid)::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(244,247,251,.95) 0%, rgba(244,247,251,.82) 52%, rgba(244,247,251,0) 100%); }
.nav .wrap { position: relative; }
.nav .wrap { display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 46px; height: 46px; }
.brand .t { font-family: var(--serif-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; color: var(--ink); display: block; line-height: 1.05; white-space: nowrap; }
.brand .k { font-size: .78rem; font-weight: 500; color: var(--ink-faint); display: block; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-links a { font-size: .94rem; color: var(--ink-soft); text-decoration: none; position: relative; padding: 4px 0; white-space: nowrap; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0; background: var(--blue); transition: width .25s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--blue); }
.nav-links a[aria-current]::after, .nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.btn-ink { font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--ink-soft); padding: 9px 6px; white-space: nowrap; }
.btn-ink:hover { color: var(--blue); }
.btn-seal { font-weight: 600; font-size: .95rem; text-decoration: none; background: var(--blue); color: #fff; border: 1px solid var(--blue); padding: 10px 20px; border-radius: 999px; white-space: nowrap; transition: all .2s; }
.btn-seal:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--sh-2); }
.nav-burger { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 4px; }
.mobile-menu { display: none; }
/* Trang công khai không có hero -> nav trắng mờ ngay từ đầu */
.nav.solid { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom-color: var(--rule); }

/* ---------- FOOTER ---------- */
.foot { background: var(--spine); color: var(--parchment-dim); padding: 56px 0 28px; }
.foot .top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.12); }
.foot .brand .t { color: var(--parchment); }
.foot .brand .k { color: var(--parchment-dim); }
.foot .blurb { font-size: .95rem; line-height: 1.7; margin-top: 16px; max-width: 34ch; }
.foot h4 { font-family: var(--serif-display); font-weight: 600; font-size: .95rem; color: var(--parchment); margin-bottom: 14px; }
.foot ul { list-style: none; }
.foot li { margin-bottom: 10px; }
.foot a:not(.brand) { color: var(--parchment-dim); text-decoration: none; }
.foot a:not(.brand):hover { color: var(--parchment); }
.foot .bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: .85rem; }
.foot .credit a { color: #93c5fd; text-decoration: none; font-weight: 600; }
.foot .credit a:hover { color: #fff; text-decoration: underline; }

/* Màn hình vừa (thêm mục "Học liệu"): thu khoảng cách, chữ nhỏ lại một chút để không chèn lên tên thương hiệu */
@media (max-width: 1400px) {
  .nav .wrap { gap: 18px; }
  .nav-links { gap: 15px; }
  .nav-links a { font-size: .9rem; }
  .nav-cta { gap: 10px; }
}
@media (max-width: 1260px) {
  .nav .wrap { gap: 14px; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; margin-left: auto; }
  .mobile-menu { display: block; max-height: 0; overflow: hidden; background: var(--paper-raised); transition: max-height .35s ease; }
  .mobile-menu.open { max-height: 480px; box-shadow: var(--sh-2); border-bottom: 1px solid var(--rule-strong); }
  .mobile-menu a { display: block; padding: 15px 6vw; font-size: 1.02rem; color: var(--ink); text-decoration: none; border-top: 1px solid var(--rule); }
  .mm-auth { display: flex; gap: 12px; padding: 16px 6vw 20px; border-top: 1px solid var(--rule); }
  .mm-auth a { flex: 1; text-align: center; padding: 12px; border-radius: var(--r); border: 0; }
  .mm-auth .mm-login { border: 1px solid var(--rule-strong); color: var(--blue); }
  .mm-auth .mm-reg { background: var(--blue); color: #fff; }
  .nav.scrolled, .nav.solid { background: rgba(255,255,255,.96); }
}
@media (max-width: 860px) {
  .foot .top { grid-template-columns: 1fr 1fr; }
  .foot .brand-col { grid-column: 1 / -1; }
}
@media (max-width: 540px) { .brand .k { display: none; } }

/* ---------- Khối dùng chung cho trang công khai ---------- */
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.15; }
.sec-head p { margin-top: 12px; font-size: 1.08rem; line-height: 1.65; color: var(--ink-soft); max-width: 56ch; }
.sec-head .more { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 600; color: var(--blue); text-decoration: none; }
.sec-head .more:hover { text-decoration: underline; }
/* Hoạ tiết sao lấp lánh (tên class giữ là .contour); trên nền đậm dùng filter invert để sao thành trắng */
.contour {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='220' viewBox='0 0 320 220'%3E%3Cg fill='%231a56db'%3E%3Ccircle cx='209.6' cy='67.1' r='1.11' opacity='1.00'/%3E%3Ccircle cx='217.4' cy='148.1' r='0.62' opacity='0.92'/%3E%3Ccircle cx='226.3' cy='182.1' r='1.35' opacity='0.57'/%3E%3Ccircle cx='254.0' cy='42.3' r='1.01' opacity='0.50'/%3E%3Ccircle cx='66.9' cy='173.3' r='1.73' opacity='0.90'/%3E%3Ccircle cx='35.6' cy='103.5' r='1.33' opacity='0.59'/%3E%3Ccircle cx='89.4' cy='81.0' r='1.89' opacity='0.92'/%3E%3Ccircle cx='134.2' cy='94.3' r='1.57' opacity='0.46'/%3E%3Ccircle cx='50.7' cy='69.9' r='0.74' opacity='0.68'/%3E%3Ccircle cx='311.4' cy='102.9' r='1.39' opacity='0.50'/%3E%3Ccircle cx='139.5' cy='192.2' r='1.57' opacity='0.55'/%3E%3Ccircle cx='171.5' cy='186.2' r='1.26' opacity='0.42'/%3E%3Ccircle cx='188.6' cy='20.3' r='1.23' opacity='0.61'/%3E%3Ccircle cx='223.9' cy='55.9' r='0.74' opacity='0.61'/%3E%3Ccircle cx='133.8' cy='207.7' r='0.79' opacity='0.36'/%3E%3Ccircle cx='80.6' cy='29.2' r='1.18' opacity='0.35'/%3E%3Ccircle cx='91.6' cy='61.7' r='0.78' opacity='0.49'/%3E%3Ccircle cx='257.1' cy='105.5' r='0.94' opacity='0.90'/%3E%3Ccircle cx='196.3' cy='153.9' r='0.60' opacity='0.71'/%3E%3Ccircle cx='143.6' cy='112.4' r='1.17' opacity='0.54'/%3E%3Ccircle cx='156.2' cy='209.9' r='0.63' opacity='0.69'/%3E%3Ccircle cx='290.0' cy='134.1' r='0.60' opacity='0.77'/%3E%3Ccircle cx='207.7' cy='87.8' r='1.53' opacity='0.80'/%3E%3Ccircle cx='90.5' cy='174.4' r='2.18' opacity='0.67'/%3E%3Ccircle cx='60.9' cy='125.2' r='1.19' opacity='0.91'/%3E%3Ccircle cx='183.1' cy='152.5' r='0.60' opacity='0.96'/%3E%3Ccircle cx='28.0' cy='53.5' r='0.82' opacity='0.87'/%3E%3Ccircle cx='99.1' cy='189.4' r='0.64' opacity='0.87'/%3E%3Ccircle cx='130.9' cy='94.6' r='0.60' opacity='0.56'/%3E%3Ccircle cx='226.7' cy='181.8' r='1.50' opacity='1.00'/%3E%3Ccircle cx='189.3' cy='189.2' r='0.68' opacity='0.35'/%3E%3Ccircle cx='81.3' cy='116.3' r='1.14' opacity='0.80'/%3E%3Ccircle cx='215.0' cy='107.4' r='1.16' opacity='0.95'/%3E%3Ccircle cx='218.3' cy='28.7' r='0.99' opacity='0.49'/%3E%3Cpath d='M52 39C53.05 44.95 53.05 44.95 59 46C53.05 47.05 53.05 47.05 52 53C50.95 47.05 50.95 47.05 45 46C50.95 44.95 50.95 44.95 52 39Z'/%3E%3Cpath d='M232 119C233.35 126.65 233.35 126.65 241 128C233.35 129.35 233.35 129.35 232 137C230.65 129.35 230.65 129.35 223 128C230.65 126.65 230.65 126.65 232 119Z'/%3E%3Cpath d='M150 183C150.75 187.25 150.75 187.25 155 188C150.75 188.75 150.75 188.75 150 193C149.25 188.75 149.25 188.75 145 188C149.25 187.25 149.25 187.25 150 183Z'/%3E%3Cpath d='M286 31.5C286.675 35.325 286.675 35.325 290.5 36C286.675 36.675 286.675 36.675 286 40.5C285.325 36.675 285.325 36.675 281.5 36C285.325 35.325 285.325 35.325 286 31.5Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 320px 220px;
}

/* Đầu trang con: đường dẫn + tiêu đề + dẫn nhập */
.page-head { padding: 124px 0 30px; }
.page-head .crumbs { font-size: .9rem; color: var(--ink-faint); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .crumbs a { color: var(--ink-soft); text-decoration: none; }
.page-head .crumbs a:hover { color: var(--blue); }
.page-head h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.12; max-width: 18ch; text-wrap: balance; }
.page-head .lead { margin-top: 16px; font-size: 1.12rem; line-height: 1.65; color: var(--ink-soft); max-width: 58ch; }
.page-head .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Khối kêu gọi cuối trang */
.closing { padding: 80px 0 100px; text-align: center; }
.closing h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.closing p { margin: 12px auto 26px; color: var(--ink-soft); max-width: 50ch; font-size: 1.08rem; line-height: 1.65; }
.closing .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Hiện dần khi cuộn (chỉ những khối được đánh dấu data-rv) */
.js [data-rv] { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js [data-rv="left"] { transform: translateX(-30px); }
.js [data-rv="right"] { transform: translateX(30px); }
.js [data-rv="clip"] { opacity: 1; transform: none; position: relative; transition: none; }
.js [data-rv="clip"]::after { content: ""; position: absolute; inset: 0; background: var(--paper); border-radius: var(--r-lg); transform-origin: right center; transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.js [data-rv="clip"].in::after { transform: scaleX(0); }
.js [data-rv].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-rv] { opacity: 1; transform: none; transition: none; }
  .js [data-rv="clip"]::after { display: none; }
  html { scroll-behavior: auto; }
}

