/* ============================================================
   โรงเรียนนิลประพันธ์ — Design System
   CI: "Balanced Bridge" v.2026 · Font: Sarabun
   Torch Gold · Heritage Green · Dolphin Blue · Charcoal · Cream
   ============================================================ */

:root {
  /* Surfaces (CI) */
  --bg:        #F8F5EE;   /* Warm Cream — main background    */
  --bg-soft:   #F1ECE0;   /* Soft Sand — panel sections      */
  --bg-warm:   #F1ECE0;   /* Soft Sand — page heroes         */
  --charcoal:  #29251F;   /* Deep Charcoal — dark anchors    */

  /* Ink (CI) */
  --ink:    #29251F;      /* Deep Charcoal — primary text */
  --ink-2:  #756E64;      /* Neutral Greige — secondary   */
  --ink-3:  #9B9489;      /* lighter greige — captions    */

  /* Lines (CI) */
  --line:   #EAE3D4;
  --line-2: #DED5C2;

  /* Brand gold — Torch Gold (CI primary · locked) */
  --yellow:        #E5A910;
  --yellow-dark:   #C8910A;
  --yellow-bright: #F2BC30;  /* lighter gold for hover (lifts, never dulls) */
  --yellow-deep:   #8A6406;   /* readable gold-brown for text on cream */
  --yellow-soft:   #F3E2B0;
  --yellow-tint: #FBF3DC;

  /* Heritage Green (CI secondary · heritage / ceremony) */
  --green:       #44604E;
  --green-dark:  #354D3D;
  --green-tint:  #E6ECE7;

  /* Dolphin Blue (CI secondary · kids / activities / digital) */
  --blue:        #2E7DA1;
  --blue-dark:   #256480;
  --blue-bright: #3E97C0;  /* lighter blue for hover (lifts, never dulls) */
  --blue-tint:   #E2EDF3;

  /* Radii */
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --r-xl: 34px;

  /* Shadows (warm) */
  --sh-sm: 0 2px 8px rgba(64,52,20,.06);
  --sh:    0 10px 30px rgba(64,52,20,.09);
  --sh-md: 0 18px 44px rgba(64,52,20,.12);
  --sh-lg: 0 30px 70px rgba(64,52,20,.16);

  --maxw: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); overscroll-behavior-y: none; }
/* ปิด overscroll bounce (rubber-band) ทั้งเว็บแทนการไล่จับคู่สีตอนเลื่อนสุดหน้า — เคยลองสลับสีพื้นหลัง
   ให้เข้ากับ footer ตอน bounce มาแล้วหลายรอบ (ดู git log ของ css/js ไฟล์นี้) แต่ละรอบเจอ edge case
   ใหม่ของ WebKit เพิ่มเรื่อย ๆ (trigger ผิด element / เร็วไป / ช้าไป / มี glow ตอน transition สี)
   เพราะเป็น native rendering behavior ที่คุมได้ไม่เต็มร้อย เลยเปลี่ยนมาตัด bounce ทิ้งแทน —
   deterministic กว่า ไม่มีอะไรให้เห็นตอนเลื่อนสุดหน้าเลย (ไม่ใช่แค่สีถูก) */
/* ชั้นสำรอง (backstop) เสริมจาก sticky-footer ด้านล่าง — toggle ผ่าน scroll listener ใน js/footer.js
   เมื่อขอบบนสุดของ footer เลื่อนถึง/เลยขอบบนจอ (footer เต็มจอพอดี) ค่อยสลับเป็นสี footer */
html.at-footer,
html.at-footer body { background: var(--charcoal); }

body {
  margin: 0;
  font-family: "Sarabun", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  /* sticky-footer layout — กัน "ช่องว่างสีครีมโผล่ใต้ footer" ตอน Safari ยุบแถบ URL แล้วจอสูงขึ้น
     กว่าความสูงจริงของเนื้อหา (คนละปัญหากับ overscroll bounce ด้านบน — เกิดจาก viewport ขยาย
     แบบ static ไม่ใช่ animation ของการลาก) ให้ #footer (flex:1 0 auto ด้านล่าง) ยืดเต็มพื้นที่
     ที่เหลือเอง พื้นหลัง .footer (charcoal) เลยครอบคลุมถึงขอบจอเสมอ ไม่ต้องพึ่งสี body/html เลย */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.18; font-weight: 800; letter-spacing: -0.01em; }
