/*
Theme Name:  MPTY Theme
Theme URI:   https://mpty.ac.th
Author:      M Intelligence
Author URI:  https://m-intelligence.tech
Description: โรงเรียนเมืองพัทยา 11 (มัธยมสาธิตพัทยา) — Aurora glassmorphism design
Version:     1.0.0
License:     GNU General Public License v2 or later
Text Domain: mpty
*/

/* ══════════════════════════════════════════════════════════════════
   BRAND TOKENS
══════════════════════════════════════════════════════════════════ */
:root {
  /* School Yellow — สีประจำโรงเรียน */
  --brand-400: #FFD700;   /* gold — general UI (badges, icons, nav) */
  --brand-500: #FFC200;   /* gradient end */
  --brand-600: #CC8800;   /* dark accent — hover/text */
  --brand-700: #8A6000;
  --brand-deep: #996600;  /* text on light bg */
  --brand-hero: #FFFF00;  /* pure school yellow — hero section only */

  --ink-950: #0A0A0B;
  --ink-900: #121317;
  --ink-800: #1D1F25;
  --ink-700: #2E3038;
  --ink-500: #5B5F6B;
  --ink-400: #8A8F9C;
  --ink-300: #B7BBC4;

  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --slate-950: #050A14;

  --paper: #FFFFFF;
  --page-bg: #F6FBFF;

  /* Aurora — สดใสขึ้น: ฟ้าอิ่มสีกว่าเดิม + แต้มเหลืองอุ่นๆ ตามสีโรงเรียน */
  --aurora:
    radial-gradient(ellipse 60% 50% at 10% 10%,  rgba(140,200,255,.75) 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 95% 15%,  rgba(110,190,255,.70) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 70% 45%,  rgba(255,222,128,.40) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 85%,  rgba(170,220,255,.70) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 15% 90%,  rgba(255,236,170,.50) 0%, transparent 60%);

  --g-bg:     rgba(255,255,255,.55);
  --g-blur:   22px;
  --g-border: rgba(255,255,255,.6);
  --g-shadow: 0 12px 30px -12px rgba(18,19,23,.18);
}

/* ══════════════════════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 18px + antialiased + tabular-nums — ตรงกับ mpty-web globals.css */
html { scroll-behavior: smooth; font-size: 18px; }

body {
  font-family: 'Sarabun', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  background-color: var(--page-bg);
  background-image: var(--aurora);
  background-attachment: fixed;
  color: var(--ink-900);
  overflow-x: hidden;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.site {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Prompt', 'Sarabun', sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ══════════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
══════════════════════════════════════════════════════════════════ */
.container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ══════════════════════════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════════════════════════ */
.top-bar {
  background: var(--slate-900);
  border-bottom: 2px solid var(--brand-400);
  color: #fff;
  font-size: .75rem;
  padding: .375rem 1rem;
}

.top-bar__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}

.top-bar__contact {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-bar__contact span {
  display: flex;
  align-items: center;
  gap: .375rem;
}

.top-bar__contact svg { color: var(--brand-400); }

.top-bar__links {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.top-bar__links a:hover { color: var(--brand-400); }
.top-bar__sep { color: rgba(255,255,255,.3); }

/* ══════════════════════════════════════════════════════════════════
   SITE HEADER / NAV
══════════════════════════════════════════════════════════════════ */
.site-header {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #F1F5F9;
  box-shadow: 0 1px 12px rgba(18,19,23,.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: .75rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}

.brand-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--brand-400), #FFCC00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255,215,0,.4);
  flex-shrink: 0;
}

.brand-icon svg { color: var(--slate-900); }

.brand-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--slate-900);
  line-height: 1.1;
}

.brand-sub {
  font-size: .7rem;
  color: var(--ink-500);
  font-weight: 500;
}

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--slate-900);
  padding-block: .5rem;
  position: relative;
  transition: color .2s;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--brand-600);
  transition: width .25s;
}

.site-nav a:hover { color: var(--brand-600); }
.site-nav a:hover::after { width: 100%; }

/* CTA button */
.btn-calendar {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: linear-gradient(135deg, var(--brand-400), #FACC15);
  color: var(--slate-900);
  font-size: .8rem;
  font-weight: 700;
  padding: .55rem 1.1rem;
  border-radius: 9999px;
  border: 2px solid rgba(255,255,255,.6);
  transition: box-shadow .25s, transform .25s;
}

.btn-calendar:hover {
  box-shadow: 0 6px 20px rgba(255,215,0,.5);
  transform: translateY(-1px);
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--slate-900);
}

/* ── Desktop dropdown ────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__toggle {
  display: flex;
  align-items: center;
  gap: .3rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  color: var(--slate-900);
  padding: .25rem .5rem;
  border-radius: .5rem;
  transition: color .15s;
  white-space: nowrap;
}

.nav-dropdown__toggle svg { transition: transform .2s; }
.nav-dropdown:hover .nav-dropdown__toggle svg,
.nav-dropdown__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-dropdown__panel {
  display: none;
  position: absolute;
  top: calc(100% + .75rem);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: .875rem;
  box-shadow: 0 8px 24px -4px rgba(15,23,42,.12);
  padding: .5rem;
  min-width: 200px;
  z-index: 100;
}

/* สะพานโปร่งใสปิดช่องว่างระหว่าง toggle กับ panel ป้องกัน mouseleave ยิงก่อน */
.nav-dropdown__panel::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: .875rem;
}

.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown__toggle[aria-expanded="true"] + .nav-dropdown__panel { display: block; }

.nav-dropdown__panel a {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem .875rem;
  border-radius: .6rem;
  font-size: .875rem;
  font-weight: 500;
  color: #334155;
  transition: background .15s, color .15s;
}

.nav-dropdown__panel a:hover { background: #FFFBEB; color: var(--brand-600); }
.nav-dropdown__panel a svg { color: #94A3B8; flex-shrink: 0; }
.nav-dropdown__panel a:hover svg { color: var(--brand-600); }

/* ── Mobile nav — Full-screen overlay ───────────────────────── */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--slate-900);
  display: flex;
  flex-direction: column;
  padding: 0 1.5rem 2rem;
  /* slide down from top */
  transform: translateY(-100%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  pointer-events: none;
  overflow-y: auto;
}

.mobile-nav-overlay.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* header bar — mirrors site-header height */
.mobile-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  text-decoration: none;
}

.mobile-nav-brand__img {
  width: 36px; height: 36px;
  object-fit: contain;
}

.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  transition: background .15s;
}

.mobile-nav-close:hover { background: rgba(255,255,255,.15); }

/* nav links */
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding-block: 2rem 1.5rem;
  flex: 1;
}

.mobile-nav-link {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  padding-block: .45rem;
  letter-spacing: -.01em;
  transition: color .15s, transform .15s;
  line-height: 1.2;
}

.mobile-nav-link:hover,
.mobile-nav-link[aria-current="page"] {
  color: var(--brand-400);
  transform: translateX(4px);
}

.mobile-nav-link--sm {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  padding-block: .3rem;
}

.mobile-nav-link--sm:hover { color: rgba(255,255,255,.8); transform: translateX(4px); }

.mobile-nav-sep {
  height: 1px;
  background: rgba(255,255,255,.1);
  margin-block: 1rem;
}

/* footer actions */
.mobile-nav-foot {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  flex-shrink: 0;
}

.mobile-btn-calendar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  background: var(--brand-400);
  color: var(--slate-900);
  font-weight: 700;
  font-size: .95rem;
  padding: 1rem;
  border-radius: .875rem;
  transition: background .2s;
}

.mobile-btn-calendar:hover { background: var(--brand-600); }

.mobile-nav-privacy {
  text-align: center;
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  transition: color .15s;
}

.mobile-nav-privacy:hover { color: rgba(255,255,255,.6); }

@media (max-width: 400px) {
  .mobile-nav-link { font-size: 1.25rem; padding-block: .35rem; }
  .mobile-nav-link--sm { font-size: .9rem; }
  .mobile-nav-links { padding-block: 1.25rem 1rem; }
  .mobile-nav-sep { margin-block: .75rem; }
}

/* ══════════════════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--slate-900) 0%, #1E293B 50%, var(--slate-900) 100%);
  color: #fff;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(15,23,42,.78) 0%, rgba(15,23,42,.55) 55%, rgba(15,23,42,.35) 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-block: 4rem 3rem;
  width: 100%;
}

.hero > .container { position: relative; z-index: 1; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  color: var(--brand-400);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .4rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.2);
  margin-bottom: 1.25rem;
}

.hero__ping {
  position: relative;
  display: inline-flex;
  width: 10px; height: 10px;
}

.hero__ping::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-400);
  opacity: .75;
  animation: ping 1.5s ease-in-out infinite;
}

.hero__ping::after {
  content: '';
  position: relative;
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand-400);
}

@keyframes ping {
  0%, 100% { transform: scale(1); opacity: .75; }
  50% { transform: scale(2); opacity: 0; }
}

.hero__title {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 800; /* extrabold เท่ากับ mpty-web */
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero__title-accent { color: var(--brand-hero); }

