/* tastemaker: surface=institutional-portal (ตามแบบ rayongwit.ac.th ที่ลูกค้าขอ) · mood=formal/trust
   macro=Entry splash (/) → boxed portal (/home): logo row → blue icon navbar → boxed poster slider → 3-col (ผู้บริหาร | ประกาศ | คำขวัญ) → news list → newsletter cards → programs → activity cards → faq → slim footer
   palette: crest navy #24308a (navbar/buttons) · lotus #c2187a (small accents) · white + #f4f6fa · type: Anuphan 400/500/600/700
   contrast: ink/white 15.1 · muted/white 6.4 · white/navy 10.9 · white/lotus 5.9 */

:root {
  --blue: #24308a;
  --blue-800: #1b2570;
  --blue-950: #0e1647;
  --blue-50: #eef1fb;
  --lotus: #c2187a;
  --lotus-600: #a8136a;
  --ink: #1b2131;
  --muted: #545c70;
  --line: #e2e6ee;
  --soft: #f4f6fa;
  --paper: #ffffff;
  --font: 'Anuphan', 'Noto Sans Thai', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --r: 6px;
  --gutter: clamp(16px, 3vw, 32px);
  --sec: clamp(36px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--paper); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { line-height: 1.45; margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; flex: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--lotus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 4px; border: 1.5px solid transparent; background: var(--blue); color: #fff; font-weight: 500; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--blue-800); }
.btn-lotus { background: var(--lotus); }
.btn-lotus:hover { background: var(--lotus-600); }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { background: var(--blue-50); }
.btn-ghost, .btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover, .btn-outline:hover { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn:disabled { opacity: .6; cursor: progress; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--blue); text-decoration: none; min-height: 44px; }
.link-more svg { width: 16px; height: 16px; }
.link-more:hover { text-decoration: underline; }
.more-row { display: flex; justify-content: center; margin-top: 28px; }

/* ลายสามเหลี่ยมจากตรา (ใช้ในแถบหัวหน้าข่าวและป้ายประกาศ) */
.tri { position: absolute; pointer-events: none; width: 340px; height: auto; }
.tri path { fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ---------- หัวเว็บ: แถบตรา + แถบเมนูน้ำเงิน ---------- */
.site-header { background: #fff; }
.head-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 92px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--blue); min-width: 0; }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.4; }
.brand-name { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; color: var(--blue); margin: 0; line-height: 1.4; }
.brand-text small {
  margin-top: 4px; padding: 1px 12px; border-radius: 999px; background: var(--lotus); color: #fff; white-space: nowrap;
  font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.6;
}
@media (max-width: 480px) { .brand-text small { letter-spacing: .02em; padding: 0 10px; } .head-phone { display: none; } }
.head-contact { display: flex; align-items: center; gap: 14px; }
.head-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; min-height: 44px; }
.head-phone svg { color: var(--blue); }
.head-social { display: inline-flex; gap: 6px; }
.head-social a { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.head-social a:hover { background: var(--blue-800); }
.head-social svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .head-top { min-height: 76px; }
  .brand img { width: 52px; height: 52px; }
  .head-phone span { display: none; }
  .head-phone { width: 44px; justify-content: center; }
}
@media (max-width: 400px) { .brand-name { font-size: 19px; } .brand { gap: 10px; } }

.navbar { position: sticky; top: 0; z-index: 50; background: #fff; transition: box-shadow .2s var(--ease); }
.navbar.scrolled { box-shadow: 0 6px 18px -12px rgba(14, 22, 71, .45); }
.navbar .wrap { background: var(--blue); display: flex; align-items: stretch; }
.site-nav { display: flex; align-items: stretch; flex-wrap: wrap; }
.nav-link, .nav-group > button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 52px; padding: 0 14px; border: 0; background: none;
  color: #fff; font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease);
}
.nav-link svg, .nav-group > button svg { width: 18px; height: 18px; }
.nav-group > button svg:last-child { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.nav-link:hover, .nav-group > button:hover, .nav-group:hover > button { background: rgba(255, 255, 255, .12); }
.nav-link.is-current, .nav-group.is-current > button { background: var(--blue-800); box-shadow: inset 0 -3px 0 var(--lotus); }
.nav-group { position: relative; display: flex; }
.nav-sub {
  position: absolute; top: 100%; left: 0; min-width: 250px; width: max-content; max-width: 340px; padding: 6px; background: #fff; border: 1px solid var(--line);
  border-top: 3px solid var(--lotus); box-shadow: 0 18px 36px -18px rgba(14, 22, 71, .4); display: none; z-index: 5;
}
.nav-sub a { display: block; padding: 10px 14px; color: var(--ink); text-decoration: none; font-size: 16px; border-radius: 4px; }
.nav-sub a:hover, .nav-sub a[aria-current] { background: var(--blue-50); color: var(--blue); }
.nav-sub a[aria-current] { font-weight: 600; }
.nav-group > button[aria-expanded="true"] + .nav-sub { display: block; }
.nav-group > button[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  /* เมนูย่อยชิดใต้ปุ่มพอดี และค้างไว้ครู่หนึ่งตอนเมาส์ออก เลื่อนลงมาเลือกได้ไม่หาย */
  .nav-sub::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
  .nav-sub { display: block; visibility: hidden; opacity: 0; transform: translateY(-4px);
    transition: opacity .15s var(--ease) .2s, transform .15s var(--ease) .2s, visibility 0s linear .35s; }
  .nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub,
  .nav-group > button[aria-expanded="true"] + .nav-sub { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
}

/* เมนูชั้นที่ 3 — เปิดด้านข้างของกล่องเมนูย่อย */
.nav-sub-group { position: relative; display: flex; align-items: stretch; }
.nav-sub-group > a { flex: 1; }
.nav-sub-group.is-current > a { color: var(--blue); }
.sub2-toggle { flex: 0 0 36px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 4px; cursor: pointer; }
.sub2-toggle svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.sub2-toggle:hover { background: var(--blue-50); color: var(--blue); }
.nav-sub2 {
  position: absolute; left: 100%; top: -7px; min-width: 260px; padding: 6px; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--lotus); box-shadow: 0 18px 36px -18px rgba(14, 22, 71, .4); display: none; z-index: 6;
}
.sub2-toggle[aria-expanded="true"] + .nav-sub2 { display: block; }
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .nav-sub2::before { content: ''; position: absolute; top: 0; bottom: 0; left: -12px; width: 12px; }
  .nav-sub-group:hover > .nav-sub2, .nav-sub-group:focus-within > .nav-sub2 { display: block; }
  .nav-sub-group:hover > .sub2-toggle { color: var(--blue); }
}
@media (min-width: 901px) {
  .nav-link, .nav-group > button { padding: 0 10px; gap: 5px; font-size: 15.5px; }
  .nav-group > button svg:last-child { width: 13px; height: 13px; margin-left: -1px; }
  .nav-home { padding: 0 14px; }
  .nav-home span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-group:nth-last-child(-n+2) > .nav-sub { left: auto; right: 0; }
}