p  { margin: 0; }
a  { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Section rhythm ---------- */
.section { padding: clamp(64px, 8vw, 120px) 0; }
.section--soft { background: var(--bg-soft); }
.section--warm { background: var(--bg-warm); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--yellow-deep);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: var(--yellow);
}
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 {
  font-size: clamp(28px, 4vw, 46px);
  margin-top: 16px;
  text-wrap: balance;
}
.section-head p {
  margin-top: 16px; color: var(--ink-2); font-size: clamp(16px,1.6vw,19px);
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: inherit; font-weight: 700; font-size: 16px;
  padding: 14px 26px; border-radius: 100px; border: 0; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn--primary { background: var(--yellow); color: #2A2200; box-shadow: var(--sh-sm); }
.btn--primary:hover { background: var(--yellow-bright); transform: translateY(-3px); box-shadow: var(--sh-md); }

.btn--dark { background: var(--charcoal); color: #fff; }
.btn--dark:hover { transform: translateY(-3px); box-shadow: var(--sh); }

.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--yellow); background: var(--yellow-tint); transform: translateY(-3px); }

.btn--light { background: #fff; color: var(--ink); box-shadow: var(--sh-sm); }
.btn--light:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }

/* ============================================================
   SKIP LINK — ซ่อนไว้นอกจอ ปรากฏเมื่อโฟกัส (Tab แรกสุดของหน้า) เพื่อข้ามเมนู header ไป <main> โดยตรง
   ============================================================ */
.skip-link {
  position: absolute; top: -48px; left: 12px; z-index: 200;
  background: var(--yellow); color: var(--ink); font-weight: 700;
  padding: 10px 18px; border-radius: 8px; text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(64,52,20,.05); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: flex; align-items: center; gap: 13px; margin-right: auto; min-width: 0; }
.brand__txt { min-width: 0; }
.brand__name, .brand__sub { overflow: visible; }
.brand__mark {
  width: 46px; height: 46px; border-radius: 12px;
  flex: none; object-fit: contain; object-position: center;
  background: none; box-shadow: none;
}
.brand__name { font-weight: 800; font-size: 19px; line-height: 1.12; white-space: nowrap; }
.brand__txt { display: flex; flex-direction: column; gap: 1px; }
.brand__sub { font-size: 12.5px; color: var(--ink-2); font-weight: 600; letter-spacing: .02em; line-height: 1.1; }

.menu { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.menu__item { position: relative; }
.menu__link {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 15.5px;
  color: var(--ink-2); transition: color .2s, background .2s, border-radius .2s;
}
.menu__link:hover { color: var(--ink); background: var(--bg-soft); border-radius: 100px; }
.menu__link .chev { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.menu__item:hover .chev { transform: rotate(180deg); }

.menu__link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--yellow); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.menu__link:hover::after { transform: scaleX(1); }
.menu__item--active .menu__link::after { display: none; }
.menu__item--active .menu__link {
  color: #2A2200; background: var(--yellow); border-radius: 100px;
  padding-left: 18px; padding-right: 18px;
}
.menu__item--active .menu__link:hover { background: var(--yellow-bright); color: #2A2200; }

/* dropdown */
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-md); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.menu__item:hover .dropdown, .menu__item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: 11px 14px; border-radius: 10px; font-size: 15px;
  font-weight: 600; color: var(--ink-2); transition: background .18s, color .18s, padding .2s;
}
.dropdown a:hover { background: var(--yellow-tint); color: var(--ink); padding-left: 20px; }

.nav__cta { display: flex; align-items: center; gap: 10px; flex: none; }

.burger {
  display: none; width: 46px; height: 46px; border: 0;
  background: transparent; cursor: pointer; position: relative; flex: none;
  transition: transform .25s var(--ease);
}
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: .3s var(--ease); }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.burger.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* mobile drawer */
.drawer {
  position: fixed; top: 68px; left: 0; right: 0; bottom: 0; z-index: 55; background: #fff;
  padding: 20px 24px 40px; overflow-y: auto;
  transform: translateX(100%); transition: transform .35s var(--ease), top .1s linear;
}
.drawer.open { transform: translateX(0); }
.drawer a { display: block; padding: 12px 8px; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid var(--line); }
.drawer a.sub { padding-left: 24px; font-size: 14.5px; color: var(--ink-2); font-weight: 500; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: clamp(40px,5vw,72px) 0 clamp(60px,7vw,100px); overflow: hidden; }
.hero__bg-blob {
  position: absolute; top: -180px; right: -160px; width: 620px; height: 620px;
  background: radial-gradient(circle at 30% 30%, var(--yellow-soft), transparent 62%);
  filter: blur(10px); z-index: 0; pointer-events: none;
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px,5vw,64px);
  align-items: center;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  font-size: 14px; font-weight: 700; color: var(--ink-2); box-shadow: var(--sh-sm);
}
.hero__badge b { background: var(--charcoal); color: #fff; padding: 4px 11px; border-radius: 100px; font-size: 12.5px; }
.hero h1 {
  font-size: clamp(36px, 5.6vw, 68px); margin: 22px 0 0; text-wrap: balance;
}
.hero h1 .hl { color: var(--yellow-dark); }
.hero__tag {
  margin-top: 18px; font-size: clamp(17px,2vw,22px); color: var(--ink-2); max-width: 30ch;
  font-weight: 500; text-wrap: pretty;
}
.hero__motto {
  display: inline-flex; gap: 18px; margin-top: 26px; flex-wrap: wrap;
}
.hero__motto span { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.hero__motto span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); }
.hero__cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* hero visual */
.hero__visual { position: relative; }
.hero__photo {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  aspect-ratio: 4/4.4; box-shadow: var(--sh-lg); z-index: 1;
}
.hero__badge--float {
  position: absolute; top: 20px; left: 20px; z-index: 3;
  animation: floaty 7s ease-in-out infinite;
}
.hero__float {
  position: absolute; background: #fff; border-radius: var(--r);
  box-shadow: var(--sh-md); padding: 14px 18px; z-index: 2;
  display: flex; align-items: center; gap: 13px;
}
.hero__float--a { top: 8%; left: -34px; animation: floaty 6s ease-in-out infinite; }
.hero__float--b { bottom: 9%; right: -28px; animation: floaty 7s ease-in-out infinite .8s; }
.hero__float .ic {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: var(--yellow-tint); color: var(--yellow-deep);
}
.hero__float .ic svg { width: 24px; height: 24px; }
.hero__float .n { font-size: 22px; font-weight: 800; line-height: 1; }
.hero__float .l { font-size: 13px; color: var(--ink-3); font-weight: 600; }
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }

/* ============================================================
   PLACEHOLDER (image slots)
   ============================================================ */
