/* ==========================================================================
   Cubic Plus Commercial Co., Ltd. — Design System
   Palette derived from the corporate logo: navy cube + gold wordmark.
   ========================================================================== */

:root {
  /* Brand */
  --black-900: #0a0e18;
  --sky: linear-gradient(90deg, #fcfdfc 0, #f7fbfd 37%, #eff7fe 63%, #eaf5fe 100%); /* สีท้องฟ้าด้านบนของภาพเมืองใน Footer */
  --navy-900: #0b1730;
  --navy-800: #12244a;
  --navy-700: #1b3466;
  --navy-600: #274a8c;
  --gold-600: #a9862f;
  --gold-500: #c9a64b;
  --gold-400: #dcc078;

  /* Neutrals */
  --ink: #1a2233;
  --muted: #5a6478;
  --line: #e3e8f0;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;

  /* Feedback */
  --ok: #1c8a5b;

  /* Metrics */
  --wrap: 1160px;
  --gutter: 24px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 23, 48, .06), 0 4px 12px rgba(11, 23, 48, .05);
  --shadow-md: 0 8px 28px rgba(11, 23, 48, .10);
  --header-h: 104px;

}

/* --------------------------------------------------------------- Reset --- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--gold-600); }

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  line-height: 1.3;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -.01em;
}

h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

/* -------------------------------------------------------------- Layout --- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(56px, 6vw, 92px) 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy-900); color: #cfd8e8; }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { margin-bottom: 40px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .lead a { white-space: nowrap; }
@media (max-width: 480px) { .section-head .lead a { white-space: normal; } }

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.section--navy .eyebrow { color: var(--gold-400); }
.card .eyebrow { font-size: .8rem; letter-spacing: .14em; }

.lead { font-size: 1.06rem; color: var(--muted); }
.section--navy .lead { color: #aab6cd; }

.grid { display: grid; gap: 24px; }

/* Grid/flex children default to a min-content floor, which form controls and
   long unbroken strings push past. Reset it so tracks can actually shrink. */
.grid > *, .split > * { min-width: 0; }

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* การ์ดบริการหน้าแรก 5 ใบ แถวบน 3 ใบ แถวล่าง 2 ใบ */
.grid--services { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid--services > * { grid-column: span 2; }
.grid--services > :nth-child(n + 4) { grid-column: span 3; }
/* .card.card--accent : ต้องชนะ .card ที่ประกาศไว้ด้านล่าง ไม่งั้นพื้นหลังจะกลับเป็นสีขาว */
.card.card--accent {
  background:
    radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(150deg, var(--black-900), #182033);
  border-color: var(--black-900);
  border-top-color: var(--gold-500);
}
.card.card--accent:hover { border-color: var(--black-900); border-top-color: var(--gold-500); }
.card--accent h3 { color: #fff; }
.card--accent .card__title--gold { color: var(--gold-400); }
.card.card--premier, .card.card--premier:hover { border: 2px solid var(--gold-500); }
.card.card--accent p { color: #c6d2e6; }
.card--accent .card__link { color: var(--gold-400); }
.card--accent .check li { color: #d6deeb; }
.card--accent .check li::before { background: rgba(220, 192, 120, .16); color: var(--gold-400); }
.card--accent .eyebrow { color: var(--gold-400); }

/* ------------------------------------------------------------- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary { background: var(--gold-500); color: var(--navy-900); }
.btn--primary:hover { background: var(--gold-400); color: var(--navy-900); }

.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-700); color: #fff; }

.btn--danger { background: #b03030; color: #fff; }
.btn--danger:hover { background: #952626; color: #fff; }

.btn--ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost:hover { border-color: var(--gold-400); color: var(--gold-400); }

.btn--outline { border-color: var(--line); color: var(--navy-800); background: #fff; }
.btn--outline:hover { border-color: var(--gold-500); color: var(--gold-600); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row--spaced { margin-top: 22px; }
.btn-row--center { justify-content: center; }

/* -------------------------------------------------------------- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; flex-shrink: 0; color: var(--navy-900); }
.brand:hover { color: var(--navy-900); }
.brand img { width: 84px; height: 84px; }

/* เมนูชิดขวาเสมอ แม้ไม่มีปุ่ม CTA ท้ายแถว */
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav__item { position: relative; }

.nav__link {
  display: block;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--navy-800);
  white-space: nowrap;
}
.nav__link:hover { background: var(--bg-soft); color: var(--navy-900); }
.nav__link[aria-current="page"] { color: var(--gold-600); }

.nav__toggle {
  display: flex;
  align-items: center;
  gap: .35em;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--navy-800);
  white-space: nowrap;
  cursor: pointer;
}
.nav__toggle:hover { background: var(--bg-soft); }
.nav__toggle::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.nav__item.is-open .nav__toggle::after { transform: translateY(1px) rotate(-135deg); }

.nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 290px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav__item.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; }

.nav__menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink);
}
.nav__menu a:hover { background: var(--bg-soft); color: var(--navy-800); }
.nav__menu a[aria-current="page"] { color: var(--gold-600); }
.nav__item.is-current > .nav__toggle { color: var(--gold-600); }

/* เมนูที่มีหลายรายการเรียง 2 คอลัมน์ ไม่ให้ยาวล้นจอ */
@media (min-width: 1101px) {
  .nav__menu { max-height: calc(100dvh - 130px); overflow-y: auto; }
  .nav__menu--wide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 6px;
    left: 50%;
    width: 660px;
    margin-left: -330px;
  }
}