.hero__desc {
  color: #CBD5E1;
  font-size: clamp(.9rem, 2vw, 1.05rem);
  max-width: 540px;
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-500));
  color: var(--slate-900);
  font-weight: 700;
  padding: .85rem 2rem;
  border-radius: .75rem;
  box-shadow: 0 4px 16px rgba(255,215,0,.35);
  transition: box-shadow .25s, transform .25s;
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(255,215,0,.5);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: #fff;
  font-weight: 600;
  padding: .85rem 2rem;
  border-radius: .75rem;
  border: 2px solid rgba(255,255,255,.3);
  transition: background .25s, border-color .25s;
}

.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* Upcoming events card */
.hero__events-card {
  position: relative;
  background: #fff;
  color: var(--slate-900);
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: 0 20px 50px rgba(18,19,23,.35);
}

.hero__events-card::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--brand-400), #fff);
  opacity: .25;
  filter: blur(8px);
  z-index: -1;
}

.events-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .75rem;
}

.events-card__label {
  font-size: .55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: #94A3B8;
  margin-bottom: .15rem;
}

.events-card__title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--slate-900);
}

.events-card__icon {
  width: 32px; height: 32px;
  background: #FFFBEB;
  border-radius: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem;
  border-radius: .5rem;
  background: #F8FAFC;
  margin-bottom: .4rem;
  transition: background .2s;
}

.event-item:hover { background: #FFFBEB; }

.event-item__dot {
  width: 28px; height: 28px;
  border-radius: .4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-item__date {
  font-size: .6rem;
  font-weight: 700;
  color: var(--brand-deep);
  line-height: 1;
}

.event-item__name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--slate-900);
  line-height: 1.3;
}

.event-item__badge {
  font-size: .55rem;
  font-weight: 700;
  background: var(--brand-400);
  color: var(--slate-900);
  padding: .15rem .4rem;
  border-radius: 9999px;
  margin-left: auto;
  flex-shrink: 0;
}

.events-card__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  font-size: .65rem;
  font-weight: 700;
  color: var(--brand-deep);
  margin-top: .6rem;
}

.events-card__more:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════
   STATS SECTION
══════════════════════════════════════════════════════════════════ */
.hero__stats {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: 1.5rem;
  padding-inline: 1.5rem;
}

.hero__stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
  margin-inline: auto;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 1rem;
  overflow: hidden;
}

.hero__stat {
  padding: 1.5rem 1.75rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.hero__stat:nth-child(2),
.hero__stat:nth-child(4) { border-right: none; }

.hero__stat:nth-child(3),
.hero__stat:nth-child(4) { border-bottom: none; }

.hero__stat-label {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.55);
  margin-bottom: .4rem;
}

.hero__stat-number {
  display: block;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  color: #fff;
}

.hero__stat-number--accent { color: var(--brand-400); }

/* ══════════════════════════════════════════════════════════════════
   ABOUT SECTION  (placeholder — reuse news card style)
══════════════════════════════════════════════════════════════════ */
.section {
  padding-block: 5rem;
}

.section--alt { background: #fff; }
.section--dark { background: var(--slate-900); color: #fff; }

/* ── Slides Section ────────────────────────────────────────────── */
.section--slides {
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.slides-track-wrap {
  position: relative;
  height: 560px;
  user-select: none;
}

.slides-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.slides-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}

.slides-item.active {
  opacity: 1;
  pointer-events: auto;
}

.slides-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

.slides-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background .2s;
  z-index: 10;
}

.slides-btn:hover { background: rgba(255,255,255,.3); }
.slides-btn--prev { left: 1.25rem; }
.slides-btn--next { right: 1.25rem; }

.slides-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 10;
}

.slides-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}

.slides-dot.active {
  background: var(--brand-400);
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .slides-track-wrap { height: 260px; }
}

@media (max-width: 1024px) {
  .hero__stats { padding-block: 1rem; padding-inline: 1rem; }
  .hero__stats-grid { border-radius: .75rem; }
  .hero__stat { padding: .85rem 1rem; }
  .hero__stat-number { font-size: clamp(1.25rem, 4vw, 1.75rem); }
  .hero__stat-label { font-size: .58rem; margin-bottom: .25rem; }
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand-600);
  margin-bottom: .75rem;
}

.section__label::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--brand-400);
  border-radius: 2px;
}

.section__heading {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 700; /* bold เท่ากับหัวข้อ section ใน mpty-web */
  margin-bottom: 1rem;
}

.section__sub {
  color: var(--ink-500);
  font-size: .9rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

/* ══════════════════════════════════════════════════════════════════
   ABOUT — ผู้อำนวยการ + ค่านิยม
══════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

/* การ์ดรูป ผอ. — กรอบขาว + เงาเหลือง offset ด้านหลัง */
.principal-card { position: relative; max-width: 280px; margin-inline: auto; }

.principal-card::before {
  content: '';
  position: absolute;
  top: 10px; left: 10px;
  width: 100%; height: 100%;
  background: var(--brand-400);
  border-radius: 1.25rem;
}

.principal-card__frame {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid #F1F5F9;
  border-radius: 1.25rem;
  box-shadow: 0 16px 40px -16px rgba(18,19,23,.25);
  padding: .75rem;
}

.principal-card__photo {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top;
  border-radius: .9rem;
  display: block;
  background: #F1F5F9;
}

.principal-card__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.principal-card__caption {
  margin-top: .75rem;
  background: #FFFBEB;
  border-radius: .9rem;
  text-align: center;
  padding: .85rem .75rem;
}

.principal-card__name {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  color: var(--slate-900);
  font-size: .95rem;
}

.principal-card__role {
  font-size: .7rem;
  color: var(--ink-500);
  margin-top: .2rem;
}

/* ค่านิยม pills */
.value-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.value-pill {
  font-size: .72rem;
  font-weight: 600;
  background: #FFFBEB;
  color: var(--brand-deep);
  border: 1px solid rgba(255,215,0,.4);
  padding: .35rem .85rem;
  border-radius: 9999px;
}

.about-content__body {
  font-size: .9rem;
  color: var(--ink-700);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}

.about-feature__icon {
  width: 40px; height: 40px;
  background: #FFFBEB;
  color: var(--brand-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-feature__title {
  font-weight: 700;
  font-size: .85rem;
  color: var(--ink-900);
}

.about-feature__sub {
  font-size: .75rem;
  color: var(--ink-500);
  margin-top: .15rem;
}

/* กล่อง quote */
.about-quote {
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.7);
  border-left: 4px solid var(--brand-400);
  border-radius: 1rem;
  box-shadow: 0 8px 24px -12px rgba(18,19,23,.15);
  padding: 1.25rem 1.5rem;
}

.about-quote p {
  font-style: italic;
  font-size: .85rem;
  color: var(--ink-500);
  line-height: 1.8;
}

/* ══════════════════════════════════════════════════════════════════
   GALLERY (gx) — filter tabs + featured grid + lightbox
══════════════════════════════════════════════════════════════════ */
.gx-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.gx-head__sub {
  font-size: .88rem;
  color: var(--ink-500);
  margin-top: .5rem;
}

.gx-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2rem;
}

.gx-tab {
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: .5rem 1.15rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  background: #F1F5F9;
  color: var(--ink-500);
  transition: background .2s, color .2s;
}

.gx-tab:hover { background: #E2E8F0; color: var(--ink-700); }

.gx-tab.active {
  background: var(--slate-900);
  color: var(--brand-400);
}

.gx-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 160px;
  grid-auto-flow: dense;
  gap: .75rem;
}

.gx-item {
  position: relative;
  overflow: hidden;
  border-radius: .9rem;
  border: none;
  padding: 0;
  cursor: pointer;
  background: #E2E8F0;
  text-align: left;
}

.gx-item.hidden { display: none; }

.gx-item--featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gx-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.gx-item:hover img { transform: scale(1.05); }

.gx-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.1rem;
  background: linear-gradient(to top, rgba(15,23,42,.9) 0%, rgba(15,23,42,.3) 45%, transparent 100%);
  opacity: 0;
  transition: opacity .3s;
}

.gx-item:hover .gx-item__overlay,
.gx-item:focus-visible .gx-item__overlay { opacity: 1; }

.gx-item__cat {
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--brand-400);
  margin-bottom: .25rem;
}

.gx-item__title {
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

/* Lightbox */
.gx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.gx-lightbox.open { display: flex; }

.gx-lightbox__stage {
  position: relative;
  width: min(92vw, 920px);
  height: min(80vh, 580px);
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gx-lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  border-radius: 0;
}

.gx-lightbox__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  border-radius: 0 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.gx-lightbox__cat {
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--brand-400);
}

.gx-lightbox__title {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  margin-top: .25rem;
}

.gx-lightbox__close,
.gx-lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
  font-family: inherit;
  z-index: 3;
}