.ph {
  position: relative; width: 100%; height: 100%;
  background:
    repeating-linear-gradient(135deg, #F0EADC 0 14px, #F5F0E4 14px 28px);
  display: grid; place-items: center; color: var(--yellow-deep);
}
.ph__label {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px; letter-spacing: .02em; color: #A89668;
  background: rgba(255,255,255,.75); padding: 6px 12px; border-radius: 100px;
  border: 1px dashed #D6C79E; text-align: center;
}
/* generated mockup imagery (swap for real photos) */
.mock { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Lock fixed-ratio media boxes: image fills the box absolutely so the
   container's aspect-ratio is always respected (prevents tall images on mobile) */
.acard__media, .ncard__media, .gitem__media, .level__media, .nrow__media { overflow: hidden; }
.acard__media > img, .ncard__media > img, .gitem__media > img,
.level__media > img, .nrow__media > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* ============================================================
   STATS
   ============================================================ */
.stats { position: relative; z-index: 2; margin-top: -52px; }
.stats__card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(28px,3.4vw,46px);
  box-shadow: var(--sh);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  color: var(--ink);
}
.stat { padding: 8px clamp(12px,2vw,26px); position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 14%; height: 72%; width: 1px;
  background: var(--line-2);
}
.stat__num {
  font-size: clamp(34px, 4.4vw, 56px); font-weight: 800; line-height: 1;
  color: var(--yellow-dark); letter-spacing: -.02em;
}
.stat__num .suffix { color: var(--ink); font-size: .55em; }
.stat__label { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); font-weight: 500; line-height: 1.4; }

/* ============================================================
   BENTO / FEATURE CARDS (curriculum highlight)
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.fcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px; position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.fcard:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.fcard__ic {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: var(--yellow-tint); color: var(--yellow-deep); margin-bottom: 20px;
  transition: transform .4s var(--ease), background .3s;
}
.fcard:hover .fcard__ic { transform: scale(1.08) rotate(-5deg); background: var(--yellow); color: #2A2200; }
.fcard__ic svg { width: 30px; height: 30px; }
.fcard h3 { font-size: 22px; }
.fcard p { margin-top: 12px; color: var(--ink-2); font-size: 15.5px; text-wrap: pretty; }
.fcard__tag {
  display: inline-block; margin-bottom: 16px; font-size: 12.5px; font-weight: 700;
  color: var(--yellow-deep); letter-spacing: .08em; text-transform: uppercase;
}
.fcard--wide { grid-column: span 3; }
.fcard--tall { grid-column: span 3; }
.fcard--lead {
  grid-column: span 3; background: linear-gradient(155deg, #FBF3DC 0%, #F3E2B0 100%); color: #7A6212;
  border: 1px solid var(--yellow-soft);
}
.fcard--lead h3 { color: #5A4509; }
.fcard--lead p { color: #7A6212; }
.fcard--lead .fcard__ic { background: #fff; color: var(--yellow-deep); }
.fcard--lead .fcard__tag { color: var(--yellow-deep); }
.fcard--lead:hover .fcard__ic { background: var(--yellow); color: #2A2200; }
.fcard__media { margin: 22px -30px -30px; height: 180px; }

/* ---------- Curriculum feature: Personalized hero banner + grid ---------- */
.hf-tag {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 7px 14px; border-radius: 100px;
  background: var(--yellow-tint); color: var(--yellow-deep);
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.hf-tag svg { width: 16px; height: 16px; }
.feat-banner__tagrow { display: flex; align-items: center; gap: 12px; }
.feat-banner__ic { display: inline-grid; place-items: center; color: var(--yellow-deep); }
.feat-banner__ic svg { width: 34px; height: 34px; }

.feat-banner {
  display: grid; grid-template-columns: 1.08fr .92fr; align-items: stretch;
  background: var(--bg-warm); border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--sh);
}
.feat-banner__body { padding: clamp(30px,3.4vw,52px); display: flex; flex-direction: column; justify-content: center; }
.feat-banner__body h3 { font-size: clamp(25px,2.9vw,36px); margin-top: 16px; text-wrap: balance; }
.feat-banner__body p { margin-top: 15px; color: var(--ink-2); font-size: 16.5px; max-width: 44ch; text-wrap: pretty; }
.feat-banner__media { min-height: 320px; position: relative; overflow: hidden; }
.feat-banner__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.feat-banner:hover .feat-banner__media img { transform: scale(1.05); }
.feat-mini { display: flex; gap: 22px; margin-top: 24px; flex-wrap: wrap; }
.feat-mini b { font-size: 15px; font-weight: 800; color: var(--ink); }
.feat-mini b::before { content: "→ "; color: var(--yellow-dark); }
@media (max-width: 880px) { .feat-banner { grid-template-columns: 1fr; } .feat-banner__media { min-height: 0; aspect-ratio: 16 / 10; order: -1; } }

.feat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-top: 18px; }
.feat-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 30px;
  display: flex; gap: 22px; align-items: flex-start;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.feat-item:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.feat-item__ic {
  width: 64px; height: 64px; border-radius: 17px; flex: none; display: grid; place-items: center;
  background: var(--yellow-tint); color: var(--yellow-deep); transition: .3s var(--ease);
}
.feat-item:hover .feat-item__ic { background: var(--yellow); color: #2A2200; transform: rotate(-5deg); }
.feat-item__ic svg { width: 32px; height: 32px; }
.feat-item .tag { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow-deep); }
.feat-item h3 { font-size: 19px; margin-top: 5px; }
.feat-item p { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; text-wrap: pretty; }
@media (max-width: 760px) { .feat-grid { grid-template-columns: 1fr; } }

/* ============================================================
   LEVELS
   ============================================================ */
.levels { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }

/* ---------- Levels: alternating image/text rows (no cards) ---------- */
.level-rows { display: flex; flex-direction: column; gap: clamp(40px,6vw,88px); margin-top: clamp(36px,4vw,60px); }
.lrow { display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: clamp(28px,5vw,72px); }
.lrow__media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh); aspect-ratio: 4 / 3; }
.lrow__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.lrow:hover .lrow__media img { transform: scale(1.05); }
.lrow__age { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow-deep); }
.lrow__age::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--yellow); }
.lrow__body h3 { font-size: clamp(26px,3.2vw,40px); margin-top: 14px; text-wrap: balance; }
.lrow__body p { margin-top: 16px; color: var(--ink-2); font-size: clamp(16px,1.6vw,18px); max-width: 46ch; text-wrap: pretty; }
.lrow__points { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lrow__points li { display: flex; align-items: flex-start; gap: 11px; color: var(--ink); font-size: 15.5px; font-weight: 600; line-height: 1.5; }
.lrow__points li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--yellow); }
.lrow__link { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; font-weight: 700; font-size: 16px; color: var(--ink); transition: color .25s var(--ease); }
.lrow__link .arr { transition: transform .3s var(--ease); }
.lrow:hover .lrow__link { color: var(--yellow-deep); }
.lrow:hover .lrow__link .arr { transform: translateX(6px); }
.lrow:nth-child(even) .lrow__media { order: 2; }
@media (max-width: 820px) {
  .lrow { grid-template-columns: 1fr; gap: 22px; }
  .lrow:nth-child(even) .lrow__media { order: 0; }
}
.level {
  border-radius: var(--r-lg); overflow: hidden; background: #fff;
  border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease);
  display: flex; flex-direction: column;
}
.level:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.level__media { aspect-ratio: 4/3; position: relative; }
.level__media .tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 13px;
  padding: 6px 14px; border-radius: 100px; box-shadow: var(--sh-sm);
}
.level__body { padding: 26px 26px 30px; flex: 1; display: flex; flex-direction: column; }
.level__body h3 { font-size: 24px; }
.level__age { color: var(--yellow-deep); font-weight: 700; font-size: 14px; margin-top: 4px; }
.level__body p { margin-top: 12px; color: var(--ink-2); font-size: 15px; flex: 1; }
.level__link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-weight: 700; color: var(--ink); font-size: 15.5px;
}
.level__link .arr { transition: transform .3s var(--ease); }
.level:hover .level__link .arr { transform: translateX(5px); }
.level:hover .level__link { color: var(--yellow-deep); }

/* ============================================================
   ACTIVITY CAROUSEL
   ============================================================ */
.caro { position: relative; margin: 0 -24px; }
/* ยกเลิก padding ของ .wrap (24px) ตรงนี้ แล้วให้ .caro__track ใส่ padding กลับเข้าไปเองแทน —
   เผื่อพื้นที่ขอบซ้าย/ขวาให้ box-shadow ตอน hover ฟุ้งได้โดยไม่โดนตัด (การ์ดจะขยับเข้ามาจากแนว
   หัวข้อ section เล็กน้อยตามส่วนต่างของ padding แลกกับไม่ให้เงาโดน clip) */
.caro__track {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  /* padding รอบ track ต้องเผื่อพื้นที่ให้ box-shadow ตอน hover (.acard:hover ใช้ --sh-md ซึ่งฟุ้ง
     ~40-50px) เพราะ overflow-x:auto ทำให้ overflow-y กลายเป็น auto (clip) ไปด้วยโดยอัตโนมัติ —
     padding เดิม (6px 4px 24px) แคบเกินไป เงาเลยโดนตัดทั้งซ้าย/ขวา/ล่าง ต่างจาก section ข่าวที่เป็น
     grid ธรรมดา ไม่มี overflow เลยไม่ถูกตัด */
  padding: 16px 28px 48px; scroll-behavior: smooth;
  /* scroll-snap ใช้ scroll-padding (ไม่ใช่ padding เฉยๆ) กำหนดขอบ snapport — ถ้าไม่ใส่ scroll-padding
     ด้วย การ์ดแรกจะโดน snap ไปชิดขอบ scrollport จริง (คือ padding-box ไม่รวม padding ที่มองเห็น)
     ทำให้เงาฝั่งซ้ายของการ์ดแรกโดนตัดอยู่ดีทั้งที่มองว่ามี padding เผื่อไว้แล้ว (เคยเจอบั๊กแบบนี้มา
     แล้วตอนทำ full-bleed มือถือ — ดูคอมเมนต์ scroll-padding ในโค้ดมือถือด้านล่าง) */
  scroll-padding-left: 28px; scroll-padding-right: 28px;
  scrollbar-width: none;
}
.caro__track::-webkit-scrollbar { display: none; }
.acard {
  flex: 0 0 340px; scroll-snap-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease);
  display: flex; flex-direction: column;
}
.acard:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.acard__media { aspect-ratio: 4/3; position: relative; }
.acard__media .date {
  position: absolute; top: 14px; left: 14px; background: var(--yellow); color: #2A2200;
  font-weight: 700; font-size: 12.5px; padding: 5px 13px; border-radius: 100px;
}
.acard__body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.acard__date { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700;
  color: var(--yellow-deep); letter-spacing: .02em; margin-bottom: 10px; }
.acard__date svg { width: 15px; height: 15px; }
.acard__body h3 { font-size: 19px; line-height: 1.3; }
.acard__body p { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; flex: 1; }
.acard__more {
  margin-top: 16px; font-weight: 700; font-size: 14.5px; color: var(--yellow-deep);
  display: inline-flex; align-items: center; gap: 7px;
}
.acard__more .arr { transition: transform .3s var(--ease); }
.acard:hover .acard__more .arr { transform: translateX(5px); }

.caro__nav { display: flex; gap: 10px; }
.caro__nav--bottom { justify-content: center; margin-top: 28px; }
.caro__btn {
  width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid var(--line-2);
  background: #fff; cursor: pointer; display: grid; place-items: center;
  transition: .25s var(--ease); color: var(--ink);
}
.caro__btn:hover { background: var(--yellow); border-color: var(--yellow); color: #2A2200; transform: scale(1.06); }
.caro__btn svg { width: 20px; height: 20px; }

.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(28px,3.5vw,48px); flex-wrap: wrap; }