/* จอคอมที่ไม่เต็มจอ (901–1240px): เมนูยังเป็นแถบเดิม แค่ซ่อนไอคอนและบีบระยะ — ยังไม่พอค่อยขึ้นสองบรรทัด ไม่ย่อเป็นปุ่มเมนู */
@media (min-width: 901px) and (max-width: 1240px) {
  .navbar .wrap { width: 100%; max-width: calc(100% - var(--gutter) * 2); }
  .site-nav { justify-content: center; width: 100%; }
  .nav-link, .nav-group > button { padding: 0 9px; gap: 4px; font-size: 15px; min-height: 48px; }
  .nav-link:not(.nav-home) > svg:first-child, .nav-group > button > svg:first-child { display: none; }
  .nav-group:nth-last-child(-n+3) > .nav-sub { left: auto; right: 0; }
}
@media (min-width: 901px) and (max-width: 1010px) {
  .nav-link, .nav-group > button { padding: 0 7px; font-size: 14.5px; }
  .nav-group > button svg:last-child { display: none; }
}

.nav-toggle {
  display: none; width: 100%; min-height: 52px; padding: 0 4px; border: 0; background: none; color: #fff; cursor: pointer;
  align-items: center; gap: 10px; font-weight: 600; font-size: 17px;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle svg:nth-child(2) { display: none; }
@media (max-width: 900px) {
  .navbar .wrap { flex-direction: column; width: 100%; padding-inline: var(--gutter); }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; flex-direction: column; flex-wrap: nowrap; padding-bottom: 10px; max-height: calc(100vh - 140px); overflow-y: auto; }
  body.nav-open .site-nav { display: flex; }
  body.nav-open .nav-toggle svg:first-child { display: none; }
  body.nav-open .nav-toggle svg:nth-child(2) { display: block; }
  .nav-link, .nav-group > button { width: 100%; justify-content: flex-start; padding: 0 8px; border-top: 1px solid rgba(255, 255, 255, .14); }
  .nav-group { flex-direction: column; }
  .nav-group > button svg:last-child { margin-left: auto; }
  .nav-link.is-current, .nav-group.is-current > button { box-shadow: inset 3px 0 0 var(--lotus); }
  .nav-sub { position: static; box-shadow: none; border: 0; background: var(--blue-800); padding: 4px 0 8px 34px; min-width: 0; width: auto; max-width: none; }
  .nav-sub a { color: #fff; padding: 12px 8px; }
  .nav-sub a:hover, .nav-sub a[aria-current] { background: rgba(255, 255, 255, .1); color: #fff; }
  .nav-sub-group { flex-wrap: wrap; }
  .nav-sub-group.is-current > a { color: #fff; font-weight: 600; }
  .sub2-toggle { flex-basis: 44px; min-height: 44px; color: #fff; }
  .sub2-toggle svg { transform: rotate(90deg); }
  .sub2-toggle[aria-expanded="true"] svg { transform: rotate(-90deg); }
  .sub2-toggle:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .nav-sub2 { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 6px 16px; background: none; border: 0; border-left: 2px solid rgba(255, 255, 255, .2); box-shadow: none; }
}

/* ---------- แบนเนอร์: กล่องกลางจอ ---------- */
.hero { padding-top: 0; }
.hero-box { position: relative; overflow: hidden; background: var(--soft); }
.hero-track, .board-track { display: flex; height: 100%; transition: transform .6s var(--ease); will-change: transform; }
.hero-slide, .poster-slide { position: relative; flex: 0 0 100%; height: 100%; margin: 0; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero-full .hero-box { max-height: 560px; }
.hero-full .hero-body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 56px clamp(16px, 4vw, 48px) 32px; color: #fff;
  background: linear-gradient(0deg, rgba(14, 22, 71, .82), rgba(14, 22, 71, 0));
}
.hero-title { font-size: clamp(24px, 3.4vw, 40px); color: #fff; margin: 0 0 6px; font-weight: 600; }
.hero-sub { color: #e6eaff; font-size: clamp(15px, 1.4vw, 18px); max-width: 42em; margin-bottom: 14px; }

.hero-compact { padding-top: 20px; }
.hero-compact .hero-box { height: clamp(170px, 24vw, 240px); }
.hero-compact .hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 22, 71, .9) 0%, rgba(14, 22, 71, .65) 55%, rgba(14, 22, 71, .35) 100%); }
.hero-compact .hero-body { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 20px clamp(16px, 4vw, 40px); }
.hero-compact .hero-title { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 2px; }
.hero-compact .hero-sub { margin-bottom: 0; font-size: 16px; }
.hero-compact .btn { align-self: flex-start; margin-top: 12px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; color: #cfd6f5; margin-bottom: 6px; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.sl-side {
  position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .85); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35); transition: background-color .15s var(--ease);
}
.sl-side:hover { background: #fff; }
.sl-prev { left: 10px; }
.sl-next { right: 10px; }
.sl-dots { display: flex; justify-content: center; }
.sl-dots button { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.sl-dots button::before { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; margin: -5.5px; border-radius: 50%; border: 1.5px solid #8a91a6; background: #fff; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.sl-dots button[aria-current="true"]::before { background: var(--blue); border-color: var(--blue); }
.sl-dots-under { margin-top: 4px; }

/* ---------- หัวข้อแต่ละส่วน (แบบเว็บโรงเรียน: ข้อความ + เส้นใต้ยาว) ---------- */
.sec { padding-block: var(--sec); position: relative; }
.sec-head { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sec-head::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 56px; height: 3px; background: var(--blue); border-radius: 2px; }
.sec-head h2 { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(22px, 2.4vw, 28px); }
.sec-head h2 svg { width: 26px; height: 26px; color: var(--blue); }
.sec-head p { color: var(--muted); max-width: 46em; font-size: 16px; margin: 0; flex: 1 1 100%; }
.sec-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue); text-decoration: none; min-height: 44px; }
.sec-more svg { width: 16px; height: 16px; }

/* ---------- แถว 3 คอลัมน์หน้าแรก: ผู้บริหาร | ป้ายประกาศ | คำขวัญ ---------- */
.sec-portal { padding-top: 28px; }
.portal-row { display: grid; gap: 28px; align-items: start; }
.portal-3 { grid-template-columns: minmax(0, 250px) minmax(0, 1fr) minmax(0, 290px); }
.portal-2 { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
@media (max-width: 1000px) { .portal-3 { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); } .portal-3 .slot-motto { grid-column: 1 / -1; } }
@media (max-width: 680px) { .portal-3, .portal-2 { grid-template-columns: 1fr; } }
.slot-title { font-size: 20px; color: var(--blue); text-align: center; margin-bottom: 10px; }
.leader { margin: 0 auto; text-align: center; max-width: 260px; }
.leader-pic img { width: 100%; max-width: 100px; margin-inline: auto; box-shadow: 0 10px 24px -16px rgba(14, 22, 71, .6); }
.leader figcaption { padding-top: 8px; }
.leader b { display: block; font-size: 16px; font-weight: 600; line-height: 1.4; }
.leader span { display: block; color: var(--muted); font-size: 13.5px; }
.leader p { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
/* รองผู้อำนวยการ: รายการรูปเล็กใต้ ผอ. */
.dep-list { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dep-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.dep-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 9px; align-items: center; padding: 3px 8px 3px 3px; border-radius: 8px; background: var(--soft); text-align: left; }
.dep-pic { display: grid; place-items: end center; width: 32px; height: 42px; overflow: hidden; border-radius: 6px; background: #e9edf5; color: #c5ccdc; }
.dep-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.dep-pic svg { width: 26px; height: 26px; stroke-width: 1.2; }
.dep-text b { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep-text small { display: block; font-size: 12px; line-height: 1.3; color: var(--blue); margin-top: 1px; }
@media (max-width: 680px) { .dep-list { max-width: 420px; margin-inline: auto; } .dep-list ul { grid-template-columns: 1fr 1fr; } }
.poster-box { position: relative; overflow: hidden; background: var(--soft); box-shadow: 0 10px 28px -18px rgba(14, 22, 71, .55); }
.poster-slide > a { display: block; width: 100%; height: 100%; }
.poster-slide img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.poster-slide { overflow: hidden; }
.poster-slide > a { position: relative; overflow: hidden; }
/* พื้นหลังเบลอจากรูปเดียวกัน เติมที่ว่างเมื่อโปสเตอร์สัดส่วนไม่เท่ากล่อง */
.poster-slide .poster-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(22px) saturate(1.1); transform: scale(1.15); opacity: .7; pointer-events: none; }
.slot-board { min-width: 0; }
.slot-board .poster-slide { display: flex; flex-direction: column; height: auto; }
.slot-board .poster-slide > a { height: auto; background: var(--soft); overflow: hidden; }
.slot-board .poster-slide img { height: 100%; }
.slot-board .poster-box { container-type: inline-size; }
.slot-board .sl-side { top: calc(50cqw / var(--ar)); }
.slot-board figcaption { padding: 12px 14px 4px; background: #fff; }
.poster-title { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.slot-board figcaption p { font-size: 14px; color: var(--muted); margin: 4px 0 0; line-height: 1.6; }
.slot-motto { text-align: center; }
.slot-motto .prose h3 { font-size: 20px; color: var(--ink); margin: 0 0 6px; }
.slot-motto .prose p { color: var(--muted); font-size: 16px; margin-bottom: 18px; }
.slot-motto .prose strong { color: var(--blue); }
.fb-box { margin: 4px auto 0; max-width: 500px; text-align: center; }
.fb-box iframe { display: block; width: 100%; height: 130px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fb-box a { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 15px; font-weight: 600; color: var(--blue); }
.fb-box a svg { width: 18px; height: 18px; }

/* ---------- รายการข่าวประชาสัมพันธ์ ---------- */
.newslist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.newslist li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 8px; border-radius: 4px; }
.newslist li:hover { background: var(--soft); }
.newslist-mark img { width: 52px; height: 52px; object-fit: contain; }
.newslist a { color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 500; line-height: 1.5; display: inline-block; }
.newslist a:hover { color: var(--blue); text-decoration: underline; }
.newslist time, .letter footer, .news-body time { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-top: 2px; }
.newslist time svg, .letter footer svg, .news-body time svg { width: 15px; height: 15px; }

/* ---------- การ์ดจดหมายข่าว ---------- */
.sec-letters { padding-top: 8px; }
.letters { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (max-width: 640px) { .letters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .letter-body { padding: 10px 12px; } .letter-body h3 { font-size: 15px; } .letter footer { padding: 8px 12px; } .letter:nth-child(3) { display: none; } }
.letter { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; background: #fff; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .letter:hover { transform: translateY(-3px); } }
.letter-pic { display: block; aspect-ratio: 5 / 7; overflow: hidden; background: var(--soft); }
.letter-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.letter-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.letter-body h3 { font-size: 17px; font-weight: 500; line-height: 1.5; }
.letter-body h3 a { color: var(--ink); text-decoration: none; }
.letter-body h3 a:hover { color: var(--blue); }
.letter-body .btn { align-self: flex-start; min-height: 44px; padding: 0 18px; }
.letter footer { border-top: 1px solid var(--line); padding: 10px 16px; margin: 0; }

/* ---------- การ์ดข่าว (หน้ารวมข่าว / ข่าวอื่นๆ) ---------- */
.news-grid { display: grid; gap: 20px; }
.news-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.news { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .news:hover { transform: translateY(-3px); } }
.news-pic { display: block; aspect-ratio: 4 / 3; background: var(--soft); padding: 12px; }
.news-pic img { width: 100%; height: 100%; object-fit: contain; }
.news-nopic { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #b7c0dc; }
.news-nopic .tri { position: static; width: 45%; }
.news-body { padding: 14px 16px 18px; }
.news-body h3 { font-size: 17px; font-weight: 500; line-height: 1.5; margin-top: 4px; }
.news-body h3 a { color: var(--ink); text-decoration: none; }
.news-body h3 a::after { content: ''; position: absolute; inset: 0; }
.news-body h3 a:hover { color: var(--blue); }
.news-body p { color: var(--muted); font-size: 15px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { color: var(--muted); text-align: center; padding: 48px 0; }

/* ---------- การ์ดภาพกิจกรรม (รูปคงสัดส่วนไฟล์จริง ไม่ครอป) ---------- */
.shots { display: grid; gap: 20px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (min-width: 480px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; } }
@media (min-width: 1024px) { .shots { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 28px 24px; } }
.shot { margin: 0; }
.shot a { display: block; overflow: hidden; }
.shot img, .shot video { width: 100%; transition: transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) { .shot a:hover img { transform: scale(1.03); } }
.shot figcaption { padding-top: 10px; font-size: 15px; color: var(--muted); line-height: 1.6; }
.shot figcaption b { display: block; color: var(--ink); font-weight: 500; font-size: 16px; }

/* ---------- หลักสูตร ---------- */
.programs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
@media (min-width: 480px) and (max-width: 767px) { .programs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.program { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .program:hover { transform: translateY(-3px); } }
.program-pic img { width: 100%; height: 100%; object-fit: cover; }
.program-mark { position: relative; height: 96px; background: var(--blue); color: rgba(255, 255, 255, .16); overflow: hidden; }
.program:nth-child(even) .program-mark { background: var(--blue-800); }
.program-mark .tri { width: 140px; right: -16px; top: -12px; }
.program-mark span { position: absolute; left: 20px; bottom: 12px; color: #fff; font-size: 28px; font-weight: 700; }
.program-mark span::after { content: ''; display: block; width: 26px; height: 3px; background: var(--lotus); border-radius: 2px; margin-top: 2px; }
@media (max-width: 767px) { .program-mark { height: 72px; } .program-mark span { font-size: 24px; bottom: 10px; } .program-mark .tri { width: 100px; } }
.program-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.program-cat { font-size: 14px; font-weight: 600; color: var(--lotus); }
.program-body h3, .program-body h4 { font-size: 19px; }
.program-body p { color: var(--muted); font-size: 15px; }
.program-body .btn { margin-top: auto; align-self: flex-start; }
.program-list { display: grid; gap: 12px; }
.program-list .program { flex-direction: row; }
.program-list .program-mark, .program-list .program-pic { width: 150px; height: auto; flex: none; }
.card-price { font-weight: 700; color: var(--blue); }
.card-price s { color: var(--muted); font-weight: 400; margin-left: 8px; }
.card-sold { color: var(--lotus); font-weight: 600; }

/* ---------- เกี่ยวกับ ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.about.pic-right .about-pic { order: 2; }
.about.no-pic { grid-template-columns: minmax(0, 46em); }
.about-pic { margin: 0 auto; width: fit-content; max-width: 100%; }
.about-pic a { display: block; }
.about-pic img { width: auto; max-width: 100%; max-height: 600px; box-shadow: 0 14px 34px -22px rgba(14, 22, 71, .6); }
.about-text h2 { font-size: clamp(24px, 2.8vw, 32px); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); position: relative; }
.about-text h2::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 56px; height: 3px; background: var(--blue); border-radius: 2px; }
.about-text .prose { color: var(--muted); margin-bottom: 22px; }
.about-text .prose p:first-child { font-size: clamp(18px, 1.8vw, 21px); color: var(--ink); font-weight: 500; line-height: 1.65; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about.pic-right .about-pic { order: 0; } }

/* ---------- อัตลักษณ์ ---------- */
.sec-pillars { background: var(--soft); }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .pillars { grid-template-columns: repeat(min(var(--cols), 4), minmax(0, 1fr)); gap: 20px; } }
.pillar { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px 20px; text-align: center; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .pillar:hover { transform: translateY(-3px); } }
.pillar-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.pillar-icon svg { width: 26px; height: 26px; }
.pillar-no { position: absolute; top: 14px; right: 16px; font-size: 14px; font-weight: 700; color: var(--lotus); }
.pillar h3 { font-size: 20px; margin-bottom: 6px; }
.pillar p { color: var(--muted); font-size: 15px; }
@media (max-width: 479px) { .pillar { padding: 18px 12px; } .pillar h3 { font-size: 17px; } .pillar p { font-size: 14px; } }

/* ---------- ทำเนียบบุคคล (หน้ารอง) ---------- */
.person { margin: 0; text-align: center; }
.person-pic { overflow: hidden; background: var(--soft); max-width: 260px; margin-inline: auto; }
.person-pic img { width: 100%; height: 100%; object-fit: cover; }
.person-name { display: block; font-size: 18px; color: var(--ink); line-height: 1.5; font-weight: 600; }
.person-role { display: block; color: var(--blue); font-weight: 500; font-size: 15px; margin-top: 2px; }
.person-text { color: var(--muted); font-size: 15px; margin-top: 8px; }
.person figcaption { padding-top: 12px; }
.person-lead { max-width: 340px; margin: 0 auto 8px; }
.person-lead .person-name { font-size: 22px; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .people { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; } }

/* ---------- ป้ายประกาศ (หน้ารอง) ---------- */
.board { padding-block: var(--sec); }
.board > .wrap { position: relative; overflow: hidden; background: var(--blue-950); color: #fff; padding: clamp(24px, 4vw, 48px); }
.board-tri { display: none; }
.board-slide { flex: 0 0 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.board-count { display: inline-block; font-size: 14px; font-weight: 600; color: #a9b6ea; margin-bottom: 10px; }
.board-title { font-size: clamp(24px, 2.8vw, 34px); color: #fff; margin-bottom: 12px; }
.board-text p { color: #d4dbf7; margin-bottom: 22px; }
.board-pic { margin: 0; display: flex; justify-content: center; }
.board-pic img { width: auto; max-height: 440px; max-width: 100%; }
.board .slider-ui { margin-top: 24px; }
@media (max-width: 860px) { .board-slide { grid-template-columns: 1fr; } .board-pic { order: -1; } }
.slider-ui { display: flex; align-items: center; gap: 8px; }
.sl-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .5); background: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.board .sl-dots button::before { background: transparent; border-color: rgba(255, 255, 255, .6); }
.board .sl-dots button[aria-current="true"]::before { background: #fff; border-color: #fff; }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq-wrap { display: block; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; cursor: pointer; font-weight: 500; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { transition: transform .2s var(--ease); color: var(--blue); }
.faq details[open] summary { color: var(--blue); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq-a { padding: 0 18px 16px; color: var(--muted); }

/* ---------- แถบชวนติดต่อ ---------- */
.cta-band { padding-block: var(--sec); }
.cta-band > .wrap { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(22px, 3vw, 36px); }
.cta-dark > .wrap { background: var(--blue); color: #fff; }
.cta-soft > .wrap { background: var(--blue-50); }
.cta-tri { display: none; }
.cta-band h2 { font-size: clamp(19px, 2vw, 24px); max-width: 32em; font-weight: 500; }
.cta-dark h2 { color: #fff; }
.cta-dark .btn-lotus { background: #fff; color: var(--blue); }
.cta-dark .btn-lotus:hover { background: var(--blue-50); }

/* ---------- ติดต่อ ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.contact.no-form { grid-template-columns: 1fr; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact-note { color: var(--muted); margin-bottom: 20px; }
.contact-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; }
.contact-list li > svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--blue); color: #fff; }
.contact-list small { display: block; font-size: 14px; color: var(--muted); }
.contact-list a, .contact-list span { color: var(--ink); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--blue); text-decoration: underline; }
.hours-box { border-top: 1px solid var(--line); padding-top: 16px; }
.hours-box h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 8px; }
.hours-box h3 svg { color: var(--blue); }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.hours .closed { color: var(--lotus); }
.lead { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 3vw, 30px); display: grid; gap: 14px; }
.lead h3 { font-size: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); transition: border-color .2s var(--ease); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.lead .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; font-size: 16px; }
.msg { margin: 0; font-size: 15px; min-height: 1.5em; color: var(--muted); }
.msg.ok { color: #16723f; font-weight: 600; }
.msg.bad { color: #b3261e; font-weight: 600; }
.contact-map { margin-top: clamp(28px, 4vw, 44px); }
.map-box { position: relative; }
.map { width: 100%; height: clamp(300px, 38vw, 420px); border: 0; display: block; background: var(--soft); }
.map-box .btn { position: absolute; right: 14px; bottom: 14px; }

/* ---------- ข้อความอิสระ ---------- */
.prose-narrow { max-width: 50em; }
.prose-wide { max-width: none; }
.sec-text .prose > h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); position: relative; }
.sec-text .prose > h2::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 56px; height: 3px; background: var(--blue); border-radius: 2px; }
.prose h3 { font-size: 20px; margin: 1.4em 0 .4em; color: var(--blue); }
.prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose li::marker { color: var(--blue); }
.prose a { color: var(--blue); font-weight: 500; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.sec-text + .sec-text { padding-top: 0; }

/* ---------- แถบหัวหน้าข่าว ---------- */
.band { padding-top: 20px; }
.band > .wrap { position: relative; overflow: hidden; background: linear-gradient(90deg, var(--blue-950), var(--blue)); color: #fff; padding: clamp(24px, 4vw, 44px) clamp(18px, 4vw, 40px); }
.band-tri { display: none; }
.band h1 { color: #fff; font-size: clamp(26px, 3.4vw, 40px); max-width: 24em; position: relative; }
.band-sub { color: #d4dbf7; margin-top: 6px; position: relative; }
.a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; color: #d4dbf7; font-size: 15px; position: relative; }
.a-meta svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.a-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }

/* ---------- หน้าข่าวเดี่ยว ---------- */
.a-wrap { max-width: 820px; }
.a-lead { font-size: clamp(18px, 1.8vw, 20px); font-weight: 500; line-height: 1.65; margin-bottom: 24px; }
.a-cover { margin: 0 0 28px; background: var(--soft); padding: 16px; display: flex; justify-content: center; }
.a-cover img { max-height: 90vh; width: auto; }
.a-toc { background: var(--soft); border-left: 4px solid var(--blue); padding: 16px 20px; margin-bottom: 28px; }
.a-toc ol { margin: 6px 0 0; padding-left: 1.3em; }
.a-body h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 1.5em 0 .5em; scroll-margin-top: 80px; }
.a-fig { margin: 24px 0; }
.a-fig img { margin-inline: auto; }
.a-fig figcaption { font-size: 15px; color: var(--muted); text-align: center; margin-top: 8px; }
blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--blue); font-size: 19px; }
blockquote cite { display: block; font-size: 15px; color: var(--muted); font-style: normal; margin-top: 6px; }
.a-embed { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.a-embed h3 { font-size: 20px; margin-bottom: 12px; }
.a-related ul { padding-left: 1.2em; }
.a-cta { margin-top: 36px; padding: 22px 24px; background: var(--blue-50); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.sec-tint { background: var(--soft); }

/* ---------- ท้ายเว็บแถบเรียบ ---------- */
.site-footer { background: var(--soft); border-top: 1px solid var(--line); margin-top: var(--sec); font-size: 15px; color: var(--muted); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 22px; }
.foot-addr { margin: 0; line-height: 1.7; }
.foot-addr b { color: var(--ink); font-weight: 600; }
.site-footer a { color: var(--ink); }
.social { display: flex; gap: 8px; flex: none; }
.social a { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--blue); }
.foot-bottom { border-top: 1px solid var(--line); padding-block: 14px; font-size: 14px; }
@media (max-width: 760px) { .foot-row { flex-direction: column; align-items: flex-start; } }

/* ---------- หน้าเข้าสู่เว็บ ---------- */
body.is-entry { background: #eaf2fb; }
.entry { position: relative; min-height: 100vh; min-height: 100svh; display: flex; justify-content: center; overflow: hidden; }
.entry-bg { position: fixed; inset: 0; z-index: 0; }
.entry-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.entry-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(232, 241, 251, .95) 0%, rgba(232, 241, 251, .86) 50%, rgba(232, 241, 251, .55) 100%); }
.entry-in { position: relative; z-index: 1; width: min(980px, 100% - 32px); padding-block: clamp(28px, 6vh, 64px) 48px; display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 3vh, 32px); text-align: center; }
.entry-brand { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 24px); text-align: left; }
.entry-brand img { width: clamp(84px, 10vw, 120px); height: auto; }
.entry-brand h1 { font-size: clamp(28px, 4.6vw, 52px); color: var(--blue); font-weight: 600; line-height: 1.4; }
.entry-pill { display: inline-block; margin-top: 6px; padding: 2px 16px; border-radius: 999px; background: var(--lotus); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.entry-brand p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.entry-board { width: 100%; }
.entry-box { width: 100%; max-width: calc(56vh * 16 / 9); margin-inline: auto; background: #fff; box-shadow: 0 24px 50px -28px rgba(14, 22, 71, .55); }
.entry-box .poster-slide > a { display: block; width: 100%; height: 100%; }
.entry-btn { min-width: 180px; min-height: 54px; font-size: 18px; box-shadow: 0 12px 26px -14px rgba(14, 22, 71, .7); }
@media (max-width: 560px) {
  .entry-brand { flex-direction: column; text-align: center; }
  .entry-box { max-width: none; }
}

/* ---------- ปุ่มติดต่อลอย — ปุ่มแชทกลมมุมขวาล่าง กดแล้วกางเป็น โทร / Messenger / ไลน์ ---------- */
.float-contact { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fab { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(14, 22, 71, .55); transition: transform .2s var(--ease); }
.fab:hover { transform: scale(1.06); }
.fab svg { width: 28px; height: 28px; }
.fab-toggle { background: #1f4486; }
.fab-toggle svg:last-child, .float-contact.open .fab-toggle svg:first-child { display: none; }
.float-contact.open .fab-toggle svg:last-child { display: block; }
.fab-phone { background: #f0993a; }
.fab-phone svg { fill: #fff; stroke: none; }
.fab-msg { background: #3b82f6; color: #3b82f6; }
.fab-msg svg { width: 32px; height: 32px; }
.fab-line { background: #06c755; }
.fab-list { display: flex; flex-direction: column; gap: 14px; }
.js .fab-list { visibility: hidden; opacity: 0; transform: translateY(12px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s; }
.js .float-contact.open .fab-list { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.fab-tip { position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--ink); color: #fff;
  font-size: 14px; padding: 6px 12px; border-radius: 6px; pointer-events: none; opacity: 0; transition: opacity .15s var(--ease); }
.fab:hover .fab-tip, .fab:focus-visible .fab-tip { opacity: 1; }
@media (max-width: 640px) { .fab { width: 54px; height: 54px; } .fab-tip { display: none; } }
@media (prefers-reduced-motion: reduce) { .fab, .js .fab-list { transition: none; } }
body.nav-open .float-contact { display: none; }

/* ---------- ดูรูปขนาดเต็ม ---------- */
dialog.light { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.light::backdrop { background: rgba(8, 12, 36, .88); }
dialog.light img { max-width: 94vw; max-height: 84vh; width: auto; margin-inline: auto; }
dialog.light p { color: #fff; text-align: center; margin-top: 10px; }
dialog.light p:empty { display: none; }
dialog.light button { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--blue); font-size: 28px; line-height: 1.4; cursor: pointer; }

/* ---------- จุดกดบนจอสัมผัสอย่างน้อย 44px ---------- */
@media (pointer: coarse), (max-width: 767px) {
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .crumbs { margin-bottom: 0; }
  .contact-list a { display: inline-flex; align-items: center; min-height: 44px; }
  .prose li a, .a-related a, .a-toc a { display: inline-block; padding-block: 10px; }
  .newslist a { min-height: 44px; padding-top: 8px; }
  .news-body h3 a { display: inline-block; min-height: 44px; }
  .letter-body h3 a { display: inline-block; min-height: 44px; }
  .foot-addr a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- อนิเมชัน: ปรากฏตอนเลื่อนถึง เล่นครั้งเดียว ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- หมวดข่าว ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; }
.cat-chips a:hover { border-color: var(--blue); color: var(--blue); }
.cat-chips a[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; }
.cat-tag { display: inline-block; font-size: 14px; font-weight: 600; color: var(--lotus); margin-right: 8px; }
.newslist .cat-tag { display: block; margin: 0 0 2px; }
.cat-tag-light { color: #fff; background: rgba(255, 255, 255, .16); padding: 2px 10px; border-radius: 999px; text-decoration: none; }

/* ---------- ไฟล์ดาวน์โหลด (หน้าที่สร้างใหม่) ---------- */
.downloads { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.downloads a { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; background: #fff; }
.downloads a:hover { border-color: var(--blue); }
.downloads a > svg:first-child { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--blue-50); color: var(--blue); }
.downloads b { display: block; font-weight: 500; }
.downloads small { color: var(--muted); font-size: 14px; }

/* ---------- ระบบสมัครสอบ ---------- */
.ex-quick { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-bottom: 40px; }
.ex-quick-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--soft); }
.ex-quick-item:hover { border-color: var(--blue); }
.ex-quick-item svg { grid-row: 1 / 3; width: 48px; height: 48px; padding: 12px; border-radius: 50%; background: var(--blue); color: #fff; }
.ex-quick-item b { font-weight: 600; }
.ex-quick-item span { color: var(--muted); font-size: 15px; }
.ex-rounds { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ex-round { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.ex-round-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ex-level { color: var(--muted); font-size: 15px; }
.ex-round h3 { font-size: 19px; }
.ex-round h3 a { color: var(--ink); text-decoration: none; }
.ex-round h3 a:hover { color: var(--blue); }
.ex-program { color: var(--blue); margin: 0; font-weight: 500; }
.ex-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; margin: 4px 0; }
.ex-facts dt { font-size: 14px; color: var(--muted); }
.ex-facts dd { margin: 0; font-weight: 500; }
.ex-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.ex-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.ex-open { background: #e6f5ec; color: #0b6b33; }
.ex-soon { background: #fff4e0; color: #8a5300; }
.ex-closed { background: #eceef3; color: #4a5266; }
.ex-st-pending { background: #fff4e0; color: #8a5300; }
.ex-st-approved { background: #e6f5ec; color: #0b6b33; }
.ex-st-revise { background: #fdeaea; color: #a3221b; }
.ex-flow-head { margin-top: 48px; }
.ex-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); counter-reset: none; }
.ex-flow li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--soft); font-weight: 500; }
.ex-flow li span { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ex-detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 860px) { .ex-detail { grid-template-columns: 1fr; } }
.ex-main h2, .ex-side h2 { font-size: 21px; margin: 24px 0 10px; }
.ex-main h2:first-of-type { margin-top: 18px; }
.ex-facts-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.ex-fact { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.ex-fact svg { color: var(--blue); width: 18px; height: 18px; }
.ex-fact b { color: var(--ink); }
.ex-list { margin: 0; padding-left: 1.3em; }
.ex-list li { margin-bottom: 6px; }
.ex-docs { list-style: none; padding: 0; }
.ex-docs li { display: flex; gap: 10px; align-items: flex-start; }
.ex-docs svg { color: var(--blue); margin-top: 4px; width: 18px; height: 18px; }
.ex-pdf { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 14px; align-items: center; margin-top: 24px; padding: 14px 16px; border: 1px solid var(--blue); border-radius: var(--r); color: var(--ink); text-decoration: none; background: var(--blue-50); }
.ex-pdf > svg:first-child { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--blue); color: #fff; }
.ex-pdf small { display: block; color: var(--muted); }
.ex-side { position: sticky; top: 72px; }
.ex-apply { padding: 20px; border-radius: var(--r); background: var(--soft); border: 1px solid var(--line); display: grid; gap: 8px; }
.btn-lg { min-height: 54px; font-size: 18px; width: 100%; }
.btn:disabled { background: #b8bfd2; cursor: not-allowed; }
.ex-note { color: var(--muted); font-size: 15px; margin: 0; }
.ex-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.ex-timeline::before { content: ''; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.ex-timeline li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.ex-tl-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.ex-tl-ic svg { width: 20px; height: 20px; }
.ex-timeline b { display: block; }
.ex-timeline li > div span { color: var(--muted); font-size: 15px; }
.ex-timeline li.is-past .ex-tl-ic { background: #b8bfd2; }
.ex-form-wrap, .ex-check-wrap { max-width: 860px; }
.ex-check-wrap { max-width: 520px; }
.ex-form fieldset { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 14px; }
.ex-form legend { font-size: 19px; font-weight: 600; color: var(--blue); padding: 0; margin-bottom: 8px; }
.field select { width: 100%; font: inherit; font-size: 16px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 4px; background: #fff; min-height: 48px; }
.field input[type=file] { width: 100%; font: inherit; font-size: 16px; padding: 10px; border: 1.5px dashed var(--line); border-radius: 4px; background: #fff; }
.field em { color: #b3261e; font-style: normal; }
.field .help { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.field .err { display: block; color: #b3261e; font-size: 14px; font-weight: 600; margin-top: 4px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #b3261e; }
.ex-current { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.ex-consent label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 16px; line-height: 1.6; }
.ex-consent input { width: 22px; height: 22px; flex: none; margin-top: 3px; }
.ex-me { display: grid; gap: 20px; max-width: 900px; }
.ex-app { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; background: #fff; }
.ex-app.is-new { border-color: #0b6b33; }
.ex-app header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ex-app header small { color: var(--muted); }
.ex-app h2 { font-size: 22px; }
.ex-revise { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: var(--r); background: #fdeaea; color: #6d1712; }
.ex-revise svg { color: #a3221b; }
.ex-revise p { margin: 4px 0 0; }
.ex-res { display: grid; justify-items: start; gap: 2px; padding: 16px 18px; border-radius: var(--r); background: var(--soft); }
.ex-res span { color: var(--muted); font-size: 14px; }
.ex-res b { font-size: 28px; }
.ex-res-pass { background: #e6f5ec; } .ex-res-pass b { color: #0b6b33; }
.ex-res em { font-style: normal; font-weight: 600; }

/* ---------- หน้าในหมวด (หน้าหมวดของเมนู) ---------- */
.child-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.child-grid a { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 14px; align-items: center; min-height: 72px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; background: #fff; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.child-grid a:hover { border-color: var(--blue); box-shadow: 0 10px 24px -18px rgba(14, 22, 71, .6); }
.child-grid a > svg:first-child { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--blue-50); color: var(--blue); }
.child-grid a > svg:last-child { width: 18px; height: 18px; color: var(--muted); }
.child-grid b { display: block; font-weight: 600; line-height: 1.4; }
.child-grid small { color: var(--muted); font-size: 14px; }

/* ---------- ปุ่มไประบบภายนอก ---------- */
.golink { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 22px 24px; border: 1px dashed var(--blue); border-radius: var(--r); background: var(--blue-50); }
.golink small { color: var(--muted); font-size: 15px; }

/* ---------- ตารางในเนื้อหา (บรรทัดขึ้นต้นด้วย |) ---------- */
.table-scroll { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--r); }
.table-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--blue); color: #fff; font-weight: 600; white-space: nowrap; }
.prose tbody tr:nth-child(even) td { background: #f7f8fc; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child { white-space: nowrap; }
@media (max-width: 640px) { .prose table { font-size: 15px; } .prose th, .prose td { padding: 9px 10px; } }

/* ---------- การ์ดรูปบุคลากร (ทำเนียบ) ---------- */
/* หน้าทำเนียบ: ชื่อหน้าและหัวข้อกลุ่มอยู่กึ่งกลาง ไม่มีแถบหัวหน้า */
.staff-head { text-align: center; margin: 8px auto 36px; max-width: 46em; }
.staff-head h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.3; color: var(--ink); }
.staff-head h1::after { content: ''; display: block; width: 64px; height: 3px; margin: 14px auto 0; background: var(--blue); border-radius: 2px; }
.staff-head .prose { margin-top: 14px; color: var(--muted); font-size: 16px; }
.staff-head .prose p { margin: 0; }
.sec-staff .sec-head { margin-top: 12px; justify-content: center; text-align: center; border-bottom: 0; padding-bottom: 14px; }
.sec-staff .sec-head::after { left: 50%; bottom: 0; transform: translateX(-50%); }
/* แถวที่คนไม่เต็มจัดกึ่งกลาง · กลุ่มที่มีคนเดียว (เช่น ผู้อำนวยการ) การ์ดใหญ่ขึ้น */
.staff-grid { --cols: 2; --gap: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 28px var(--gap); margin-bottom: 44px; }
.staff-grid > .staff { flex: 0 0 calc((100% - var(--gap) * (var(--cols) - 1)) / var(--cols)); }
@media (min-width: 640px) { .staff-grid { --cols: 3; } }
@media (min-width: 960px) { .staff-grid { --cols: 5; --gap: 22px; row-gap: 32px; } }
.staff-grid > .staff:only-child { flex-basis: min(280px, 70%); }
.staff:only-child b { font-size: 20px; }
.staff { margin: 0; text-align: center; }
.staff-pic { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(#f4f6fa, #e9edf5); }
.staff-pic img { width: 100%; height: 100%; object-fit: cover; }
.staff-pic:has(.staff-nopic) { display: grid; place-items: end center; }
.staff-nopic { display: block; width: 72%; color: #c5ccdc; }
.staff-nopic svg { display: block; width: 100%; height: auto; stroke-width: 1.1; }
.staff figcaption { padding-top: 12px; }
.staff-pic > a { display: block; height: 100%; }
.staff-link .staff-pic img { transition: transform .3s ease; }
.staff-link:hover .staff-pic img { transform: scale(1.04); }
.staff b a { color: inherit; text-decoration: none; }
.staff b a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.staff b a svg { display: inline-block; width: 15px; height: 15px; margin-left: 5px; vertical-align: -1px; color: var(--blue); }
.staff b { display: block; font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.staff figcaption span { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.staff small { display: block; color: var(--blue); font-size: 14px; margin-top: 2px; }
@media (max-width: 479px) { .staff b { font-size: 15.5px; } .staff figcaption span { font-size: 14px; } }
