/* ==========================================================================
   site.css — ธีมเว็บไซต์โรงเรียน (โมเดิร์น เขียว-เหลือง แบบระบบ ปพ.5 + เปลี่ยนธีมสีได้จากหลังบ้าน)
   ========================================================================== */
:root {
  --p: #059669; --p-rgb: 5,150,105; --p-dark: #04714f; --p-deep: #023f2c; --p-deep-rgb: 2,63,44; --p-soft: #e6f5f0; --p-softer: #f2faf7; --p-light: #2fb388;
  --a: #facc15; --a-rgb: 250,204,21; --a-ink: #422006;
  --ink: #111827; --text: #374151; --muted: #6b7280; --line: #e5e7eb; --bg: #ffffff; --bg2: #f6f8f7;
  --radius: 14px; --radius-lg: 20px;
  --shadow: 0 6px 24px rgba(var(--p-deep-rgb), .08);
  --shadow-lg: 0 18px 50px rgba(var(--p-deep-rgb), .14);
  --head: 'Sarabun', 'TH Sarabun New', system-ui, sans-serif;
  --body: 'Sarabun', 'TH Sarabun New', system-ui, sans-serif;
  --container: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
/* โหมดไว้ทุกข์: ใส่ filter ที่ส่วนเนื้อหา (ไม่ใส่ที่ html/header เพราะ filter ทำให้เมนูมือถือแบบ fixed แสดงผิดตำแหน่ง) */
html.mourning body > *:not(.site-header):not(.m-nav):not(.m-backdrop), html.mourning .site-header .brand, html.mourning .site-header .hdr-actions { filter: grayscale(var(--mourn, 1)); }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.7; color: var(--text); background: var(--bg); overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--p); text-decoration: none; }
a:hover { color: var(--p-dark); }
h1, h2, h3, h4, h5 { font-family: var(--head); color: var(--ink); line-height: 1.3; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.ico { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.18em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--p); color: #fff; padding: 8px 14px; z-index: 999; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .62em 1.35em; border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--head); font-weight: 500; font-size: 15.5px; line-height: 1.2; transition: .2s; white-space: nowrap; }
.btn-primary { background: var(--p); color: #fff; box-shadow: 0 6px 18px rgba(var(--p-rgb), .28); }
.btn-primary:hover { background: var(--p-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { border-color: var(--p); color: var(--p); background: #fff; }
.btn-outline:hover { background: var(--p); color: #fff; }
.btn-ghost { border-color: var(--p); color: var(--p); background: rgba(255,255,255,.85); }
.btn-ghost:hover { background: #fff; }
.btn-lg { padding: .8em 1.6em; font-size: 16.5px; }
.btn-sm { padding: .45em 1em; font-size: 14px; }
.play-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--p); color: #fff; }
.play-dot .ico { width: 11px; height: 11px; margin-left: 2px; }
.badge { display: inline-block; font-family: var(--head); font-size: 12.5px; padding: 2px 12px; border-radius: 999px; background: linear-gradient(135deg, var(--p-light), var(--p)); color: #fff; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 6px 22px rgba(var(--p-deep-rgb),.08); }
.hdr { display: flex; align-items: center; gap: 22px; min-height: 92px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; }
.brand-logo { width: 68px; height: 68px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--head); font-size: 22px; font-weight: 700; color: var(--p-deep); }
.brand-text em { font-style: normal; font-family: var(--head); font-size: 13px; letter-spacing: .06em; color: var(--p); font-weight: 500; text-transform: uppercase; }
.brand-text small { font-size: 13.5px; color: var(--muted); }
.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.main-nav li { position: relative; }
.main-nav > ul > li > a { display: flex; align-items: center; gap: 4px; padding: 10px 11px; white-space: nowrap; font-family: var(--head); font-size: 15.5px; font-weight: 500; color: var(--ink); border-radius: 10px; }
.main-nav > ul > li > a:hover, .main-nav > ul > li:hover > a { color: var(--p); background: var(--p-softer); }
.main-nav .caret { width: 14px; height: 14px; opacity: .7; }
.main-nav .sub, .main-nav .sub2 { position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; list-style: none; margin: 0; padding: 8px; border-radius: 14px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s; }
.main-nav .sub2 { top: -8px; left: 100%; }
.main-nav > ul > li:nth-last-child(-n+3) > .sub { left: auto; right: 0; }
.main-nav > ul > li:nth-last-child(-n+3) .sub2 { left: auto; right: 100%; }
.main-nav li:hover > .sub, .main-nav li:focus-within > .sub, .main-nav .has-sub2:hover > .sub2 { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub a { display: block; padding: 9px 14px; border-radius: 9px; color: var(--text); font-size: 15.5px; }
.main-nav .sub a:hover { background: var(--p-soft); color: var(--p); }
.icon-btn.nav-toggle { display: none; }
.hdr-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; color: var(--ink); }
.icon-btn:hover { background: var(--p-soft); color: var(--p); }
.icon-btn .ico { width: 22px; height: 22px; }
.hdr-cta { border-radius: 10px; }
.hdr-contact { font-family: var(--head); font-weight: 500; color: var(--ink); padding: 8px 6px; white-space: nowrap; }
.hdr-cta { white-space: nowrap; }
.search-panel { border-top: 1px solid var(--line); background: #fff; padding: 14px 0; }
.search-panel form { display: flex; align-items: center; gap: 10px; }
.search-panel input { flex: 1; border: 0; outline: 0; font-size: 18px; padding: 8px 4px; background: transparent; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--p-softer); overflow: hidden; }
.hero-track { position: relative; transition: height .4s; }
.slide { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.slide.is-active { position: relative; opacity: 1; visibility: visible; z-index: 1; }
.slide > img, .slide > .slide-link img { width: 100%; height: auto; }
.slide.has-text { min-height: clamp(380px, 38vw, 560px); }
.slide.has-text > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.has-text::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 32%, rgba(255,255,255,0) 58%); }
.hero-copy { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; padding-top: 40px; padding-bottom: 60px; min-height: inherit; }
.hero-text { max-width: 600px; }
@media (min-width: 761px) { .slide.has-text .hero-copy { padding-left: 84px; padding-right: 84px; max-width: none; } }
.hero h1 { margin: 0 0 14px; }
.h-big { display: block; font-size: clamp(42px, 6vw, 76px); font-weight: 800; color: var(--p-deep); line-height: 1.28; letter-spacing: -.01em; }
.h-sub { display: block; font-size: clamp(24px, 3vw, 38px); font-weight: 600; color: var(--p-deep); line-height: 1.25; margin-top: 6px; }
.hero-quote { font-size: 19px; color: var(--ink); margin: 0 0 22px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-script { position: absolute; right: 6%; top: 14%; transform: rotate(-6deg); font-family: var(--head); font-style: italic; font-size: clamp(18px, 2vw, 28px); color: var(--p-deep); max-width: 340px; text-align: center; margin: 0; }
.hero-script::after { content: ""; display: block; height: 4px; width: 60%; margin: 6px auto 0; background: var(--a); border-radius: 4px; transform: rotate(-2deg); }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9);
  color: var(--ink); display: grid; place-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.12); transition: .2s; }
.hero-nav:hover { background: #fff; color: var(--p); transform: translateY(-50%) scale(1.06); }
.hero-nav.prev { left: 18px; } .hero-nav.next { right: 18px; }
.hero-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.hero-dots button { width: 9px; height: 9px; border-radius: 9px; border: 0; padding: 0; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.08); transition: .25s; }
.hero-dots button.is-active { width: 28px; background: var(--p); }
.hero-empty { padding: 90px 0; background: linear-gradient(135deg, var(--p-softer), #fff); }

/* ---------- quick links ---------- */
.quick { padding: 22px 0 6px; position: relative; z-index: 3; }
.quick-grid { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.quick-item { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 34px 20px; position: relative; color: var(--text); transition: .2s; }
.quick-item + .quick-item { border-left: 1px solid var(--line); }
a.quick-item:hover { background: var(--p-softer); color: var(--text); }
.q-ic { display: grid; place-items: center; width: 56px; height: 56px; color: var(--p); margin-bottom: 8px; }
.q-ic .ico { width: 44px; height: 44px; stroke-width: 1.6; }
.q-ic img { width: 48px; height: 48px; object-fit: contain; }
.q-txt strong { display: block; font-family: var(--head); font-size: 16.5px; color: var(--p-deep); font-weight: 600; }
.q-txt small { display: block; font-size: 14px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.q-go { position: absolute; right: 12px; top: 50%; width: 26px; height: 26px; border-radius: 50%; background: var(--p-soft); color: var(--p); display: grid; place-items: center; transition: .2s; }
.q-go .ico { width: 14px; height: 14px; }
a.quick-item:hover .q-go { background: var(--p); color: #fff; }

/* ---------- sections ---------- */
.section { padding: 46px 0; }
.section-sm { padding: 22px 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.sec-head h2, .bar-title { position: relative; padding-left: 16px; font-size: 26px; font-weight: 700; color: var(--p-deep); margin: 0; display: flex; align-items: center; gap: 10px; }
.sec-head h2::before, .bar-title::before { content: ""; position: absolute; left: 0; top: 12%; bottom: 12%; width: 5px; border-radius: 4px; background: var(--a); }
.sec-ic { width: 30px; height: 30px; color: var(--p); }
.sec-more { font-family: var(--head); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sec-more .ico { width: 16px; height: 16px; transition: transform .2s; }
.sec-more:hover .ico { transform: translateX(3px); }
.eyebrow { font-family: var(--head); font-size: 14px; letter-spacing: .08em; color: var(--p); text-transform: uppercase; font-weight: 600; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: 1.35fr repeat(4, 1fr); align-items: center; background: linear-gradient(120deg, var(--p-soft), var(--p-softer) 55%, var(--p-soft));
  border-radius: var(--radius-lg); padding: 28px 30px; position: relative; overflow: hidden; }
.stats-title { position: relative; z-index: 1; padding-left: 16px; }
.stats-title::before { content: ""; position: absolute; left: 0; top: 4px; height: 58px; width: 5px; border-radius: 4px; background: var(--a); }
.stats-title h2 { font-size: 26px; font-weight: 800; color: var(--p-deep); text-transform: uppercase; line-height: 1.15; margin: 0 0 6px; }
.stats-title h2 span { color: var(--p-deep); }
.stats-title p { margin: 0; color: var(--text); font-size: 15px; }
.stat { text-align: center; padding: 6px 10px; position: relative; z-index: 1; }
.stat + .stat::before, .stats-title + .stat::before { content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 1px; background: rgba(var(--p-rgb), .18); }
.stat-ic { width: 36px; height: 36px; color: var(--p); stroke-width: 1.7; margin: 0 auto 4px; display: block; }
.stat strong { display: block; font-family: var(--head); font-size: clamp(28px, 3vw, 40px); font-weight: 700; color: var(--p-deep); line-height: 1.15; }
.stat span { font-size: 15px; color: var(--text); }

/* ---------- director ---------- */
.director { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 28px; align-items: center; background: linear-gradient(135deg, #fff, var(--p-softer)); }
.director img { width: 220px; height: 260px; object-fit: cover; border-radius: 16px; }
.director blockquote { margin: 8px 0 14px; font-size: 18px; color: var(--ink); position: relative; }
.director strong { display: block; font-family: var(--head); color: var(--p-deep); font-size: 18px; }
.director small { color: var(--muted); }

/* ---------- post card ---------- */
.post-card { display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pc-img { position: relative; display: block; aspect-ratio: 16 / 9.4; overflow: hidden; background: var(--p-soft); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .pc-img img { transform: scale(1.05); }
.date-pill { position: absolute; left: 14px; bottom: 12px; background: var(--p); color: #fff; font-family: var(--head); font-size: 13px; padding: 3px 12px; border-radius: 999px; }
.pc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.pc-cat { align-self: flex-start; font-size: 12.5px; font-family: var(--head); color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); padding: 1px 10px; border-radius: 999px; margin-bottom: 8px; }
.pc-body h3 { font-size: 17.5px; font-weight: 600; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-body h3 a { color: var(--ink); }
.pc-body h3 a:hover { color: var(--p); }
.pc-body p { font-size: 15.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 10px; }
.more { margin-top: auto; font-family: var(--head); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.more .ico { width: 16px; height: 16px; transition: transform .2s; }
.more:hover .ico { transform: translateX(3px); }

/* ---------- announcements ---------- */
.announce { background: linear-gradient(120deg, var(--p-softer), var(--p-soft)); border-radius: var(--radius-lg); padding: 22px 24px 24px; }
.announce .sec-head { margin-bottom: 16px; }
.announce .sec-head h2 { padding-left: 0; }
.announce .sec-head h2::before { display: none; }
.ann-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ann-item { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); color: var(--text); transition: .2s; position: relative; }
.ann-item:hover { box-shadow: var(--shadow); color: var(--text); transform: translateY(-2px); }
.ann-date { flex-shrink: 0; text-align: center; min-width: 62px; padding-right: 14px; border-right: 1px solid var(--line); line-height: 1.1; }
.ann-date b { display: block; font-family: var(--head); font-size: 28px; color: var(--p); font-weight: 700; }
.ann-date small { font-size: 12.5px; color: var(--muted); }
.ann-title { flex: 1; font-size: 15.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann-go { color: var(--p); flex-shrink: 0; }
.ann-go .ico { width: 18px; height: 18px; }

/* ---------- why ---------- */
.why { position: relative; padding: 48px 0; margin: 26px 0 0; background: var(--why-bg, radial-gradient(600px 300px at 80% 30%, var(--p-soft), transparent), linear-gradient(120deg, #fff, var(--p-softer))) center/cover no-repeat; }
.why::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.9) 32%, rgba(255,255,255,.15) 75%); }
.why-in { position: relative; display: grid; grid-template-columns: 1fr 1.55fr; gap: 30px; align-items: center; }
.why-text .bar-title { font-size: 28px; margin-bottom: 12px; }
.why-text p { color: var(--text); font-size: 16.5px; }
.why-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.why-card { background: rgba(255,255,255,.95); border-radius: 16px; padding: 22px 12px 18px; text-align: center; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.8); transition: .25s; }
.why-card:hover { transform: translateY(-4px); }
.why-card .ico { width: 42px; height: 42px; color: var(--p); stroke-width: 1.5; margin: 0 auto 10px; display: block; }
.why-card strong { display: block; font-family: var(--head); font-size: 15.5px; color: var(--ink); line-height: 1.35; }
.why-card small { display: block; color: var(--muted); font-size: 14px; }

/* ---------- follow ---------- */
.follow-sec { padding-top: 34px; }
.follow { display: grid; grid-template-columns: 1fr 1.15fr 1.75fr; gap: 26px; align-items: start; }
.follow-social ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; }
.follow-social a { display: flex; align-items: center; gap: 12px; color: var(--text); }
.follow-social a:hover strong { color: var(--p); }
.soc-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; }
.soc-ic .ico { width: 24px; height: 24px; }
.follow-social strong { display: block; font-family: var(--head); font-size: 16px; color: var(--ink); line-height: 1.3; }
.follow-social small { color: var(--muted); font-size: 14px; }
.fb-frame { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; height: 330px; }
.fb-frame iframe { width: 100%; height: 100%; border: 0; }
.fb-frame.empty { display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.fb-frame.empty .ico { width: 44px; height: 44px; color: #1877f2; margin: 0 auto; }
.follow-video .sec-head { margin-bottom: 14px; }
.video-box { border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16/9; box-shadow: var(--shadow-lg); }
.video-box video, .video-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-poster { position: relative; width: 100%; height: 100%; border: 0; padding: 0; background: #000; display: block; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: .3s; }
.video-poster:hover img { opacity: 1; transform: scale(1.02); }
.play-big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--p); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(255,255,255,.25); transition: .2s; }
.play-big .ico { width: 30px; height: 30px; margin-left: 4px; }
.video-poster:hover .play-big { transform: translate(-50%, -50%) scale(1.08); }
.video-empty { height: 100%; display: grid; place-content: center; text-align: center; color: #bbb; }
.video-empty .ico { width: 42px; height: 42px; margin: 0 auto; }

/* ---------- gallery card ---------- */
.gal-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--p-soft); box-shadow: var(--shadow); }
.gal-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gal-card:hover img { transform: scale(1.06); }
.gal-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; color: #fff; font-family: var(--head); font-weight: 500; background: linear-gradient(transparent, rgba(var(--p-deep-rgb),.82)); line-height: 1.4; }
.gal-card .count { position: absolute; top: 10px; right: 10px; left: auto; bottom: auto; padding: 2px 10px; border-radius: 99px; background: rgba(0,0,0,.55); font-size: 13px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 50px; color: rgba(255,255,255,.85); background: radial-gradient(1200px 400px at 85% 0%, rgba(255,255,255,.08), transparent), linear-gradient(135deg, var(--p-dark), var(--p-deep)); position: relative; }
.ftr { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1.1fr; gap: 34px; padding-top: 44px; padding-bottom: 34px; }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text em { color: rgba(255,255,255,.85); }
.brand-light .brand-text small { color: rgba(255,255,255,.7); }
.ftr-social { display: flex; gap: 10px; margin-top: 18px; }
.ftr-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; transition: .2s; }
.ftr-social a:hover { background: var(--a); color: var(--p-deep); }
.ftr-col h4 { color: #fff; font-size: 17px; position: relative; padding-left: 12px; margin-bottom: 14px; }
.ftr-col h4::before { content: ""; position: absolute; left: 0; top: 15%; bottom: 15%; width: 4px; border-radius: 4px; background: var(--a); }
.ftr-contact, .ftr-links { list-style: none; padding: 0; margin: 0; font-size: 15.5px; }
.ftr-contact li { display: flex; gap: 10px; margin-bottom: 10px; line-height: 1.5; }
.ftr-contact .ico { margin-top: 3px; color: var(--a); }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.ftr-links li { margin-bottom: 7px; padding-left: 14px; position: relative; }
.ftr-links li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.45); }
.ftr-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; font-size: 14.5px; color: rgba(255,255,255,.7); }
.ftr-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- floating ---------- */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--p); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: .25s; z-index: 80; }
.to-top.show { opacity: 1; visibility: visible; }
.fab { position: fixed; right: 22px; bottom: 80px; z-index: 81; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fab-list { display: flex; flex-direction: column; gap: 10px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s; }
.fab.open .fab-list { opacity: 1; visibility: visible; transform: none; }
.fab-list a { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-lg); position: relative; }
.fab-list a img { width: 26px; height: 26px; object-fit: contain; }
.fab-list a::after { content: attr(data-tip); position: absolute; right: 56px; white-space: nowrap; background: var(--ink); color: #fff; font-size: 13.5px; padding: 4px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .2s; }
.fab-list a:hover::after { opacity: 1; }
.fab-main { width: 54px; height: 54px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--p-light), var(--p)); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.fab-main .ico { width: 24px; height: 24px; grid-area: 1/1; transition: .25s; }
.fab-main .fab-x { opacity: 0; transform: rotate(-90deg); }
.fab.open .fab-main .ico:first-child { opacity: 0; transform: rotate(90deg); }
.fab.open .fab-main .fab-x { opacity: 1; transform: none; }

/* ---------- popup / lightbox / modal ---------- */
.popup, .lightbox, .vmodal { position: fixed; inset: 0; z-index: 200; background: rgba(var(--p-deep-rgb), .82); display: grid; place-items: center; padding: 20px; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.popup-box { position: relative; max-width: min(720px, 94vw); background: #fff; border-radius: 16px; overflow: hidden; }
.popup-box img { max-height: 80vh; width: auto; margin: 0 auto; }
.popup-close, .lb-close, .vm-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; z-index: 3; }
.popup-skip { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px; font-size: 14.5px; color: var(--muted); }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { color: #eee; margin-top: 10px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close { position: fixed; }
.vmodal .vm-box { width: min(980px, 94vw); aspect-ratio: 16/9; position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.vmodal iframe { width: 100%; height: 100%; border: 0; }
.vm-close { top: -50px; right: 0; position: absolute; }

/* ---------- inner page ---------- */
.page-hero { background: radial-gradient(900px 300px at 85% -20%, rgba(255,255,255,.18), transparent), linear-gradient(120deg, var(--p-dark), var(--p)); color: #fff; padding: 34px 0 38px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%; border: 40px solid rgba(255,255,255,.06); }
.page-hero h1 { color: #fff; font-size: clamp(26px, 3.2vw, 38px); margin: 6px 0 0; font-weight: 700; }
.page-hero p { margin: 8px 0 0; color: rgba(255,255,255,.85); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: rgba(255,255,255,.85); }
.crumbs a { color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.crumbs .cur { color: rgba(255,255,255,.85); }
.page-wrap { padding: 38px 0 20px; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.side-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 22px; }
.side-box h3 { font-size: 18px; padding-left: 12px; position: relative; }
.side-box h3::before { content: ""; position: absolute; left: 0; top: 15%; bottom: 15%; width: 4px; border-radius: 3px; background: var(--a); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { border-bottom: 1px dashed var(--line); }
.side-list li:last-child { border: 0; }
.side-list a { display: flex; gap: 12px; padding: 10px 0; color: var(--text); align-items: center; }
.side-list a:hover { color: var(--p); }
.side-list img { width: 74px; height: 54px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.side-list .t { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-list small { display: block; color: var(--muted); font-size: 13px; }
.side-cats a { justify-content: space-between; }
.side-cats span.n { background: var(--p-soft); color: var(--p); border-radius: 99px; font-size: 13px; padding: 0 9px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs a { padding: 7px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-family: var(--head); font-size: 14.5px; }
.tabs a.active, .tabs a:hover { background: var(--p); border-color: var(--p); color: #fff; }
.search-inline { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.search-inline input { border: 0; outline: 0; padding: 8px 16px; min-width: 220px; }
.search-inline button { border: 0; background: var(--p); color: #fff; padding: 0 16px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .ico { width: 54px; height: 54px; color: var(--p-light); margin: 0 auto 10px; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 34px 0 10px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-family: var(--head); }
.pager a:hover { border-color: var(--p); color: var(--p); }
.pager .cur { background: var(--p); color: #fff; border-color: var(--p); }

/* ---------- article ---------- */
.article { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 30px 34px; }
.article-title { font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14.5px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-cover { border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.article-cover img { width: 100%; }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--head); font-size: 15px; }
.share a, .share button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 0; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.prevnext a { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; color: var(--text); background: #fff; }
.prevnext a:hover { border-color: var(--p); }
.prevnext small { display: block; color: var(--muted); font-size: 13px; }
.prevnext .nx { text-align: right; }

/* ---------- rendered content (blocks) ---------- */
.content { font-size: 17.5px; line-height: 1.85; color: var(--text); overflow-wrap: anywhere; }
.content > *:first-child { margin-top: 0; }
.content h2 { font-size: 26px; margin: 1.3em 0 .5em; } .content h3 { font-size: 22px; margin: 1.2em 0 .5em; } .content h4 { font-size: 19px; margin: 1.1em 0 .4em; }
.content p.lead { font-size: 20px; color: var(--ink); }
.content img { border-radius: 10px; max-width: 100%; height: auto !important; display: inline-block; }
.content ul, .content ol { padding-left: 1.4em; }
.content table { border-collapse: collapse; width: 100%; }
.content td, .content th { border: 1px solid var(--line); padding: 8px 12px; }
.content th { background: var(--p-softer); font-family: var(--head); }
.content iframe { border: 0; border-radius: 10px; }
.content hr, .b-sep { border: 0; border-top: 2px solid var(--line); margin: 2em auto; width: 40%; }
.b-quote { margin: 1.5em 0; padding: 18px 24px; border-left: 5px solid var(--a); background: var(--p-softer); border-radius: 0 14px 14px 0; font-size: 19px; color: var(--ink); }
.b-quote p { margin: 0; } .b-quote cite { display: block; margin-top: 8px; font-size: 15px; color: var(--muted); font-style: normal; }
.b-quote cite::before { content: "— "; }
.b-callout { display: flex; gap: 12px; padding: 14px 18px; border-radius: 12px; margin: 1.2em 0; background: #eef4ff; color: #1e3a8a; }
.b-callout .ico { width: 22px; height: 22px; margin-top: 4px; }
.b-callout-success { background: #ecfdf3; color: #14532d; } .b-callout-warning { background: #fffbeb; color: #78350f; } .b-callout-danger { background: #fef2f2; color: #7f1d1d; }
.b-image { margin: 1.5em 0; text-align: center; }
.b-image img { margin: 0 auto; display: block; }
.b-image.align-left { float: left; max-width: 45%; margin: .3em 1.4em 1em 0; } .b-image.align-right { float: right; max-width: 45%; margin: .3em 0 1em 1.4em; }
.b-image.align-wide img, .b-image.align-full img { width: 100%; }
.b-image figcaption, .b-gallery figcaption, .b-embed figcaption, .b-video figcaption { font-size: 14.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.content::after { content: ""; display: table; clear: both; }
.b-gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 10px; margin: 1.5em 0; }
.b-gallery.cols-2 { --cols: 2; } .b-gallery.cols-3 { --cols: 3; } .b-gallery.cols-4 { --cols: 4; } .b-gallery.cols-5 { --cols: 5; }
.b-gallery figure { margin: 0; }
.b-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; transition: .3s; }
.b-gallery a:hover img { opacity: .88; }
.b-embed, .b-video { margin: 1.5em 0; }
.b-embed-frame { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.b-embed.is-doc .b-embed-frame { aspect-ratio: 4/5; background: #f3f3f3; max-height: 900px; }
.b-embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.b-video video { width: 100%; border-radius: 12px; background: #000; }
.b-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--p-softer); margin: 1.2em 0; flex-wrap: wrap; }
.b-file-ic { width: 46px; height: 46px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: #dc2626; box-shadow: var(--shadow); }
.b-file-ic .ico { width: 26px; height: 26px; }
.b-file-meta { flex: 1; min-width: 160px; line-height: 1.4; }
.b-file-meta strong { display: block; font-family: var(--head); font-weight: 500; color: var(--ink); word-break: break-all; }
.b-file-meta small { color: var(--muted); }
.b-pdf { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: -6px 0 1.4em; }
.b-pdf iframe { width: 100%; height: 80vh; border: 0; display: block; }
.b-table { overflow-x: auto; margin: 1.4em 0; }
.b-button { margin: 1.4em 0; }

/* ---------- forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-family: var(--head); font-weight: 500; font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.field label .req { color: #dc2626; }
.input, .field input, .field select, .field textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); outline: 0; transition: .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--p); box-shadow: 0 0 0 4px rgba(var(--p-rgb), .12); }
.captcha { display: flex; gap: 8px; align-items: center; }
.captcha-img { border-radius: 10px; border: 1px dashed var(--line); }
.captcha-refresh { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; color: var(--p); }
.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 15.5px; }
.alert-success { background: #ecfdf3; color: #14532d; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; }
.alert-info { background: var(--p-softer); color: var(--p-deep); border: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .i { width: 46px; height: 46px; border-radius: 12px; background: var(--p-soft); color: var(--p); display: grid; place-items: center; flex-shrink: 0; }
.info-list strong { display: block; font-family: var(--head); color: var(--ink); }
.map-box { border-radius: var(--radius); overflow: hidden; margin-top: 22px; border: 1px solid var(--line); }
.map-box iframe { width: 100% !important; height: 320px; border: 0; display: block; }

/* staff */
.dept { margin-bottom: 40px; }
.dept > h2 { text-align: center; font-size: 24px; color: var(--p-deep); margin-bottom: 22px; }
.dept > h2::after { content: ""; display: block; width: 60px; height: 4px; background: var(--a); border-radius: 4px; margin: 10px auto 0; }
.staff-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.staff-card { width: 230px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px 20px; box-shadow: var(--shadow); transition: .25s; }
.staff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.staff-card img { width: 150px; height: 180px; object-fit: cover; border-radius: 14px; margin: 0 auto 12px; background: var(--p-soft); }
.staff-card.lead { width: 280px; border-color: rgba(var(--p-rgb), .3); }
.staff-card.lead img { width: 190px; height: 230px; }
.staff-card strong { display: block; font-family: var(--head); color: var(--ink); font-size: 16.5px; line-height: 1.4; }
.staff-card small { color: var(--p); font-size: 14.5px; display: block; }
.staff-card .c { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

/* documents */
.doc-list { display: grid; gap: 12px; }
.doc-item { display: flex; gap: 14px; align-items: center; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.doc-item .b-file-ic { flex-shrink: 0; }
.doc-item .m { flex: 1; min-width: 200px; }
.doc-item .m strong { display: block; font-family: var(--head); font-weight: 500; color: var(--ink); }
.doc-item .m small { color: var(--muted); font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1440px) {
  .main-nav > ul > li > a { padding: 10px 8px; font-size: 15px; }
  .brand-logo { width: 58px; height: 58px; }
  .brand-text strong { font-size: 19px; }
  .hdr-contact { display: none; }
}
@media (max-width: 1240px) {
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-item:nth-child(3n+1) { border-left: 0; }
  .quick-item:nth-child(n+4) { border-top: 1px solid var(--line); }
  .stats { grid-template-columns: repeat(4, 1fr); row-gap: 20px; }
  .stats-title { grid-column: 1 / -1; }
  .stats-title + .stat::before { display: none; }
  .why-in { grid-template-columns: 1fr; }
  .follow { grid-template-columns: 1fr 1fr; }
  .follow-video { grid-column: 1 / -1; }
  .ftr { grid-template-columns: 1fr 1fr; }
  .layout-side { grid-template-columns: 1fr; }
  .hero-script { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .hdr { min-height: 72px; gap: 10px; }
  .brand-logo { width: 50px; height: 50px; }
  .brand-text strong { font-size: 17px; }
  .brand-text small, .brand-text em { font-size: 11.5px; }
  .hdr-cta { display: none; }
  .grid-3, .ann-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-item:nth-child(3n+1) { border-left: 1px solid var(--line); }
  .quick-item:nth-child(2n+1) { border-left: 0; }
  .quick-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .q-go { display: none; }
  .quick-item { padding: 18px 10px; }
  .stats { grid-template-columns: 1fr 1fr; padding: 22px 18px; }
  .stat + .stat::before { display: none; }
  .why-cards { grid-template-columns: 1fr 1fr; }
  .follow { grid-template-columns: 1fr; }
  .ftr { grid-template-columns: 1fr; gap: 24px; }
  .slide.has-text { min-height: 440px; }
  .slide.has-text::before { background: linear-gradient(180deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.75) 55%, rgba(255,255,255,.2) 100%); }
  .hero-copy { align-items: flex-start; padding-top: 28px; }
  .hero-nav { width: 38px; height: 38px; }
  .hero-nav.prev { left: 8px; } .hero-nav.next { right: 8px; }
  .sec-head h2, .bar-title { font-size: 22px; }
  .director { grid-template-columns: 1fr; text-align: center; }
  .director img { margin: 0 auto; }
  .article { padding: 20px 18px; }
  .form-grid, .contact-grid { grid-template-columns: 1fr; }
  .b-image.align-left, .b-image.align-right { float: none; max-width: 100%; margin: 1em 0; }
  .b-gallery { grid-template-columns: repeat(2, 1fr) !important; }
  .prevnext { grid-template-columns: 1fr; }
  .search-inline input { min-width: 0; width: 100%; }
  .staff-card { width: calc(50% - 11px); padding: 12px 10px; }
  .staff-card img { width: 100%; height: auto; aspect-ratio: 5/6; }
  .staff-card.lead { width: 80%; }
  .fab { right: 14px; bottom: 74px; } .to-top { right: 18px; bottom: 18px; }
}
@media print { .site-header, .site-footer, .fab, .to-top, .share { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.mourn-ribbon { position: fixed; top: 0; left: 0; width: 80px; height: 80px; z-index: 500; pointer-events: none;
  background: linear-gradient(135deg, #111 0 30%, transparent 30%); }

/* ---------- เมนูมือถือ (ลูกของ body โดยตรง) ---------- */
/* โหมดเมนูย่อ (html.nav-compact) — เปิดเมื่อจอ ≤ 1240px หรือเมื่อเมนูด้านบนยาวจนไม่พอที่ (ตรวจด้วย site.js) */
html.nav-compact .icon-btn.nav-toggle { display: inline-grid; }
html.nav-compact .main-nav { display: none; }
html.nav-compact .hdr-contact { display: none; }
html.nav-compact .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
html.nav-compact .brand { flex: 1 1 auto; max-width: none; }
html.nav-compact .hdr { gap: 10px; }
html:not(.nav-compact) .m-nav, html:not(.nav-compact) .m-backdrop { display: none; }
@media all {
  .m-backdrop { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(var(--p-deep-rgb),.5); z-index: 9998; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .m-nav { display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; width: 86vw; max-width: 360px; height: 100%; background: #fff; z-index: 9999;
    transform: translate3d(105%, 0, 0); visibility: hidden; transition: transform .3s ease, visibility .3s; box-shadow: -10px 0 40px rgba(var(--p-deep-rgb),.25);
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
  body.nav-open .m-nav { transform: none; visibility: visible; }
  body.nav-open .m-backdrop { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; touch-action: none; }
  body.nav-open .m-nav { touch-action: pan-y; }
  body.nav-open .fab, body.nav-open .to-top { display: none; }
  .m-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
  .m-brand { display: flex; align-items: center; gap: 10px; color: var(--p-deep); font-family: var(--head); font-weight: 700; font-size: 16px; line-height: 1.3; min-width: 0; }
  .m-brand img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
  .m-close { flex-shrink: 0; border: 0; background: var(--p-soft); color: var(--p); width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
  .m-close .ico { width: 22px; height: 22px; }
  .m-search { display: flex; align-items: center; gap: 8px; margin: 12px 14px 4px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
  .m-search input { flex: 1; border: 0; outline: 0; padding: 10px 0; font-size: 16px; background: transparent; min-width: 0; }
  .m-list { list-style: none; margin: 0; padding: 6px 10px; }
  .m-list > li { border-bottom: 1px solid var(--line); }
  .m-row { display: flex; align-items: center; }
  .m-link { flex: 1; display: block; text-align: left; padding: 13px 10px; font-family: var(--head); font-weight: 500; font-size: 16.5px; color: var(--ink); background: none; border: 0; }
  .m-caret { width: 44px; height: 44px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 10px; transition: transform .2s; }
  .m-has.open .m-caret { transform: rotate(180deg); color: var(--p); }
  .m-has.open > .m-row .m-link { color: var(--p); }
  .m-sub { list-style: none; margin: 0 0 8px; padding: 0 0 0 12px; display: none; }
  .m-has.open > .m-sub { display: block; }
  .m-sub a { display: block; padding: 10px 10px; color: var(--text); font-size: 15.5px; border-radius: 8px; }
  .m-sub a:active, .m-sub a:hover { background: var(--p-soft); color: var(--p); }
  .m-sub ul { list-style: none; padding-left: 14px; margin: 0; }
  .m-foot { margin-top: auto; padding: 16px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
  .m-foot .btn { justify-content: center; }
  .m-tel { text-align: center; color: var(--muted); font-size: 15px; }
}

/* ---------- ส่วนหัว: รองรับชื่อโรงเรียน/คำขวัญยาว ไม่ให้ดันปุ่มค้นหา-เมนูหลุดจอ ---------- */
.brand { flex: 0 1 auto; min-width: 0; max-width: 440px; }
.brand-text { min-width: 0; }
.site-header .brand-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.site-header .brand-text em, .site-header .brand-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-actions { flex-shrink: 0; margin-left: auto; }
.main-nav { flex-shrink: 0; margin-left: auto; }
.main-nav + .hdr-actions { margin-left: 0; }
/* ไม่มี JavaScript: ใช้ขนาดจอตัดสิน */
@media (max-width: 1240px) { html:not(.js) .main-nav { display: none; } }
.ftr-brand .brand-text small { white-space: normal; }
@media (max-width: 760px) {
  .hdr-actions { gap: 2px; }
  .hdr-actions .icon-btn { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .site-header .brand-text small { display: none; }
  .site-header .brand-text strong { font-size: 15.5px; }
  .site-header .brand-logo { width: 44px; height: 44px; }
  .brand { gap: 8px; }
}
/* ส่วนหัวกว้างขึ้นบนจอใหญ่ เพื่อให้เมนูยาวแสดงครบโดยไม่ทับปุ่มค้นหา */
.site-header > .container.hdr { max-width: 1480px; }
.main-nav > ul > li > a { padding-left: 9px; padding-right: 9px; font-size: 15px; }
@media (min-width: 1600px) { .main-nav > ul > li > a { padding-left: 12px; padding-right: 12px; font-size: 15.5px; } }
.site-header .hdr { position: relative; z-index: 3; }
.search-panel { position: relative; z-index: 2; }

/* ==========================================================================
   MODERN v2 — สไตล์เดียวกับระบบ ปพ.5 (เขียว-เหลือง, ปุ่มไล่สี, การ์ดมน, ฟอนต์สารบรรณ)
   สีทั้งหมดอ้างอิงตัวแปรธีม จึงเปลี่ยนสีได้จากหลังบ้าน › ตั้งค่า › ธีมสี
   ========================================================================== */
:root { --radius: 16px; --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 28px -14px rgba(var(--p-deep-rgb), .22);
  --shadow-lg: 0 2px 4px rgba(16,24,40,.04), 0 24px 48px -18px rgba(var(--p-deep-rgb), .32);
  --grad: linear-gradient(135deg, var(--p-light) 0%, var(--p) 50%, var(--p-dark) 100%);
  --grad-deep: linear-gradient(135deg, var(--p) 0%, var(--p-dark) 45%, var(--p-deep) 100%); }
body { background: var(--bg2); font-size: 18px; }
h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: 0; }

/* ปุ่ม */
.btn { border-radius: 12px; font-weight: 700; padding: .68em 1.35em; font-size: 16px; transition: transform .18s, box-shadow .18s, background .18s, filter .18s; }
.btn-primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 22px -10px rgba(var(--p-rgb), .75), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { color: #fff; background: var(--grad); filter: brightness(1.06) saturate(1.05); transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(var(--p-rgb), .8), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:active { transform: translateY(0); }
.btn-outline, .btn-ghost { background: #fff; border: 2px solid rgba(var(--p-rgb), .35); color: var(--p-dark); }
.btn-outline:hover, .btn-ghost:hover { background: var(--p-soft); border-color: var(--p); color: var(--p-dark); transform: translateY(-2px); }
.btn-accent { background: linear-gradient(135deg, var(--a), var(--a) 60%, rgba(var(--a-rgb), .85)); color: var(--a-ink); border: 0; box-shadow: 0 10px 22px -10px rgba(var(--a-rgb), .9); }
.btn-accent:hover { color: var(--a-ink); transform: translateY(-2px); filter: brightness(1.04); }
.btn-lg { padding: .82em 1.6em; font-size: 17px; }
.btn-sm { padding: .45em 1em; font-size: 14.5px; border-radius: 10px; }
.play-dot { background: var(--a); color: var(--a-ink); }
.badge { background: var(--a); color: var(--a-ink); font-weight: 700; }

/* ส่วนหัว */
.site-header { background: rgba(255,255,255,.96); border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.site-header.scrolled { box-shadow: 0 8px 24px -12px rgba(var(--p-deep-rgb), .25); }
.brand-text strong { color: var(--p-deep); font-weight: 800; }
.brand-text em { color: var(--p); font-weight: 700; }
.main-nav > ul > li > a { font-weight: 600; border-radius: 10px; color: var(--ink); }
.main-nav > ul > li > a:hover, .main-nav > ul > li:hover > a { background: var(--p-soft); color: var(--p-dark); }
.main-nav .sub { border-radius: 16px; padding: 8px; border-color: rgba(var(--p-rgb), .12); }
.main-nav .sub a:hover { background: var(--p-soft); color: var(--p-dark); }
.icon-btn { border-radius: 12px; }
.icon-btn:hover { background: var(--p-soft); color: var(--p-dark); }
.hdr-cta { border-radius: 12px; }

/* แบนเนอร์ */
.h-big { background: linear-gradient(90deg, var(--p-deep), var(--p) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hero-dots button.is-active { background: var(--a); }
.hero-nav { border-radius: 14px; }
.hero-nav:hover { color: var(--p-dark); }
.hero-script::after { background: var(--a); }

/* เมนูลัด: การ์ดแยกชิ้น + ไอคอนในกล่องสี */
.quick { padding: 26px 0 8px; }
.quick-grid { background: transparent; border: 0; box-shadow: none; overflow: visible; gap: 14px; border-radius: 0; }
.quick-item, .quick-item + .quick-item { border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); padding: 22px 14px 20px; }
a.quick-item:hover { background: #fff; border-color: rgba(var(--p-rgb), .45); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.quick-item { transition: transform .2s, box-shadow .2s, border-color .2s; }
.q-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--p-soft); color: var(--p); margin-bottom: 12px; transition: .2s; }
.q-ic .ico { width: 34px; height: 34px; stroke-width: 1.8; }
a.quick-item:hover .q-ic { background: var(--grad); color: #fff; box-shadow: 0 10px 20px -10px rgba(var(--p-rgb), .8); }
.q-txt strong { color: var(--ink); font-size: 17px; font-weight: 700; }
.q-go { top: 14px; right: 14px; width: 28px; height: 28px; background: var(--a-soft); color: var(--a-ink); }
a.quick-item:hover .q-go { background: var(--a); color: var(--a-ink); }

/* ตัวเลขสถิติ: แถบไล่สีเข้ม + ตัวเลขขาว ไอคอนสีเน้น */
.stats { background: var(--grad-deep); color: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); padding: 30px 32px; }
.stats::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(circle at 92% 10%, rgba(var(--a-rgb), .28), transparent 34%), radial-gradient(circle at 8% 110%, rgba(255,255,255,.14), transparent 40%),
  radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.4px) 0 0 / 18px 18px; }
.stats-title h2, .stats-title h2 span { color: #fff; }
.stats-title p { color: rgba(255,255,255,.82); }
.stats-title::before { background: var(--a); }
.stat strong { color: #fff; }
.stat span { color: rgba(255,255,255,.85); }
.stat-ic { color: var(--a); width: 40px; height: 40px; }
.stat + .stat::before, .stats-title + .stat::before { background: rgba(255,255,255,.18); }

/* หัวข้อส่วน */
.sec-head h2, .bar-title { color: var(--ink); font-weight: 800; }
.sec-head h2::before, .bar-title::before { width: 6px; border-radius: 6px; background: linear-gradient(180deg, var(--a), var(--p)); }
.sec-more { color: var(--p-dark); font-weight: 700; padding: 6px 14px; border-radius: 999px; background: var(--p-soft); }
.sec-more:hover { background: var(--p); color: #fff; }
.sec-ic { color: var(--p); }

/* การ์ดข่าว */
.card { border-radius: var(--radius-lg); border-color: #e8eeeb; }
.post-card:hover { border-color: rgba(var(--p-rgb), .4); }
.date-pill { background: var(--a); color: var(--a-ink); font-weight: 700; border-radius: 10px; box-shadow: 0 6px 14px -6px rgba(0,0,0,.35); }
.pc-body h3 { font-size: 18.5px; font-weight: 700; }
.more { color: var(--p-dark); font-weight: 700; }

/* ประกาศสำคัญ */
.announce { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 24px; }
.announce .sec-head h2 { color: var(--ink); }
.ann-item { border-radius: 16px; background: var(--bg2); border-color: transparent; }
.ann-item:hover { background: #fff; border-color: rgba(var(--p-rgb), .35); }
.ann-date { border-right: 0; background: var(--grad); color: #fff; border-radius: 14px; padding: 8px 6px; min-width: 66px; margin-right: 2px; }
.ann-date b, .ann-date small { color: #fff; }
.ann-go { width: 32px; height: 32px; border-radius: 10px; background: var(--p-soft); display: grid; place-items: center; color: var(--p-dark); }

/* ทำไมต้องเลือกเรา */
.why { background-color: var(--p-softer); }
.why-card { border-radius: 20px; border: 1px solid var(--line); }
.why-card .ico { width: 56px; height: 56px; padding: 12px; border-radius: 16px; background: var(--p-soft); color: var(--p); }
.why-card:hover .ico { background: var(--grad); color: #fff; }

/* ส่วนท้าย */
.site-footer { background: radial-gradient(900px 300px at 90% 0%, rgba(var(--a-rgb), .14), transparent 60%), radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.4px) 0 0 / 20px 20px, var(--grad-deep); }
.ftr-col h4::before { background: var(--a); }
.ftr-contact .ico { color: var(--a); }
.ftr-social a { border-radius: 12px; }
.ftr-social a:hover { background: var(--a); color: var(--a-ink); }
.ftr-links li::before { background: var(--a); opacity: .8; }

/* หัวหน้าย่อย */
.page-hero { background: radial-gradient(700px 260px at 88% -10%, rgba(var(--a-rgb), .25), transparent 60%), radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.4px) 0 0 / 18px 18px, var(--grad-deep); padding: 38px 0 44px; }
.page-hero h1 { font-weight: 800; }

/* แท็บ / ตัวแบ่งหน้า / ฟอร์ม */
.tabs a { border-radius: 12px; font-weight: 600; }
.tabs a.active, .tabs a:hover { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(var(--p-rgb), .8); }
.pager a, .pager span { border-radius: 12px; font-weight: 600; }
.pager .cur { background: var(--grad); border-color: transparent; }
.search-inline { border-radius: 12px; }
.search-inline button { background: var(--grad); }
.input, .field input, .field select, .field textarea { border-radius: 12px; border-width: 1.5px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--p); box-shadow: 0 0 0 4px rgba(var(--p-rgb), .15); }
.form-card, .article, .side-box { border-radius: var(--radius-lg); }
.side-box h3::before { background: linear-gradient(180deg, var(--a), var(--p)); width: 5px; }
.info-list .i { border-radius: 14px; }
.b-quote { border-left-color: var(--a); }
.b-file-ic { border-radius: 14px; }
.staff-card { border-radius: 20px; }
.staff-card small { color: var(--p-dark); font-weight: 600; }
.dept > h2::after { background: linear-gradient(90deg, var(--a), var(--p)); }
.gal-card { border-radius: 18px; }
.fab-main, .to-top { background: var(--grad); }
.to-top { border-radius: 14px; }
.soc-ic { border-radius: 14px; }
.m-close { border-radius: 12px; }
.m-has.open > .m-row .m-link, .m-has.open .m-caret { color: var(--p-dark); }
.m-nav .m-foot .btn-outline { border-width: 2px; }
.quick-grid > .quick-item:nth-child(n) { border: 1px solid var(--line); }
.quick-grid > a.quick-item:nth-child(n):hover { border-color: rgba(var(--p-rgb), .45); }
@media (max-width: 760px) { .quick-grid { gap: 10px; } .q-ic { width: 54px; height: 54px; border-radius: 16px; } .stats { padding: 24px 18px; } }

/* ---------- สารจากผู้อำนวยการ: บล็อกสีเน้น ---------- */
.director { position: relative; overflow: hidden; display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: center; padding: 34px 40px;
  border-radius: 24px; border: 0; color: var(--a-ink);
  background: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.5px) 0 0 / 16px 16px, linear-gradient(135deg, var(--a) 0%, var(--a) 45%, var(--a-soft) 100%);
  box-shadow: 0 22px 44px -22px rgba(var(--a-rgb), .9); }
.director.no-photo { grid-template-columns: 1fr; }
.director::before { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.22); pointer-events: none; }
.director::after { content: ""; position: absolute; left: 34%; bottom: -120px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid rgba(var(--p-rgb), .08); pointer-events: none; }
.dir-photo { position: relative; z-index: 1; margin: 0; }
.dir-photo img { width: 240px; height: 290px; object-fit: cover; border-radius: 20px; border: 6px solid #fff; box-shadow: 0 18px 36px -16px rgba(0,0,0,.4); }
.dir-photo::after { content: ""; position: absolute; left: -12px; bottom: -12px; width: 70px; height: 70px; border-radius: 18px; background: var(--grad); z-index: -1; }
.dir-body { position: relative; z-index: 1; }
.dir-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.6); color: var(--p-dark);
  font-family: var(--head); font-weight: 700; font-size: 15px; }
.dir-eyebrow .ico { width: 18px; height: 18px; }
.director blockquote { margin: 16px 0 20px; font-size: 20px; line-height: 1.75; font-weight: 500; color: var(--a-ink); }
.dir-sign { padding-left: 16px; border-left: 4px solid var(--p); }
.director .dir-sign strong { display: block; font-family: var(--head); font-size: 19px; font-weight: 800; color: var(--a-ink); }
.director .dir-sign small { color: var(--a-ink); opacity: .8; font-size: 15px; }
.dir-quote { position: absolute; right: 34px; bottom: -40px; font-family: Georgia, serif; font-size: 220px; line-height: 1; color: rgba(255,255,255,.45); pointer-events: none; }
@media (max-width: 760px) {
  .director { grid-template-columns: 1fr; text-align: center; padding: 28px 20px; gap: 22px; }
  .dir-photo { justify-self: center; }
  .dir-photo img { width: 180px; height: 216px; }
  .director blockquote { font-size: 18px; }
  .dir-sign { border-left: 0; padding-left: 0; border-top: 3px solid var(--p); padding-top: 10px; display: inline-block; }
}

/* ---------- วีดิโอแนะนำและผลงาน: แถบพื้นสีเน้น + การ์ดแบบข่าว ---------- */
.video-sec { position: relative; overflow: hidden; margin: 30px 0; padding: 56px 0 60px;
  background: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.5px) 0 0 / 18px 18px, linear-gradient(135deg, var(--a) 0%, var(--a) 40%, var(--a-soft) 100%); }
.video-sec::before { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.25); pointer-events: none; }
.video-sec::after { content: ""; position: absolute; left: -90px; bottom: -140px; width: 320px; height: 320px; border-radius: 50%; border: 48px solid rgba(var(--p-rgb), .08); pointer-events: none; }
.video-sec .container { position: relative; z-index: 1; }
.video-sec .sec-head h2 { color: var(--a-ink); }
.video-sec .sec-head h2::before { background: var(--p); }
.video-sec .sec-ic { color: var(--p-dark); }
.video-sec .sec-more { background: #fff; color: var(--p-dark); box-shadow: 0 6px 16px -10px rgba(0,0,0,.4); }
.video-sec .sec-more:hover { background: var(--p); color: #fff; }
.video-sec .card { border: 0; box-shadow: 0 18px 40px -22px rgba(0,0,0,.45); }
.vid-thumb { border: 0; padding: 0; width: 100%; cursor: pointer; background: #111; }
.vid-thumb img { opacity: .94; }
.vid-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.95); color: var(--p); box-shadow: 0 0 0 10px rgba(255,255,255,.28), 0 12px 24px -8px rgba(0,0,0,.5); transition: transform .2s, background .2s, color .2s; }
.vid-play .ico { width: 26px; height: 26px; margin-left: 4px; }
.vid-card:hover .vid-play { transform: translate(-50%, -50%) scale(1.1); background: var(--p); color: #fff; }
.vid-type { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; font-family: var(--head); }
.vid-type .ico { width: 15px; height: 15px; }
.vid-title { all: unset; cursor: pointer; color: var(--ink); }
.vid-title:hover { color: var(--p); }
.vid-card .more { border: 0; background: none; padding: 0; cursor: pointer; font-size: 15.5px; font-family: var(--head); }
.vid-card .more .ico { width: 18px; height: 18px; }
.videos-page .vid-card .more { color: var(--p-dark); }

/* ---------- ติดตามเรา (แยกส่วน) ---------- */
.follow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.follow.no-fb { grid-template-columns: 1fr; }
.soc-grid { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.follow.no-fb .soc-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.soc-grid a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); transition: .2s; }
.soc-grid a:hover { transform: translateY(-3px); border-color: var(--c, var(--p)); box-shadow: var(--shadow-lg); }
.soc-grid strong { display: block; font-family: var(--head); color: var(--ink); font-size: 16.5px; line-height: 1.3; }
.soc-grid small { color: var(--muted); font-size: 14px; }
.soc-grid .soc-go { margin-left: auto; color: var(--muted); width: 18px; height: 18px; transition: .2s; }
.soc-grid a:hover .soc-go { color: var(--p); transform: translateX(3px); }
.fb-frame { height: 420px; border-radius: 20px; }
@media (max-width: 1024px) { .follow { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .soc-grid { grid-template-columns: 1fr; } .video-sec { padding: 40px 0 44px; } }

/* ============ ประกาศจัดซื้อจัดจ้าง (e-GP) ============ */
.pc-type { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  color: var(--tc, var(--p)); background: color-mix(in srgb, var(--tc, var(--p)) 11%, #fff); border: 1px solid color-mix(in srgb, var(--tc, var(--p)) 24%, #fff); }
.pc-type::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pc-egp { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 7px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #1e3a8a, #2563eb); white-space: nowrap; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pc-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.pc-tabs a small { display: inline-grid; place-items: center; min-width: 22px; height: 20px; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--p-soft); color: var(--p-dark); font-size: 12px; }
.pc-tabs a.active small, .pc-tabs a:hover small { background: rgba(255,255,255,.25); color: #fff; }
.pc-search { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-search select { padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-family: inherit; font-size: 14.5px; color: var(--text); }
.pc-list { display: grid; gap: 12px; }
.pc-item { position: relative; display: flex; align-items: center; gap: 18px; padding: 16px 18px 16px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: .2s; }
.pc-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--tc); }
.pc-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg, var(--shadow)); }
.pc-date { flex-shrink: 0; width: 66px; padding: 8px 0; border-radius: 14px; text-align: center; line-height: 1.15; color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, #fff); }
.pc-date b { display: block; font-family: var(--head); font-size: 26px; font-weight: 800; }
.pc-date small { display: block; font-size: 12px; color: var(--muted); }
.pc-main { flex: 1; min-width: 0; }
.pc-main h3 { margin: 6px 0 4px; font-size: 17px; line-height: 1.5; font-weight: 600; }
.pc-main h3 a { color: var(--ink); } .pc-main h3 a:hover { color: var(--p); }
.pc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; color: var(--muted); font-size: 14px; }
.pc-meta .ico { width: 15px; height: 15px; color: var(--tc, var(--p)); vertical-align: -2px; }
.pc-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: #cbd5e1; margin: 0 6px; }
.pc-acts { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; align-items: stretch; }
.pc-acts .btn { justify-content: center; }
.pc-note { display: flex; gap: 8px; align-items: flex-start; margin: 22px 0 0; padding: 12px 16px; border-radius: 12px; background: #eff6ff; color: #1e3a8a; font-size: 14px; line-height: 1.6; }
.pc-note .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.pc-note a { color: #1d4ed8; text-decoration: underline; }
/* detail */
.pc-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.pc-doc { padding: 0 0 22px; overflow: hidden; }
.pc-doc-head { padding: 26px 28px 20px; border-top: 5px solid var(--tc); background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 7%, #fff), #fff); }
.pc-doc-head h1 { margin: 12px 0 8px; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.45; color: var(--ink); }
.pc-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; margin: 0 28px 20px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.pc-info > div { padding: 12px 16px; background: #fff; }
.pc-info dt { font-size: 13px; color: var(--muted); }
.pc-info dd { margin: 2px 0 0; font-size: 16px; color: var(--ink); font-weight: 500; }
.pc-info dd strong { color: var(--tc); font-size: 19px; }
.pc-desc, .pc-doc > .b-file, .pc-doc > .b-pdf, .pc-doc-acts, .pc-doc > .pc-note { margin-left: 28px; margin-right: 28px; }
.pc-desc { margin-bottom: 18px; line-height: 1.85; }
.pc-doc > .b-pdf { margin-top: 12px; }
.pc-doc-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pc-side { padding: 18px; position: sticky; top: 100px; }
.pc-side h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 17px; }
.pc-side h3 .ico { color: var(--p); width: 20px; height: 20px; }
.pc-side > a:not(.pc-side-all) { display: block; padding: 11px 0; border-bottom: 1px dashed var(--line); color: var(--text); }
.pc-side > a strong { display: block; margin: 5px 0 2px; font-size: 14.5px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.pc-side > a:hover strong { color: var(--p); }
.pc-side > a small { color: var(--muted); font-size: 12.5px; }
.pc-side .pc-type { font-size: 12px; padding: 1px 9px; }
.pc-side-all { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; padding: 9px; border-radius: 10px; background: var(--p-soft); color: var(--p-dark); font-weight: 600; }
/* homepage */
.pc-home { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px 24px; box-shadow: var(--shadow);
  background-image: radial-gradient(400px 160px at 100% 0%, rgba(37, 99, 235, .07), transparent 70%); }
.pc-home-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pc-home-item { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--text); overflow: hidden; transition: .2s; }
.pc-home-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tc); }
.pc-home-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); border-color: color-mix(in srgb, var(--tc) 40%, #fff); }
.pc-home-item .pc-date { width: 58px; padding: 6px 0; } .pc-home-item .pc-date b { font-size: 22px; }
.pc-home-body { flex: 1; min-width: 0; }
.pc-home-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px; font-size: 15px; line-height: 1.5; color: var(--ink); font-weight: 500; }
.pc-home-item .pc-type { font-size: 12px; padding: 1px 9px; }
@media (max-width: 991px) { .pc-detail { grid-template-columns: 1fr; } .pc-side { position: static; } }
@media (max-width: 760px) {
  .pc-home-list { grid-template-columns: 1fr; } .pc-home { padding: 18px 14px; }
  .pc-item { flex-wrap: wrap; gap: 12px; padding: 14px 14px 14px 18px; } .pc-date { width: 58px; } .pc-main { flex-basis: calc(100% - 72px); }
  .pc-acts { flex-direction: row; width: 100%; } .pc-acts .btn { flex: 1; }
  .pc-search, .pc-search select, .pc-search .search-inline { width: 100%; }
  .pc-doc-head { padding: 20px 18px 16px; } .pc-info { margin: 0 18px 18px; } .pc-desc, .pc-doc > .b-file, .pc-doc > .b-pdf, .pc-doc-acts, .pc-doc > .pc-note { margin-left: 18px; margin-right: 18px; }
  .pc-doc-acts .btn { width: 100%; justify-content: center; }
}
.pc-info { gap: 0; background: #fff; }
.pc-info > div { box-shadow: 0 0 0 .5px var(--line); }
.pc-note { display: block; }
.pc-note > .ico { display: inline-block; vertical-align: -3px; margin: 0 4px 0 0; }
.pc-doc-head .pc-type { white-space: normal; text-align: left; }

/* แถบโหมดดูตัวอย่าง (จากหลังบ้าน) */
.preview-bar { position: sticky; top: 84px; z-index: 30; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 16px; border-radius: 14px;
  background: #1e293b; color: #fff; box-shadow: 0 12px 28px -14px rgba(0,0,0,.5); font-size: 14.5px; }
.preview-bar .ico { width: 20px; height: 20px; color: var(--a, #facc15); flex-shrink: 0; }
.preview-bar span { flex: 1; } .preview-bar strong { color: var(--a, #facc15); }
.preview-bar button { border: 0; border-radius: 10px; padding: 7px 14px; background: rgba(255,255,255,.14); color: #fff; font-family: inherit; cursor: pointer; }
.preview-bar button:hover { background: rgba(255,255,255,.24); }
@media (max-width: 640px) { .preview-bar { top: 70px; flex-wrap: wrap; } .preview-bar button { width: 100%; } }