/* mobile: keep "ดูทั้งหมด" on the eyebrow line, let the long title wrap below — applies to every section with a head-row button */
@media (max-width: 640px) {
  .head-row { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 14px; row-gap: 12px; }
  .head-row .section-head { display: contents; }
  .head-row .eyebrow { grid-column: 1; grid-row: 1; }
  .head-row .btn { grid-column: 2; grid-row: 1; }
  .head-row h2 { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
}

/* ============================================================
   NEWS
   ============================================================ */
.news { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.ncard {
  display: flex; flex-direction: column; gap: 0; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease);
}
.ncard:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.ncard__media { aspect-ratio: 4/3; position: relative; }
.ncard__body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.ncard__date { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700;
  color: var(--yellow-deep); letter-spacing: .02em; margin-bottom: 10px; }
.ncard__date svg { width: 15px; height: 15px; }
.ncard__body h3 { font-size: 18.5px; line-height: 1.35; }
.ncard__body p { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; flex: 1; }
.ncard__more { margin-top: 16px; font-weight: 700; font-size: 14.5px; color: var(--yellow-deep);
  display: inline-flex; align-items: center; gap: 7px; }
.ncard__more .arr { transition: transform .3s var(--ease); }
.ncard:hover .ncard__more .arr { transform: translateX(5px); }

/* ---------- News list rows (stacked, horizontal) ---------- */
.nlist { display: flex; flex-direction: column; gap: 22px; }
.nrow {
  display: grid; grid-template-columns: 2fr 3fr; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease);
}
.nrow:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.nrow__media { position: relative; aspect-ratio: 4/3; }
.nrow__media .date {
  position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--yellow); color: #2A2200;
  font-weight: 700; font-size: 12.5px; padding: 5px 13px; border-radius: 100px;
}
.nrow__body { padding: clamp(22px,2.4vw,30px); display: flex; flex-direction: column; justify-content: center; }
.nrow__date { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700;
  color: var(--yellow-deep); letter-spacing: .02em; margin-bottom: 10px; }
.nrow__date svg { width: 15px; height: 15px; }
.nrow__body h3 { font-size: clamp(20px,2.2vw,25px); line-height: 1.3; }
.nrow__body p { margin-top: 12px; color: var(--ink-2); font-size: 15.5px; text-wrap: pretty; }
.nrow__more {
  margin-top: 18px; font-weight: 700; font-size: 15px; color: var(--yellow-deep);
  display: inline-flex; align-items: center; gap: 8px;
}
.nrow__more .arr { transition: transform .3s var(--ease); }
.nrow:hover .nrow__more .arr { transform: translateX(5px); }

/* ============================================================
   ADMISSION CTA BAND
   ============================================================ */
