/* พลังแสงใหม่ โซลาร์ เอ็นเนอร์จี แอนด์ ฟิล์ม — โทนเขียวเข้ม (แก้ด่วน-1159: ลูกค้าขอพื้นหลังเขียวเข้มทั้งเว็บ ให้ตัวหนังสือและปุ่มเด่น)
   พื้นเขียวป่าเข้ม / การ์ดเขียวเข้มกว่าพื้นนิดเดียว · ปุ่มหลักสีทอง = พระอาทิตย์ในโลโก้ · ตัวหนังสือขาวนวล หัวข้อเขียวมิ้นต์
   ไอคอนช่องทางติดต่อเป็นสีจริงของแต่ละแอป (.bi) · เส้นบาง 1px แบ่งส่วน · ภาพผลงานจริงขนาดใหญ่
   กฎ: ทุกส่วนต้องสวยทั้งข้อความสั้นมาก/ยาวมาก และไม่ล้นจอที่ 360px */

:root {
  --accent: #eeb12a;
  --gold: #eeb12a;
  --gold-hi: #f7cb5c;
  --gold-edge: #d99a14;
  --accent-ink: #1d2412;
  --green: #74c982;
  --green-deep: #a9e0b0;
  --ink: #f2f6ee;
  --muted: #bccbbf;
  --paper: #0f2c1c;
  --paper-2: #163a26;
  --paper-3: #0b2316;
  --dark-text: #17261c;
  --line: rgba(116, 201, 130, .32);
  --line-soft: rgba(230, 245, 232, .13);
  --radius: 6px;
  --font: 'IBM Plex Sans Thai', -apple-system, 'Segoe UI', sans-serif;
  --display: var(--font);
  --gap: clamp(64px, 9vw, 120px);
  --pad: clamp(18px, 4vw, 40px);
  --max: 1240px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  font-size: 17px; line-height: 1.75; -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.3; margin: 0; text-wrap: balance; font-weight: 600; }
p { margin: 0; }
svg { flex: none; }
::selection { background: var(--gold-hi); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: var(--accent-ink); padding: 8px 14px; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); width: 100%; }
.sec { padding-block: var(--gap); position: relative; }
.sec + .sec { padding-top: calc(var(--gap) * .7); }
.sec + .sec::before {
  content: ''; position: absolute; top: 0; left: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  right: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad))); height: 1px; background: var(--line-soft);
}