.gx-lightbox__close:hover,
.gx-lightbox__nav:hover {
  background: rgba(255,255,255,.28);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}
.gx-lightbox__close:hover { transform: scale(1.08); }

.gx-lightbox__close {
  top: .75rem; right: .75rem;
  width: 34px; height: 34px;
  font-size: .85rem;
}

.gx-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
}

.gx-lightbox__nav--prev { left: .65rem; }
.gx-lightbox__nav--next { right: .65rem; }

/* ══════════════════════════════════════════════════════════════════
   NEWS SECTION
══════════════════════════════════════════════════════════════════ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--g-bg);
  backdrop-filter: blur(var(--g-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(160%);
  border: 1px solid var(--g-border);
  border-radius: 1rem;
  box-shadow: var(--g-shadow);
  overflow: hidden;
  transition: transform .28s, box-shadow .28s;
}

.news-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -16px rgba(18,19,23,.22); }

.news-card__thumb {
  width: 100%; height: 180px;
  object-fit: cover;
  background: #E2E8F0;
}

.news-card__body { padding: 1rem 1.1rem 1.25rem; }

.news-card__cat {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand-600);
  margin-bottom: .4rem;
}

.news-card__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__meta {
  font-size: .7rem;
  color: var(--ink-400);
}

/* ══ News Section Redesign (nc = news card) ═════════════════════ */
.nc-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}
.nc-header__title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--slate-900);
  margin: 0;
  line-height: 1.2;
}
.nc-tabs {
  display: flex;
  gap: .2rem;
  background: rgba(100,116,139,.08);
  border: 1px solid rgba(100,116,139,.12);
  padding: .28rem;
  border-radius: .75rem;
  flex-shrink: 0;
}
.nc-tab {
  padding: .42rem .9rem;
  border-radius: .55rem;
  border: none;
  background: transparent;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
  font-family: inherit;
  white-space: nowrap;
}
.nc-tab:hover { color: var(--slate-900); }
.nc-tab.active {
  background: var(--brand-400);
  color: var(--slate-900);
  box-shadow: 0 1px 6px rgba(255,215,0,.35);
}
@media (max-width: 700px) {
  .nc-header { align-items: flex-start; flex-direction: column; }
  .nc-tabs { flex-wrap: wrap; }
}

.nc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .nc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .nc-grid { grid-template-columns: 1fr; } }

.nc-card {
  background: #fff;
  border: 1px solid rgba(100,116,139,.1);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 18px -8px rgba(18,19,23,.12);
  display: flex;
  flex-direction: column;
  transition: transform .28s, box-shadow .28s;
}
.nc-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -12px rgba(18,19,23,.2); }

.nc-card__media {
  position: relative;
  height: 192px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.nc-media__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: transform .4s ease;
}
.nc-card:hover .nc-media__img { transform: scale(1.05); }
/* gradient overlay เมื่อมีรูปจริง */
.nc-card__media:has(.nc-media__img)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.1) 50%, transparent 100%);
  z-index: 1;
}
.nc-media__icon {
  color: rgba(255,255,255,.18);
  position: relative;
  z-index: 2;
}
/* ซ่อน icon เมื่อมีรูปจริง */
.nc-card__media:has(.nc-media__img) .nc-media__icon { display: none; }
.nc-badge { z-index: 3; }
/* category color palettes */
.nc-bg--amber  { background: #92400E; }
.nc-bg--amber2 { background: #78350F; }
.nc-bg--slate  { background: #334155; }
.nc-bg--green  { background: #14532D; }
.nc-bg--blue   { background: #1E3A5F; }
.nc-bg--rose   { background: #881337; }

.nc-badge {
  position: absolute;
  top: .85rem; left: .85rem;
  font-size: .66rem;
  font-weight: 700;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: var(--brand-400);
  color: var(--slate-900);
  z-index: 2;
  letter-spacing: .02em;
}

.nc-card__body {
  padding: 1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.nc-card__date {
  font-size: .71rem;
  color: var(--ink-400);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .32rem;
  margin-bottom: .5rem;
}
.nc-card__title {
  font-size: .93rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.45;
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nc-card__title a { color: inherit; text-decoration: none; }
.nc-card__title a:hover { color: var(--brand-700); }
.nc-card__excerpt {
  font-size: .78rem;
  color: var(--ink-500);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: .75rem;
}
.nc-card__foot {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(100,116,139,.08);
  padding-top: .8rem;
}
.nc-read-more {
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-700);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .2rem;
  transition: color .18s, gap .18s;
}
.nc-read-more:hover { color: var(--brand-600); gap: .4rem; }

.nc-empty {
  padding: 3.5rem 1rem;
  text-align: center;
  color: var(--ink-400);
}
.nc-empty svg { margin: 0 auto 1rem; display: block; opacity: .45; }
.nc-empty__msg { font-size: .95rem; font-weight: 600; color: var(--ink-500); margin: 0 0 .4rem; }
.nc-empty__sub { font-size: .8rem; color: var(--ink-400); margin: 0; }

.nc-footer {
  margin-top: 2.25rem;
  text-align: center;
}
.nc-all-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1.65rem;
  border: 2px solid var(--brand-400);
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--brand-700);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.nc-all-link:hover {
  background: var(--brand-400);
  color: var(--slate-900);
}

/* ══════════════════════════════════════════════════════════════════
   CONTACT SECTION
══════════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.contact-items { display: flex; flex-direction: column; gap: 1.25rem; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item__icon {
  width: 40px; height: 40px;
  background: #FFFBEB;
  border-radius: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
  flex-shrink: 0;
}

.contact-item__label {
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: .2rem;
}

.contact-item__text {
  font-size: .8rem;
  color: var(--ink-500);
  line-height: 1.5;
}

.map-container {
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(18,19,23,.12);
  height: 340px;
  position: relative;
}

.map-container iframe {
  width: 100%; height: 100%;
  border: 0;
}

.map-open-btn {
  position: absolute;
  bottom: 1rem; right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(15,23,42,.88);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .5rem .9rem;
  border-radius: .75rem;
  box-shadow: 0 4px 12px rgba(18,19,23,.3);
  transition: background .25s, color .25s;
}

.map-open-btn:hover {
  background: var(--brand-400);
  color: var(--slate-900);
}

/* ══════════════════════════════════════════════════════════════════
   ANNOUNCEMENT BAR
══════════════════════════════════════════════════════════════════ */
.ann-bar {
  position: relative;
  z-index: 120;
  padding: .22rem 0;
  font-size: .78rem;
  font-weight: 500;
  text-align: center;
}
.ann-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}
.ann-bar__text {
  flex: 1;
  text-align: center;
  color: inherit;
  text-decoration: none;
}
a.ann-bar__text:hover { text-decoration: underline; }
.ann-bar__close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  line-height: 1;
  color: inherit;
  opacity: .7;
  border-radius: 4px;
  transition: opacity .15s, background .15s;
}
.ann-bar__close:hover { opacity: 1; background: rgba(0,0,0,.12); }

/* Themes */
.ann-bar--general   { background: #1e40af; color: #fff; }
.ann-bar--celebration { background: var(--brand-400); color: var(--slate-900); }
.ann-bar--mourning  { background: #1c1c1c; color: #d1d5db; }
.ann-bar--urgent    { background: #b91c1c; color: #fff; }

/* Marquee mode */
.ann-bar--marquee {
  position: relative;
  overflow: hidden;
  padding: .22rem 0;
}
.ann-bar__track {
  display: flex;
  width: max-content;
  animation: ann-marquee 28s linear infinite;
}
.ann-bar--marquee:hover .ann-bar__track { animation-play-state: paused; }
.ann-bar__run {
  flex-shrink: 0;
  white-space: nowrap;
  padding-inline: .5rem;
}
.ann-bar__run a { color: inherit; text-decoration: none; }
.ann-bar__run a:hover { text-decoration: underline; }
.ann-bar__close--abs {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.2);
  border-radius: 50%;
  width: 24px;
  height: 24px;
}
@keyframes ann-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── ANNOUNCEMENT POPUP ───────────────────────────────────────── */
.ann-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.ann-popup-backdrop.visible { opacity: 1; pointer-events: auto; }
.ann-popup {
  position: relative;
  max-width: min(880px, 94vw);
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.ann-popup-backdrop.visible .ann-popup {
  transform: translateY(0) scale(1);
}
.ann-popup__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
}
.ann-popup__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.ann-popup__close:hover { background: rgba(0,0,0,.85); }
@media (max-width: 600px) {
  .ann-popup-backdrop { padding: .5rem; align-items: center; }
  .ann-popup { max-width: 96vw; border-radius: .75rem; }
  .ann-popup__img { max-height: 82vh; }
  .ann-popup__close { width: 44px; height: 44px; top: .5rem; right: .5rem; }
}

/* ── HERO BANNER OVERRIDE ─────────────────────────────────────── */
.hero--banner .hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
/* overlay opacity is set via inline style from Customizer slider */

/* ══════════════════════════════════════════════════════════════════
   404 PAGE
══════════════════════════════════════════════════════════════════ */
.not-found-hero {
  position: relative;
  background: var(--slate-900);
  color: #fff;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: 5rem;
}

.not-found-hero__num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Prompt', sans-serif;
  font-size: clamp(10rem, 30vw, 22rem);
  font-weight: 900;
  line-height: 1;
  color: rgba(255,255,255,.04);
  user-select: none;
  pointer-events: none;
  letter-spacing: -.05em;
}

.not-found-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.not-found-hero__label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-400);
  margin-bottom: 1rem;
}

.not-found-hero__label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--brand-400);
  border-radius: 2px;
}

.not-found-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .875rem;
  color: #fff;
}