.cta-band { position: relative; overflow: hidden; }
.cta-band__inner {
  position: relative; z-index: 1;
  background: var(--charcoal);
  border-radius: var(--r-xl); padding: clamp(40px,5vw,72px);
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center;
  box-shadow: var(--sh-lg);
}
.cta-band__inner::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(229,169,16,.16), transparent 66%);
}
.cta-band .btn--dark { background: var(--yellow); color: #2A2200; box-shadow: var(--sh-sm); }
.cta-band .btn--dark:hover { background: var(--yellow-bright); transform: translateY(-3px); box-shadow: var(--sh-md); }
.cta-band h2 { font-size: clamp(28px,3.6vw,44px); color: #fff; position: relative; }
.cta-band p { margin-top: 16px; color: rgba(255,255,255,.82); font-size: 18px; font-weight: 500; position: relative; }
.cta-band__actions { display: flex; flex-direction: column; gap: 14px; position: relative; }
.cta-band__actions .btn { justify-content: center; }
.cta-band__steps { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; position: relative; }
.cta-pill {
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 100px; font-weight: 700; font-size: 14px; color: var(--ink);
}
.cta-band__inner .cta-pill {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--charcoal); color: rgba(255,255,255,.7); padding: clamp(56px,6vw,84px) 0 32px; flex: 1 0 auto; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__brand .brand__name, .footer__brand .brand__sub { color: #fff; }
.footer__brand .brand__sub { color: rgba(255,255,255,.6); }
.footer p { font-size: 15px; line-height: 1.8; margin-top: 18px; }
.footer h3 { color: #fff; font-size: 15px; letter-spacing: .04em; margin-bottom: 14px; font-weight: 700; }
.footer__links { display: flex; flex-direction: column; gap: 7px; }
.footer__links a { font-size: 15px; color: rgba(255,255,255,.7); transition: color .2s, padding .2s; width: fit-content; padding: 4px 0; /* M-08: ขยายระยะแตะบนมือถือ */ }
.footer__links a:hover { color: var(--yellow); padding-left: 5px; }
.footer__contact { font-size: 15px; line-height: 1.9; }
.footer__contact a:hover { color: var(--yellow); }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08);
  display: grid; place-items: center; transition: .25s var(--ease); color: #fff;
}
.socials a:hover { background: var(--yellow); color: #2A2200; transform: translateY(-3px); }
.socials svg { width: 20px; height: 20px; }
.footer__bottom {
  margin-top: 48px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: center; text-align: center; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; font-weight: 300; color: rgba(255,255,255,.6);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__float { animation: none; }
}

/* ============================================================
   SUBPAGE BITS
   ============================================================ */
.page-hero { padding: clamp(48px,6vw,90px) 0 clamp(40px,5vw,64px); background: var(--bg-warm); position: relative; overflow: hidden; }
.crumb { font-size: 14.5px; color: var(--ink-3); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.crumb a:hover { color: var(--yellow-deep); }
.page-hero h1 { font-size: clamp(32px,4.6vw,56px); margin-top: 16px; max-width: 18ch; text-wrap: balance; }
.page-hero p { margin-top: 18px; color: var(--ink-2); font-size: 18px; max-width: 56ch; text-wrap: pretty; }

.prose-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(28px,4vw,48px); box-shadow: var(--sh-sm); }

.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.pillar { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease); }
.pillar:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.pillar__n { font-size: 14px; font-weight: 800; color: var(--yellow); letter-spacing: .1em; }
.pillar__ic {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--yellow-tint); color: var(--yellow-deep); margin-bottom: 18px;
  transition: transform .4s var(--ease), background .3s, color .3s;
}
.pillar:hover .pillar__ic { transform: scale(1.08) rotate(-5deg); background: var(--yellow); color: #2A2200; }
.pillar__ic svg { width: 30px; height: 30px; }
.pillar h3 { font-size: 21px; margin-top: 10px; }
.pillar p { margin-top: 10px; color: var(--ink-2); font-size: 15px; }

/* accordion */
.acc { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.acc + .acc { margin-top: 14px; }
.acc__head {
  width: 100%; text-align: left; font-family: inherit; cursor: pointer; border: 0; background: none;
  padding: 22px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 700; font-size: 18px; color: var(--ink);
}
.acc__head .pm { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--yellow-tint);
  display: grid; place-items: center; color: var(--yellow-deep); transition: .3s var(--ease); }
.acc.open .acc__head .pm { background: var(--yellow); color: #2A2200; transform: rotate(135deg); }
.acc__body { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.acc__body > div { padding: 0 26px 24px; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; }

.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding-top: 20px; }
.step__n {
  width: 50px; height: 50px; border-radius: 16px; background: var(--charcoal); color: var(--yellow);
  display: grid; place-items: center; font-weight: 800; font-size: 22px; margin-bottom: 16px;
}
.step h3 { font-size: 18px; }
.step p { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; }

/* ---------- Values (vision / mission) ---------- */
.bento--values { grid-template-columns: repeat(2,1fr); }
@media (max-width: 820px) { .bento--values { grid-template-columns: 1fr; } }
.vcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(28px,3.5vw,42px);
  position: relative; overflow: hidden;
}
.vcard--accent { background: linear-gradient(155deg, #FBF3DC 0%, #F3E2B0 100%); border: 1px solid var(--yellow-soft); color: #7A6212; }
.vcard--accent h3 { color: #5A4509; }
.vcard--accent p, .vcard--accent li { color: #7A6212; }
.vcard__k { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow-deep); }
.vcard--accent .vcard__k { color: var(--yellow-deep); }
.vcard h3 { font-size: clamp(22px,2.6vw,30px); margin-top: 10px; }
.vcard p { margin-top: 14px; color: var(--ink-2); font-size: 16px; line-height: 1.8; text-wrap: pretty; }
.mission-list { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.mission-list li { display: flex; gap: 14px; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.mission-list li b { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--yellow-tint);
  color: var(--yellow-deep); display: grid; place-items: center; font-size: 14px; font-weight: 800; }

/* ---------- Staff / personnel ---------- */
.staff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.staff-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.staff-card:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.staff-card__photo {
  aspect-ratio: 1/1; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--yellow-tint), var(--bg-soft));
  display: grid; place-items: center; color: var(--yellow-deep);
}
.staff-card__photo .avatar { width: 46%; height: 46%; opacity: .55; }
.staff-card__photo .mock { position: absolute; inset: 0; }
.staff-card__body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.staff-card__name { font-size: 17px; font-weight: 800; line-height: 1.3; }
.staff-card__role { margin-top: 7px; font-size: 14px; color: var(--ink-2); font-weight: 600; line-height: 1.45; }
.staff-card__tag {
  display: inline-block; margin-top: auto; padding-top: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--yellow-deep);
}

/* leadership — larger, horizontal */
.leaders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 26px; }
.leader-card {
  display: grid; grid-template-columns: 168px 1fr; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease);
}
.leader-card:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.leader-card__photo {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--yellow-soft), var(--yellow-tint));
  display: grid; place-items: center; color: var(--yellow-deep);
}
.leader-card__photo .avatar { width: 52%; height: 52%; opacity: .6; }
.leader-card__photo .mock { position: absolute; inset: 0; }
.leader-card__body { padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; }
.leader-card__k { font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow-deep); }
.leader-card__name { font-size: clamp(20px, 2.3vw, 25px); margin-top: 8px; }
.leader-card__role { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; font-weight: 600; }

@media (max-width: 1100px) { .staff-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) {
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .leaders { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .leader-card { grid-template-columns: 120px 1fr; }
  .leader-card__body { padding: 20px 20px; }
}

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 8px; padding-left: 36px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--yellow), var(--line-2)); }
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -33px; top: 4px; width: 18px; height: 18px;
  box-sizing: border-box; border-radius: 50%; background: #fff; border: 4px solid var(--yellow); box-shadow: 0 0 0 4px var(--yellow-tint);
  transition: transform .3s var(--ease); }
.tl-item:hover::before { transform: scale(1.18); }
.tl-year { font-size: 15px; font-weight: 800; color: var(--yellow-deep); letter-spacing: .02em; }
.tl-item h3 { font-size: 19px; margin-top: 4px; }
.tl-item p { margin-top: 7px; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }

/* ---------- Gallery grid + filter ---------- */
.gallery-heading { font-size: clamp(24px, 3vw, 34px); margin: 0 0 22px; text-wrap: balance; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  padding: 10px 20px; border-radius: 100px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink-2);
  transition: .22s var(--ease);
  min-height: 44px; /* M-06: มาตรฐาน touch target */
}
.chip:hover { border-color: var(--yellow); color: var(--ink); transform: translateY(-2px); }
.chip.active { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.gallery-search {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line-2); border-radius: 100px;
  padding: 9px 16px; min-width: 240px; flex: 0 1 300px;
}
.gallery-search__ic { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.gallery-search__input {
  border: 0; outline: 0; background: transparent; font-family: inherit;
  font-size: 16px; color: var(--ink); width: 100%;
}
.gallery-search__input::placeholder { color: var(--ink-3); }
.gallery-meta { margin: -4px 0 26px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); line-height: 1.6; }
.gallery-meta[hidden] { display: none; }
@media (max-width: 640px) {
  .gallery-toolbar { flex-direction: column; align-items: stretch; }
  .gallery-search { min-width: 0; flex: 1 1 auto; }
}
.gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.gitem {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), opacity .35s, border-color .3s;
}
.gitem:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.gitem__media { aspect-ratio: 4/3; position: relative; }
.gitem__media .date { position: absolute; top: 14px; left: 14px; background: var(--yellow); color: #2A2200;
  font-weight: 700; font-size: 12.5px; padding: 5px 13px; border-radius: 100px; z-index: 2; }
.gitem__body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.gitem__date { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700;
  color: var(--yellow-deep); letter-spacing: .02em; margin-bottom: 10px; }