/* คำอธิบายบรรทัดเล็กใต้ชื่อเมนูย่อย ช่วยให้ลูกค้ารู้ว่าคลิกแล้วจะเจออะไร */
.nav__desc {
  display: block;
  margin-top: 1px;
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

.header__cta { flex-shrink: 0; }

/* แถบบางด้านบนสุด : ช่องทางติดต่อซัพพอร์ตเห็นได้จากทุกหน้า */
.topbar {
  background: var(--navy-900);
  color: #9fb0cb;
  font-size: .84rem;
  line-height: 1.4;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 38px;
}
.topbar ul { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.topbar li { margin: 0; }
.topbar a { color: #fff; white-space: nowrap; }
.topbar a:hover { color: var(--gold-400); }
.topbar__label { color: #8b9bb8; }
.topbar__links a { font-weight: 600; color: var(--gold-400); }
.topbar__links a:hover { color: #fff; }

/* ปุ่มสลับภาษา */
.lang-switch { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 22px; }
.lang-switch span { color: #4d5f7d; }
.lang-switch a { color: #9fb0cb; font-weight: 600; }
.lang-switch a:hover { color: var(--gold-400); }
.lang-switch a[aria-current] { color: #fff; }
.topbar .topbar__contact { margin-right: auto; }

/* ขยายพื้นที่กดของปุ่มภาษาและเบอร์ Call Center ให้กดด้วยนิ้วได้ง่าย โดยหน้าตาและขนาดแถบเท่าเดิม */
.lang-switch a, .topbar__contact a {
  display: inline-block;
  padding: 12px 8px;
  margin: -12px -8px;
}

.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px; height: 2px;
  margin: 4px auto;
  background: var(--navy-800);
  transition: transform .2s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------------------------------------- Hero --- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 8vw, 110px) 0 84px;
  background:
    linear-gradient(90deg, rgba(5, 13, 29, .98) 0%, rgba(5, 13, 29, .92) 35%, rgba(5, 13, 29, .38) 62%, rgba(5, 13, 29, .08) 100%),
    url("../img/company/hero-cubic-infrastructure-v2.png") center / cover no-repeat;
  color: #d6dfef;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 13, 29, .82) 100%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 900px; color: #fff; font-size: clamp(1.9rem, 1.4rem + 1.9vw, 3.05rem); line-height: 1.2; }
.hero__lead { max-width: 650px; font-size: clamp(1.05rem, .98rem + .3vw, 1.22rem); color: #c2ccdc; }
.hero .btn-row { margin-top: 28px; }

.hero__lights { position: absolute; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.hero__lights i {
  position: absolute;
  width: var(--cable-w, 240px);
  height: 1px;
  overflow: hidden;
  transform: rotate(var(--cable-r, 0deg));
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(229,191,98,.13) 12%, rgba(229,191,98,.5) 55%, transparent);
  opacity: .68;
}
.hero__lights i::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -42px;
  width: 42px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #ffe6a3 72%, #fff7d7);
  filter: blur(.25px);
  box-shadow: 0 0 9px rgba(255,211,109,.9);
  animation: cable-pulse var(--pulse-speed, 4.8s) linear infinite;
  animation-delay: var(--pulse-delay, 0s);
}
.hero__lights i:nth-child(1) { top: 32%; left: 47%; --cable-w: 330px; --cable-r: 17deg; --pulse-delay: -.8s; }
.hero__lights i:nth-child(2) { top: 49%; left: 52%; --cable-w: 290px; --cable-r: -11deg; --pulse-delay: -2.1s; --pulse-speed: 5.4s; }
.hero__lights i:nth-child(3) { top: 61%; left: 55%; --cable-w: 390px; --cable-r: -4deg; --pulse-delay: -3.4s; }
.hero__lights i:nth-child(4) { top: 24%; left: 65%; --cable-w: 250px; --cable-r: 38deg; --pulse-delay: -1.6s; --pulse-speed: 5.8s; }
.hero__lights i:nth-child(5) { top: 70%; left: 67%; --cable-w: 310px; --cable-r: -19deg; --pulse-delay: -4.2s; }
.hero__lights i:nth-child(6) { top: 43%; left: 78%; --cable-w: 230px; --cable-r: 7deg; --pulse-delay: -2.9s; --pulse-speed: 4.2s; }
@keyframes cable-pulse {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  82% { opacity: .9; }
  100% { transform: translateX(calc(var(--cable-w, 240px) + 54px)); opacity: 0; }
}

/* สองคอลัมน์ : ข้อความซ้าย ภาพประกอบขวา */
.hero__inner {
  display: block;
}
.hero__copy { min-width: 0; max-width: 760px; }

.hero__visual { position: relative; min-width: 0; }
.hero__visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-inline: auto;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .38);
}

/* การ์ดลอยบนภาพ ช่วยให้ภาพสื่อถึงบริการจริงมากขึ้น */
.hero__chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid rgba(220, 192, 120, .28);
  border-radius: 14px;
  background: rgba(9, 19, 40, .82);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .32);
  white-space: nowrap;
}
.hero__chip strong { display: block; font-size: .92rem; color: #fff; }
.hero__chip span { font-size: .78rem; color: #9fb0cb; }
.hero__chip i {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--gold-500), var(--gold-600));
  color: var(--navy-900);
  font-style: normal;
  font-size: .95rem;
}
.hero__chip--a { top: 14%; left: -6%; }
.hero__chip--b { bottom: 12%; right: -4%; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid rgba(220, 192, 120, .4);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold-400);
}
.hero__badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-400);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 20px;
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero__stat strong {
  display: block;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1.2;
}
.hero__stat span { font-size: .88rem; color: #9fb0cb; }
a.hero__stat { display: block; }
.hero__stat--wide strong { white-space: nowrap; }
a.hero__stat:hover strong { color: #fff; }
a.hero__stat span { text-decoration: underline; text-underline-offset: 3px; }

/* Compact hero for interior pages */
.page-hero {
  padding: clamp(48px, 5vw, 76px) 0;
  background:
    radial-gradient(760px 380px at 85% 0%, rgba(201, 166, 75, .18), transparent 60%),
    linear-gradient(90deg, var(--navy-900) 8%, transparent 72%), /* ลายจางลงทางซ้ายเพื่อให้อ่านข้อความง่าย */
    url("../img/pattern-cubes.svg") right top,
    linear-gradient(150deg, var(--navy-900), var(--navy-700));
  color: #c6d2e6;
}
.page-hero h1 { color: #fff; margin-bottom: .35em; }
.page-hero p { color: #aebbd3; }
.page-hero p a { color: var(--gold-400); font-weight: 600; }
.page-hero p a:hover { color: #fff; }
.page-hero .btn-row { margin-top: 26px; }

.crumbs {
  margin-bottom: 16px;
  font-size: .84rem;
  color: #8b9bb8;
}
.crumbs a { color: #b7c5dd; }
.crumbs a:hover { color: var(--gold-400); }
.crumbs span { margin: 0 .5em; opacity: .6; }

/* --------------------------------------------------------------- Cards --- */

.card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-500);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(11, 23, 48, .16); border-color: #d3dceb; border-top-color: var(--gold-500); }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); font-size: .95rem; }
.card__link { margin-top: auto; padding-top: 16px; font-weight: 600; font-size: .92rem; }
.card__link::after { content: " →"; }

/* ขยายพื้นที่คลิกของลิงก์ให้เต็มการ์ด การ์ดจึงคลิกได้ทั้งใบโดยไม่ต้องแก้ HTML */
.card, .post-card { position: relative; }
.card__link::before, .post-card h3 a::before { content: ""; position: absolute; inset: 0; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--gold-500); outline-offset: 2px; }

/* Numbered process steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li {
  position: relative;
  margin: 0;
  padding: 22px 24px 22px 74px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 24px; top: 22px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-400);
  font-weight: 700;
  font-size: .95rem;
}
.steps strong { display: block; color: var(--navy-900); }
.steps p { margin: .2em 0 0; color: var(--muted); font-size: .94rem; }

/* Checklist */
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check li { position: relative; padding-left: 30px; margin: 0; }
.check li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  margin-top: .3em;
  border-radius: 50%;
  background: rgba(28, 138, 91, .12);
  color: var(--ok);
  font-size: .72rem;
  font-weight: 700;
}
.check--cross li::before, .check li.is-no::before { content: "✕"; background: rgba(190, 60, 60, .1); color: #b93b3b; }

/* --------------------------------------------------------------- Table --- */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy-900); color: #fff; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fafbfe; }
td .yes { color: var(--ok); font-weight: 700; }
td .no { color: #b93b3b; font-weight: 700; }

/* หัวแถวและแถบคั่นกลุ่มในตารางเปรียบเทียบ */
.compare tbody th, .matrix tbody th { font-weight: 600; color: var(--navy-900); }
.compare thead th:not(:first-child) { min-width: 240px; }
.table-group td { background: var(--bg-soft); font-weight: 600; color: var(--navy-800); }
.matrix th:not(:first-child), .matrix td { text-align: center; }
.matrix .table-group td { text-align: left; }
.matrix__none { color: #b4bdcc; }

/* ตารางรุ่นที่ให้บริการ: หัวตารางแยก Standard กับ Premier และมีปุ่มกรอง Series */
.model-filter { margin-bottom: 18px; }
.model-filter[hidden] { display: none; }
.model-filter .chip { min-height: 40px; cursor: pointer; font-family: inherit; }
.matrix--plans th, .matrix--plans td { padding: 10px 18px; vertical-align: middle; }
.matrix--plans thead th { text-align: center; }
.matrix--plans thead th[rowspan] { text-align: left; }
.matrix--plans thead .plan-term { background: var(--navy-700); font-weight: 500; }
.matrix--plans thead .plan--premier { background: var(--gold-500); color: var(--navy-900); }
.matrix--plans thead .plan-term.plan--premier { background: var(--gold-400); }
.matrix--plans tbody td.plan--premier { background: rgba(201, 166, 75, .07); }
.matrix--plans .table-group td {
  border-left: 4px solid var(--gold-500);
  background: var(--bg-soft);
  color: var(--navy-900);
}
.matrix--plans .yes {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(28, 138, 91, .12);
  font-size: .8rem;
}

/* --------------------------------------------------------------- Forms --- */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .9rem; font-weight: 600; color: var(--navy-900); }
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(201, 166, 75, .45);
  outline-offset: 1px;
  border-color: var(--gold-500);
}
.field textarea { min-height: 130px; resize: vertical; }
.field__hint { font-size: .82rem; color: var(--muted); }
.form__note { font-size: .85rem; color: var(--muted); }
.form__error { padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(190, 60, 60, .08); font-size: .92rem; font-weight: 600; color: #a12d2d; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------- Contact --- */

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { margin: 0; }
.contact-list dt, .contact-list h3 {
  margin: 0 0 4px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--gold-600);
}
.contact-list p { margin: 0; }

.map-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ------------------------------------------------------------- Clients --- */

/* แถบลูกค้าเลื่อนอัตโนมัติ : ใช้รายการซ้ำสองชุด เลื่อนครึ่งทางแล้ววนต่อได้แบบไม่สะดุด */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee .clients { flex-wrap: nowrap; padding-right: 12px; }
.marquee .clients li { white-space: nowrap; }
.clients li.clients__logo { display: flex; align-items: center; justify-content: center; width: 200px; height: 120px; padding: 6px 12px; border-radius: var(--radius); }
.clients__logo img { width: 100%; height: 100%; object-fit: contain; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; width: auto; }
  .marquee .clients { flex-wrap: wrap; justify-content: center; padding-right: 0; }
  .marquee .clients[aria-hidden] { display: none; }
}


.clients {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.panel .clients { margin-top: 8px; }
.clients li {
  margin: 0;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy-800);
}

.fieldwork__grid { display: grid; grid-template-columns: 1.35fr .65fr; grid-template-rows: repeat(2, 260px); gap: 18px; }
.fieldwork__item {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy-900);
}
.fieldwork__item--wide { grid-row: 1 / 3; }
.fieldwork__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.fieldwork__item:hover img { transform: scale(1.025); }
.fieldwork__item::after {
  content: "";
  position: absolute;
  inset: 38% 0 0;
  background: linear-gradient(transparent, rgba(5,13,28,.92));
}
.fieldwork__item figcaption { position: absolute; z-index: 1; right: 22px; bottom: 20px; left: 22px; color: #fff; }
.fieldwork__item figcaption strong { display: block; font-size: 1.08rem; }
.fieldwork__item figcaption span { display: block; margin-top: 2px; font-size: .86rem; color: #c5cede; }

/* ------------------------------------------------------------------ CTA --- */

.cta { padding: clamp(8px, 2vw, 24px) 0 0; text-align: center; }
.cta h2 { color: var(--navy-900); }
.cta p { color: var(--navy-800); }
.cta .btn-row { justify-content: center; margin-top: 26px; }
.cta .btn--ghost { border-color: var(--navy-800); color: var(--navy-800); }
.cta .btn--ghost:hover { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* หน้ากรณีที่ไม่อยู่ในการรับประกัน */
.exclusions .check { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 48px; }
.exclusions__head { margin-bottom: 22px; font-size: clamp(1.25rem, 1.1rem + .5vw, 1.55rem); }
.exclusions .check + .exclusions__head { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }

/* หนังสือรับรอง */
.authorized { align-items: center; }
.authorized__doc {
  display: block;
  justify-self: end;
  width: min(100%, 340px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.authorized__doc:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(11, 23, 48, .16); }
.authorized__doc img { display: block; width: 100%; height: auto; }

/* แถบหนังสือรับรองในหน้าแรก */
.authorized-band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(201, 166, 75, .35);
  border-bottom: 1px solid rgba(201, 166, 75, .35);
  background:
    radial-gradient(circle at 82% 50%, rgba(201, 166, 75, .16), transparent 42%),
    linear-gradient(150deg, var(--navy-900), #0f1f40);
}
/* ลายเส้นทองบางๆ แบบเอกสารรับรอง จางลงทางซ้ายให้อ่านข้อความง่าย */
.authorized-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(45deg, rgba(220, 192, 120, .07) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(-45deg, rgba(220, 192, 120, .07) 0 1px, transparent 1px 16px);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 85%);
  mask-image: linear-gradient(90deg, transparent 30%, #000 85%);
}
.authorized-band .wrap { position: relative; z-index: 1; }
.authorized-band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.authorized-band__title {
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 1rem + 2.2vw, 3rem);
  line-height: 1.15;
}
.authorized-band__by { margin-bottom: 18px; font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); font-weight: 600; color: var(--gold-400); }
.authorized-band .lead { max-width: 760px; margin-bottom: 28px; }
.authorized-band__doc {
  display: block;
  width: clamp(200px, 20vw, 280px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 4px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
  overflow: hidden;
  transition: transform .2s ease;
}
.authorized-band__doc:hover { transform: translateY(-4px); }
.authorized-band__doc img { display: block; width: 100%; height: auto; }

@media (max-width: 760px) {
  .authorized-band__inner { grid-template-columns: 1fr; }
  .authorized-band__doc { width: min(240px, 70%); margin: 8px auto 0; }
}

/* -------------------------------------------------------------- Footer --- */

.site-footer {
  padding: 0;
  background: var(--sky);
  color: #9fb0cb;
  font-size: .93rem;
}
/* ไล่สีท้องฟ้าขึ้นไปใน section สุดท้าย ให้ส่วนนั้นกับภาพเมืองเป็นท้องฟ้าผืนเดียวกัน */
main > .section:last-child { position: relative; isolation: isolate; }
main > .section:last-child::after {
  --sky-rise: linear-gradient(to bottom, transparent, #000 calc(100% - clamp(28px, 3vw, 46px)));
  content: "";
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: min(100%, 560px);
  background: var(--sky);
  pointer-events: none;
  -webkit-mask-image: var(--sky-rise);
  mask-image: var(--sky-rise);
}
.footer__body {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: 64px 0 28px;
  background: var(--navy-900);
  overflow: hidden;
}
.site-footer h4 {
  margin-bottom: 14px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--gold-400);
}
.site-footer a { color: #c3cfe3; }
.site-footer a:hover { color: var(--gold-400); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }

.footer__legal { display: flex; flex-wrap: wrap; gap: 4px 0; }
.site-footer .footer__legal li { margin: 0; }
.footer__legal li + li::before { content: "|"; margin: 0 10px; color: #4d5f7d; }
.site-footer .footer__legal a { color: #9fb0cb; }
.site-footer .footer__legal a:hover { color: var(--gold-400); }

.footer__label { display: block; margin-top: 10px; color: #fff; font-weight: 600; }
.footer__grid p strong { color: #fff; font-weight: 600; }

.footer__grid {
  display: grid;
  /* คอลัมน์กว้างเท่าเนื้อหา แล้วเฉลี่ยระยะห่าง ให้คอลัมน์สุดท้ายชนขอบขวาพอดี */
  grid-template-columns: minmax(0, 340px) auto auto auto;
  justify-content: space-between;
  gap: 32px;
}
.footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer__brand img { width: 52px; height: 52px; }
.footer__brand strong { color: #fff; font-size: 1rem; }
.footer__brand span { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-400); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .85rem;
  color: #7f90ac;
}

/* เส้นขอบฟ้าเมืองสมัยใหม่ ช่วยปิดหน้าโดยไม่ต้องใช้ภาพพื้นหลังหนัก ๆ */
/* ดึงขึ้นครึ่งหนึ่งของระยะล่างใน .section และตัดท้องฟ้าด้านบนออก ภาพเมืองจึงอยู่ใกล้เนื้อหาสุดท้าย */
.footer-city { margin-top: calc(clamp(56px, 6vw, 92px) / -2); overflow: hidden; }
.footer-city img {
  --sky-fade: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .12) 5%, rgba(0, 0, 0, .55) 12%, #000 19%);
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2079 / 490;
  object-fit: cover;
  object-position: bottom;
  -webkit-mask-image: var(--sky-fade);
  mask-image: var(--sky-fade);
}

/* ------------------------------------------------------------ Utilities --- */

.prose > * + h2 { margin-top: 1.6em; }
.prose > * + h3 { margin-top: 1.4em; }
.prose > .eyebrow + h2 { margin-top: 0; }

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 56px;
  align-items: start;
}
.legal { overflow-wrap: anywhere; }
.legal h2 { font-size: 1.25rem; }
.legal li { margin-bottom: .6em; }

/* สารบัญด้านข้าง ติดตามตอนเลื่อนหน้า */
.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  font-size: .9rem;
}
.legal-toc h2 { margin-bottom: 12px; font-size: .95rem; }
.legal-toc ul { margin: 0; padding: 0; list-style: none; }
.legal-toc li { margin: 0; }
.legal-toc a {
  display: block;
  padding: 7px 0;
  line-height: 1.45;
  color: var(--muted);
}
.legal-toc a:hover { color: var(--navy-800); }
.legal-toc a[aria-current="location"] { font-weight: 600; color: var(--gold-600); }

.panel {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel--soft { background: var(--bg-soft); border-color: #dde4ef; }

.note {
  padding: 18px 22px;
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-sm);
  background: rgba(201, 166, 75, .08);
  font-size: .94rem;
}

.note--spaced { margin-top: 22px; }
.fine-print { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.fine-print p { margin-bottom: .5em; }
.fine-print p:last-child { margin-bottom: 0; }
.note p { margin-bottom: .6em; }
.sub-head { margin-top: 40px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.split--wide-left { grid-template-columns: 1.25fr 1fr; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

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

.skip-link {
  position: absolute;
  top: -60px; left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--navy-900);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* -------------------------------------------------------- Quick access --- */

/* ไทล์ลิงก์ด่วน : ทั้งก้อนกดได้ ใช้บนหน้าแรกและศูนย์ช่วยเหลือ */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 22px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-500);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink); }
.tile strong { font-size: 1.05rem; color: var(--navy-900); }
.tile span { font-size: .9rem; line-height: 1.55; color: var(--muted); }
.tile em { margin-top: auto; padding-top: 10px; font-style: normal; font-size: .88rem; font-weight: 600; color: var(--navy-600); }
.tile em::after { content: " →"; }
.tile--navy { background: var(--navy-900); border-color: var(--navy-900); border-top-color: var(--gold-500); }
.tile--navy strong { color: #fff; }
.tile--navy span { color: #b9c5d9; }
.tile--navy em { color: var(--gold-400); }

/* แถบไทล์ที่วางทับขอบล่างของ hero หน้าแรก */
/* พื้นสีเทาเริ่มหลังส่วนที่ซ้อนทับ hero 44px เพื่อให้ต่อกับ section ถัดไปเป็นผืนเดียว */
.quick-access {
  position: relative;
  z-index: 2;
  margin-top: -44px;
  padding-bottom: 8px;
  background: linear-gradient(transparent 44px, var(--bg-soft) 44px);
}

/* ช่องทางติดต่อซัพพอร์ต */
.channel { display: flex; flex-direction: column; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.channel h3 { margin-bottom: .2em; font-size: 1.02rem; }
.channel__value { display: block; margin: 6px 0 8px; font-size: 1.3rem; font-weight: 700; color: var(--navy-800); overflow-wrap: anywhere; }
.channel p { color: var(--muted); font-size: .92rem; }
.channel .btn { margin-top: auto; align-self: flex-start; }
.grid--4 .channel__value { font-size: 1.02rem; }
.support-office { margin-top: 28px; align-items: center; }
.support-office h3 { margin-bottom: .2em; font-size: 1.02rem; }
.support-office p { margin: 0; text-wrap: balance; }

/* หัวข้อกลุ่มบริการบนหน้าภาพรวม */
.group-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; }
.group-head h3 { margin: 0; }
.group-head span { font-size: .9rem; color: var(--muted); }
.group + .group { margin-top: 48px; }

/* การ์ดศูนย์บริการ */
.center-card {
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.center-card h3 { margin-bottom: .35em; font-size: 1.04rem; }
.center-card p { margin: 0; font-size: .92rem; color: var(--muted); }
.center-card__tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(201, 166, 75, .14);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold-600);
}

/* ศูนย์หลักของแต่ละภาค ใช้กรอบทอง */
.center-card--main { border: 2px solid var(--gold-500); background: rgba(201, 166, 75, .05); }
.center-card--main .center-card__tag, .center-card--head .center-card__tag { background: var(--gold-500); color: var(--navy-900); }

/* ศูนย์บริการของบริษัท: เต็มแถว พื้นเข้ม กรอบทอง แบบเดียวกับการ์ด Premier */
.center-card--head {
  grid-column: 1 / -1;
  padding: 28px 32px;
  background:
    radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(150deg, var(--black-900), #182033);
  border: 2px solid var(--gold-500);
  box-shadow: var(--shadow-md);
}
.center-card--head h3 { color: #fff; font-size: 1.3rem; }
.center-card--head p { color: #d6deeb; font-size: 1rem; }

/* สารบัญในหน้า (ลิงก์ anchor) */
.toc { margin-top: 28px; }
.toc .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.toc .chip:hover { border-color: var(--gold-400); color: var(--gold-400); }

/* --------------------------------------------------------- Responsive --- */

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--services > *, .grid--services > :nth-child(n + 4) { grid-column: auto; }
  .grid--services > :last-child { grid-column: 1 / -1; }
  /* จอแคบ : ให้ข้อความมาก่อนภาพ คนอ่านจะรู้ทันทีว่าเราทำอะไร */
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual img { max-width: 380px; }
  .hero__chip--a { left: 0; }
  .hero__chip--b { right: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .split, .split--wide-left { grid-template-columns: 1fr; gap: 32px; }

  /* จอแคบ : สารบัญขึ้นก่อนเนื้อหา ไม่ติดตามการเลื่อน */
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .legal-toc {
    position: static;
    order: -1;
    max-height: none;
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
  }
}

/* เมนูมี 6 หัวข้อ + ปุ่ม จึงพับเป็น burger ตั้งแต่จอ 1100px ลงไป
   (ต้องตรงกับ mqDesktop ใน js/main.js) */
@media (max-width: 1100px) {
  /* ปุ่ม CTA ยังอยู่บนแท็บเล็ต วางไว้ก่อนปุ่ม burger */
  .burger { display: block; order: 3; }
  .header__cta { margin-left: auto; }

  /* อิงกับ header (sticky) ไม่ใช่ viewport — แถบ topbar ด้านบนจะได้ไม่ทำให้เมนูทับ header */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px var(--gutter) 32px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav__link, .nav__toggle { width: 100%; padding: 12px 8px; font-size: 1.06rem; }
  .nav__toggle { justify-content: space-between; }

  .nav__menu {
    position: static;
    min-width: 0;
    margin: 0 0 8px;
    padding: 4px 0 4px 12px;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav__item.is-open .nav__menu { display: block; }
}

@media (max-width: 1200px) {
  .hero {
    background:
      linear-gradient(90deg, rgba(5, 13, 29, .96) 0%, rgba(5, 13, 29, .88) 45%, rgba(5, 13, 29, .6) 75%, rgba(5, 13, 29, .5) 100%),
      url("../img/company/hero-cubic-infrastructure-v2.png") center / cover no-repeat;
  }
}

@media (max-width: 900px) {
  .hero {
    background:
      linear-gradient(90deg, rgba(5, 13, 29, .94) 0%, rgba(5, 13, 29, .86) 55%, rgba(5, 13, 29, .64) 100%),
      url("../img/company/hero-cubic-infrastructure-v2.png") center / cover no-repeat;
  }
  .hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__stat--wide { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar__email { display: none; }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4, .grid--services { grid-template-columns: 1fr; }
  .exclusions .check { grid-template-columns: 1fr; }
  .hero__stat--wide strong { font-size: clamp(1.35rem, 7vw, 1.85rem); }
  .matrix--plans { font-size: .84rem; }
  .matrix--plans th, .matrix--plans td { padding: 9px 4px; }
  .matrix--plans thead th { white-space: normal; }
  .matrix--plans tbody th, .matrix--plans thead th[rowspan], .matrix--plans .table-group td { padding-left: 12px; }
  .matrix--plans .yes { width: 20px; height: 20px; font-size: .7rem; }
  .hero__chip { display: none; }
  .hero__visual img { max-width: 300px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; gap: 8px; }
  .footer__legal li + li::before { display: none; }
  .card { padding: 24px; }
  .steps li { padding: 20px 20px 20px 66px; }
  .steps li::before { left: 18px; top: 20px; }
  .brand img { width: 66px; height: 66px; }
  .header__cta { display: none; }
  /* จอมือถือเหลือ Call Center กับปุ่มสลับภาษา ลิงก์ซัพพอร์ตอยู่ในเมนู */
  .topbar__email, .topbar .topbar__links { display: none; }
  .hero h1 br { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .fieldwork__grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .fieldwork__item--wide { grid-row: auto; }
  .fieldwork__item { min-height: 360px; }
  .footer-city img { width: 165%; max-width: none; transform: translateX(-20%); }
}

/* ตารางเปรียบเทียบ Standard / Premier บนมือถือ: แต่ละแถวเป็นการ์ด ป้าย Standard / Premier มาจาก
   data-label ที่ js/main.js ใส่ให้ (class compare--stack) ถ้าปิด JS จะเป็นตารางเลื่อนด้านข้างแบบเดิม */
@media (max-width: 640px) {
  /* หัวตารางยาว ๆ (เช่นฉบับอังกฤษ) ให้ขึ้นบรรทัดใหม่ได้ ตารางจะได้ไม่ล้นจอ */
  thead th { white-space: normal; }
  .table-scroll--stack { overflow: visible; border: 0; border-radius: 0; background: none; }
  .compare--stack,
  .compare--stack tbody,
  .compare--stack tr,
  .compare--stack th,
  .compare--stack td { display: block; width: auto; }
  .compare--stack thead { display: none; }
  .compare--stack tbody tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
  }
  .compare--stack tbody tr:nth-child(even) { background: #fff; }
  .compare--stack tbody th { padding: 12px 16px; background: var(--bg-soft); }
  .compare--stack td { padding: 10px 16px; }
  .compare--stack tr > :last-child { border-bottom: 0; }
  .compare--stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--navy-700);
  }
  .compare--stack td:nth-child(3)[data-label]::before { color: var(--gold-600); }
  .compare--stack tbody tr.table-group { margin: 22px 0 10px; border: 0; border-radius: 0; background: none; }
  .compare--stack .table-group td { padding: 0; background: none; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .cta, .btn-row { display: none; }
  body { color: #000; }
}

/* ==========================================================================
   ส่วนเนื้อหาจากระบบหลังบ้าน — หน้ารายการข่าว/บทความ และหน้าอ่าน
   ========================================================================== */

/* --------------------------------------------------- แถบกรอง + ค้นหา --- */

.listing-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: .89rem;
  font-weight: 600;
  color: var(--navy-800);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--gold-500); color: var(--gold-600); }
.chip.is-on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip.is-on:hover { color: #fff; }
.chip__n { font-size: .78rem; opacity: .65; font-weight: 500; }

.searchbox { display: flex; gap: 8px; }
.searchbox input {
  width: 240px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
}
.searchbox input:focus {
  outline: 2px solid rgba(201, 166, 75, .4);
  outline-offset: 1px;
  border-color: var(--gold-500);
}

.listing-count { margin-bottom: 20px; font-size: .9rem; color: var(--muted); }

/* ------------------------------------------------------ การ์ดบทความ --- */

.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d3dceb; }

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  overflow: hidden;
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__media img.is-document { object-position: top; }

.post-card__ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(140deg, var(--navy-800), var(--navy-600));
  color: var(--gold-400);
  font-size: 2.4rem;
  font-weight: 700;
}

.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.post-card__body h3 { font-size: 1.08rem; margin-bottom: .4em; }
.post-card__body h3 a { color: var(--navy-900); }
.post-card__body h3 a:hover { color: var(--gold-600); }
.post-card__body p { font-size: .93rem; color: var(--muted); }
.post-card__body .card__link { margin-top: auto; padding-top: 14px; }

/* การ์ดสูงเท่ากันเสมอ : หัวเรื่องและคำโปรยแสดงไม่เกิน 3 บรรทัด ส่วนที่เกินเป็น … (หน้าอ่านข่าวยังแสดงเต็ม) */
.post-card__body h3,
.post-card__body > p:not(.post-card__meta) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: .82rem;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(201, 166, 75, .15);
  font-size: .76rem;
  font-weight: 600;
  color: var(--gold-600);
}

/* ------------------------------------------------------------ ว่างเปล่า --- */

.empty {
  max-width: 480px;
  margin: 40px auto;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty h1, .empty h3 { color: var(--navy-900); }
.empty p { margin-bottom: 22px; }

/* --------------------------------------------------------- แบ่งหน้า --- */

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 44px;
}
.pager__btn {
  min-width: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: center;
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy-800);
}
.pager__btn:hover { border-color: var(--gold-500); color: var(--gold-600); }
.pager__btn.is-on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ------------------------------------------------------- หน้าอ่านบทความ --- */

.job-meta { margin-bottom: 8px; font-size: .86rem; font-weight: 600; color: var(--gold-600); }
.job-salary { margin-bottom: 8px; font-size: .9rem; font-weight: 600; color: var(--navy-800); }
.job-detail h2 { margin-top: 1.6em; }
.job-detail h2:first-child { margin-top: 0; }
.job-detail > div > .btn { margin-top: 28px; }
.job-apply { position: sticky; top: 110px; }
@media (max-width: 900px) { .job-apply { position: static; } }
.job-apply .btn--block { width: 100%; margin-bottom: 16px; justify-content: center; text-align: center; }
.job-facts { display: grid; gap: 12px; margin: 0 0 20px; }
.job-facts dt { font-size: .82rem; color: var(--muted); }
.job-facts dd { margin: 0; font-weight: 600; color: var(--navy-900); }
.site-popup { position: fixed; inset: 0; margin: auto; max-width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: visible; border: 0; background: transparent; }
.site-popup::backdrop { background: rgba(8, 17, 34, .72); }
.site-popup[open] { animation: popup-in .2s ease; }
.site-popup__media { display: block; overflow: hidden; border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.site-popup__media img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 32px); margin: 0 auto; }
.site-popup__close { position: absolute; top: -12px; right: -12px; z-index: 1; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); font-size: 1.5rem; line-height: 1; color: var(--navy-900); cursor: pointer; }
.site-popup__close:hover { background: var(--gold-500); }
@keyframes popup-in { from { opacity: 0; transform: scale(.97); } }
@media (prefers-reduced-motion: reduce) { .site-popup[open] { animation: none; } }
@media (max-width: 760px) { .site-popup__close { top: 6px; right: 6px; } }
.site-popup:not([open]) { display: none; }

.empty__code { display: block; margin-bottom: 8px; font-size: clamp(3rem, 2rem + 4vw, 5rem); font-weight: 700; line-height: 1; color: var(--gold-500); }

.preview-bar { margin: 0; padding: 10px 16px; background: var(--gold-500); font-size: .9rem; font-weight: 600; color: var(--navy-900); text-align: center; }
.page-hero--article h1 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: .9rem;
  color: #9fb0cb;
}
.article-meta .tag { background: rgba(220, 192, 120, .2); color: var(--gold-400); }

.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.article-paper { padding: clamp(22px, 5.5vw, 72px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 12px 34px rgba(11, 23, 48, .08); }
.article-sheet { margin-bottom: 32px; }
.article-sheet img { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(11, 23, 48, .1); }

.article-standfirst {
  margin-bottom: 28px;
  padding-left: 20px;
  border-left: 4px solid var(--gold-500);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--muted);
}

/* เนื้อหาที่มาจาก editor — คุมรูปแบบให้เข้ากับส่วนอื่นของเว็บ */
.article-body { font-size: 1.05rem; line-height: 1.85; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 { margin: 1.8em 0 .6em; font-size: 1.5rem; }
.article-body h3 { margin: 1.6em 0 .5em; font-size: 1.2rem; }
.article-body p { margin-bottom: 1.3em; }
.article-body ul, .article-body ol { margin-bottom: 1.3em; padding-left: 1.5em; }
.article-body li { margin-bottom: .5em; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }
.article-body img {
  margin: 1.8em 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.article-body blockquote {
  margin: 1.8em 0;
  padding: 18px 24px;
  border-left: 4px solid var(--gold-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-soft);
  color: var(--muted);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body pre {
  overflow-x: auto;
  margin: 1.6em 0;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  color: #dbe4f2;
  font-size: .9rem;
  line-height: 1.6;
}
.article-body code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  font-size: .92em;
}
.article-body pre code { padding: 0; background: none; color: inherit; }
.article-body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
/* จัดตำแหน่งจากปุ่มในหลังบ้าน (ชิดซ้ายคือค่าเริ่มต้น ไม่มี class) */
.article-body .align-center { text-align: center; }
.article-body .align-right  { text-align: right; }
.article-body img.align-center { margin-left: auto; margin-right: auto; }
.article-body img.align-right  { margin-left: auto; margin-right: 0; }
.article-video {
  position: relative;
  margin: 36px 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy-900);
  box-shadow: var(--shadow-md);
}
.article-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-body table { margin: 1.8em 0; font-size: .95rem; }
.article-body th, .article-body td { border: 1px solid var(--line); }

.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share__label { margin-right: 4px; font-size: .9rem; font-weight: 600; color: var(--navy-800); }
.share__link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .9rem; font-weight: 600; color: var(--navy-800); }
.share__link:hover { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }

@media (max-width: 640px) {
  .listing-bar { flex-direction: column; align-items: stretch; }
  .searchbox input { width: 100%; }
  .article-body { font-size: 1rem; }
}

/* ------------------------------------------------------------ Gallery --- */

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 2em 0; }
.gallery__item { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); background: var(--bg-soft); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery__item:hover img { transform: scale(1.04); }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

.is-zoomable { cursor: zoom-in; }

/* ดูรูปเต็มจอ — สร้างโดย js/main.js */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 13, 29, .94); color: #fff; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; animation: popup-in .2s ease; }
.lightbox__stage { display: grid; place-items: center; width: 100%; height: 100%; margin: 0; padding: 56px 72px; }
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 112px); object-fit: contain; border-radius: 6px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.lightbox__btn, .lightbox__close { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; font-size: 2rem; line-height: 1; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; transition: background .2s ease; }
.lightbox__btn:hover, .lightbox__close:hover { background: rgba(255, 255, 255, .26); }
.lightbox__btn--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__close { top: 14px; right: 16px; width: 44px; height: 44px; font-size: 1.7rem; }
.lightbox__count { position: fixed; left: 0; right: 0; bottom: 16px; margin: 0; text-align: center; font-size: .9rem; color: rgba(255, 255, 255, .8); }
.lightbox.is-single .lightbox__btn { display: none; }
@media (max-width: 700px) {
  .lightbox__stage { padding: 56px 8px; }
  .lightbox__btn { top: auto; bottom: 10px; transform: none; width: 44px; height: 44px; }
}

/* ป้ายข่าวที่ปักหมุดไว้บนสุด */
.tag--pin { color: #fff; background: var(--navy-800); }

/* ------------------------------------------- ช่องทางการสั่งซื้อ ARS --- */

.distributors { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 48px; padding: 32px 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); scroll-margin-top: 110px; }
.distributors h3 { margin: 6px 0 10px; font-size: 1.35rem; }
.distributors p { margin: 0 0 10px; color: var(--muted); }
.distributors__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.distributors__item { display: grid; gap: 8px; text-align: center; }
.distributors__logo { display: grid; place-items: center; height: 110px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
a.distributors__logo:hover { border-color: var(--gold-500); box-shadow: var(--shadow-md); }
.distributors__logo img { max-width: 100%; max-height: 72px; object-fit: contain; }
.distributors__name { font-size: 1.05rem; font-weight: 700; color: var(--navy-900); }
.distributors__caption { font-size: .82rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 800px) {
  .distributors { grid-template-columns: 1fr; padding: 24px; }
}

/* iPhone / iPad ซูมหน้าเว็บเองเมื่อแตะช่องกรอกที่ตัวอักษรเล็กกว่า 16px จอสัมผัสจึงใช้ 16px
   (ต้องอยู่ท้ายไฟล์ เพื่อชนะกฎขนาดตัวอักษรของช่องกรอกที่ประกาศไว้ก่อนหน้า) */
@media (max-width: 1100px) {
  input, select, textarea,
  .field input, .field select, .field textarea,
  .searchbox input { font-size: 16px; }
}