/* หัวข้อของส่วน: หัวข้อซ้าย เส้นทอง-เขียวลากไปขวา */
.sec-head { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); margin-bottom: clamp(14px, 2vw, 20px); }
.sec-head h2 { font-size: clamp(28px, 4vw, 46px); color: var(--ink); letter-spacing: -.005em; flex: none; max-width: 100%; }
.sec-head .rule { flex: 1; height: 2px; background: linear-gradient(90deg, var(--gold), rgba(46, 139, 62, .25) 45%, transparent); min-width: 40px; border-radius: 2px; }
.sec-intro { color: var(--muted); max-width: 62ch; font-size: 17.5px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head + :not(.sec-intro) { margin-top: clamp(24px, 3.5vw, 40px); }

/* ปุ่ม: ทองเต็ม (ปุ่มหลัก) / เส้นเขียว (ปุ่มรอง) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--radius); font-size: 16.5px; font-weight: 600;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--accent-ink); text-decoration: none;
  border: 1px solid var(--gold-edge); min-height: 52px; cursor: pointer; font-family: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
  box-shadow: 0 8px 20px -12px rgba(217, 154, 20, .7);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 14px 26px -14px rgba(217, 154, 20, .8); }
.btn:active { transform: translateY(0); }
.btn .arr { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-line, .btn-ghost { background: rgba(255, 255, 255, .04); color: var(--ink); border-color: var(--green); box-shadow: none; }
.btn-line > svg { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-width: 1.6; }
.btn-line:hover, .btn-ghost:hover { background: rgba(116, 201, 130, .14); }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- ไอคอนช่องทางติดต่อ สีจริงของแต่ละแอป ---------- */
.bi { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; flex: none; color: #fff; }
.bi svg { width: 62%; height: 62%; fill: none; stroke: #fff; stroke-width: 1.8; }
.bi-phone { background: #34c759; }
.bi-line { background: #06c755; }
.bi-line svg { fill: #fff; stroke: none; width: 70%; height: 70%; }
.bi-facebook { background: #1877f2; border-radius: 50%; }
.bi-facebook svg { fill: #fff; stroke: none; width: 66%; height: 66%; }
.bi-mail { background: #ea4335; }
.bi-pin { background: #ea4335; border-radius: 50%; }
.bi-instagram { background: linear-gradient(45deg, #f9a825, #e1306c 55%, #833ab4); }
.bi-tiktok { background: #111; }
.bi-youtube { background: #ff0000; }

/* ---------- แถบบน + หัวเว็บ ---------- */
.topbar { background: var(--paper-3); border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; min-height: 40px; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap; }
.topbar a:hover { color: var(--green-deep); }
.topbar > .wrap > span > svg, .topbar .tb-open svg { width: 15px; height: 15px; fill: none; stroke: var(--green); stroke-width: 1.6; }
.topbar .bi { width: 22px; height: 22px; border-radius: 6px; }
.topbar .bi-facebook { border-radius: 50%; }
.topbar .tb-right { margin-left: auto; gap: 20px; }
.topbar .tb-call { gap: 8px; }
.topbar .tb-call a { color: var(--ink); font-weight: 600; }
.ph-sep { color: var(--gold-edge); }

/* ห้ามใส่ backdrop-filter/transform/filter ที่หัวเว็บ — เมนูมือถืออยู่นอกหัวเว็บอยู่แล้ว */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(12, 37, 24, .97); border-bottom: 1px solid var(--line-soft); box-shadow: 0 6px 20px -16px rgba(0, 0, 0, .6); }
.nav .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
/* โลโก้เป็นสีเขียว — วางบนแผ่นขาวมุมมน ให้เห็นชัดบนพื้นเขียวเข้ม */
.logo-tile { width: 58px; height: 53px; display: grid; place-items: center; overflow: hidden; flex: none; background: #ffffff; border-radius: 8px; padding: 3px; }
.logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1.45; }
.logo-text b { font-size: 22px; font-weight: 700; color: var(--green-deep); letter-spacing: .01em; }
.logo-text small { font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.nav-links { margin-inline-start: auto; display: flex; gap: 2px; }
.nav-links a {
  text-decoration: none; padding: 10px 11px; font-size: 15.5px; color: var(--muted); position: relative; white-space: nowrap;
  transition: color .2s;
}
.nav-links a::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transition: transform .25s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--green-deep); font-weight: 600; }
.nav-toggle { display: none; }

/* เมนูมือถือ — เต็มจอเสมอ */
.mnav { position: fixed; inset: 0; z-index: 90; background: var(--paper); display: flex; flex-direction: column; padding: 0 var(--pad) calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.mnav[hidden] { display: none; }
.mnav-top { display: flex; align-items: center; justify-content: space-between; min-height: 72px; border-bottom: 1px solid var(--line-soft); }
.mnav-top b { font-size: 22px; font-weight: 700; color: var(--green-deep); }
.mnav-close { width: 48px; height: 48px; border: 1px solid var(--line-soft); background: transparent; color: var(--ink); font-size: 28px; border-radius: var(--radius); cursor: pointer; }
.mnav nav { display: flex; flex-direction: column; padding-block: 12px; }
.mnav nav a { text-decoration: none; font-size: 22px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.mnav nav a[aria-current="page"] { color: var(--green-deep); font-weight: 600; }
.mnav-cta { display: grid; gap: 12px; margin-top: auto; padding-top: 24px; }
.mnav-call { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink); text-decoration: none; padding: 10px; font-weight: 500; }
.mnav-call .bi { width: 26px; height: 26px; }
.btn-line .bi { width: 26px; height: 26px; }
body.nav-open { overflow: hidden; }

/* ---------- แบนเนอร์ ---------- */
.hero { position: relative; overflow: hidden; background: var(--paper-3); display: grid; }
.hero-slide { grid-area: 1 / 1; position: relative; display: flex; align-items: flex-end; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility .9s; }
.hero-slide.on { opacity: 1; visibility: visible; }
/* ข้อความไม่ซ้อนกันตอนสลับ: ชุดเก่าหายเร็ว ชุดใหม่ขึ้นหลังภาพจางเสร็จ */
.hero-slide .hero-body { opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.hero-slide.on .hero-body { opacity: 1; transform: none; transition: opacity .6s var(--ease) .55s, transform .6s var(--ease) .55s; }
.hero-slide.on:first-child .hero-body { transition-delay: 0s; }
.hero-tall .hero-slide { min-height: clamp(520px, 84vh, 860px); }
.hero-compact .hero-slide { min-height: clamp(300px, 46vh, 460px); }
.hero-bg, .hero-bg picture, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; object-position: 62% 40%; filter: brightness(1.04) saturate(1.06); }
/* จอกลาง: ภาพเต็มกว้าง ไล่พื้นเขียวเข้มจากซ้าย ข้อความขาวอยู่บนพื้นเข้ม */
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 35, 22, .95) 0%, rgba(11, 35, 22, .8) 38%, rgba(11, 35, 22, .15) 72%),
    linear-gradient(0deg, rgba(11, 35, 22, 1) 0%, rgba(11, 35, 22, 0) 26%);
}
/* จอคอม: ภาพจริงกว้าง 1600px — วางชิดขวาไม่เกิน 880px ให้คม แล้วไล่พื้นเขียวเข้มไปทางซ้ายใต้ข้อความ */
@media (min-width: 1101px) {
  .hero-bg { left: auto; right: 0; width: min(62%, 880px); }
  .hero-bg::after {
    background:
      linear-gradient(90deg, var(--paper-3) 0%, rgba(11, 35, 22, .5) 24%, rgba(11, 35, 22, 0) 55%),
      linear-gradient(0deg, rgba(11, 35, 22, .9) 0%, rgba(11, 35, 22, 0) 22%);
  }
}
.hero-body { position: relative; z-index: 2; padding-block: clamp(48px, 9vw, 120px) clamp(48px, 7vw, 96px); }
.hero-title { font-size: clamp(34px, 5.4vw, 68px); line-height: 1.4; font-weight: 700; max-width: 12em; color: #fff; letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.hero-compact .hero-title { font-size: clamp(32px, 5vw, 58px); max-width: 16em; }
/* คำโปรย: แถบพื้นเขียวเข้มจางรองรับตัวอักษร + ขีดทองนำ (สั่งแก้ครั้งที่ 2 ข้อ "อ่านชัดบนรูป") */
.hero-sub {
  font-size: clamp(17px, 2vw, 21px); max-width: 44ch; margin-top: 18px; color: var(--ink); font-weight: 500;
  background: rgba(11, 35, 22, .78); border-inline-start: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 18px; box-shadow: 0 10px 28px -18px rgba(0, 0, 0, .7); width: fit-content;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(26px, 3vw, 36px); }
.hero-cta:empty { display: none; }
.hero-call { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 22px; color: var(--muted); font-size: 15.5px; }
.hero-call .bi { width: 26px; height: 26px; margin-inline-end: 4px; }
.hero-call a { color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 3; display: flex; gap: 10px; }
.hero-dots button { width: 34px; height: 3px; border: 0; padding: 0; cursor: pointer; background: rgba(255, 255, 255, .3); }
.hero-dots button[aria-current="true"] { background: var(--gold); }

/* ---------- แถบความน่าเชื่อถือ (จุดเด่นแบบ cards) ---------- */
.trust { border-bottom: 1px solid var(--line-soft); background: var(--paper-3); }
.trust-headed { padding-block: var(--gap); border-bottom: 0; background: var(--paper); }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); }
.trust-list li { display: flex; align-items: center; gap: 14px; padding: 26px clamp(14px, 2vw, 28px); border-inline-start: 1px solid var(--line-soft); }
.trust-list li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.trust-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(116, 201, 130, .14); flex: none; }
.trust-ico svg { width: 28px; height: 28px; fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trust-list h3 { font-size: 17px; font-weight: 600; line-height: 1.45; }
.trust-list p { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin-top: 2px; }

/* ---------- ขั้นตอน (timeline) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); }
.steps li { display: flex; gap: 18px; padding: 8px clamp(14px, 2vw, 28px); border-inline-start: 1px solid var(--line-soft); }
.steps li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.step-n { font-size: clamp(46px, 5.4vw, 72px); font-weight: 300; color: var(--green); line-height: .95; letter-spacing: -.02em; font-style: italic; }
.steps h3 { font-size: 18.5px; font-weight: 600; margin-top: 4px; }
.steps p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-top: 6px; }

/* ---------- ตารางรายการ/ราคา (rows) ---------- */
.table-wrap { max-width: 980px; }
.pricelist { margin: 0; border-top: 2px solid var(--gold); background: var(--paper-2); border-radius: 0 0 var(--radius) var(--radius); padding-inline: clamp(14px, 2.4vw, 28px); box-shadow: 0 16px 36px -30px rgba(0, 0, 0, .55); }
.pl-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.pl-row:last-child { border-bottom: 0; }
.pl-row dt { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 500; }
.pl-row dd { margin: 0; color: var(--green-deep); font-weight: 600; font-size: 16.5px; text-align: end; }
.pl-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--green); stroke-width: 1.5; }

/* ---------- เหตุผลที่เลือกเรา (bento) ---------- */
.why { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: clamp(16px, 2.4vw, 28px); }
.why li { border-top: 3px solid var(--gold); padding: 22px 20px 24px; position: relative; background: var(--paper-2); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 16px 36px -30px rgba(0, 0, 0, .55); }
.why-n { position: absolute; right: 18px; top: 14px; font-size: 40px; font-weight: 300; font-style: italic; color: rgba(116, 201, 130, .35); line-height: 1; }
.why-ico svg { width: 34px; height: 34px; fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.why h3 { font-size: 19px; margin-top: 16px; }
.why p { color: var(--muted); font-size: 15.5px; line-height: 1.65; margin-top: 8px; }

/* ---------- ภาพ + ข้อความ (about) ---------- */
.feat { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.feat.no-pic { grid-template-columns: 1fr; max-width: 820px; }
.feat.pic-right .feat-pic { order: 2; }
.feat-pic { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--paper-3); box-shadow: 0 24px 48px -36px rgba(23, 38, 28, .6); }
.feat-pic img { width: 100%; height: 100%; object-fit: cover; }
.feat-text h2 { font-size: clamp(28px, 3.6vw, 44px); padding-bottom: 18px; margin-bottom: 22px; border-bottom: 2px solid var(--gold); color: var(--green-deep); }
.feat-reg { margin: -10px 0 20px; font-size: 15.5px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.feat-body p { color: var(--muted); margin-bottom: 16px; }
.feat-body p:first-child { color: var(--ink); font-size: 18.5px; font-weight: 400; }
.feat-text .btn { margin-top: 12px; }

/* ---------- บริการ ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(22px, 3vw, 32px); }
.chip { font: inherit; font-size: 15.5px; padding: 9px 20px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); color: var(--muted); cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--ink); border-color: var(--green); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold-edge); color: var(--accent-ink); font-weight: 600; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.svc { background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; box-shadow: 0 14px 32px -28px rgba(0, 0, 0, .55); }
.svc:hover { transform: translateY(-3px); border-color: var(--line); box-shadow: 0 22px 40px -26px rgba(23, 38, 28, .45); }
.svc[hidden] { display: none; }
.svc-pic { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-3); }
.svc-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.svc-pic.fit-contain img { object-fit: contain; }
.svc:hover .svc-pic img { transform: scale(1.03); }
.svc-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.svc-cat { font-size: 14px; color: var(--green-deep); font-weight: 600; letter-spacing: .04em; }
.svc h3 { font-size: 20px; line-height: 1.4; }
.svc p { color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.svc-price { font-weight: 600; color: var(--green-deep); }
.svc-link { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--green-deep); text-decoration: none; font-weight: 600; font-size: 15.5px; min-height: 44px; }
.svc-link .arr { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform .2s; }
.svc-link:hover .arr { transform: translateX(4px); }
/* ชิ้นแรก (บริการหลัก) ใหญ่ที่สุด — ลูกค้าขอให้งานติดตั้งโซลาร์เด่นที่สุด */
/* จัดแถว 6 หน่วย: ชิ้นแรกเต็มแถว (แนวนอน) → 2 ชิ้นถัดไปครึ่งแถว → ที่เหลือแถวละ 3 ไม่มีการ์ดค้างเดี่ยว */
@media (min-width: 1001px) {
  .svc-grid:not(.filtered) { grid-template-columns: repeat(6, 1fr); }
  .svc-grid:not(.filtered) .svc { grid-column: span 2; }
  .svc-grid:not(.filtered) .svc:nth-child(2), .svc-grid:not(.filtered) .svc:nth-child(3) { grid-column: span 3; }
  .svc-grid:not(.filtered) .svc-lead { grid-column: 1 / -1; flex-direction: row; }
  .svc-grid:not(.filtered) .svc-lead .svc-pic { flex: 1.5; aspect-ratio: 16 / 9; }
  .svc-grid:not(.filtered) .svc-lead .svc-body { flex: 1; padding: clamp(28px, 3.4vw, 48px); justify-content: center; }
  .svc-grid:not(.filtered) .svc:nth-child(2) .svc-pic, .svc-grid:not(.filtered) .svc:nth-child(3) .svc-pic { aspect-ratio: 16 / 9; }
}
.svc-grid:not(.filtered) .svc-lead h3 { font-size: clamp(22px, 2.4vw, 30px); }
/* หมวดที่มี 2 รายการ: 2 การ์ดคู่ ไม่กว้างเกิน */
.svc-grid.svc-pair { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; max-width: 820px; }
.svc-grid.svc-pair .svc { grid-column: auto !important; }
.svc-grid.svc-pair .svc .svc-pic { aspect-ratio: 4 / 3 !important; }
.svc-list { display: grid; gap: 14px; }
.svc-list .svc { flex-direction: row; }
.svc-list .svc-pic { width: 220px; flex: none; }

/* ---------- ผลงาน — masonry ตามสัดส่วนไฟล์จริง ไม่ครอป ไม่มีกรอบ ---------- */
.sec-gal { background: var(--paper-3); }
.sec-gal + .sec::before { display: none; }
.gal { columns: var(--cols, 3); column-gap: 14px; }
.gal-item { break-inside: avoid; margin: 0 0 14px; }
.gal-item a { display: block; overflow: hidden; border-radius: 4px; }
.gal-item img, .gal-item video { width: 100%; height: auto; border-radius: 4px; transition: transform .6s var(--ease), filter .4s; }
.gal-item a:hover img { transform: scale(1.025); filter: brightness(1.05); }
.gal-item figcaption { padding: 10px 2px 4px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.gal-item figcaption b { color: var(--ink); font-weight: 600; display: block; }
.gal-item figcaption span { display: block; font-size: 14px; }

dialog.light { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; color: #fff; }
dialog.light::backdrop { background: rgba(10, 20, 14, .9); }
dialog.light img { max-height: 84vh; width: auto; margin: 0 auto; }
dialog.light p { text-align: center; padding-top: 12px; color: #e8ede6; font-size: 15px; }
dialog.light button { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #ffffff; color: var(--dark-text); font-size: 26px; cursor: pointer; }

/* ---------- เสียงลูกค้า ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.quote { margin: 0; padding: 30px 28px 26px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--paper-2); position: relative; box-shadow: 0 16px 36px -30px rgba(0, 0, 0, .55); }
.q-mark { font-size: 72px; line-height: .6; color: var(--gold); font-weight: 300; display: block; height: 30px; }
.quote blockquote { margin: 10px 0 20px; font-size: 17px; line-height: 1.8; }
.quote figcaption { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.quote figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.quote b { display: block; font-size: 15.5px; font-weight: 600; }
.quote small { color: var(--green-deep); font-size: 14px; }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 72px); }
.faq-side h2 { font-size: clamp(28px, 3.6vw, 44px); position: sticky; top: 110px; color: var(--green-deep); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:first-child { border-top: 1px solid var(--line-soft); }
.faq summary { cursor: pointer; padding: 20px 44px 20px 0; font-weight: 600; position: relative; list-style: none; font-size: 18px; line-height: 1.5; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--green-deep); }
.faq .faq-a { padding: 0 0 22px; color: var(--muted); margin: 0; white-space: pre-line; max-width: 66ch; }

/* ---------- แถบชวนติดต่อ ---------- */
/* dark = ภาพบ้านโซลาร์ ทับด้วยพื้นเขียวแบรนด์ (ไม่ใช้พื้นดำแล้ว) · soft = พื้นเขียวอ่อน (ใช้กับปุ่มแคตตาล็อก) */
.cta-band { position: relative; padding-block: clamp(80px, 12vw, 150px); text-align: center; overflow: hidden; }
.cta-dark { background: #1d6a2d url('/img/solar-home-golden-hour.webp') center 40% / cover no-repeat; }
.cta-dark::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24, 92, 42, .9), rgba(29, 106, 45, .74) 50%, rgba(24, 92, 42, .9)); }
.cta-soft { background: var(--paper-3); border-block: 1px solid var(--line-soft); padding-block: clamp(48px, 7vw, 80px); }
.cta-band .wrap { position: relative; }
.cta-band h2 { font-size: clamp(28px, 4.4vw, 52px); max-width: 22ch; margin: 0 auto 30px; color: #fff; }
.cta-soft h2 { color: var(--green-deep); font-size: clamp(24px, 3.2vw, 36px); max-width: 30ch; margin-bottom: 24px; }

/* ---------- ติดต่อ ---------- */
.sec-contact { background: linear-gradient(180deg, var(--paper), var(--paper-3)); }
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-note { color: var(--muted); margin-bottom: 22px; }
.contact-note p + p { margin-top: 10px; }
.contact-list { display: grid; gap: 4px; margin: 0 0 26px; padding: 0; list-style: none; }
.contact-list li { display: flex; gap: 14px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 17px; }
.contact-list .bi { width: 34px; height: 34px; }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { color: var(--green-deep); }
.hours { margin: 0 0 24px; padding: 0; list-style: none; font-size: 15.5px; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); max-width: 340px; }
.hours .closed { color: var(--muted); }
.contact-form { background: var(--paper-2); border: 1px solid var(--line-soft); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); box-shadow: 0 24px 48px -36px rgba(23, 38, 28, .55); }
.map-wrap { margin-top: clamp(28px, 4vw, 48px); position: relative; }
.map { border: 0; width: 100%; height: clamp(280px, 36vw, 400px); border-radius: var(--radius); display: block; }
.map-open { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--green-deep); font-weight: 600; text-decoration: none; min-height: 44px; }
.map-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

form.lead { display: grid; gap: 16px; }
form.lead .f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form.lead label { font-size: 15px; font-weight: 600; display: block; margin-bottom: 6px; color: var(--ink); }
form.lead input, form.lead textarea, form.lead select {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; min-height: 50px;
  border: 1px solid rgba(23, 38, 28, .2); border-radius: var(--radius); background: #ffffff; color: var(--dark-text);
  transition: border-color .2s, box-shadow .2s;
}
form.lead select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
form.lead input::placeholder, form.lead textarea::placeholder { color: #7d877f; }
form.lead input:focus, form.lead textarea:focus, form.lead select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(46, 139, 62, .15); }
form.lead textarea { min-height: 120px; resize: vertical; }
form.lead .btn { width: 100%; }
form.lead .hp { position: absolute; left: -9999px; }
form.lead .msg { font-size: 15px; margin: 0; }
form.lead .msg.ok { color: var(--green-deep); }
form.lead .msg.bad { color: #ff9a8a; }

/* ---------- ข้อความอิสระ ---------- */
.prose { max-width: 760px; }
.prose-wide { max-width: none; }
.prose h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 18px; }
.prose p { color: var(--muted); margin-bottom: 16px; }

/* ---------- บทความ ---------- */
.a-wrap { max-width: 760px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.a-wrap h1 { font-size: clamp(28px, 4.2vw, 44px); margin-bottom: 12px; }
.a-meta { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.a-cover { margin: 0 0 26px; }
.a-lead { font-size: 18.5px; color: var(--muted); margin: 0 0 26px; }
.a-toc { background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 32px; }
.a-toc b { display: block; font-size: 14.5px; margin-bottom: 8px; color: var(--green-deep); }
.a-toc ol { margin: 0; padding-inline-start: 20px; }
.a-toc a { color: var(--muted); text-decoration: none; }
.a-body > * { margin-block: 0 20px; }
.a-body h2 { font-size: clamp(22px, 3vw, 28px); margin-block: 44px 14px; }
.a-body h3 { font-size: clamp(18px, 2.4vw, 21px); margin-block: 30px 10px; }
.a-body a:not(.btn) { color: var(--green-deep); text-underline-offset: 3px; }
.a-body blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-inline-start: 3px solid var(--gold); }
.a-fig { margin: 28px 0; }
.a-fig figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; text-align: center; }
.a-cta { background: var(--paper-3); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; text-align: center; margin: 32px 0; }
.a-cta p { margin: 0 0 14px; }
.a-embed { margin: 32px 0; }
.a-embed .cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.a-embed .card { background: var(--paper-2); border-radius: var(--radius); overflow: hidden; }
.a-embed .card-body { padding: 14px; }
.a-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.a-related li a { display: block; padding: 13px 16px; background: var(--paper-2); text-decoration: none; }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.card-pic { aspect-ratio: 4 / 3; display: block; }
.card-pic img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px; }
.card-body h2 { font-size: 19px; margin-bottom: 6px; }
.card-body h2 a { text-decoration: none; }
.card-body p { color: var(--muted); font-size: 15px; }

/* ---------- ท้ายเว็บ (พื้นเขียวเข้มที่สุด) ---------- */
.foot { background: #081c11; border-top: 3px solid var(--gold); padding-block: clamp(48px, 6vw, 80px) 28px; font-size: 15.5px; }
.foot .wrap { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: clamp(28px, 4vw, 56px); }
.foot-brand p { color: var(--muted); margin-top: 12px; max-width: 46ch; }
.foot-brand .foot-name { color: var(--ink); font-weight: 600; margin-top: 18px; }
.foot-brand .foot-reg { margin-top: 2px; font-size: 14.5px; color: var(--muted); }
.foot-col b { display: block; color: var(--green-deep); font-weight: 700; margin-bottom: 14px; letter-spacing: .02em; }
.foot-col nav { display: grid; gap: 0; }
.foot-col a { text-decoration: none; color: var(--muted); gap: 10px; }
.foot-col a:hover { color: var(--ink); }
.foot-col p { color: var(--muted); margin-bottom: 0; }
.foot-col .bi { width: 24px; height: 24px; border-radius: 6px; }
.foot-col .bi-facebook, .foot-col .bi-pin { border-radius: 50%; }
.foot .social { display: flex; gap: 10px; margin-top: 18px; }
.foot .social a { width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none; }
.foot .social .bi { width: 40px; height: 40px; }
.foot .copy { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: 20px; color: var(--muted); font-size: 14px; }

/* ปุ่มติดต่อลอย: มือถือ = แถบล่าง (ไลน์ โทร ประเมินราคา) · คอม = ปุ่ม LINE ลอยมุมขวา */
.float-contact { position: fixed; z-index: 50; }
.float-contact a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 15px; }
.float-contact svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (min-width: 900px) {
  .float-contact { right: 22px; bottom: 22px; display: flex; gap: 10px; }
  .float-contact .fl-call, .float-contact .fl-quote { display: none; }
  .float-contact .fl-line { width: 58px; height: 58px; border-radius: 50%; background: #06c755; color: #fff; box-shadow: 0 10px 26px -10px rgba(6, 100, 50, .6); }
  .float-contact .fl-line span { position: absolute; left: -9999px; }
  .float-contact .fl-line svg { width: 30px; height: 30px; fill: #fff; stroke: none; }
}
@media (max-width: 899px) {
  .float-contact { left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 1.3fr; background: var(--paper-2); border-top: 1px solid var(--line-soft); box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, .55); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .float-contact a { height: 56px; color: var(--ink); border-inline-start: 1px solid var(--line-soft); }
  .float-contact .fl-line svg { fill: #06c755; stroke: none; width: 22px; height: 22px; }
  .float-contact .fl-call svg { stroke: #34c759; stroke-width: 2; }
  .float-contact .fl-quote { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--accent-ink); }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- อนิเมชันเข้าจอ (เล่นครั้งเดียว ไม่ทำให้หน้าเลื่อนตำแหน่ง) ---------- */
.rv-on [data-rv] { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.rv-on [data-rv].in { opacity: 1; transform: none; }

/* ---------- จอแคบ ---------- */
@media (max-width: 1240px) {
  .nav-links a { padding-inline: 8px; font-size: 15px; }
  .nav-links a::after { left: 8px; right: 8px; }
}
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-toggle { display: grid; gap: 5px; place-content: center; width: 48px; height: 48px; border: 1px solid var(--line-soft); background: transparent; border-radius: var(--radius); cursor: pointer; }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); }
  /* แถบบนมี 3 เบอร์ ยาวกว่าปกติ — จอกลางซ่อนเวลาเปิดและลิงก์ Facebook (มีที่ท้ายเว็บ/หน้าติดต่อ) กันล้นจอ */
  .topbar .tb-open, .topbar .tb-right a:last-child { display: none; }
}
@media (max-width: 1000px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-grid:not(.filtered) .svc-lead { grid-column: 1 / -1; grid-row: auto; }
  .trust-list, .steps { grid-template-columns: repeat(2, 1fr); }
  .trust-list li:nth-child(odd), .steps li:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .trust-list li { padding-block: 18px; }
  .steps { row-gap: 28px; }
  .why { grid-template-columns: repeat(2, 1fr); }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .topbar .tb-open, .topbar .tb-right a:last-child { display: none; }
  .topbar .wrap { gap: 14px; justify-content: space-between; font-size: 14px; }
  .topbar .tb-right { margin-left: 0; }
  .nav .wrap { min-height: 66px; gap: 12px; }
  .logo-tile { width: 50px; height: 46px; }
  .logo-text b { font-size: 19px; }
  .logo-text small { font-size: 14px; letter-spacing: 0; }
  .nav-cta { display: none; }
  .nav-toggle { margin-left: auto; }
  .hero-cta .btn { flex: 1 1 auto; }
  /* มือถือ: ภาพอยู่ครึ่งบนสว่างเต็มที่ (ไม่มีตัวหนังสือทับภาพ) แล้วจางลงพื้นเขียวเข้มที่ตัวหนังสืออยู่ */
  .hero-tall .hero-slide { min-height: min(92vh, 760px); }
  .hero-tall .hero-bg { bottom: auto; height: 52%; }
  .hero-tall .hero-bg img { object-position: 57% 28%; }
  .hero-tall .hero-bg::after { background: linear-gradient(0deg, var(--paper-3) 0%, rgba(11, 35, 22, .9) 30%, rgba(11, 35, 22, 0) 62%); }
  .hero-compact .hero-bg img { object-position: 60% 50%; }
  .hero-compact .hero-bg::after { background: linear-gradient(0deg, rgba(11, 35, 22, .97) 0%, rgba(11, 35, 22, .82) 50%, rgba(11, 35, 22, .4) 100%); }
  .hero-sub { padding: 10px 14px; }
  .feat { grid-template-columns: 1fr; }
  .feat.pic-right .feat-pic { order: 0; }
  .svc-grid { gap: 12px; }
  .svc-grid:not(.filtered) .svc-lead { flex-direction: column; }
  .svc-grid:not(.filtered) .svc-lead .svc-pic { aspect-ratio: 4 / 3; flex: none; }
  .svc-body { padding: 16px 16px 18px; }
  .svc h3 { font-size: 17.5px; }
  .svc p { font-size: 14.5px; }
  .svc-list .svc { flex-direction: column; }
  .svc-list .svc-pic { width: 100%; }
  .gal { columns: 2; column-gap: 10px; }
  .gal-item { margin-bottom: 10px; }
  .faq-grid, .contact { grid-template-columns: 1fr; }
  .faq-side h2 { position: static; }
  form.lead .f2 { grid-template-columns: 1fr; }
  .pl-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pl-row dd { text-align: start; padding-inline-start: 38px; }
  .sec-head h2 { flex: 1; }
  .sec-head .rule { display: none; }
  .sec-head { border-bottom: 2px solid var(--gold); padding-bottom: 14px; }
}
@media (max-width: 700px) {
  /* จอแคบ: แถบบนเหลือแค่เบอร์โทร (LINE อยู่ที่แถบปุ่มล่างจออยู่แล้ว) */
  .topbar .tb-right, .topbar .tb-label { display: none; }
  .topbar .wrap { justify-content: center; }
  .topbar .tb-call { gap: 6px; font-size: 14px; }
}
@media (max-width: 520px) {
  .svc-body { padding: 12px 12px 14px; gap: 6px; }
  .svc h3 { font-size: 16px; }
  .svc p { font-size: 14px; line-height: 1.6; }
  .svc-link { font-size: 14.5px; }
  .trust-list { grid-template-columns: 1fr 1fr; }
  .trust-list li { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 12px; }
  .trust-list h3 { font-size: 15.5px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line-soft); padding-top: 18px; }
  .why { grid-template-columns: 1fr; }
  .foot .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .float-contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); }
  .float-contact a { font-size: 14px; gap: 6px; padding-inline: 4px; }
  .float-contact svg { width: 18px; height: 18px; }
}

/* พื้นที่กดอย่างน้อย 44px ทุกลิงก์ (นิ้วโป้งบนมือถือ) — ขยายพื้นที่กด ไม่เปลี่ยนหน้าตา */
.topbar .wrap { min-height: 44px; }
.topbar a, .logo, .hero-call a, .contact-list a, .foot-col a, .foot .logo { min-height: 44px; display: inline-flex; align-items: center; }
.hero-dots button { height: 44px; width: 48px; background: transparent; position: relative; }
.hero-dots button::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: rgba(255, 255, 255, .3); }
.hero-dots button[aria-current="true"] { background: transparent; }
.hero-dots button[aria-current="true"]::before { background: var(--gold); }
.hero-dots { bottom: 4px; }

/* ตัวหนังสือไทยไม่ต่ำกว่า 14px และระยะบรรทัดหัวข้อไม่ต่ำกว่า 1.4 (สระบน-ล่างไม่ชนกัน) */
h1, h2, h3 { line-height: 1.4; }

/* ซ่อนแบบไม่ดันหน้ากว้าง (ลิงก์ข้ามไปเนื้อหา / ช่องล่อบอท) */
.skip:not(:focus), form.lead .hp { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv-on [data-rv] { opacity: 1; transform: none; }
}