.not-found-hero__desc {
  font-size: .95rem;
  color: rgba(255,255,255,.6);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.not-found-hint {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 1.25rem;
}

.not-found-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}

.not-found-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  font-weight: 600;
  font-size: .875rem;
  color: var(--slate-900);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.not-found-card svg { color: var(--brand-400); flex-shrink: 0; }

.not-found-card:hover {
  border-color: var(--brand-400);
  box-shadow: 0 4px 16px -4px rgba(251,199,46,.25);
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .not-found-links { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════════════════════════════════════════
   PRIVACY POLICY PAGE
══════════════════════════════════════════════════════════════════ */
.privacy-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.privacy-toc__inner {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1.5rem;
  position: sticky;
  top: 5rem;
}

.privacy-toc__heading {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: .75rem;
}

.privacy-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.privacy-toc__list li { counter-increment: toc; }

.privacy-toc__list a {
  display: flex;
  gap: .5rem;
  align-items: baseline;
  padding: .45rem .5rem;
  font-size: .82rem;
  color: #475569;
  border-radius: .4rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.privacy-toc__list a::before {
  content: counter(toc) ".";
  font-size: .7rem;
  font-weight: 700;
  color: #CBD5E1;
  flex-shrink: 0;
}

.privacy-toc__list a:hover { background: #F8FAFC; color: var(--slate-900); }

.privacy-toc__updated {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #F1F5F9;
  font-size: .75rem;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.privacy-toc__updated strong { color: #475569; }

.privacy-notice {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  font-size: .875rem;
  color: #1E40AF;
  line-height: 1.6;
}

.privacy-notice svg { flex-shrink: 0; margin-top: .15rem; }

.privacy-section { margin-bottom: 2.75rem; }

.privacy-section__title {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid #F1F5F9;
}

.privacy-section__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--brand-400);
  color: var(--slate-900);
  font-size: .8rem;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
}

.privacy-list {
  padding-left: 1.25rem;
  line-height: 1.8;
  color: #475569;
}

.privacy-list li { margin-bottom: .35rem; }

.privacy-table-wrap { overflow-x: auto; }

.privacy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.privacy-table th {
  background: #F8FAFC;
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid #E2E8F0;
  white-space: nowrap;
}

.privacy-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  color: #475569;
  vertical-align: top;
  line-height: 1.6;
}

.privacy-table tr:last-child td { border-bottom: none; }
.privacy-table tr:hover td { background: #FAFAFA; }

.privacy-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.privacy-card {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: .75rem;
  padding: 1rem;
  font-size: .875rem;
}

.privacy-card__icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1; }

.privacy-card strong { display: block; color: var(--slate-900); margin-bottom: .25rem; }
.privacy-card p { margin: 0; color: #64748B; line-height: 1.5; }

.privacy-rights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin-bottom: 1rem;
}

.privacy-right {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .875rem;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: .75rem;
  font-size: .875rem;
}

.privacy-right__icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.3; }
.privacy-right strong { display: block; color: var(--slate-900); margin-bottom: .2rem; }
.privacy-right p { margin: 0; color: #64748B; line-height: 1.5; }

.privacy-note {
  font-size: .8rem;
  color: #64748B;
  background: #F8FAFC;
  border-left: 3px solid var(--brand-400);
  padding: .75rem 1rem;
  border-radius: 0 .5rem .5rem 0;
  line-height: 1.6;
}

.privacy-contact-card {
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  overflow: hidden;
}

.privacy-contact-card__header {
  background: var(--slate-900);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.privacy-contact-card__header span { font-size: .75rem; color: #94A3B8; }

.privacy-contact-card__body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.privacy-contact-item {
  display: flex;
  gap: .625rem;
  align-items: flex-start;
  font-size: .875rem;
  color: #475569;
  line-height: 1.5;
}

.privacy-contact-item svg { flex-shrink: 0; margin-top: .2rem; color: var(--brand-400); }
.privacy-contact-item a { color: #1D4ED8; text-decoration: underline; }

.privacy-footer-note {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #E2E8F0;
  font-size: .82rem;
  color: #94A3B8;
  line-height: 1.7;
}

/* Responsive */
@media (min-width: 768px) {
  .privacy-cards { grid-template-columns: repeat(2, 1fr); }
  .privacy-rights { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════════════════════════════════════════
   SITE FOOTER
══════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--slate-900);
  color: #CBD5E1;
  border-top: 4px solid var(--brand-400);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-block: 3rem;
}

.footer-brand__logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.footer-brand__circle {
  width: 40px; height: 40px;
  background: var(--brand-400);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--slate-900);
  flex-shrink: 0;
}

.footer-brand__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-brand__name {
  font-weight: 700;
  color: #fff;
  font-size: .9rem;
  line-height: 1.2;
}

.footer-brand__sub {
  font-size: .7rem;
  color: var(--brand-400);
  margin-top: .2rem;
}

.footer-brand__desc {
  font-size: .72rem;
  color: #64748B;
  line-height: 1.7;
}

.footer-col__title {
  font-weight: 700;
  color: #fff;
  font-size: .8rem;
  margin-bottom: 1rem;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: .5rem; }

.footer-links a {
  font-size: .75rem;
  color: #CBD5E1;
  transition: color .2s;
}

.footer-links a:hover { color: var(--brand-400); }

.footer-email-form {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}

.footer-email-input {
  background: #1E293B;
  border: 1px solid #334155;
  color: #fff;
  font-size: .75rem;
  padding: .5rem .75rem;
  border-radius: .5rem;
  flex: 1;
  outline: none;
  font-family: 'Sarabun', sans-serif;
}

.footer-email-input:focus { border-color: var(--brand-400); }

.footer-email-btn {
  background: var(--brand-400);
  color: var(--slate-900);
  border: none;
  padding: .5rem .75rem;
  border-radius: .5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.footer-email-btn:hover { background: var(--brand-600); }

.site-footer__bottom {
  background: var(--slate-950);
  border-top: 1px solid #1E293B;
  padding-block: 1rem;
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  color: #64748B;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.footer-legal a {
  color: #94A3B8;
  text-decoration: none;
  transition: color .15s;
}

.footer-legal a:hover { color: var(--brand-400); }

/* ══════════════════════════════════════════════════════════════════
   PROGRAMS — MEP hero card + แผนการเรียนรอง (ตาม mpty-web)
══════════════════════════════════════════════════════════════════ */
.programs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* การ์ดเหลือง MEP */
.mep-card {
  background: var(--brand-400);
  border-radius: 1.25rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
}

.mep-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.mep-card__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--slate-900);
  color: var(--brand-400);
  font-size: .7rem;
  font-weight: 700;
  padding: .4rem .85rem;
  border-radius: 9999px;
}

.mep-card__globe {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.5);
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-900);
}

.mep-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.25;
  margin-bottom: .25rem;
}

.mep-card__sub {
  font-size: .85rem;
  font-weight: 600;
  color: rgba(15,23,42,.5);
  margin-bottom: 1rem;
}

.mep-card__desc {
  font-size: .85rem;
  color: rgba(15,23,42,.75);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.mep-card__subjects-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(15,23,42,.5);
  margin-bottom: .75rem;
}

.mep-card__subjects {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}

.mep-card__subject {
  background: rgba(255,255,255,.55);
  color: var(--slate-900);
  font-size: .72rem;
  font-weight: 600;
  padding: .3rem .85rem;
  border-radius: 9999px;
}

.mep-card__footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15,23,42,.1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.prog-fit {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .8rem;
  color: rgba(15,23,42,.8);
  line-height: 1.6;
}

.prog-fit svg { flex-shrink: 0; margin-top: .2rem; color: var(--slate-900); }

.mep-card__cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  background: var(--slate-900);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  padding: .8rem 1.5rem;
  border-radius: .75rem;
  transition: background .2s;
}

.mep-card__cta:hover { background: var(--slate-800); }