.gitem__date svg { width: 15px; height: 15px; }
.gitem__cat { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow-deep); }
.gitem__body h3 { font-size: 19px; margin-top: 8px; line-height: 1.3; }
.gallery .gitem__body h3 { color: #211e18; margin-top: 0; }
.gitem__body p { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; flex: 1; }
.gitem__more { margin-top: 16px; font-weight: 700; font-size: 14.5px; color: var(--yellow-deep);
  display: inline-flex; align-items: center; gap: 7px; }
.gitem__more .arr { transition: transform .3s var(--ease); }
.gitem:hover .gitem__more .arr { transform: translateX(5px); }
.gitem.hide { display: none; }

/* ---------- Gallery lightbox (M-05) ---------- */
.gallery article.gitem { cursor: zoom-in; }
.glb {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,17,12,.92);
  padding: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom));
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s var(--ease), visibility .25s;
}
.glb.show { opacity: 1; visibility: visible; pointer-events: auto; }
.glb__box {
  position: relative; max-width: min(1100px,92vw); max-height: 88vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.glb__img {
  max-width: 100%; max-height: 76vh; width: auto; height: auto;
  object-fit: contain; border-radius: var(--r); box-shadow: var(--sh-lg); background: #000;
}
.glb__cap { color: #fff; font-weight: 700; font-size: 15.5px; text-align: center; margin: 0; max-width: 90vw; }
.glb__close {
  position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border-radius: 50%; border: 0; background: var(--charcoal); color: #fff; font-size: 26px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.glb__close:hover { background: var(--yellow); color: #2A2200; transform: rotate(90deg); }
@media (max-width: 560px) {
  .glb__close { top: -54px; right: 0; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.info-list { display: grid; gap: 16px; }
.info {
  display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 24px; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.info:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.info__ic { width: 50px; height: 50px; flex: none; border-radius: 14px; background: var(--yellow-tint);
  color: var(--yellow-deep); display: grid; place-items: center; }
.info__ic svg { width: 24px; height: 24px; }
.info__k { font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.info__v { font-size: 17px; font-weight: 600; margin-top: 3px; }
.info__v a:hover { color: var(--yellow-deep); }
.map { border-radius: var(--r-lg); overflow: hidden; height: 100%; min-height: 360px; border: 1px solid var(--line); }
.social-row { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.social-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 100px;
  background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 14.5px; color: var(--ink);
  transition: .22s var(--ease);
}
.social-pill:hover { background: var(--yellow); border-color: var(--yellow); transform: translateY(-3px); color: #2A2200; }
.social-pill svg { width: 18px; height: 18px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .menu, .nav__cta .btn--ghost { display: none; }
  .burger { display: block; }
  .nav__inner { transition: height .25s var(--ease, ease); }
  .brand__mark { transition: width .25s var(--ease, ease), height .25s var(--ease, ease); }
  .brand__name { transition: font-size .25s var(--ease, ease); }
  .brand__sub { transition: opacity .2s var(--ease, ease); }
  .nav.scrolled .nav__inner { height: 46px; }
  .nav.scrolled .brand__mark { width: 28px; height: 28px; border-radius: 8px; }
  .nav.scrolled .brand__name { font-size: 14px; }
  .nav.scrolled .brand__sub { display: none; }
  .nav.scrolled .burger { transform: scale(.86); }
  .nav {
    background: linear-gradient(to bottom, rgba(248,245,238,.97) 0%, rgba(248,245,238,.78) 70%, rgba(248,245,238,.55) 100%);
  }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; margin: 0 auto; width: 100%; }
  .bento { grid-template-columns: repeat(2,1fr); }
  .fcard--wide, .fcard--tall, .fcard--lead { grid-column: span 2; }
  .levels, .news, .pillars { grid-template-columns: 1fr; }
  .stats__card { grid-template-columns: repeat(2,1fr); gap: 18px; }
  .stat + .stat::before { display: none; }
  .cta-band__inner { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .steps { grid-template-columns: repeat(2,1fr); }
  .gallery { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .map { min-height: 300px; }
  .nrow { grid-template-columns: 1fr; }
  .nrow__media { aspect-ratio: 4/3; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bento { grid-template-columns: 1fr; }
  .fcard--wide, .fcard--tall, .fcard--lead { grid-column: span 1; }
  .stats__card { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .acard { flex: 0 0 82%; }
  .gallery { grid-template-columns: 1fr; }
  .hero__float--a { left: -8px; }
  .hero__float--b { right: -8px; }
  /* carousel เต็มขอบจอ: ดัน .caro ออกนอก padding ของ .wrap แล้วคืน padding
     ให้ .caro__track แทน การ์ดแรกยังชิดแนวหัวข้อเดิม แต่เลื่อนได้สุดขอบจอ
     หมายเหตุ: scroll-snap ถือ padding box เป็นส่วนหนึ่งของ scrollport เสมอ —
     แค่ใส่ padding เฉยๆ ไม่พอ ต้องใส่ scroll-padding ด้วย ไม่งั้นการ์ดแรก/สุดท้าย
     จะ snap ไปชิดขอบจอจริง (ไม่เหลือ free space) แม้จะมองเห็น padding อยู่ก็ตาม */
  .caro { margin: 0 -24px; }
  .caro__track { padding-left: 24px; padding-right: 24px; scroll-padding-left: 24px; scroll-padding-right: 24px; }
}
@media (max-width: 380px) {
  .brand__name { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .caro { margin: 0 -16px; }
  .caro__track { padding-left: 16px; padding-right: 16px; scroll-padding-left: 16px; scroll-padding-right: 16px; }
}

/* ============================================================
   CI ACCENT SCOPES — Heritage Green / Dolphin Blue
   ใช้เฉพาะหน้า/ส่วนที่บทบาทตรงกับ CI:
   · เขียว = มรดก/พิธีการ/ผู้บริหาร (about, คณะผู้บริหาร)
   · น้ำเงิน = เด็ก/ดิจิทัล/Coding (ประถมศึกษา)
   ทอง ยังเป็นสีหลักของส่วนที่เหลือ
   ============================================================ */

/* eyebrow + chip variants (ใช้ราย element) */
.eyebrow--green { color: var(--green); }
.eyebrow--green::before { background: var(--green); }
.eyebrow--blue { color: var(--blue-dark); }
.eyebrow--blue::before { background: var(--blue); }
.cta-pill--blue { background: var(--blue-tint); border-color: #BBD3E0; color: var(--blue-dark); }

/* ---- Heritage Green scope ---- */
.accent-green .eyebrow { color: var(--green); }
.accent-green .eyebrow::before { background: var(--green); }
.accent-green .vcard__k { color: var(--green); }
.accent-green .mission-list li b { background: var(--green-tint); color: var(--green); }
.accent-green .timeline::before { background: linear-gradient(var(--green), var(--line-2)); }
.accent-green .tl-item::before { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-tint); }
.accent-green .tl-year { color: var(--green); }
/* หมุดสุดท้าย (ปัจจุบัน) = ทอง (สีหลัก) */
.accent-green .tl-item:last-child::before { border-color: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-tint); }
.accent-green .tl-item:last-child .tl-year { color: var(--yellow-deep); }
/* gold accent vcard (เช่น การ์ดผู้บริหารปัจจุบัน) — คงทองแม้ในหน้าโทนเขียว */
.vcard--gold { background: linear-gradient(155deg, #FBF3DC 0%, #F3E2B0 100%); border: 1px solid var(--yellow-soft); }
.accent-green .vcard--gold .vcard__k { color: var(--yellow-deep); }
.accent-green .staff-card__photo { background: linear-gradient(160deg, var(--green-tint), var(--bg-soft)); color: var(--green); }
.accent-green .staff-card__tag { color: var(--green); }
/* soft green accent card (วิสัยทัศน์) — แทนทองอ่อน */
.accent-green .vcard--accent { background: linear-gradient(155deg, #EEF3EF 0%, var(--green-tint) 100%); border: 1px solid #CBD9CF; color: #41514A; }
.accent-green .vcard--accent h3 { color: var(--green-dark); }
.accent-green .vcard--accent p, .accent-green .vcard--accent li { color: #41514A; }
.accent-green .vcard--accent .vcard__k { color: var(--green); }

/* ---- Dolphin Blue scope ---- */
.accent-blue .eyebrow { color: var(--blue-dark); }
.accent-blue .eyebrow::before { background: var(--blue); }
.accent-blue .mission-list li b { background: var(--blue-tint); color: var(--blue-dark); }
.accent-blue .pillar__n { color: var(--blue); }
.accent-blue .pillar:hover .pillar__ic { background: var(--blue); color: #fff; }
.accent-blue .level__age { color: var(--blue-dark); }
.accent-blue .level:hover .level__link { color: var(--blue-dark); }
.accent-blue .btn--primary { background: var(--blue); color: #fff; }
.accent-blue .btn--primary:hover { background: var(--blue-bright); color: #fff; transform: translateY(-3px); box-shadow: var(--sh-md); }

/* blue pillar (ใช้รายกล่อง — เช่น Coding/Personalized) */
.pillar--blue .pillar__ic { background: var(--blue-tint); color: var(--blue); }
.pillar--blue .pillar__n { color: var(--blue); }
.pillar--blue:hover .pillar__ic { background: var(--blue); color: #fff; }

/* ---------- Back to top (M-09) — สร้างด้วย JS ใน main.js ทุกหน้า public ---------- */
.totop {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: 48px; height: 48px; border-radius: 50%; border: 0; z-index: 50;
  background: var(--charcoal); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.28), var(--sh-md);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s, background .2s var(--ease);
}
.totop.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
  /* จอสัมผัสไม่มี mouseleave จริง ถ้าไม่ scope ไว้ สีเหลืองจาก :hover จะค้าง
     บนปุ่มหลังแตะ (เพราะเบราว์เซอร์มือถือคง :hover ไว้จนกว่าจะแตะที่อื่น) */
  .totop:hover { background: var(--yellow); color: #2A2200; }
}
.totop svg { width: 22px; height: 22px; }
