/* ============================================================
   เว็บไซต์คณะเทคโนโลยีการเกษตร มหาวิทยาลัยบูรพา วิทยาเขตสระแก้ว
   สไตล์หลัก v2 — โทนเขียวเกษตรสมัยใหม่ คงความเป็นทางการของหน่วยงานราชการ
   ============================================================ */

:root {
  --green-900: #0f3d22;
  --green-800: #15532f;
  --green-700: #15803d;
  --green-600: #1d9a4d;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;
  --gold:      #f3c01e;   /* เหลืองข้าวโพด (corn yellow) */
  --gold-dark: #cf9b00;
  --uni-grey:  #5b6068;   /* เทา (มหาวิทยาลัย) */
  --uni-gold:  #b9912f;   /* ทอง (มหาวิทยาลัย) */
  --ink:       #1b2530;
  --muted:     #5b6770;
  --line:      #e6ebe7;
  --bg:        #ffffff;
  --bg-soft:   #f5f8f5;
  --radius:    3px;
  --radius-sm: 2px;
  --shadow:    0 4px 14px rgba(15, 61, 34, .08);
  --shadow-sm: 0 1px 4px rgba(15, 61, 34, .07);
  --maxw:      1200px;
  --grad:      linear-gradient(120deg, var(--green-800), var(--green-600));
  --grad-soft: linear-gradient(120deg, #166534, #1d9a4d 60%, #22c55e);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Sarabun", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.72;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-800); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--green-900); color: #cfe8d8; font-size: 13.5px; }
.topbar .container {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  align-items: center; justify-content: space-between;
  padding: 8px 22px;
}
.topbar a { color: #cfe8d8; }
.topbar a:hover { color: #fff; }
.topbar .tb-info span { margin-right: 16px; white-space: nowrap; }
.topbar .tb-links a { font-weight: 500; }

/* ---------- Header / Logo ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .container {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 22px;
}
.brand { display: flex; align-items: center; gap: 15px; }
.brand .logo {
  width: 58px; height: 58px; flex-shrink: 0;
  object-fit: contain; display: block;
}
.brand-text strong { display: block; font-size: 21px; color: var(--green-800); letter-spacing: -.2px; }
.brand-text span { font-size: 13.5px; color: var(--muted); }

/* ---------- Navigation ---------- */
.nav {
  background: var(--grad); position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(15, 61, 34, .18);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.nav li a {
  display: block; color: #eaf7ee; padding: 15px 18px;
  font-weight: 600; font-size: 17px; position: relative;
  transition: color .15s;
}
.nav li a::after {
  content: ""; position: absolute; left: 17px; right: 17px; bottom: 9px;
  height: 2.5px; background: var(--gold); border-radius: 3px;
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.nav li a:hover { color: #fff; }
.nav li a:hover::after, .nav li a.active::after { transform: scaleX(1); }
.nav li a.active { color: #fff; font-weight: 600; }
.nav-toggle {
  display: none; background: none; border: 0; color: #fff;
  font-size: 26px; cursor: pointer; padding: 10px;
}

/* ---------- Hero (รูปเต็มภาพ + แถบหัวเรื่องด้านล่าง ไม่ทับกัน) ---------- */
.hero { background: #eef2ee; }
.hero > img {
  display: block; width: 100%; height: auto; max-height: 440px;
  object-fit: contain; margin: 0 auto; background: #eef2ee;
}
.hero-strip { background: var(--grad); color: #fff; padding: 26px 0; border-top: 3px solid var(--gold); }
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.30); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 5px 14px; border-radius: 2px; margin-bottom: 14px;
}
.hero-strip h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.25; letter-spacing: -.3px; max-width: 820px; }
.hero-strip p { margin: 0 0 18px; font-size: 17px; opacity: .95; max-width: 720px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Page header ---------- */
.page-head { background: var(--grad); color: #fff; padding: 46px 0 40px; position: relative; overflow: hidden; }
.page-head::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
}
.page-head h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -.3px; position: relative; }
.page-head .ph-sub { margin: 0 0 8px; opacity: .92; font-size: 16px; }
.page-head .crumb { font-size: 14px; opacity: .9; position: relative; }
.page-head .crumb a { color: #fff; text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section.alt { background: var(--bg-soft); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 {
  font-size: 29px; color: var(--green-800); margin: 0 0 10px;
  display: inline-block; position: relative; padding-bottom: 14px; letter-spacing: -.3px;
}
.section-title h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 60px; height: 4px; background: var(--gold);
  transform: translateX(-50%); border-radius: 4px;
}
.section-title p { color: var(--muted); margin: 0; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--green-500); }
.card .thumb { aspect-ratio: 4/3; overflow: hidden; background: #eef2ee; border-bottom: 1px solid var(--line); }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card .body h3 { margin: 0 0 9px; font-size: 19px; color: var(--green-800); line-height: 1.45; }
.card .body p { margin: 0 0 15px; color: var(--muted); font-size: 15px; flex: 1; }

.tag {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  color: var(--green-800); background: var(--green-100);
  padding: 3px 10px; border-radius: 2px; margin-bottom: 11px; align-self: flex-start;
  letter-spacing: .2px;
}
.tag.corporate { background: #dbeafe; color: #1e40af; }
.tag.pr        { background: var(--green-100); color: var(--green-800); }
.tag.academic  { background: #fef3c7; color: #92400e; }
.meta { font-size: 13px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--green-700); color: #fff;
  padding: 11px 22px; border-radius: 3px; font-weight: 600; font-size: 15.5px;
  border: 1px solid var(--green-700); cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.btn.gold { background: var(--gold); color: #3d2c00; border-color: var(--gold); }
.btn.gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.8); }
.btn.ghost:hover { background: #fff; color: var(--green-800); border-color: #fff; }
.section .btn.ghost, .prose .btn.ghost { color: var(--green-700); border-color: var(--green-700); }
.section .btn.ghost:hover, .prose .btn.ghost:hover { background: var(--green-700); color: #fff; }
.btn.sm { padding: 7px 15px; font-size: 14px; }

/* ---------- Course / list ---------- */
.course-list { display: grid; gap: 20px; }
.course-item {
  border: 1px solid var(--line); border-left: 5px solid var(--green-600);
  border-radius: var(--radius); padding: 24px 26px; background: var(--bg);
  box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease;
}
.course-item:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.course-item h3 { margin: 6px 0 10px; color: var(--green-800); font-size: 21px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pill {
  font-size: 13px; background: var(--green-50); border: 1px solid var(--green-100);
  color: var(--green-800); padding: 4px 10px; border-radius: 2px; font-weight: 600;
}
.pill.price { background: #fff7e6; border-color: #ffe1a6; color: #9a6700; }
.course-item p { margin: 0 0 6px; color: #374151; }
.course-item .note { font-size: 14px; color: var(--muted); }

/* ---------- Info / contact box ---------- */
.infobox {
  background: var(--green-50); border: 1px solid var(--green-100);
  border-radius: var(--radius); padding: 24px 26px;
}
.infobox h3 { margin: 0 0 12px; color: var(--green-800); }

/* ---------- Two-column content ---------- */
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start; }
.prose p { margin: 0 0 16px; }
.prose h2 { color: var(--green-800); margin-top: 32px; font-size: 23px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.num-list { counter-reset: item; list-style: none; padding-left: 0; }
.num-list li { position: relative; padding-left: 40px; margin-bottom: 12px; }
.num-list li::before {
  counter-increment: item; content: counter(item);
  position: absolute; left: 0; top: 1px; width: 27px; height: 27px;
  background: var(--green-100); color: var(--green-800); border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}

/* ---------- Download list ---------- */
.dl-list { display: grid; gap: 12px; }
.dl-item {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px 18px;
  background: var(--bg); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s;
}
.dl-item:hover { border-color: var(--green-500); transform: translateX(3px); }
.dl-item .ico {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: #fde8e8; color: #c0392b; display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
}
.dl-item .info { flex: 1; }
.dl-item .info strong { display: block; color: var(--ink); }
.dl-item .info span { font-size: 13px; color: var(--muted); }

/* ---------- SDG grid ---------- */
.sdg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sdg-item {
  border-radius: var(--radius-sm); padding: 18px; color: #fff; min-height: 120px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-sm); transition: transform .2s ease;
}
.sdg-item:hover { transform: scale(1.04); }
.sdg-item .num { font-size: 23px; font-weight: 800; opacity: .9; }
.sdg-item .name { font-size: 15px; font-weight: 600; line-height: 1.4; }

/* ---------- Newsletter cards ---------- */
.nl-card .thumb { aspect-ratio: 3/4; }

/* ---------- Quick links (home) ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.quick a {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s; color: var(--ink);
}
.quick a:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--green-500); }
.quick .ic {
  margin: 0 auto 12px; width: 58px; height: 58px; border-radius: 3px;
  background: var(--green-50); display: grid; place-items: center; color: var(--green-700);
}
.quick .ic svg { width: 30px; height: 30px; }
.quick strong { display: block; color: var(--green-800); font-size: 17px; margin-bottom: 2px; }
.quick span { font-size: 13.5px; color: var(--muted); }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 10px; }
.stat .n { font-size: 38px; font-weight: 800; color: var(--green-700); line-height: 1; }
.stat .l { color: var(--muted); margin-top: 8px; font-size: 15px; }

/* ============================================================
   หน้าหลักสูตร (curriculum.php)
   ============================================================ */
.curriculum-head .ph-sub { font-weight: 400; }
.curr-facts { background: var(--green-900); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 28px; padding: 22px 0; }
.fact { display: flex; align-items: center; gap: 14px; color: #eaf7ee; }
.fact-ic {
  width: 44px; height: 44px; border-radius: 3px; flex-shrink: 0; color: #fff;
  background: rgba(255,255,255,.12); display: grid; place-items: center;
}
.fact-ic svg { width: 24px; height: 24px; }
.fact strong { display: block; font-size: 13px; color: #9fd3b1; font-weight: 600; }
.fact span { font-size: 15.5px; font-weight: 600; }

.struct-list { list-style: none; margin: 0; padding: 0; }
.struct-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--green-100); }
.struct-list li:last-child { border-bottom: 0; }
.struct-list li.sub { padding-left: 18px; font-size: 14.5px; color: var(--muted); border-bottom: 0; padding-top: 4px; padding-bottom: 4px; }
.struct-list li b { color: var(--green-800); white-space: nowrap; }

.career-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.career-card {
  display: flex; align-items: flex-start; gap: 12px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px;
  box-shadow: var(--shadow-sm); font-weight: 500;
}
.career-ic {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--green-100); color: var(--green-700); display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
}

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.tab-btn {
  background: var(--bg); border: 1.5px solid var(--line); color: var(--ink);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.tab-btn:hover { border-color: var(--green-500); color: var(--green-800); }
.tab-btn.active { background: var(--green-700); border-color: var(--green-700); color: #fff; box-shadow: 0 6px 16px rgba(21,128,61,.22); }
.tab-panel { display: none; animation: fade .25s ease; }
.tab-panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.course-group { color: var(--green-800); font-size: 17px; margin: 24px 0 10px; padding-left: 12px; border-left: 4px solid var(--gold); }
.course-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.course-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.course-table thead th {
  background: var(--green-50); color: var(--green-800); text-align: left;
  font-size: 14px; padding: 12px 16px; border-bottom: 2px solid var(--green-100); white-space: nowrap;
}
.course-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.course-table tbody tr:last-child td { border-bottom: 0; }
.course-table tbody tr:hover { background: var(--bg-soft); }
.course-table .code { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; font-size: 14px; }
.course-table .c-th { display: block; font-weight: 600; color: var(--ink); }
.course-table .c-en { display: block; font-size: 13px; color: var(--muted); }
.course-table .c-note { display: inline-block; margin-top: 4px; font-size: 12.5px; background: #fff7e6; color: #9a6700; padding: 2px 9px; border-radius: 999px; }
.course-table .credit { font-weight: 700; color: var(--green-700); white-space: nowrap; }
.ta-r { text-align: right; }
.curr-note { margin-top: 22px; font-size: 14px; color: var(--muted); background: var(--bg-soft); border-left: 4px solid var(--green-500); padding: 12px 16px; border-radius: var(--radius-sm); }

/* ---------- Org structure (about) ---------- */
.org-tree { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.org-node {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.org-node.top { background: var(--grad); color: #fff; text-align: center; border: 0; }
.org-node.top strong { font-size: 18px; }
.org-children { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.org-children .org-node { border-top: 4px solid var(--green-600); }
.org-node strong { display: block; color: var(--green-800); }
.org-node.top strong { color: #fff; }
.org-node span { font-size: 14px; color: var(--muted); }

/* ---------- Poster grid (ภาพโปสเตอร์ขนาดต่างกัน จัดช่องเท่ากัน) ---------- */
.poster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.poster-grid .poster {
  aspect-ratio: 1 / 1; background: #f1f5f1; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.poster-grid .poster img { width: 100%; height: 100%; object-fit: contain; display: block; }
.poster-banner { text-align: center; }
.poster-banner img {
  max-width: 760px; width: 100%; height: auto; margin: 0 auto;
  border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line);
}
@media (max-width: 900px) { .poster-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .poster-grid { grid-template-columns: 1fr; } }

/* ---------- Staff / faculty ---------- */
.staff-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.staff-card {
  width: 240px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); text-align: center; padding-bottom: 16px;
}
.staff-photo { aspect-ratio: 3/4; overflow: hidden; background: #eef2ee; }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.staff-name { font-weight: 700; color: var(--green-800); font-size: 16px; margin: 14px 10px 4px; line-height: 1.4; }
.staff-rank { display: block; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.staff-fullname { display: inline-block; white-space: nowrap; max-width: 100%; }
.staff-role { font-size: 13.5px; color: var(--muted); margin: 0 14px; }
.staff-edu {
  list-style: none; text-align: left; margin: 10px 14px 0; padding: 10px 0 0;
  border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.55;
}
.staff-edu li { margin-bottom: 4px; padding-left: 14px; position: relative; }
.staff-edu li::before { content: '\2022'; position: absolute; left: 2px; color: var(--green-700); }
@media (max-width: 560px) { .staff-card { width: 100%; max-width: 300px; } }

/* ---------- Policy / complaint blocks ---------- */
.policy-box {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.policy-box h3 { color: var(--green-800); margin: 0 0 12px; }

/* ---------- Footer ---------- */
/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--green-800); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #e8f4ed; padding: 50px 0 0; border-top: 4px solid var(--gold); }
.site-footer .container { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 32px; }
.site-footer h4 { color: #fff; margin: 0 0 16px; font-size: 19px; }
.site-footer a { color: #e8f4ed; }
.site-footer a:hover { color: var(--gold); }
.site-footer p { font-size: 15.5px; color: #e8f4ed; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; font-size: 15.5px; }
.footer-bottom {
  margin-top: 40px; border-top: 1px solid rgba(255,255,255,.18);
  text-align: center; padding: 18px; font-size: 14.5px; color: #cfe2d6;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px;
  border-radius: 50%; background: var(--green-700); color: #fff; border: 0;
  font-size: 22px; cursor: pointer; box-shadow: 0 8px 22px rgba(21,128,61,.4);
  opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s; z-index: 60;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--green-800); transform: translateY(-3px); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .sdg-grid { grid-template-columns: repeat(2, 1fr); }
  .quick, .stats { grid-template-columns: repeat(2, 1fr); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
  .cols { grid-template-columns: 1fr; }
  .org-children { grid-template-columns: 1fr; }
  .career-grid { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
  .nav .container { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav ul { display: none; width: 100%; flex-direction: column; padding-bottom: 8px; }
  .nav ul.open { display: flex; }
  .nav li a { padding: 13px 6px; border-bottom: 1px solid rgba(255,255,255,.14); }
  .nav li a::after { display: none; }
  .hero { min-height: 380px; }
  .hero-strip h1 { font-size: 30px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .quick, .sdg-grid, .stats { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; }
  .brand-text strong { font-size: 18px; }
  .brand .logo { width: 52px; height: 52px; }
  .hero-strip h1 { font-size: 25px; }
  .hero-strip p { font-size: 16px; }
  .page-head h1 { font-size: 25px; }
  .section { padding: 44px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ===== Lightbox: คลิกรูปเพื่อขยาย (มีปุ่มกากบาทปิด รองรับทุกขนาดหน้าจอ) ===== */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 4vw; }
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 84vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox-close { position: absolute; top: 12px; right: 14px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; z-index: 2001; }
.lightbox-close:hover, .lightbox-close:focus { background: rgba(255, 255, 255, .35); }
.lightbox-caption { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; text-align: center; max-width: 90vw; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
img.lb-zoom { cursor: zoom-in; }
@media (max-width: 560px) {
  .lightbox-overlay { padding: 10px; }
  .lightbox-overlay img { max-width: 96vw; max-height: 80vh; }
  .lightbox-close { top: 8px; right: 8px; }
}

/* ===== กันตัดคำกลางชื่อ/ข้อความ — ให้ตัดขึ้นบรรทัดใหม่ทั้งคำ ===== */
.nbw { white-space: nowrap; display: inline-block; max-width: 100%; }
body { overflow-wrap: normal; word-break: normal; }