/* การ์ดแผนรอง */
.programs-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.prog-card {
  background: var(--slate-50);
  border: 1px solid #F1F5F9;
  border-radius: 1.25rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prog-card__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.prog-card__icon {
  width: 44px; height: 44px;
  background: #fff;
  border: 1px solid #F1F5F9;
  border-radius: .75rem;
  box-shadow: 0 1px 4px rgba(18,19,23,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
  flex-shrink: 0;
}

.prog-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.35;
}

.prog-card__desc {
  font-size: .82rem;
  color: var(--ink-500);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.prog-card__footer {
  margin-top: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.prog-card__footer .prog-fit {
  font-size: .72rem;
  color: var(--ink-500);
}

.prog-card__footer .prog-fit svg { color: var(--brand-600); }

.prog-card__ask {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--brand-deep);
  white-space: nowrap;
  flex-shrink: 0;
  transition: gap .2s;
}

.prog-card__ask:hover { gap: .55rem; }

/* "ดูทั้งหมด" card */
.prog-card--more {
  text-decoration: none;
  color: inherit;
  border: 2px dashed rgba(0,0,0,.12);
  background: rgba(255,255,255,.35);
  transition: border-color .2s, background .2s;
}
.prog-card--more:hover {
  border-color: var(--brand-600);
  background: rgba(255,248,220,.45);
}
.prog-card__icon--more {
  background: #F1F5F9;
  color: var(--ink-400);
}
.prog-card--more:hover .prog-card__icon--more {
  background: #FFFBEB;
  color: var(--brand-600);
}

/* ══════════════════════════════════════════════════════════════════
   GALLERY GRID
══════════════════════════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: .75rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #E2E8F0;
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.gallery-item:hover img { transform: scale(1.05); }

/* ══════════════════════════════════════════════════════════════════
   PAGE HERO  (single/archive header band)
══════════════════════════════════════════════════════════════════ */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, var(--slate-900) 0%, #1E293B 60%, var(--slate-900) 100%);
  color: #fff;
  padding-block: 3.5rem 4.5rem;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 90% 10%, rgba(255,215,0,.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgba(130,200,250,.10) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero__inner { position: relative; z-index: 1; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  color: #94A3B8;
  margin-bottom: 1.25rem;
}

.breadcrumb a { color: #CBD5E1; transition: color .2s; }
.breadcrumb a:hover { color: var(--brand-400); }
.breadcrumb__sep { color: #475569; }

.page-hero__cat {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,215,0,.15);
  border: 1px solid rgba(255,215,0,.35);
  color: var(--brand-400);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.page-hero__title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  max-width: 880px;
  margin-bottom: 1rem;
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: .78rem;
  color: #94A3B8;
}

.page-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.page-hero__meta svg { color: var(--brand-400); }

/* ══════════════════════════════════════════════════════════════════
   SINGLE ARTICLE
══════════════════════════════════════════════════════════════════ */
.article-wrap {
  position: relative;
  z-index: 2;
  margin-top: -2.5rem;
  padding-bottom: 5rem;
}

.article-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 1.5rem;
  box-shadow: 0 24px 60px -20px rgba(18,19,23,.25);
  overflow: hidden;
  max-width: 880px;
  margin-inline: auto;
}

.article-card__cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

.article-card__body {
  padding: clamp(1.5rem, 4vw, 3rem);
}

/* Prose — WP content styles */
.prose {
  font-size: .95rem;
  line-height: 1.9;
  color: var(--ink-700);
}

.prose p { margin-bottom: 1.1rem; }

.prose h2, .prose h3 {
  color: var(--ink-900);
  margin: 1.75rem 0 .75rem;
  position: relative;
  padding-left: .9rem;
}

.prose h2::before, .prose h3::before {
  content: '';
  position: absolute;
  left: 0; top: .25em; bottom: .25em;
  width: 4px;
  border-radius: 4px;
  background: var(--brand-400);
}

.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.prose li { margin-bottom: .35rem; }

.prose img {
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(18,19,23,.12);
  margin-block: 1.25rem;
}

.prose a { color: var(--brand-600); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.prose blockquote {
  border-left: 4px solid var(--brand-400);
  background: #FFFBEB;
  border-radius: 0 .75rem .75rem 0;
  padding: 1rem 1.25rem;
  margin-block: 1.25rem;
  color: var(--ink-700);
  font-style: italic;
}

/* Article footer — share/back */
.article-card__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(18,19,23,.08);
  padding: 1.25rem clamp(1.5rem, 4vw, 3rem);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-700);
  padding: .55rem 1.1rem;
  border-radius: 9999px;
  border: 1.5px solid var(--ink-300);
  transition: border-color .2s, color .2s, background .2s;
}

.btn-back:hover { border-color: var(--brand-400); color: var(--brand-600); background: #FFFBEB; }

.share-row { display: flex; align-items: center; gap: .5rem; }

.share-label { font-size: .72rem; font-weight: 700; color: var(--ink-400); margin-right: .25rem; }

.share-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-900);
  color: #fff;
  transition: background .2s, transform .2s;
}

.share-btn:hover { background: var(--brand-400); color: var(--slate-900); transform: translateY(-2px); }

/* Related news */
.related-section { max-width: 880px; margin: 3rem auto 0; }

.related-section__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 1.25rem;
}

.related-section__title::before {
  content: '';
  width: 22px; height: 4px;
  border-radius: 4px;
  background: var(--brand-400);
}

/* ══════════════════════════════════════════════════════════════════
   NEWS ARCHIVE
══════════════════════════════════════════════════════════════════ */
.archive-body {
  position: relative;
  z-index: 2;
  margin-top: -2.5rem;
  padding-bottom: 5rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 9999px;
  box-shadow: 0 12px 32px -14px rgba(18,19,23,.2);
  padding: .5rem;
  margin-bottom: 2rem;
  width: fit-content;
  max-width: 100%;
}

.filter-pill {
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-500);
  padding: .45rem 1.1rem;
  border-radius: 9999px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.filter-pill:hover { color: var(--ink-900); background: rgba(18,19,23,.05); }

.filter-pill.active {
  background: var(--slate-900);
  color: var(--brand-400);
}

/* Featured (first) news card on archive */
.news-featured {
  display: grid;
  grid-template-columns: 1fr;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 1.25rem;
  box-shadow: 0 20px 50px -18px rgba(18,19,23,.22);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: transform .28s, box-shadow .28s;
}

.news-featured:hover { transform: translateY(-3px); box-shadow: 0 26px 60px -18px rgba(18,19,23,.3); }

.news-featured__thumb {
  width: 100%; height: 100%;
  min-height: 240px;
  object-fit: cover;
  background: #E2E8F0;
}

.news-featured__body {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .75rem;
}

.news-featured__badge {
  display: inline-flex;
  width: fit-content;
  background: var(--brand-400);
  color: var(--slate-900);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  border-radius: 9999px;
}

.news-featured__title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.35;
}

.news-featured__title a:hover { color: var(--brand-600); }

.news-featured__excerpt {
  font-size: .85rem;
  color: var(--ink-500);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-featured__meta {
  font-size: .75rem;
  color: var(--ink-400);
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* Pagination */
.mpty-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 2.5rem;
}

.mpty-pagination .page-numbers {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: .6rem;
  border-radius: .65rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-700);
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 4px 12px -6px rgba(18,19,23,.15);
  transition: background .2s, color .2s;
}

.mpty-pagination .page-numbers:hover { background: #FFFBEB; color: var(--brand-600); }

.mpty-pagination .page-numbers.current {
  background: var(--slate-900);
  color: var(--brand-400);
  border-color: var(--slate-900);
}

/* ══════════════════════════════════════════════════════════════════
   PERSONNEL (บุคลากร)
══════════════════════════════════════════════════════════════════ */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.staff-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 12px 32px -14px rgba(18,19,23,.3);
  aspect-ratio: 3 / 4;
  transition: transform .25s, box-shadow .25s;
  background: #E2E8F0;
}

.staff-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -14px rgba(18,19,23,.38); }

.staff-card__photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.staff-card__photo--empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--ink-300);
  background: #E2E8F0;
}

.staff-card__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem 1rem .9rem;
  background: linear-gradient(to top, rgba(12,14,20,.82) 0%, rgba(12,14,20,.55) 60%, transparent 100%);
  text-align: left;
}

.staff-card__name {
  font-size: .88rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .2rem;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.staff-card__position {
  font-size: .7rem;
  font-weight: 600;
  color: var(--brand-400);
  margin-bottom: .3rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.staff-card__group {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  padding: .2rem .6rem;
  border-radius: 9999px;
}

.staff-group-heading {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink-900);
  margin: 2.25rem 0 1.1rem;
}

.staff-group-heading::before {
  content: '';
  width: 22px; height: 4px;
  border-radius: 4px;
  background: var(--brand-400);
}

.staff-group-heading:first-of-type { margin-top: 0; }

.staff-section { margin-bottom: 3rem; }
.staff-section:last-child { margin-bottom: 0; }

.staff-card--hidden { display: none !important; }

.staff-see-more {
  margin-top: 1.25rem;
  text-align: center;
}

.staff-see-more__btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-600);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(18,19,23,.1);
  border-radius: 9999px;
  padding: .55rem 1.25rem;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}

