/* ===== Self-hosted fonts (generated) ===== */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-400-thai.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-500-thai.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-600-thai.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-700-thai.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/ibmplexsansthai-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Design tokens : green / gray / white ===== */
:root {
  --green-900: #1d974e;
  --green-700: #1f7b4a;
  --green-600: #2e7d4f;
  --green-500: #3a9b63;
  --green-100: #e7f3ec;
  --green-50:  #f3f9f5;

  --gray-900: #1f2a30;
  --gray-700: #3d4a52;
  --gray-600: #5b6770;
  --gray-400: #95a0a8;
  --gray-200: #e2e7ea;
  --gray-100: #eef1f3;
  --gray-50:  #f6f8f8;

  --white: #ffffff;

  --text: var(--gray-900);
  --muted: var(--gray-600);
  --line: var(--gray-200);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(31, 42, 48, 0.08);
  --shadow-sm: 0 4px 14px rgba(31, 42, 48, 0.06);
  --container: 1140px;
  --font-th: "IBM Plex Sans Thai", "Inter", system-ui, sans-serif;
  --transition: .2s ease;
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  font-family: var(--font-th);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--gray-900); font-weight: 700; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ===== Page transitions ===== */
/* เบราว์เซอร์สมัยใหม่: cross-fade ระหว่างหน้าแบบ native (View Transitions API) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .12s ease both; }
::view-transition-new(root) { animation: vt-in .18s ease both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* เบราว์เซอร์ที่ไม่รองรับ: เฟดเนื้อหาเข้าตอนโหลดหน้า */
@supports not (view-transition-name: none) {
  .hero, .hero-banner, .stats, .page-banner, .section, .cta-banner { animation: page-rise .5s ease both; }
}
@keyframes page-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* เคารพผู้ใช้ที่ปิดแอนิเมชัน */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .hero, .hero-banner, .stats, .page-banner, .section, .cta-banner { animation: none; }
  .counter { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1.5px solid transparent; transition: var(--transition); white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--primary { background: var(--green-600); color: #fff; }
.btn--primary:hover { background: var(--green-700); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--green-700); border-color: var(--green-600); }
.btn--outline:hover { background: var(--green-600); color: #fff; }
.btn--white { background: #fff; color: var(--green-700); }
.btn--white:hover { background: var(--green-50); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--green-700); border-color: #fff; transform: translateY(-2px); }
/* micro-interaction: ปุ่มยุบตัวเล็กน้อยเมื่อกด */
.btn:active { transform: translateY(0) scale(.97); }

/* ===== Top bar (letterhead banner) ===== */
.topbar {
  display: flex;
  align-items: stretch;
  height: 76px;
  background: #8DC63F;
  overflow: hidden;
}
.topbar__logo {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 36px 8px 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
}
.topbar__logo img { height: 56px; width: auto; }
.topbar__arrow {
  flex-shrink: 0;
  width: 44px;
  background: #4a4a4a;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%, 22px 50%);
  margin-left: -20px;
  z-index: 2;
}
.topbar__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 16px 8px 28px;
  color: #1a2a10;
  min-width: 0;
  margin-left: -20px;
}
.topbar__names {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__pipe { font-weight: 300; opacity: .7; }
.topbar__detail {
  font-size: 0.78rem;
  margin-top: 3px;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__detail a { color: inherit; }
.topbar__qr {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  flex-shrink: 0;
}
.topbar__qr img { height: 58px; width: 58px; object-fit: contain; display: block; }
.header__lang { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-btn { background: none; border: none; color: var(--gray-600); font-weight: 700; cursor: pointer; font-size: 14px; font-family: inherit; transition: var(--transition); }
.lang-btn:hover { color: var(--green-700); }
.lang-btn.is-active { color: var(--green-700); }
.lang-sep { color: var(--gray-400); }

/* ===== Header ===== */
#site-header { height: 112px; flex-shrink: 0; }
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e4e8e2;
  transition: box-shadow var(--transition);
}
.header::before { display: none; }
.header.is-scrolled { box-shadow: 0 4px 18px rgba(50,90,10,.28); }
.header__inner { display: flex; align-items: center; gap: 0; height: 112px; position: relative; padding-left: 0; z-index: 1; }
.header .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: max(20px, calc((100% - var(--container)) / 2 + 20px));
}
.brand {
  display: flex; align-items: center; gap: 12px;
  background: #d6dbd7;
  flex-shrink: 0;
  align-self: stretch;
  padding: 0 56px 0 28px;
  clip-path: polygon(0 0, 75% 0, 100% 100%, 0 100%);
  position: relative; z-index: 2;
}
.brand__logo { height: 94px; width: auto; display: block; }
/* ─── Dark diagonal strip for 3D dimensional effect ─── */
.header__sep {
  display: block;
  width: 84px; flex-shrink: 0; align-self: stretch;
  background: #5a5a5a;
  clip-path: polygon(0 0, 20px 0, 82px 100%, 62px 100%);
  margin-left: -62px;
  position: relative; z-index: 1;
}
.brand.has-logo .brand__mark, .brand.has-logo .brand__text { display: none; }
.brand__mark {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff; font-weight: 800; font-size: 22px; box-shadow: var(--shadow-sm);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 20px; letter-spacing: .5px; color: var(--green-700); }
.brand__text small { font-size: 11.5px; color: var(--muted); }
.nav { display: flex; gap: 6px; margin-left: 80px; }
.nav a {
  padding: 9px 14px; border-radius: 8px; font-weight: 600; font-size: 15px; color: #1a3a0a;
  transition: var(--transition);
}
.nav a:hover { color: var(--green-700); background: rgba(141,198,63,.12); }
.nav a.is-active { color: var(--green-700); background: rgba(141,198,63,.18); }
/* ===== Nav item icons (ไอคอนนำหน้าเมนู) =====
   ห่อ icon+label ไว้ใน .nav__lbl เพื่อให้เมนูมือถือ (trigger ใช้ space-between)
   ยังจัด label ชิดซ้าย + caret ชิดขวาได้ถูก · icon ใช้ stroke=currentColor จึงเปลี่ยนสีตามลิงก์ */
.nav > a { display: inline-flex; align-items: center; }
.nav__lbl { display: inline-flex; align-items: center; gap: 7px; }
.nav__ico { width: 18px; height: 18px; flex: 0 0 auto; }
/* CTA button: green on white bg */
.header__cta { margin-left: 6px; background: #8DC63F !important; color: #fff !important; }
.header__cta:hover { background: var(--green-700) !important; }
/* Lang buttons */
.header__lang .lang-btn { color: #444; }
.header__lang .lang-btn.is-active { color: var(--green-700); font-weight: 700; }
.header__lang .lang-sep { color: #bbb; }
/* Hamburger lines on green bg */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2.5px; background: #1a3a0a; border-radius: 2px; transition: var(--transition); }

/* ===== Mega menu ===== */
.nav__item--mega { display: flex; align-items: center; position: relative; }
.nav__mega-trigger {
  padding: 9px 14px; border-radius: 8px; font-weight: 500; font-size: 15px; color: var(--gray-700);
  display: inline-flex; align-items: center; gap: 5px; transition: var(--transition); cursor: pointer;
}
.nav__mega-trigger:hover,
.nav__item--mega:hover .nav__mega-trigger { color: var(--green-700); background: var(--green-50); }
.caret { font-size: 11px; transition: transform var(--transition); }
.nav__item--mega:hover .caret { transform: rotate(180deg); }

.megamenu {
  position: absolute; top: 100%; left: 0; right: auto; z-index: 60; padding-top: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: var(--transition);
}
.nav__item--mega:hover .megamenu { opacity: 1; visibility: visible; transform: translateY(0); }
/* two-level mega menu (TISI style) — left list fixed, right panel flyout sized to content */
.megamenu__inner {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.megamenu__inner.mm2 { position: relative; width: 300px; padding: 10px; }
/* รายการยาวเกินจอ → เลื่อน (scroll) ด้วยเมาส์ได้ ไม่ให้ทะลุขอบล่างจอ */
.mm2-left { background: #fff; max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: contain; }
.mm2-group {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 13px 16px; font-family: inherit; font-size: 14.5px; font-weight: 500; line-height: 1.3;
  color: var(--gray-700); background: none; border: none; border-radius: 8px; cursor: pointer;
  text-align: left; transition: var(--transition);
}
.mm2-group:hover { background: var(--green-50); color: var(--green-700); }
.mm2-group.is-active { background: var(--green-600); color: #fff; }
.mm2-arrow { font-size: 13px; opacity: .45; flex-shrink: 0; }
.mm2-group.is-active .mm2-arrow { opacity: 1; }
/* ลิงก์ตรงในแถบซ้าย (รายการตรวจสอบ) — สไตล์เหมือนกลุ่มแต่ไม่มีลูกศร ตัวเล็กกว่าเล็กน้อย */
.mm2-link {
  display: block; width: 100%;
  padding: 11px 16px; font-size: 13.5px; font-weight: 500; line-height: 1.35;
  color: var(--gray-700); border-radius: 8px; transition: var(--transition);
}
.mm2-link:hover { background: var(--green-50); color: var(--green-700); }
/* พาเนล test ไว้แสดงบนมือถือเท่านั้น — บนเดสก์ท็อปไม่ให้โผล่เด็ดขาด */
@media (min-width: 761px) { .mm2-panel--mobileonly { display: none !important; } }

/* right panel = flyout box, appears on hover, width/height fit content */
.mm2-right {
  position: absolute; top: -1px; left: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px; width: max-content; min-width: 280px; max-width: 360px;
  display: none;
}
/* invisible bridge across the gap so hover isn't lost when moving to the flyout */
.mm2-right::before {
  content: ""; position: absolute; top: 0; left: -12px; width: 12px; height: 100%;
}
.mm2-right.is-open { display: block; }
.mm2-panel { display: none; }
.mm2-panel.is-active { display: block; }
.mm2-panel a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--gray-700); transition: var(--transition);
}
.mm2-panel a:hover { background: var(--green-50); color: var(--green-700); }
.mm2-panel-title { display: none; }
.mm-ic {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-100); font-size: 17px;
}
.mm-ic--img { background: #fff; padding: 4px; overflow: hidden; }
.mm-ic img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ===== Active nav link ===== */
.nav a.is-active,
.nav__mega-trigger.is-active,
.nav__drop-trigger.is-active { color: var(--green-700); background: var(--green-50); }

/* ===== Simple dropdown (ใบรับรองและมาตรฐาน) ===== */
.nav__item--drop { display: flex; align-items: center; position: relative; }
.nav__drop-trigger {
  padding: 9px 14px; border-radius: 8px; font-weight: 600; font-size: 15px; color: #1a3a0a;
  transition: var(--transition); display: flex; align-items: center; gap: 4px;
}
.nav__drop-trigger:hover,
.nav__item--drop:hover .nav__drop-trigger { color: var(--green-700); background: rgba(141,198,63,.12); }
.nav__item--drop:hover .caret { transform: rotate(180deg); }
.nav__dropdown {
  position: absolute; top: 100%; left: 0; z-index: 60; padding-top: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: var(--transition);
  min-width: 260px;
}
.nav__item--drop:hover .nav__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__dropdown-inner {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px;
}
.nav__dropdown a {
  display: block; padding: 10px 14px; border-radius: 6px; font-size: 14px; font-weight: 500;
  color: var(--gray-700); transition: var(--transition);
}
.nav__dropdown a:hover { color: var(--green-700); background: var(--green-50); }

/* ===== Page banner (inner pages) ===== */
.page-banner {
  display: none; /* ซ่อนแถบหัวเรื่อง (breadcrumb + ชื่อหน้า) ทุกหน้า — ลบบรรทัดนี้เพื่อให้กลับมาแสดง */
  background: linear-gradient(120deg, var(--green-700), var(--green-900));
  color: #fff; padding: 46px 0;
}
.page-banner h1 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); margin-top: 8px; }
.page-banner__crumb { font-size: 14.5px; color: #cfe5d8; }
.page-banner__crumb a { transition: var(--transition); }
.page-banner__crumb a:hover { color: #fff; text-decoration: underline; }
.page-banner__crumb .sep { margin: 0 8px; opacity: .65; }
.page-banner__crumb > span:last-child { color: #fff; font-weight: 600; }

/* ===== Clickable card (home service teaser) ===== */
.card--link { display: block; }
.card__more { display: inline-block; margin-top: 12px; color: var(--green-600); font-weight: 600; font-size: 14.5px; }
.card--link:hover .card__more { color: var(--green-700); }

/* ===== Map ===== */
.map-wrap { margin-top: 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.map-wrap iframe { display: block; }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, var(--green-100), transparent),
    linear-gradient(180deg, var(--green-50), #fff);
  padding: 70px 0 80px;
}
.hero__inner { display: grid; grid-template-columns: 1.25fr .9fr; gap: 50px; align-items: center; }
.hero__eyebrow {
  display: inline-block; background: var(--green-100); color: var(--green-700);
  padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: 18px; color: var(--gray-900); }
.hero h1 { background: none; }
.hero__content > p { color: var(--muted); font-size: 17px; max-width: 560px; margin-bottom: 28px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 14px;
}
.hero__stats { display: grid; gap: 8px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 20px 22px;
  border-radius: var(--radius-sm); background: var(--green-50);
}
.stat strong { font-size: 34px; color: var(--green-600); font-weight: 800; }
.stat span { color: var(--muted); font-size: 15px; }

/* ===== Sections ===== */
.section { padding: 80px 0; }
/* โซนสลับสี — ใช้เขียวอ่อนของแบรนด์ ให้แยกจากโซนพื้นขาวด้านบนได้ชัด
   (เดิมเป็น --gray-50 #f6f8f8 ซึ่งเกือบขาว แทบมองไม่เห็นความต่าง)
   การ์ด .feature ข้างในเป็นพื้นขาว จึงเด้งออกมาจากพื้นนี้ */
.section--alt { background: var(--green-100); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section__eyebrow {
  display: inline-block; color: var(--green-600); font-weight: 700; font-size: 14px;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px;
}
.section__head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.section__head p { color: var(--muted); font-size: 16.5px; }

/* ===== โค้งเขียวตกแต่งพื้นหลัง (มุมขวาบนของ section) =====
   วาดด้วย inline SVG ไม่ใช้ไฟล์รูป → ไม่เพิ่มน้ำหนักเว็บ
   ⚠️ section ต้องมี overflow:hidden เพราะโค้งวางล้นขอบขวา ถ้าไม่มีจะเกิด scroll แนวนอน */
.section--deco { position: relative; overflow: hidden; }
.section--deco > .container { position: relative; z-index: 1; }  /* เนื้อหาอยู่หน้าโค้งเสมอ */
.section__arc {
  /* right:0 ได้เลย เพราะปลายเส้นในไฟล์ SVG อยู่ชิดขอบขวาของ viewBox อยู่แล้ว
     สัดส่วน viewBox 120:80 = 3:2 → width/height ต้องคงอัตราส่วนนี้ */
  position: absolute; top: 0; right: 0;
  width: 760px; height: 507px;
  z-index: 0; pointer-events: none; display: block;
}
/* ขนาดปลอดภัยคำนวณจาก: โค้งนูนเข้าซ้าย ≈ 29% ของ width และ .section__head จัดกึ่งกลาง (สูงสุด 640px)
   → ต้องได้ว่า  จอ > 0.58 × width + 640 + ระยะเผื่อ  ไม่งั้นโค้งจะกินเข้ามาทับหัวข้อ */
@media (max-width: 1200px) {
  .section__arc { width: 560px; height: 373px; }
}
@media (max-width: 1024px) {
  .section__arc { display: none; }
}

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

/* ===== Feature cards ===== */
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: var(--transition);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-100); }
.feature__icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); font-size: 24px; margin-bottom: 18px;
}
.feature h3 { font-size: 18.5px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 1fr; gap: 34px; }
.about__img {
  aspect-ratio: 4/3; border-radius: var(--radius); display: grid; place-items: center;
  font-size: 110px;
  background: linear-gradient(135deg, var(--green-100), var(--green-50));
  border: 1px solid var(--line);
}
.about__content h2 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 16px; }
.about__content > p { color: var(--muted); margin-bottom: 16px; }
.checklist { margin: 22px 0 26px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; color: var(--gray-700); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-600); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}

/* ===== Product cards ===== */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 26px; text-align: center; transition: var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-100); }
.card__icon {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 34px; background: var(--green-50);
}
.card h3 { font-size: 18.5px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* ===== Services ===== */
.service {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; position: relative; overflow: hidden; transition: var(--transition);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service__no {
  font-size: 40px; font-weight: 800; color: var(--green-100); line-height: 1; display: block; margin-bottom: 14px;
}
.service h3 { font-size: 18px; margin-bottom: 8px; }
.service p { color: var(--muted); font-size: 15px; }

/* ===== CTA banner ===== */
.cta-banner { background: linear-gradient(135deg, var(--green-700), var(--green-900)); color: #fff; }
.cta-banner__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: 54px 20px; flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; font-size: clamp(22px, 3vw, 30px); margin-bottom: 6px; }
.cta-banner p { color: #cfe5d8; }

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: start; }
.contact__item { display: flex; gap: 16px; margin-bottom: 26px; }
.contact__ico {
  flex: 0 0 46px; height: 46px; border-radius: 12px; background: var(--green-100);
  display: grid; place-items: center; font-size: 20px;
}
.contact__item strong { display: block; margin-bottom: 3px; color: var(--gray-900); }
.contact__item p { color: var(--muted); font-size: 15px; }
.contact__item a:hover { color: var(--green-700); }

.contact__form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 500; font-size: 14.5px; margin-bottom: 7px; color: var(--gray-700); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; color: var(--text); transition: var(--transition); background: var(--gray-50);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--green-500); background: #fff;
  box-shadow: 0 0 0 3px var(--green-100);
}
.field textarea { resize: vertical; }
.form__note { margin-top: 14px; color: var(--green-700); font-weight: 600; font-size: 15px; }

/* ===== Footer ===== */
.footer { background: var(--gray-900); color: #b8c2c9; padding-top: 56px; font-size: 15px; position: relative; overflow: hidden; }
.footer__wm {
  position: absolute; right: 2%; bottom: -6%;
  width: clamp(220px, 28vw, 420px); height: auto;
  fill: rgba(255,255,255,0.05);
  pointer-events: none; user-select: none;
}
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1.6fr; gap: 40px; padding-bottom: 40px; }
.footer__col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer__col p { margin-bottom: 10px; line-height: 1.65; }
.footer__col a { display: block; padding: 4px 0; transition: var(--transition); }
.footer__col a:hover { color: #fff; }
.brand--footer {
  margin-bottom: 16px;
  background: transparent;
  clip-path: none;
  filter: none;
  align-self: auto;
  padding: 0;
}
.brand--footer .brand__logo { height: 60px; background: #fff; padding: 6px 10px; border-radius: 8px; }
.brand--footer .brand__text strong { color: #fff; }
.footer__bottom { border-top: 1px solid #2e3a41; padding: 20px 0; font-size: 14px; color: var(--gray-400); }

/* ===== Cleanroom tests ===== */
.clean-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; position: relative; transition: var(--transition);
  border-left: 4px solid var(--green-500);
}
.clean-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.clean-card__img {
  width: calc(100% + 48px);
  margin: -28px -24px 20px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
}
.clean-card__no {
  font-size: 30px; font-weight: 800; color: var(--green-500); line-height: 1; display: block; margin-bottom: 12px;
}
.clean-card h3, .clean-card h4 { font-size: 16px; margin-bottom: 6px; }
.clean-card p { color: var(--muted); font-size: 14px; }
.clean-card--accent { background: var(--green-50); border-left-color: var(--green-700); }
/* optional / add-on test card */
.clean-card--opt { background: var(--gray-50); border-left-color: var(--gray-400); border-style: dashed; }
.clean-card--opt .clean-card__no { color: var(--gray-400); }
/* divider heading for the optional-tests group */
.opt-divider { margin: 48px 0 20px; padding-top: 28px; border-top: 1px solid var(--line); text-align: center; }
.opt-divider span { font-weight: 700; font-size: 21px; color: var(--green-700); }

/* ===== Service tabs (slide bar) ===== */
.tabs__bar {
  display: flex; flex-wrap: wrap; gap: 4px 8px; padding-bottom: 4px; margin-bottom: 30px;
  border-bottom: 1px solid var(--line); scrollbar-width: thin;
}
.tabs__btn {
  flex: 0 0 auto; padding: 13px 22px; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 15.5px; font-weight: 600; color: var(--gray-600);
  border-bottom: 3px solid transparent; transition: var(--transition); white-space: nowrap;
}
.tabs__btn:hover { color: var(--green-700); }
.tabs__btn.is-active { color: var(--green-700); border-bottom-color: var(--green-600); }
.tabs__panel { display: none; animation: fadeIn .35s ease; }
.tabs__panel.is-active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel-head { margin-bottom: 26px; }
.panel-head h3 { font-size: 21px; margin-bottom: 8px; color: var(--green-700); }
.panel-head p { color: var(--muted); max-width: 760px; }
.panel-note {
  margin-top: 16px; padding: 16px 18px; background: var(--green-50); border-radius: var(--radius-sm);
  border-left: 4px solid var(--green-500); font-size: 14.5px;
}
.panel-note strong { color: var(--green-700); display: block; margin-bottom: 2px; }
.panel-note span { color: var(--gray-700); }

/* ===== Calibration scope ===== */
.scope { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.scope__col {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px;
}
.scope__col h4 {
  font-size: 16px; color: var(--green-700); margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
/* icon variant: centered icon + heading + underline, cards spread evenly across the row */
.scope__col--icon { text-align: center; }
.scope__col--icon .scope__icon { font-size: 32px; line-height: 1; margin-bottom: 12px; }
.scope__col--icon h4 { text-align: center; }
.taglist { display: flex; flex-direction: column; gap: 7px; }
.taglist li { position: relative; padding-left: 18px; color: var(--gray-700); font-size: 14.5px; }
.taglist li::before { content: "▸"; position: absolute; left: 0; color: var(--green-500); }

/* ===== Calibration - Temperature showcase (design handoff "2a") ===== */
.cal-temp-showcase { margin: 8px auto 0; max-width: 1360px; padding: 0 20px; }
.cal-temp-showcase__inner {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid oklch(90% 0.005 250); box-shadow: 0 1px 3px oklch(0% 0 0 / 0.08);
  padding: 64px 64px 56px;
  background:
    radial-gradient(480px 360px at -5% 10%, oklch(90% 0.05 200 / 0.55), transparent 60%),
    radial-gradient(520px 400px at 8% 60%, oklch(92% 0.06 152 / 0.5), transparent 65%),
    linear-gradient(180deg, oklch(97% 0.01 200), oklch(98% 0.005 152));
}
/* photo background for a showcase block (light horizontal wash keeps the
   heading text and white cards readable — text side opaque, right side clear).
   The image itself is set per block via the --showcase-photo variable.
   NB: url() lives in the CSS file, so paths need the ../ prefix. */
.cal-temp-showcase__inner--photo {
  background:
    linear-gradient(100deg,
      rgba(255,255,255,0.90) 0%,
      rgba(255,255,255,0.74) 34%,
      rgba(255,255,255,0.40) 66%,
      rgba(255,255,255,0.24) 100%),
    var(--showcase-photo) center / cover no-repeat;
}
.cal-temp-showcase__inner--temp       { --showcase-photo: url('../assets/lab-other/Sum.jpg'); }
.cal-temp-showcase__inner--centrifuge { --showcase-photo: url('../assets/lab-other/centrifuge.jpg'); }
.cal-temp-showcase__inner--mass       { --showcase-photo: url('../assets/lab-other/mass.jpg'); }
.cal-temp-showcase__header { position: relative; max-width: 900px; display: flex; flex-direction: column; gap: 18px; }
.cal-temp-showcase__title { margin: 0; font-family: var(--font-th); font-weight: 700; font-size: 48px; color: oklch(45% 0.13 152); }
.cal-temp-showcase__title span { font-weight: 500; font-size: 28px; color: oklch(45% 0.01 250); }
.cal-temp-showcase__desc { margin: 0; font-size: 16.5px; line-height: 1.75; color: oklch(30% 0.01 250); }
.cal-temp-showcase__desc strong { color: oklch(25% 0.02 250); }
.cal-temp-showcase__cards { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px; }
.cal-temp-card {
  background: #fff; border-radius: 16px; padding: 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 8px 20px oklch(30% 0.05 200 / 0.08);
}
.cal-temp-card__title { font-family: var(--font-th); font-weight: 600; font-size: 15.5px; color: oklch(22% 0.01 250); text-align: center; }
.cal-temp-card__divider { width: 100%; height: 1px; background: oklch(90% 0.005 250); }
.cal-temp-card__desc { margin: 0; font-size: 12.5px; line-height: 1.7; color: oklch(45% 0.01 250); text-align: left; }
.cal-temp-card__list { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 4px; list-style: none; padding: 0; }
.cal-temp-card__list li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: oklch(32% 0.01 250); }
.cal-temp-card__list li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: oklch(58% 0.13 152); flex-shrink: 0; }
@media (max-width: 960px) {
  .cal-temp-showcase__cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cal-temp-showcase__inner { padding: 40px 24px 32px; }
  .cal-temp-showcase__title { font-size: 34px; }
  .cal-temp-showcase__cards { grid-template-columns: 1fr; }
}

/* secondary topic blocks (Electrical / Electronic Balance) - smaller heading, same system */
.cal-temp-showcase--sub .cal-temp-showcase__inner { padding: 56px 64px 48px; }
.cal-temp-showcase--sub .cal-temp-showcase__header { gap: 14px; }
.cal-temp-showcase--sub .cal-temp-showcase__title { font-size: 38px; }
.cal-temp-showcase--sub .cal-temp-showcase__title span { font-size: 22px; }
.cal-temp-showcase--sub .cal-temp-showcase__desc { font-size: 15.5px; }
.cal-temp-showcase--sub .cal-temp-showcase__cards { margin-top: 36px; }
.cal-temp-showcase__cards--cols3 { grid-template-columns: repeat(3, 1fr); }
.cal-temp-showcase__cards--cols2 { grid-template-columns: repeat(2, 1fr); max-width: 700px; }
.cal-temp-card--sub { padding: 26px 20px; gap: 14px; }
@media (max-width: 960px) {
  .cal-temp-showcase__cards--cols3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cal-temp-showcase--sub .cal-temp-showcase__inner { padding: 36px 24px 28px; }
  .cal-temp-showcase--sub .cal-temp-showcase__title { font-size: 28px; }
  .cal-temp-showcase__cards--cols3,
  .cal-temp-showcase__cards--cols2 { grid-template-columns: 1fr; max-width: none; }
}

/* clickable cards (link to detail page) */
.cal-temp-card { transition: transform .25s ease, box-shadow .25s ease; }
a.cal-temp-card { cursor: pointer; color: inherit; }
a.cal-temp-card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px oklch(30% 0.06 200 / 0.16); }
a.cal-temp-card .cal-temp-card__title { position: relative; }
a.cal-temp-card:hover .cal-temp-card__title { color: oklch(45% 0.13 152); }

/* ===== Temperature detail page (scrolling topics) ===== */
.temp-nav {
  position: sticky; top: 120px; z-index: 40;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  padding: 12px 14px; margin: 0 auto 44px; max-width: max-content;
  background: rgba(255,255,255,.97);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.temp-nav a {
  padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  color: var(--green-700); background: var(--green-50); transition: var(--transition);
}
.temp-nav a:hover, .temp-nav a.is-active { background: var(--green-600); color: #fff; }

.temp-page-title {
  text-align: center; font-size: 40px; color: oklch(38% 0.11 152); margin: 0 0 28px;
}
.temp-page-title span { font-weight: 500; opacity: .8; font-size: 22px; color: oklch(45% 0.01 250); }
@media (max-width: 640px) {
  .temp-page-title { font-size: 30px; }
  .temp-page-title span { font-size: 17px; }
}

.temp-topic { margin-bottom: 64px; scroll-margin-top: 200px; }
.temp-topic:last-child { margin-bottom: 0; }
/* full-width band; content stays aligned to the page container (แบบ 3a: พื้นอ่อน) */
.temp-topic__hero {
  position: relative; overflow: hidden; color: var(--gray-900); margin-bottom: 8px;
  background:
    radial-gradient(480px 360px at -5% 10%, oklch(90% 0.05 200 / 0.55), transparent 60%),
    radial-gradient(520px 400px at 8% 60%, oklch(92% 0.06 152 / 0.5), transparent 65%),
    linear-gradient(180deg, oklch(97% 0.01 200), oklch(98% 0.005 152));
}
.temp-topic__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.temp-topic__hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    oklch(98% 0.005 152 / .95) 0%,
    oklch(98% 0.005 152 / .78) 30%,
    oklch(98% 0.005 152 / .25) 55%,
    oklch(98% 0.005 152 / 0) 72%);
}
.temp-topic__hero-inner {
  position: relative; z-index: 1; min-height: 268px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding-top: 48px; padding-bottom: 48px; padding-right: 300px;
}
.temp-topic__hero-inner > *:not(.temp-topic__range) { position: relative; }
.temp-topic__eyebrow { font-size: 15px; font-weight: 500; color: oklch(42% 0.1 152); }
.temp-topic__title { color: oklch(38% 0.11 152); font-size: 44px; margin: 0; }
.temp-topic__title span { font-weight: 500; opacity: .8; font-size: 22px; }

/* ช่วงอุณหภูมิ (ตัวเลขวิ่ง) วงกลมสีขาวลอยด้านขวา — ตัวเลขสีเขียว */
.temp-topic__range {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 220px; height: 220px; border-radius: 50%; padding: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  background: #fff; box-shadow: 0 12px 32px oklch(30% 0.05 200 / 0.18);
}
.temp-topic__range .lbl { display: block; font-size: 11.5px; color: oklch(45% 0.01 250); margin-bottom: 6px; line-height: 1.3; }
.temp-topic__range .vals { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.temp-topic__range .num { font-size: 34px; font-weight: 700; line-height: 1.1; color: oklch(40% 0.13 152); }
.temp-topic__range .unit { font-size: 16px; font-weight: 600; color: oklch(40% 0.13 152); }
.temp-topic__range .sep { font-size: 12px; color: oklch(45% 0.01 250); font-weight: 500; margin: 1px 0; }

.temp-topic__body { padding: 40px 6px 0; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; }
.temp-topic__text > p { color: var(--gray-700); margin-bottom: 16px; }
.temp-topic__text h4 { font-size: 17px; color: oklch(42% 0.12 152); margin: 4px 0 12px; }
.temp-topic__figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }
.temp-topic__figure img { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); width: 100%; }
.temp-topic__ph {
  border: 2px dashed var(--gray-200); border-radius: 14px; padding: 54px 20px;
  text-align: center; color: var(--gray-400); font-size: 14px; background: var(--gray-50);
}
@media (max-width: 760px) {
  .temp-nav { top: 74px; }
  .temp-topic { scroll-margin-top: 150px; }
  .temp-topic__hero-inner { padding-top: 28px; padding-bottom: 28px; padding-right: 20px; min-height: auto; }
  .temp-topic__title { font-size: 26px; }
  .temp-topic__range {
    position: static; transform: none; align-self: flex-end;
    margin: 22px 0 4px; width: 180px; height: 180px;
  }
  .temp-topic__range .num { font-size: 32px; }
  .temp-topic__body { grid-template-columns: 1fr; gap: 24px; }
}

/* ===== Laboratory accreditation (cert เต็มใบ + ข้อความด้านล่าง) ===== */
.accreditation { max-width: 760px; margin: 0 auto; text-align: center; }
.accreditation__img {
  display: inline-block; width: 100%; max-width: 600px; margin: 0 auto 30px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #fff; transition: var(--transition);
}
.accreditation__img:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(31,42,48,.14); }
.accreditation--wide { max-width: none; }
.accreditation--wide .accreditation__img { max-width: none; }
.accreditation__img img { width: 100%; height: auto; display: block; }
.accreditation__mark {
  display: inline-block; margin: 0 auto 32px; padding: 22px 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); background: #fff;
}
.accreditation__mark img { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto; }
/* ตราแบบพื้นหลังโปร่งใส (ไม่มีกรอบ/เงา/พื้นขาว) */
.accreditation__mark--plain { padding: 0; border: none; box-shadow: none; background: transparent; margin: 24px auto 0; }
.accreditation__mark--plain img { max-width: 260px; }
.accreditation__eyebrow { display: block; font-size: 24px; margin-bottom: 20px; }
.accreditation__text p { color: var(--gray-700); font-size: 16.5px; line-height: 1.9; max-width: 680px; margin: 0 auto; }