.staff-see-more__btn:hover {
  background: var(--brand-400);
  color: var(--slate-900);
  border-color: var(--brand-400);
}

/* ── Personnel view toggle ── */
.personnel-view-toggle {
  display: flex;
  gap: .4rem;
  margin-bottom: 1.5rem;
}

.personnel-view-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink-500);
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(18,19,23,.1);
  border-radius: 9999px;
  padding: .5rem 1.1rem;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}

.personnel-view-btn:hover { background: rgba(255,255,255,.95); color: var(--ink-900); }

.personnel-view-btn.active {
  background: var(--slate-900);
  color: var(--brand-400);
  border-color: var(--slate-900);
}

/* ── Org chart tree ── */
.org-chart {
  overflow-x: auto;
  padding: 1rem 1rem 2rem;
  min-width: 0;
}

.org-tree {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: center;
  position: relative;
  min-width: max-content;
}

.org-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.org-tree ul {
  padding-top: 2.5rem;
  gap: 1.5rem;
}

/* vertical line down from parent to horizontal bar */
.org-tree ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 2px solid var(--brand-400);
  height: 2.5rem;
}

.org-tree li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2.5rem;
}

/* horizontal line from center of each sibling */
.org-tree li::before {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid var(--brand-400);
  width: calc(50% + .75rem);
  height: 0;
}

.org-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-top: 2px solid var(--brand-400);
  width: calc(50% + .75rem);
  height: 0;
}

/* trim outer edges of first/last sibling */
.org-tree li:first-child::before { display: none; }
.org-tree li:last-child::after  { display: none; }

/* only-child: no horizontal line, only vertical */
.org-tree li:only-child::before,
.org-tree li:only-child::after { display: none; }

.org-tree li:only-child { padding-top: 2.5rem; }

/* root level has no top line */
.org-tree > li { padding-top: 0; }
.org-tree > li::before,
.org-tree > li::after { display: none; }

/* ── Org card node ── */
.org-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1.5px solid rgba(255,255,255,.8);
  border-radius: 1rem;
  box-shadow: 0 8px 24px -10px rgba(18,19,23,.2);
  padding: 1rem .9rem .85rem;
  width: 140px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  z-index: 1;
}

.org-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -12px rgba(18,19,23,.28); }

.org-card__photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2.5px var(--brand-400);
  margin-bottom: .65rem;
  background: #E2E8F0;
  display: block;
}

.org-card__photo--empty {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: .65rem;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2.5px var(--brand-400);
}

.org-card__info { display: flex; flex-direction: column; gap: .15rem; }

.org-card__name {
  font-size: .72rem;
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.35;
}

.org-card__position {
  font-size: .62rem;
  font-weight: 600;
  color: var(--brand-600);
  line-height: 1.3;
}

@media (max-width: 768px) {
  .org-chart { padding: .5rem 0 1.5rem; }
  .org-card { width: 110px; padding: .75rem .6rem; }
  .org-card__photo, .org-card__photo--empty { width: 56px; height: 56px; }
  .org-card__name { font-size: .65rem; }
  .org-card__position { font-size: .57rem; }
  .org-tree ul { gap: .75rem; }
}

/* ── Personnel layout (sidebar + main) ── */
.post-type-archive-mpty_personnel .archive-body {
  margin-top: 0;
  padding-top: 2.5rem;
}

.personnel-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

.personnel-sidebar {
  position: sticky;
  top: 88px;
}

.personnel-sidebar__card {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 1.25rem;
  box-shadow: 0 12px 32px -14px rgba(18,19,23,.18);
  padding: 1.25rem 1rem;
}

.personnel-sidebar__label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: 0 .5rem .75rem;
  border-bottom: 1px solid rgba(18,19,23,.07);
  margin-bottom: .5rem;
}

.personnel-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.personnel-nav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .55rem .75rem;
  border-radius: .75rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-600);
  transition: background .18s, color .18s;
  text-decoration: none;
}

.personnel-nav__item:hover {
  background: rgba(18,19,23,.05);
  color: var(--ink-900);
}

.personnel-nav__item.active {
  background: var(--brand-400);
  color: var(--slate-900);
}

.personnel-nav__count {
  font-size: .72rem;
  font-weight: 700;
  background: rgba(18,19,23,.08);
  color: var(--ink-500);
  border-radius: 9999px;
  padding: .1rem .5rem;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.personnel-nav__item.active .personnel-nav__count {
  background: rgba(18,19,23,.12);
  color: var(--slate-900);
}

@media (max-width: 768px) {
  .personnel-layout {
    grid-template-columns: 1fr;
  }

  .personnel-sidebar {
    position: static;
  }

  .personnel-sidebar__card {
    padding: 1rem;
  }

  .personnel-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .4rem;
  }

  .personnel-nav__item {
    padding: .4rem .75rem;
    font-size: .75rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
   DOCUMENTS (เอกสารดาวน์โหลด)
══════════════════════════════════════════════════════════════════ */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  max-width: 880px;
  margin-inline: auto;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 1rem;
  box-shadow: 0 10px 26px -14px rgba(18,19,23,.18);
  padding: 1rem 1.25rem;
  transition: transform .22s, box-shadow .22s;
}

.doc-item:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgba(18,19,23,.25); }

.doc-item__icon {
  width: 46px; height: 46px;
  border-radius: .75rem;
  background: #FFFBEB;
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-item__body { flex: 1; min-width: 0; }

.doc-item__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: .15rem;
}

.doc-item__meta {
  font-size: .7rem;
  color: var(--ink-400);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.doc-item__ext {
  text-transform: uppercase;
  font-weight: 800;
  color: var(--brand-600);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--slate-900);
  color: var(--brand-400);
  font-size: .75rem;
  font-weight: 700;
  padding: .55rem 1.1rem;
  border-radius: 9999px;
  flex-shrink: 0;
  transition: background .2s, color .2s, transform .2s;
}

.btn-download:hover {
  background: var(--brand-400);
  color: var(--slate-900);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════
   GALLERY ALBUM (single-mpty_gallery)
══════════════════════════════════════════════════════════════════ */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1080px;
  margin-inline: auto;
}

.album-grid figure {
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 28px -12px rgba(18,19,23,.25);
  background: #E2E8F0;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.album-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}

.album-grid figure:hover img { transform: scale(1.04); }

@media (max-width: 480px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Gallery Archive ── */
.gx-grid--archive {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
}
.gx-grid--archive .gx-item--featured {
  grid-column: span 1;
  grid-row: span 1;
}
@media (max-width: 640px) {
  .gx-grid--archive { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
}

/* ── Pagination ── */
.archive-pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 .6rem;
  border-radius: .5rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-600);
  background: rgba(255,255,255,.7);
  border: 1px solid var(--g-border);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.archive-pagination .page-numbers:hover { background: rgba(251,199,46,.18); color: var(--ink-900); }
.archive-pagination .page-numbers.current { background: var(--brand-400); color: var(--slate-900); border-color: var(--brand-400); }
.archive-pagination .page-numbers.dots { border: none; background: none; }

/* ── Gallery section "see all" button ── */
.gx-footer {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}
.gx-footer__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: 2rem;
  background: rgba(255,255,255,.65);
  border: 1.5px solid var(--g-border);
  color: var(--ink-700);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.gx-footer__btn:hover {
  background: rgba(251,199,46,.2);
  border-color: rgba(251,199,46,.6);
  color: var(--ink-900);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .news-featured { grid-template-columns: 5fr 4fr; }

  .gx-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }

  .about-grid { grid-template-columns: 4fr 8fr; }
  .about-features { grid-template-columns: 1fr 1fr; }

  .programs-layout { grid-template-columns: 1fr 1fr; }

  .hero__stats-grid { grid-template-columns: repeat(4, 1fr); max-width: 860px; }
  .privacy-layout { grid-template-columns: 220px 1fr; }
  .hero__stat { border-bottom: none; padding: 1.5rem 2rem; }
  .hero__stat:nth-child(2) { border-right: 1px solid rgba(255,255,255,.08); }
  .hero__stat:nth-child(4) { border-right: none; }

  .contact-grid { grid-template-columns: 2fr 3fr; align-items: start; }

  .site-footer__grid { grid-template-columns: 2fr 1fr 1.5fr 1.5fr; }
}

@media (min-width: 1024px) {
  .site-nav,
  .btn-calendar { display: flex; }

  .menu-toggle { display: none; }

  .hero__inner { grid-template-columns: 9fr 3fr; }
}

@media (max-width: 1023px) {
  .site-nav,
  .btn-calendar { display: none; }

  .menu-toggle { display: flex; }
}

@media (max-width: 640px) {
  .hero__inner { text-align: center; align-items: center; }
  .hero__badge { margin-inline: auto; }
  .hero__desc  { margin-inline: auto; }
  .hero__actions { justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════════
   PAGE PROGRAMS — หน้าหลักสูตรการศึกษา
══════════════════════════════════════════════════════════════════ */

/* page-hero sub-title */
.page-hero__sub {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  margin-top: .35rem;
  font-weight: 300;
}

/* Quick-jump tabs ── hero bottom */
.prog-jumptabs {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.75rem;
}

.prog-jumptab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1rem;
  border-radius: 9999px;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, color .2s;
}

.prog-jumptab:hover           { background: rgba(255,255,255,.22); color: #fff; }
.prog-jumptab--mep:hover      { background: rgba(255,215,0,.25); border-color: rgba(255,215,0,.55); }
.prog-jumptab--sci:hover      { background: rgba(96,165,250,.25); border-color: rgba(96,165,250,.55); }
.prog-jumptab--art:hover      { background: rgba(192,132,252,.25); border-color: rgba(192,132,252,.55); }

.prog-jumptab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  padding: .1rem .55rem;
  border-radius: 9999px;
  background: var(--brand-400);
  color: var(--slate-900);
  letter-spacing: .04em;
}

/* ── programs-page wrapper ─────────────────────────────────────── */
.programs-page {
  padding-top: 3rem;
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ── Program Card (pcard) ──────────────────────────────────────── */
.pcard {
  position: relative;
  background: var(--g-bg);
  backdrop-filter: blur(var(--g-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(160%);
  border: 1px solid var(--g-border);
  border-radius: 1.5rem;
  box-shadow: var(--g-shadow);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  overflow: hidden;
  scroll-margin-top: 6rem;
}

/* Coloured accent stripe on left */
.pcard__accent {
  position: absolute;
  top: 0; left: 0;
  width: 5px;
  height: 100%;
  border-radius: 1.5rem 0 0 1.5rem;
}

.pcard--mep .pcard__accent { background: linear-gradient(to bottom, var(--brand-400), var(--brand-600)); }
.pcard--sci .pcard__accent { background: linear-gradient(to bottom, #60A5FA, #2563EB); }
.pcard--art .pcard__accent { background: linear-gradient(to bottom, #C084FC, #9333EA); }

/* Header row */
.pcard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.pcard__badge-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.pcard__plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  padding: .2rem .75rem;
  border-radius: 9999px;
  letter-spacing: .06em;
}

.pcard__plan-badge--mep { background: var(--brand-400); color: var(--slate-900); }
.pcard__plan-badge--sci { background: #DBEAFE; color: #1D4ED8; }
.pcard__plan-badge--art { background: #F3E8FF; color: #7E22CE; }

.pcard__plan-name {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-500);
}

.pcard__icon {
  width: 48px; height: 48px;
  border-radius: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pcard--mep .pcard__icon { background: #FFFBEB; color: var(--brand-600); }
.pcard--sci .pcard__icon { background: #EFF6FF; color: #2563EB; }
.pcard--art .pcard__icon { background: #FAF5FF; color: #9333EA; }

/* Title + desc */
.pcard__title {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--ink-900);
  margin-bottom: .65rem;
}

.pcard__desc {
  font-size: .88rem;
  color: var(--ink-500);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Inner 2-col grid */
.pcard__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .pcard__grid { grid-template-columns: 1fr 1fr; }
}

.pcard__block {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.pcard__block-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-400);
}

/* Chips */
.pcard__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.prog-chip {
  display: inline-flex;
  align-items: center;
  padding: .25rem .75rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.08);
  color: var(--ink-700);
}

.prog-chip--career {
  background: rgba(255,255,255,.5);
  border-color: rgba(0,0,0,.06);
  font-size: .73rem;
  color: var(--ink-500);
}

/* Requirement list */
.prog-req-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.prog-req-list li {
  font-size: .82rem;
  color: var(--ink-600, var(--ink-500));
  padding-left: 1rem;
  position: relative;
}

.prog-req-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-size: .72rem;
  font-weight: 700;
  color: #22C55E;
}

/* Fit text */
.pcard__fit-text {
  font-size: .83rem;
  color: var(--ink-500);
  line-height: 1.65;
}

/* Footer CTA */
.pcard__footer {
  border-top: 1px solid rgba(0,0,0,.06);
  padding-top: 1.4rem;
  display: flex;
}

.pcard__cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  font-weight: 700;
  padding: .65rem 1.4rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: opacity .2s, transform .18s;
}

.pcard__cta:hover { opacity: .88; transform: translateX(2px); }

.pcard__cta--mep { background: var(--slate-900); color: var(--brand-400); }
.pcard__cta--sci { background: #1D4ED8; color: #fff; }
.pcard__cta--art { background: #7E22CE; color: #fff; }

/* MEP card: slight yellow tint on bg */
.pcard--mep {
  background: rgba(255, 250, 225, .65);
}

/* ── Comparison Table ──────────────────────────────────────────── */
.prog-compare-section {
  scroll-margin-top: 6rem;
}

.prog-compare-heading {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-900);
  margin-bottom: 1.25rem;
}

.prog-compare-wrap {
  overflow-x: auto;
  border-radius: 1.1rem;
  box-shadow: var(--g-shadow);
}

.prog-compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--g-bg);
  backdrop-filter: blur(var(--g-blur));
  -webkit-backdrop-filter: blur(var(--g-blur));
  font-size: .83rem;
}

.prog-compare-table th,
.prog-compare-table td {
  padding: .8rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.06);
  white-space: nowrap;
}

.prog-compare-table thead th {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-400);
  background: rgba(255,255,255,.5);
}

.th--mep { color: var(--brand-600) !important; }
.th--sci { color: #2563EB !important; }
.th--art { color: #7E22CE !important; }

.prog-compare-table tbody tr:last-child td { border-bottom: none; }
.prog-compare-table tbody tr:hover td { background: rgba(255,255,255,.35); }

.prog-compare-table td:first-child {
  font-weight: 600;
  color: var(--ink-600, var(--ink-500));
  white-space: normal;
  min-width: 110px;
}

.cmp-badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .65rem;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 700;
  background: #F1F5F9;
  color: var(--ink-600, var(--ink-500));
}

.cmp-badge--mep { background: #FFFBEB; color: var(--brand-700); }

.cmp-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 9999px;
  background: #DCFCE7;
  color: #16A34A;
  font-size: .78rem;
  font-weight: 700;
}

.cmp-dash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  color: var(--ink-300);
  font-size: 1rem;
}

/* ── Gutenberg content block ───────────────────────────────────── */
.prog-page-content {
  background: var(--g-bg);
  backdrop-filter: blur(var(--g-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(160%);
  border: 1px solid var(--g-border);
  border-radius: 1.5rem;
  box-shadow: var(--g-shadow);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.prog-page-content h2 {
  font-size: 1.15rem;
  color: var(--ink-900);
  margin-bottom: .75rem;
  margin-top: 2rem;
}

.prog-page-content h2:first-child { margin-top: 0; }

.prog-page-content p {
  font-size: .88rem;
  color: var(--ink-500);
  line-height: 1.75;
  margin-bottom: .9rem;
}

.prog-page-content ul, .prog-page-content ol {
  padding-left: 1.4rem;
  font-size: .88rem;
  color: var(--ink-500);
  line-height: 1.75;
  margin-bottom: .9rem;
}

/* ════════════════════════════════════════════════════════
   CALENDAR GRID
════════════════════════════════════════════════════════ */
.mpty-cal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  max-width: 860px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .mpty-cal-layout { grid-template-columns: 1fr; }
}

/* ── Grid card ── */
.mpty-cal {
  background: var(--g-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--g-border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: var(--g-shadow);
}

/* ── Navigation ── */
.mpty-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.mpty-cal__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--g-border);
  color: var(--ink-500);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.mpty-cal__nav-btn:hover,
.mpty-cal__nav-btn:focus-visible {
  background: rgba(251,199,46,.18);
  color: var(--ink-900);
  border-color: rgba(251,199,46,.55);
  outline: none;
}
.mpty-cal__nav-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink-900);
}

/* ── Day-of-week header ── */
.mpty-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.mpty-cal__dow {
  text-align: center;
  font-size: .65rem;
  font-weight: 700;
  color: var(--ink-400);
  padding: .35rem 0;
  letter-spacing: .04em;
}
.mpty-cal__dow--sun { color: #EF4444; }

/* ── Day cells ── */
.mpty-cal__day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .3rem 0 .25rem;
  border-radius: .45rem;
  min-height: 2.4rem;
  transition: background .12s;
}
.mpty-cal__day--empty { background: transparent !important; }
.mpty-cal__day--has-ev { cursor: pointer; }
.mpty-cal__day--has-ev:hover { background: rgba(251,199,46,.14); }
.mpty-cal__day--active { background: rgba(251,199,46,.22) !important; }
.mpty-cal__day-num {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-700);
  line-height: 1;
}
.mpty-cal__day--today .mpty-cal__day-num {
  background: var(--brand-400);
  color: #fff;
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
}
.mpty-cal__dots {
  display: flex;
  gap: 2px;
  margin-top: 3px;
}
.mpty-cal__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}
.mpty-cal__today-link {
  font-size: .72rem;
  color: var(--ink-400);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mpty-cal__today-link:hover { color: var(--brand-600); }

/* ── Event list panel ── */
.mpty-cal-events {
  background: var(--g-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--g-border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: var(--g-shadow);
}
.mpty-cal-events__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink-900);
  margin-bottom: .9rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--g-border);
}
.mpty-cal-events__add {
  font-size: .7rem;
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 600;
  font-family: 'Sarabun', sans-serif;
}
.mpty-cal-events__add:hover { text-decoration: underline; }
.mpty-cal-events__item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: .5rem;
  background: rgba(255,255,255,.80);
  border: 1px solid rgba(0,0,0,.07);
  border-left-width: 3px;
  transition: background .12s;
  cursor: default;
}
.mpty-cal-events__item + .mpty-cal-events__item { margin-top: .4rem; }
.mpty-cal-events__item--active { background: rgba(255,255,255,1); }
.mpty-cal-events__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mpty-cal-events__text {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  flex-wrap: wrap;
}
.mpty-cal-events__date {
  font-size: .68rem;
  font-weight: 600;
  color: var(--ink-400);
}
.mpty-cal-events__title {
  font-size: .83rem;
  font-weight: 700;
  color: var(--ink-800);
  line-height: 1.3;
}
.mpty-cal-events__empty {
  text-align: center;
  color: var(--ink-400);
  font-size: .82rem;
  padding: 1.5rem 0;
}

/* ══════════════════════════════════════════════════════════════════
   PAGE-ABOUT — ประวัติโรงเรียน
══════════════════════════════════════════════════════════════════ */

/* shared glass card */
.glass-card {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 1.25rem;
  padding: 1.75rem 2rem;
}

/* ── ข้อมูลทั่วไป ──────────────────────────────────────────────── */
.about-general { padding-bottom: 0; }

.about-info-card__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: .82rem;
  color: var(--brand-600);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.about-info-card__head svg { color: var(--brand-500); }

.about-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .85rem 2rem;
}
@media (max-width: 640px) { .about-info-grid { grid-template-columns: 1fr; } }