/* ===== Certificates ===== */
.badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 40px; }
.badge {
  padding: 10px 20px; border-radius: 999px; background: var(--green-100); color: var(--green-700);
  font-weight: 600; font-size: 14.5px; border: 1px solid var(--green-500);
}
.subhead {
  font-size: 18px; color: var(--gray-900); margin: 14px 0 18px; padding-left: 14px;
  border-left: 4px solid var(--green-600);
}
/* หัวข้อหลักสูตรในหน้าฝึกอบรม — ไม่มีแถบเขียว + ตัวใหญ่ชัดเจน */
.train-head { font-size: 26px; font-weight: 700; color: var(--gray-900); margin: 16px 0 20px; text-align: center; }
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 34px; }
.cert-card {
  position: relative; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #fff;
}
.cert-card img { width: 100%; height: 100%; object-fit: cover; }
.cert-card img.is-missing { display: none; }
.cert-card__ph {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 14px;
  color: var(--green-700); font-size: 12.5px; font-weight: 600;
  background: repeating-linear-gradient(45deg, var(--green-50), var(--green-50) 12px, #fff 12px, #fff 24px);
  border: 2px dashed var(--green-500); border-radius: var(--radius);
}
.cert-card img:not(.is-missing) + .cert-card__ph { display: none; }

/* ===== About activity slider sizing ===== */
.slider--about { box-shadow: var(--shadow); border-radius: var(--radius); max-width: none; }
/* วางจุดบอกตำแหน่งทับบนรูป เพื่อไม่ให้มีแถบสีขาวด้านล่าง */
.slider--about .slider__dots {
  position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; z-index: 3;
}
.slider--about .slider__dots button { background: rgba(255,255,255,.6); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.slider--about .slider__dots button.is-active { background: #fff; }

/* แกลเลอรีผลงาน: กรอบ 16:9 — ใช้กับชุดรูป "แนวนอน" (เช่น assets/fumigation, assets/filter-change) */
.slider.slider--wide { max-width: 600px; }
.slider--wide .slide { aspect-ratio: 16 / 9; }
.slider--wide .slide img { object-fit: contain; background: #fff; }

/* แกลเลอรีผลงาน: กรอบ 3:4 — ใช้กับชุดรูป "แนวตั้ง" (เช่น assets/cleanroom/cr-*)
   ⚠️ ต้องมี position:absolute ที่ img ด้วย ห้ามตัดออก:
   .slide เป็น grid + place-items:center ทำให้ height:100% ของ img คำนวณไม่ได้ (วนลูป)
   img จึงกลับไปใช้ความสูงตามธรรมชาติ (รูป 3:4 ที่กว้าง 588px = สูง 784px) แล้วล้นกรอบ
   โดน overflow:hidden ตัดหัวตัดท้าย ส่วน object-fit ก็ไม่มีผลเพราะกรอบ img เท่าอัตราส่วนรูปพอดี
   การถอด img ออกจาก grid flow ทำให้ height:100% อ้างอิงกับ .slide ได้ตรง ๆ */
.slider.slider--portrait { max-width: 440px; }
.slider--portrait .slide { aspect-ratio: 3 / 4; }
.slider--portrait .slide img { position: absolute; inset: 0; object-fit: contain; background: #fff; }

/* แกลเลอรีใบรับรอง: กรอบ ~1.41:1 (A4 แนวนอน) แสดงทีละใบ + หมุนอัตโนมัติ + ขนาดใหญ่ */
.slider.slider--cert { max-width: 820px; }
.slider--cert .slide { aspect-ratio: 1.414 / 1; }
.slider--cert .slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }

/* ===== Floating contact widget (left) ===== */
.fab { position: fixed; right: 16px; left: auto; bottom: 22px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fab__items { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fab__item {
  display: flex; align-items: center; gap: 9px; transition: var(--transition);
  opacity: 0; transform: translateX(120%); pointer-events: none;
}
.fab.is-open .fab__item { opacity: 1; transform: none; pointer-events: auto; }
.fab__label {
  background: #8bc78f; color: #fff; font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: 999px; white-space: nowrap; box-shadow: var(--shadow-sm);
}
.fab__icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm); flex: 0 0 48px;
}
.fab__item--call .fab__icon { background: #f5821f; font-size: 20px; }
.fab__item--line .fab__icon { background: #06c755; font-size: 11px; letter-spacing: .3px; }
.fab__item--msg  .fab__icon { background: linear-gradient(135deg, #00b2ff, #006aff); font-size: 22px; font-style: italic; }
.fab__item:hover .fab__label { background: var(--green-600); }
.fab__toggle {
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; align-self: flex-end;
  background: var(--green-600); color: #fff; box-shadow: var(--shadow); position: relative; transition: var(--transition);
}
.fab__toggle:hover { background: var(--green-700); transform: scale(1.05); }
.fab__toggle:active { transform: scale(.94); }
.fab__item:active .fab__icon { transform: scale(.9); }
.fab__icon { transition: transform var(--transition); }
.fab__toggle span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; transition: opacity .2s; }
.fab__toggle-open { opacity: 0; }
.fab__toggle-closed { opacity: 1; }
.fab.is-open .fab__toggle-open { opacity: 1; }
.fab.is-open .fab__toggle-closed { opacity: 0; }

/* pulse ring — หยุดเมื่อเปิดแล้ว */
@keyframes fab-pulse {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
.fab:not(.is-open) .fab__toggle::before,
.fab:not(.is-open) .fab__toggle::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--green-500);
  animation: fab-pulse 2.2s ease-out infinite;
  pointer-events: none;
}
.fab:not(.is-open) .fab__toggle::after { animation-delay: 1.1s; }
@media (prefers-reduced-motion: reduce) {
  .fab__toggle::before, .fab__toggle::after { animation: none; }
}

/* ===== Responsive ===== */

.clean-extra { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.clean-extra__box {
  background: var(--gray-50); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px;
}
.clean-extra__box h4 { font-size: 17px; margin-bottom: 16px; color: var(--green-700); }
.clean-extra__box .checklist { margin: 0; }
.clean-extra__box p { color: var(--muted); font-size: 15px; }

/* ===== Slider / Gallery ===== */
.slider { position: relative; max-width: 920px; margin: 0 auto; }
.slider__viewport { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.slider__track { display: flex; transition: transform .5s ease; }
.slide {
  position: relative; flex: 0 0 100%; aspect-ratio: 16/9; background: var(--green-50);
  display: grid; place-items: center; overflow: hidden;
}
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide img.is-missing { display: none; }
.slide__ph {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  color: var(--green-700); font-weight: 600; font-size: 15px; padding: 20px;
  background:
    repeating-linear-gradient(45deg, var(--green-50), var(--green-50) 14px, #fff 14px, #fff 28px);
  border: 2px dashed var(--green-500);
}
.slide img:not(.is-missing) + .slide__ph { display: none; }
.slider__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--green-700); font-size: 26px; line-height: 1;
  box-shadow: var(--shadow-sm); display: grid; place-items: center; transition: var(--transition);
}
.slider__btn:hover { background: var(--green-600); color: #fff; }
.slider__btn--prev { left: 14px; }
.slider__btn--next { right: 14px; }
.slider__dots { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.slider__dots button {
  width: 11px; height: 11px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--gray-200); transition: var(--transition); padding: 0;
}
.slider__dots button.is-active { background: var(--green-600); width: 28px; border-radius: 6px; }

/* ปุ่มเลื่อนแสดงเฉพาะตอนเมาส์ชี้ที่รูป */
.slider--hover-nav .slider__btn { opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.slider--hover-nav:hover .slider__btn { opacity: 1; pointer-events: auto; }

/* ===== Hero banner (full-width slider) ===== */
.hero-banner { position: relative; }
.slider--hero { max-width: none; margin: 0; }
.slider--hero .slider__viewport { border-radius: 0; box-shadow: none; background: none; }
.slider--hover-nav .slider__viewport { border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.slider--hero .slide {
  /* กรอบ 16:9 เต็มความกว้างเว็บ — วิดีโอ 16:9 (contain) เต็มขอบพอดี ไม่ตัด ไม่มีขอบว่าง
     จำกัดสูงสุด 900px กันสูงเกินบนจอกว้างมาก (จอ ≤ ~1600px จะเต็ม 16:9 พอดี) */
  aspect-ratio: 16 / 9; height: auto; min-height: 0; max-height: 900px;
  background: linear-gradient(120deg, var(--green-700), var(--green-900));
}
.hero-slide { position: relative; }
/* cover = วิดีโอเต็มความกว้างกรอบเสมอ ไม่มีขอบเขียว (จอกว้างกว่า 16:9 จะตัดบน-ล่างเล็กน้อย, จอ ≤ ~1600px เต็มพอดีไม่ตัด) */
.hero-slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide__img.is-missing { display: none; }
.hero-slide__content {
  position: absolute; inset: 0; display: flex; align-items: center;
  background: linear-gradient(90deg, rgba(15,40,28,.52), rgba(15,40,28,.22) 55%, rgba(15,40,28,0));
}
.hero-slide__content .container { width: 100%; position: relative; z-index: 2; }
/* ลายน้ำ (watermark) จาง ๆ หลังตัวอักษร — เปลี่ยนรูปได้ที่ assets/hero/watermark.png */
.hero-slide__wm {
  position: absolute; top: 50%; right: 3%; transform: translateY(-50%);
  height: 82%; width: auto; max-width: 46%; object-fit: contain;
  opacity: .06; pointer-events: none; user-select: none;
}
.hero-slide__eyebrow {
  display: inline-block; background: rgba(255,255,255,.16); color: #fff;
  padding: 7px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; margin-bottom: 20px;
}
.hero-slide__title { color: #fff; font-size: clamp(34px, 5.6vw, 50px); max-width: 880px; margin-bottom: 18px; }
.hero-slide__sub { color: rgba(255,255,255,.92); font-size: clamp(17px, 1.4vw, 20px); max-width: 680px; margin-bottom: 28px; }
.hero-slide__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.slider--hero .slider__dots { position: absolute; left: 0; right: 0; bottom: 20px; margin: 0; z-index: 3; }
.slider--hero .slider__dots button { background: rgba(255,255,255,.5); }
.slider--hero .slider__dots button.is-active { background: #fff; }
.slider--hero .slider__btn { background: rgba(255,255,255,.85); }
.slider--hero .slider__btn:hover { background: var(--green-600); color: #fff; }
/* เดสก์ท็อป: ดันข้อความ hero ไปมุมซ้ายบน + ขยับซ้ายมากขึ้น (มือถือคงจัดกลางแนวตั้งไว้ ไม่ให้ล้นกรอบเตี้ย) */
@media (min-width: 861px) {
  .hero-slide__content { align-items: flex-start; padding-top: 70px; }
  .hero-slide__content .container { max-width: 1500px; }
}

/* ===== Stats counter ===== */
.stats { background: linear-gradient(120deg, var(--green-700), var(--green-900)); color: #fff; }
.stats__inner { display: grid; grid-template-columns: repeat(3, 1fr); padding: 48px 20px; text-align: center; }
.stat-item { padding: 6px 14px; }
.stats__inner .stat-item:not(:first-child) { border-left: 1px solid rgba(255,255,255,.18); }
.stat-item strong { display: block; font-size: clamp(32px, 4vw, 46px); font-weight: 800; color: #fff; line-height: 1; }
.stat-item span { display: block; margin-top: 8px; color: rgba(255,255,255,.85); font-size: 15px; }

/* ===== Service cards (1-per-row, split layout) ===== */
.svc-grid { grid-template-columns: 1fr; gap: 20px; }
.svc-grid--2 { grid-template-columns: 1fr 1fr; gap: 24px; }
.svc-grid--2 .svc-card,
.svc-grid--2 .svc-card:nth-child(even) {
  grid-template-areas: "img body";
  grid-template-columns: 45% 55%;
  grid-template-rows: unset;
  min-height: 220px;
}
/* gray text panel + shadow so image and text read as one card */
.svc-grid--2 .svc-card { border: 0; box-shadow: var(--shadow); }
.svc-grid--2 .svc-card:hover { border: 0; box-shadow: 0 16px 40px rgba(31,42,48,.14); }
.svc-grid--2 .svc-card__body { padding: 24px 28px; background: var(--gray-100); }
.svc-grid--2 .svc-card h3 { font-size: 16px; margin-bottom: 10px; }
.svc-grid--2 .svc-card p { font-size: 13.5px; }
/* step-number badge (numbers live in the HTML but are hidden by default) */
.svc-grid--2 .svc-card__no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--green-600); color: #fff;
  font-size: 15px; font-weight: 800; line-height: 1;
  margin-bottom: 14px; align-self: flex-start; flex: 0 0 auto;
}

/* whole-card slide-in for 2-col grid */
.svc-grid--2 .svc-card.reveal { transform: translateX(-90px); }
.svc-grid--2 .svc-card:nth-child(even).reveal { transform: translateX(90px); }
.svc-grid--2 .svc-card.reveal.is-visible { transform: none; }
.svc-card {
  display: grid;
  grid-template-areas: "img body";
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius);
  overflow: hidden; min-height: 300px;
  background: var(--white);
  /* เงาสีเทาให้กล่องข้อความลอยออกจากพื้นหลัง (สีเงาใช้โทนเดียวกับ --shadow ของโปรเจกต์) */
  box-shadow: 0 8px 24px rgba(31, 42, 48, .12); border: 1px solid var(--line);
  text-decoration: none;
  transition: box-shadow .35s ease, transform .35s ease;
}
.svc-card:hover { box-shadow: 0 16px 40px rgba(31, 42, 48, .18); transform: translateY(-4px); }
.svc-card:nth-child(even) { grid-template-areas: "body img"; }
.svc-card__bg {
  grid-area: img;
  background: linear-gradient(145deg, var(--green-700) 0%, var(--green-500) 100%);
  background-size: cover; background-position: center;
  transition: transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
}
.svc-card:hover .svc-card__bg { transform: scale(1.06); }
/* ช่องรูปในการ์ด svc ที่ยังไม่ได้ใส่รูป (ไม่มี inline background-image) → แสดงป้าย "รอใส่รูป"
   ให้เหมือน placeholder หน้าอื่น พอเพิ่ม style="background-image:url(...)" ป้ายจะหายเอง */
.svc-card__bg:not([style]) {
  background: repeating-linear-gradient(45deg, var(--green-50), var(--green-50) 12px, #fff 12px, #fff 24px);
  display: grid; place-content: center; text-align: center; padding: 14px;
  border: 2px dashed var(--green-500);
}
.svc-card__bg:not([style])::after {
  content: "รอใส่รูป";
  color: var(--green-700); font-weight: 600; font-size: 13px;
}
.svc-card:hover .svc-card__bg:not([style]) { transform: none; }
.svc-card__icon { display: none; }
.svc-card__no { display: none; }
/* การ์ด svc แบบข้อความล้วน (ไม่มีช่องรูป) — คอลัมน์เดียวเต็มความกว้าง ใช้ได้ทั้ง svc-grid และ svc-grid--2 */
.svc-card.svc-card--text {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  grid-template-areas: "body";
  min-height: 0;
}
/* การ์ด even ใน svc-grid--2 ถูกกฎ .svc-grid--2 .svc-card:nth-child(even) (0,3,0) ครอบ 2 คอลัมน์ไว้
   ต้อง specificity สูงกว่าเพื่อบังคับข้อความล้วน (ไม่งั้นช่องรูปฝั่งซ้ายจะเป็นกล่องขาวว่าง) */
.svc-grid--2 .svc-card:nth-child(even).svc-card--text {
  grid-template-columns: 1fr;
  grid-template-areas: "body";
  min-height: 0;
}
.svc-card__body {
  grid-area: body;
  padding: 44px 52px;
  display: flex; flex-direction: column; justify-content: center;
  /* พื้นกล่องข้อความสีเทา (โทนเดียวกับแพเนลข้อความของ svc-grid--2) */
  background: var(--gray-100);
}
.svc-card h3 {
  font-size: 22px; color: var(--gray-900); font-weight: 700;
  line-height: 1.3; margin-bottom: 14px;
}
/* หัวข้อการ์ดหน้าแรก (index.html) เป็นประโยคยาว → ลดน้ำหนักฟอนต์ + เพิ่ม line-height
   ให้อ่านสบายตากว่าตัวหนาแน่น ๆ · จำกัดที่ .svc-grid ไม่โดนการ์ดหน้า test (.svc-grid--2) */
.svc-grid .svc-card h3 {
  font-weight: 600; line-height: 1.5; margin-bottom: 18px;
}
.svc-card p {
  color: var(--muted); font-size: 15px; line-height: 1.65;
  margin: 0 0 22px; max-height: none; overflow: visible; opacity: 1;
}
.svc-card .card__more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green-600); font-weight: 600; font-size: 14.5px;
  opacity: 1; max-height: none; overflow: visible;
  transition: gap .25s ease, color .25s ease;
}
.svc-card:hover .card__more { color: var(--green-700); gap: 12px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .scope { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .about__media { order: -1; }
  .stats__inner { grid-template-columns: repeat(3, 1fr); gap: 26px 0; }
  /* keep 16:9, but never shorter than this so the overlaid text still fits on
     small screens (below this width the video fills via cover with a slight crop) */
  .slider--hero .slide { min-height: 420px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 80px; }
  #site-header { height: 66px; }
  .header__inner { height: 66px; }
  .header__sep { width: 58px; margin-left: -42px; clip-path: polygon(0 0, 14px 0, 56px 100%, 42px 100%); }
  /* one card per row on tablet/phone so the image has full width and isn't
     squeezed into a narrow, heavily-cropped strip */
  .svc-grid--2 { grid-template-columns: 1fr; }
  .svc-card {
    grid-template-areas: "img" "body" !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 220px auto;
  }
  /* size the stacked image to a 4:3 box (matches the photos) so the whole
     landscape photo shows instead of a cropped horizontal slice. rows go auto
     so the row follows the box height (base rule forces grid-template-rows:unset,
     so this more-specific override is required). */
  .svc-grid--2 .svc-card { grid-template-rows: auto auto; }
  /* photos are 3:4 portrait; a shorter 4:3 frame + cover keeps the card compact
     and full-width (no side gaps), trimming a little off the top/bottom while
     keeping the subject centred. */
  .svc-grid--2 .svc-card__bg {
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }
  /* drop the horizontal slide-in reveal on narrow screens — it pushed cards
     off-canvas and created a horizontal scrollbar; use a subtle vertical rise */
  .svc-grid--2 .svc-card.reveal,
  .svc-grid--2 .svc-card:nth-child(even).reveal { transform: translateY(30px); }
  .svc-card__body { padding: 28px 24px; }
  .svc-card h3 { font-size: 18px; margin-bottom: 10px; }
  .svc-card p { margin-bottom: 16px; font-size: 14px; }
  /* การ์ดข้อความล้วน (ไม่มีรูป) — ตัดแถวรูป 220px ที่ base rule บังคับไว้ ไม่ให้เหลือช่องว่างบน */
  .svc-card.svc-card--text {
    grid-template-areas: "body" !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
  .brand__logo { height: 48px; width: auto; }
  .nav {
    position: fixed; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column;
    gap: 0; padding: 12px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .25s ease; margin-left: 0;
    max-height: calc(100vh - 66px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .accreditation__img { max-width: 100%; margin: 0 auto 22px; }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 12px 8px; border-bottom: 1px solid var(--gray-100); }
  .header__lang { margin-left: auto; }
  .nav-toggle { display: flex; margin-left: 12px; }
  .header__cta { display: none; }
  .topbar { display: none; }

  /* mega menu becomes a collapsible accordion on mobile */
  .nav__item--mega { flex-direction: column; align-items: stretch; width: 100%; }
  .nav__mega-trigger {
    padding: 12px 8px; border-bottom: 1px solid var(--gray-100);
    display: flex; justify-content: space-between; align-items: center;
  }
  .caret { display: inline; font-size: 13px; transition: transform .25s ease; }
  .nav__item--mega.is-open .caret { transform: rotate(180deg); }
  .megamenu {
    position: static; transform: none; padding-top: 0;
    opacity: 1; visibility: visible;
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav__item--mega.is-open .megamenu { max-height: 2000px; }
  .megamenu__inner.mm2 {
    width: auto; padding: 6px 0 6px 8px;
    border: none; box-shadow: none; border-radius: 0;
  }
  .mm2-left { display: none; }
  .mm2-right {
    position: static; display: block; width: auto; min-width: 0; padding: 0;
    border: none; box-shadow: none; border-radius: 0;
  }
  .mm2-panel { display: block; margin-bottom: 14px; }
  .mm2-panel-title {
    display: block; font-weight: 700; font-size: 13px; color: var(--green-700);
    padding: 6px 0 4px; letter-spacing: .02em;
  }
  .mm2-panel a { padding: 10px 8px; }

  /* simple cert dropdown becomes accordion on mobile */
  .nav__item--drop { flex-direction: column; align-items: stretch; width: 100%; }
  .nav__drop-trigger {
    padding: 12px 8px; border-bottom: 1px solid var(--gray-100);
    display: flex; justify-content: space-between; align-items: center; border-radius: 0;
  }
  .nav__item--drop.is-open .caret { transform: rotate(180deg); }
  .nav__dropdown {
    position: static; transform: none; padding-top: 0;
    opacity: 1; visibility: visible;
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav__item--drop.is-open .nav__dropdown { max-height: 200px; }
  .nav__dropdown-inner { border: none; box-shadow: none; border-radius: 0; padding: 0; background: var(--gray-50); }
  .nav__dropdown a { padding: 10px 20px; border-bottom: 1px solid var(--gray-100); border-radius: 0; }
}
@media (max-width: 560px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stats__inner { grid-template-columns: 1fr; gap: 22px 0; }
  .stats__inner .stat-item:not(:first-child) { border-left: none; }
  .scope { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .topbar__detail { display: none; }
  .fab__label { font-size: 13px; padding: 9px 12px; }
  .fab__icon { width: 42px; height: 42px; flex-basis: 42px; }
}

/* ===== Scroll progress bar ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--green-700), #8DC63F);
  z-index: 9999;
  pointer-events: none;
}

/* ===== Scroll reveal =====
   No permanent will-change: opacity/transform transitions are auto-promoted
   by the browser for their duration, and JS adds a transient will-change hint
   only to the element currently animating (cleared on transitionend). This
   avoids keeping dozens of GPU layers alive at once, which was causing jank. */
.reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* service card split-reveal (image and text animate from their own sides) */
.svc-reveal {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-reveal[data-reveal-dir="left"]  { transform: translateX(-50px) scale(0.98); }
.svc-reveal[data-reveal-dir="right"] { transform: translateX(50px) scale(0.98); }
.svc-reveal.is-visible { opacity: 1; transform: none; }
/* restore hover zoom on image after it's revealed */
.svc-card:hover .svc-card__bg.svc-reveal.is-visible { transform: scale(1.06); }

/* hero slide media (parallax removed — transforming a playing <video> every
   scroll frame caused jank; static object-fit cover is smooth) */
.hero-slide__img { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal  { opacity: 1; transform: none; transition: none; }
  .svc-reveal { opacity: 1; transform: none; transition: none; }
  .scroll-progress { display: none; }
}

/* ===== BSC promo video (replaces the old JS ring/option animation) ===== */
.bsc-video { max-width: 1100px; margin: 8px auto 40px; padding: 0 20px; }
.bsc-video__frame { position: relative; aspect-ratio: 16 / 9; background: #fff; }
.bsc-video__frame video {
  display: block; width: 100%; height: 100%;
  object-fit: cover; border: 0; outline: 0; background: #fff;
}
/* Paint a white ring right over the video's edge (inside + outside). The hairline
   that appears at the composited video-layer boundary during scroll gets covered;
   white-on-white is invisible against the page, so nothing else changes. */
.bsc-video__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #fff;
}

/* ===== Accordion test list (test-fumeh) — content-first, click to reveal image ===== */
.acc-list { display: flex; flex-direction: column; gap: 14px; margin: 8px auto 0; max-width: 960px; }
.acc {
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.acc[open] { box-shadow: var(--shadow); border-color: var(--green-100); }
.acc__head {
  display: flex; align-items: center; gap: 18px; cursor: pointer;
  padding: 20px 24px; list-style: none; user-select: none;
}
.acc__head::-webkit-details-marker { display: none; }
.acc__head:hover .acc__title { color: var(--green-700); }
.acc__no {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: var(--green-50); color: var(--green-700);
  transition: background .25s ease, color .25s ease;
}
.acc[open] .acc__no { background: var(--green-600); color: #fff; }
.acc__titles { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.acc__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--green-600); }
.acc__title { font-size: 17px; font-weight: 700; color: var(--gray-900); transition: color .2s ease; }
.acc__chev { flex: 0 0 auto; color: var(--gray-400); font-size: 15px; transition: transform .3s ease, color .25s ease; }
.acc[open] .acc__chev { transform: rotate(180deg); color: var(--green-600); }
.acc__panel {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center;
  padding: 2px 24px 26px 82px;
}
.acc__text p { color: var(--gray-700); font-size: 15px; line-height: 1.8; margin: 0; }
.acc__media { border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, var(--green-700), var(--green-500)); }
.acc__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acc[open] .acc__panel { animation: acc-in .38s ease both; }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .acc__head { padding: 16px 18px; gap: 14px; }
  .acc__title { font-size: 15.5px; }
  .acc__panel { grid-template-columns: 1fr; gap: 16px; padding: 2px 18px 22px; }
}

/* ===== Solar-style icon cards (test pages) ===== */
.solar-sec { margin-top: 8px; }
.solar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.solar-card {
  background: #fff; border-radius: 14px; box-shadow: 0 22px 44px rgba(13,38,26,.16);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.solar-card:hover { transform: translateY(-6px); box-shadow: 0 30px 56px rgba(13,38,26,.22); }
.solar-card__media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: #fff;
}
.solar-card__media img { width: 100%; height: 100%; object-fit: fill; display: block;
  transition: transform 1s cubic-bezier(0.16,1,0.3,1); }
.solar-card:hover .solar-card__media img { transform: scale(1.06); }
.solar-card__media img.is-missing { display: none; }
.solar-card__ph {
  position: absolute; inset: 0; display: none; place-content: center; text-align: center; padding: 14px;
  color: var(--green-700); font-weight: 600; font-size: 13px;
  background: repeating-linear-gradient(45deg, var(--green-50), var(--green-50) 12px, #fff 12px, #fff 24px);
  border: 2px dashed var(--green-500);
}
.solar-card__media img.is-missing + .solar-card__ph { display: grid; }
.solar-card__body { padding: 0 28px 32px; }
.solar-card__no {
  width: 54px; height: 54px; border-radius: 50%; background: var(--green-700); color: #fff;
  font-weight: 800; font-size: 18px; display: grid; place-items: center;
  margin: -27px 0 18px; position: relative; z-index: 2;
  border: 3px solid #fff; box-shadow: 0 8px 20px rgba(13,38,26,.25);
}
.solar-card h3 { font-size: 21px; color: var(--gray-900); font-weight: 700; line-height: 1.25; margin: 0 0 14px; }
.solar-card__divider { width: 46px; height: 3px; background: var(--green-500); border-radius: 2px; margin-bottom: 18px; }
.solar-card p { color: var(--muted); font-size: 15px; line-height: 1.72; margin: 0; }
/* การ์ดแบบข้อความล้วน (ไม่มีรูป) — ชดเชย margin ลบของเลขวงกลมที่เดิมไว้ทับรูป */
.solar-card--text .solar-card__body { padding-top: 30px; }
.solar-card--text .solar-card__no { margin-top: 0; }
@media (max-width: 900px) { .solar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .solar-grid { grid-template-columns: 1fr; }
}
/* 1 การ์ดต่อแถว (แนวนอน: รูปซ้าย / ข้อความขวา) — ไม่กระทบ solar-grid ปกติของหน้าอื่น */
.solar-grid--rows { grid-template-columns: 1fr; max-width: 940px; margin: 0 auto; }
.solar-grid--rows .solar-card { flex-direction: row; align-items: stretch; }
/* aspect-ratio คงที่ → การ์ดทุกใบสูงเท่ากัน (ไม่ว่ามีรูปจริงหรือ placeholder) */
.solar-grid--rows .solar-card__media { width: 42%; flex: 0 0 42%; aspect-ratio: 16 / 10; }
.solar-grid--rows .solar-card__media img { object-fit: cover; }
.solar-grid--rows .solar-card__body { flex: 1; padding-top: 30px; }
.solar-grid--rows .solar-card__no { margin-top: 0; }
/* การ์ดข้อความล้วนในเลย์เอาต์แถว (ไม่มีรูป) — กันเลขวงกลมทะลุขอบบนตอนจอมือถือ */
.solar-grid--rows .solar-card--text .solar-card__body { padding-top: 30px; }
.solar-grid--rows .solar-card--text .solar-card__no { margin-top: 0; }
@media (max-width: 620px) {
  .solar-grid--rows .solar-card { flex-direction: column; }
  .solar-grid--rows .solar-card__media { width: auto; flex: none; aspect-ratio: 16 / 10; }
  .solar-grid--rows .solar-card__body { padding-top: 0; }
  .solar-grid--rows .solar-card__no { margin-top: -27px; }
}

/* ===== 3D rotating gallery (repair.html — filter change / maintenance photos) ===== */
.g3d { max-width: 900px; margin: 8px auto 0; padding: 50px 20px 70px; perspective: 1400px; }
.g3d__stage {
  position: relative; width: 260px; height: 180px; margin: 0 auto;
  transform-style: preserve-3d;
  animation: g3d-spin 28s linear infinite;
}
.g3d:hover .g3d__stage { animation-play-state: paused; }
@keyframes g3d-spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
.g3d__item {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 34px rgba(9,30,20,.22); border: 4px solid #fff;
  backface-visibility: hidden; background: #fff;
}
.g3d__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* รูปแนวตั้ง 3:4 (assets/cleanroom/cr-*) ในกรอบแนวนอน 260x180 จะถูกครอปเหลือแถบกลาง ~52%
   ดันจุดครอปขึ้นเป็น 40% เพื่อให้แผ่นกรองบนเพดาน (อยู่ค่อนไปทางบนของรูป) อยู่ในกรอบเต็ม ๆ */
.g3d__item--tall img { object-position: center 40%; }
/* 7 รูป: มุมกระจาย 360°/7 ≈ 51.43° · translateZ = (กว้าง stage / 2) ÷ tan(180°/7) = 130 ÷ tan25.71° ≈ 270px
   (ระยะนี้ทำให้ขอบรูปชนกันพอดีเป็นวงปิด — เปลี่ยนจำนวนรูปต้องคำนวณใหม่ทั้งมุมและ translateZ)
   7 รูปคือจำนวนมากสุดที่วงยังไม่ล้นกรอบ .g3d (270+130 = 400 → กว้าง 800px < พื้นที่ใช้ได้ 860px) */
.g3d__item:nth-child(1) { transform: rotateY(0deg)      translateZ(270px); }
.g3d__item:nth-child(2) { transform: rotateY(51.43deg)  translateZ(270px); }
.g3d__item:nth-child(3) { transform: rotateY(102.86deg) translateZ(270px); }
.g3d__item:nth-child(4) { transform: rotateY(154.29deg) translateZ(270px); }
.g3d__item:nth-child(5) { transform: rotateY(205.71deg) translateZ(270px); }
.g3d__item:nth-child(6) { transform: rotateY(257.14deg) translateZ(270px); }
.g3d__item:nth-child(7) { transform: rotateY(308.57deg) translateZ(270px); }
@media (prefers-reduced-motion: reduce) {
  .g3d__stage { animation: none; }
}
@media (max-width: 760px) {
  .g3d { padding: 30px 10px 46px; perspective: 900px; }
  .g3d__stage { width: 180px; height: 128px; }
  /* มือถือ: stage กว้าง 180px → translateZ = 90 ÷ tan25.71° ≈ 187px */
  .g3d__item:nth-child(1) { transform: rotateY(0deg)      translateZ(187px); }
  .g3d__item:nth-child(2) { transform: rotateY(51.43deg)  translateZ(187px); }
  .g3d__item:nth-child(3) { transform: rotateY(102.86deg) translateZ(187px); }
  .g3d__item:nth-child(4) { transform: rotateY(154.29deg) translateZ(187px); }
  .g3d__item:nth-child(5) { transform: rotateY(205.71deg) translateZ(187px); }
  .g3d__item:nth-child(6) { transform: rotateY(257.14deg) translateZ(187px); }
  .g3d__item:nth-child(7) { transform: rotateY(308.57deg) translateZ(187px); }
}

/* ===== Product cards (gallery.html — filter & spare-parts products) ===== */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 8px; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-100); }
.product-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--green-50); overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card__media img.is-missing { display: none; }
.product-card__ph {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 14px;
  color: var(--green-700); font-weight: 600; font-size: 12.5px;
  background: repeating-linear-gradient(45deg, var(--green-50), var(--green-50) 12px, #fff 12px, #fff 24px);
  border: 2px dashed var(--green-500);
}
.product-card__media img:not(.is-missing) + .product-card__ph { display: none; }
.product-card__body { padding: 22px 22px 26px; }
.product-card h3 { font-size: 17px; margin-bottom: 8px; }
.product-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
@media (max-width: 960px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .product-grid { grid-template-columns: 1fr; } }

/* ===== Filter showcase (gallery — แผ่นกรองรวมเป็นรูปเดียว + ลิสต์) ===== */
.filter-showcase {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; margin-top: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; align-items: stretch;
}
.filter-showcase__media { background: var(--green-50); min-height: 300px; }
.filter-showcase__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.filter-showcase__body { padding: 32px 36px; align-self: center; }
.filter-showcase__body > h3 { font-size: 22px; color: var(--gray-900); margin-bottom: 10px; }
.filter-showcase__lead { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; }
.filter-showcase .checklist { margin: 20px 0 0; }
/* สลับด้าน: รูปอยู่ขวา (ใช้กับบล็อกที่ 2 เพื่อไม่ให้ซ้ำแนวกับบล็อกแรก) */
.filter-showcase--reverse .filter-showcase__media { order: 2; }
@media (max-width: 760px) {
  .filter-showcase { grid-template-columns: 1fr; }
  .filter-showcase__media { min-height: 0; aspect-ratio: 4 / 3; }
  .filter-showcase__body { padding: 26px 24px 30px; }
  .filter-showcase--reverse .filter-showcase__media { order: 0; }
}