.about-info-item {
  display: grid;
  grid-template-columns: 20px 1fr 1fr;
  gap: .4rem .75rem;
  align-items: baseline;
  font-size: .83rem;
}
.about-info-item--full { grid-column: 1 / -1; }
.about-info-item__icon { color: var(--brand-500); display: flex; align-items: center; }
.about-info-item__label { color: var(--ink-400); font-size: .75rem; white-space: nowrap; }
.about-info-item__val { color: var(--ink-700); }

/* ── วิสัยทัศน์ / ปรัชญา / ปณิธาน ────────────────────────────── */
.about-vision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (max-width: 768px) { .about-vision-grid { grid-template-columns: 1fr; } }

.about-vision-card {
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 1.1rem;
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.about-vision-card--accent {
  background: linear-gradient(145deg, rgba(251,199,46,.18) 0%, rgba(255,255,255,.65) 100%);
  border-color: rgba(251,199,46,.45);
}
.about-vision-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(251,199,46,.08), transparent 70%);
  pointer-events: none;
}
.about-vision-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: rgba(251,199,46,.15);
  border: 1px solid rgba(251,199,46,.3);
  border-radius: 50%;
  color: var(--brand-600);
  margin-bottom: 1rem;
}
.about-vision-card--accent .about-vision-card__icon {
  background: rgba(251,199,46,.25);
  border-color: rgba(251,199,46,.5);
}
.about-vision-card__label {
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: .5rem;
}
.about-vision-card__pali {
  font-size: .92rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: .3rem;
  font-style: italic;
}
.about-vision-card__text {
  font-size: .88rem;
  color: var(--ink-600);
  line-height: 1.65;
  margin: 0;
}

/* ── อัตลักษณ์ ─────────────────────────────────────────────────── */
.about-identity-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 900px) { .about-identity-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px)  { .about-identity-grid { grid-template-columns: 1fr; } }

.about-id-card {
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.about-id-card--motto {
  background: linear-gradient(135deg, var(--slate-900) 0%, #1E293B 100%);
  border-color: rgba(251,199,46,.25);
}
.about-id-card--motto .about-id-card__label { color: var(--brand-400); }
.about-id-card--motto .about-id-card__value {
  color: #F1F5F9;
  font-size: .93rem;
  font-weight: 600;
  line-height: 1.6;
  font-style: italic;
}
.about-id-card__icon { color: var(--brand-500); margin-bottom: .2rem; }
.about-id-card__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.about-id-card__value {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink-700);
}

/* ── สัญลักษณ์ ─────────────────────────────────────────────────── */
.about-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink-800);
  margin-bottom: .4rem;
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.about-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--brand-400);
  border-radius: 99px;
}
.about-section-sub {
  font-size: .88rem;
  color: var(--ink-400);
  line-height: 1.7;
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.about-symbol-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 640px) { .about-symbol-grid { grid-template-columns: 1fr; } }

.about-symbol-card__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: .78rem;
  color: var(--brand-600);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
/* school color preview strip */
.about-color-strip {
  display: flex;
  height: 80px;
  border-radius: .75rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.about-color-strip__half {
  flex: 1;
  display: flex;
  align-items: flex-end;
  padding: .55rem .8rem;
}
.about-color-strip__half--yellow { background: linear-gradient(145deg,#FFE033,#FFD700); }
.about-color-strip__half--white {
  background: #fff;
  border-left: 1.5px solid rgba(0,0,0,.07);
}
.about-color-strip__tag {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 4px;
}
.about-color-strip__half--yellow .about-color-strip__tag {
  color: rgba(0,0,0,.55);
  background: rgba(255,255,255,.35);
}
.about-color-strip__half--white .about-color-strip__tag {
  color: rgba(0,0,0,.4);
  background: rgba(0,0,0,.04);
}
/* color detail rows */
.about-color-rows { display: flex; flex-direction: column; gap: .9rem; }
.about-color-row { display: flex; align-items: flex-start; gap: .8rem; }
.about-color-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: .1rem;
}
.about-color-dot--yellow {
  background: #FFD700;
  box-shadow: 0 2px 8px rgba(255,215,0,.5);
}
.about-color-dot--white {
  background: #fff;
  border: 2px solid #CBD5E1;
  box-shadow: 0 2px 6px rgba(0,0,0,.07);
}
.about-color-row__name {
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink-800);
  margin-bottom: .2rem;
}
.about-color-hex {
  display: inline-block;
  font-size: .7rem;
  font-family: 'Courier New', monospace;
  color: var(--ink-400);
  background: rgba(0,0,0,.04);
  padding: .05rem .35rem;
  border-radius: 3px;
  margin-left: .35rem;
  vertical-align: middle;
}
.about-color-row__desc {
  font-size: .78rem;
  color: var(--ink-500);
  line-height: 1.6;
  margin: 0;
}

/* tree card — golden shower bg */
.about-symbol-card--tree {
  background-size: cover;
  background-position: center 40%;
  position: relative;
  overflow: hidden;
}
.about-symbol-card--tree::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 0;
}
.about-symbol-card--tree > * { position: relative; z-index: 1; }

.about-tree {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.about-tree__visual svg { filter: drop-shadow(0 6px 14px rgba(255,200,0,.30)); }
.about-tree__name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink-800);
  margin-bottom: .5rem;
}
.about-tree__desc {
  font-size: .85rem;
  color: var(--ink-500);
  line-height: 1.65;
  margin: 0;
}

/* ── Timeline ──────────────────────────────────────────────────── */
.about-timeline {
  position: relative;
  padding-left: 0;
  margin-top: 1.75rem;
}
.about-timeline::before {
  content: '';
  position: absolute;
  left: 88px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand-400) 0%, rgba(251,199,46,.15) 100%);
}
@media (max-width: 640px) {
  .about-timeline::before { left: 64px; }
}

.tl-group {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  position: relative;
}
.tl-group + .tl-group { margin-top: 1.75rem; }

.tl-year-wrap {
  flex-shrink: 0;
  width: 108px;
  display: flex;
  justify-content: flex-end;
  padding-right: 22px;
  padding-top: .1rem;
  position: relative;
}
.tl-year-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: .55rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand-400);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(251,199,46,.3);
}
@media (max-width: 640px) {
  .tl-year-wrap { width: 80px; padding-right: 18px; }
}

.tl-year {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.tl-year__be {
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand-600);
  white-space: nowrap;
}
.tl-year__ce {
  font-size: .62rem;
  color: var(--ink-300);
  white-space: nowrap;
}

.tl-items {
  list-style: none;
  padding: 0;
  margin: 0;
  padding-left: 1.5rem;
  flex: 1;
}
.tl-item {
  position: relative;
  font-size: .84rem;
  color: var(--ink-600);
  line-height: 1.6;
  padding-left: .75rem;
  padding-bottom: .55rem;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: .6em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-400);
  opacity: .7;
}
