:root {
  --red: #8B1A1A;
  --red-pale: #FEF2F2;
  --ink: #111827;
  --ink2: #374151;
  --muted: #6B7280;
  --subtle: #9CA3AF;
  --line: #E5E7EB;
  --bg: #F9FAFB;
  --white: #FFFFFF;
  --green: #16A34A;
  --green-bg: #DCFCE7;
  --blue: #1D4ED8;
  --blue-bg: #EFF6FF;
  --amber-bg: #FFFBEB;
  --r: 16px;
  --r-sm: 10px;
  --r-lg: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

/* เผื่อระยะด้านบนไว้ตอนกดลิงก์ข้าม Section จะได้ไม่โดน Navbar บัง */
#services, #portfolio, #contact {
  scroll-margin-top: 80px;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* For Safari */
  border-bottom: 1px solid var(--line);
  z-index: 50;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  flex: 1; /* แบ่งพื้นที่ฝั่งซ้ายให้เท่าฝั่งขวา */
}

.logo-icon {
  font-size: 24px;
  color: var(--red);
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
}

.logo-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.logo-subtitle {
  font-size: 11px;
  color: var(--subtle);
}

.btn-line {
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s;
}

.btn-line:hover {
  background: #15803d;
}

.lang-switcher-group {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  background-color: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.lang-btn {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.lang-btn:hover {
  color: var(--ink);
}
.lang-btn.active {
  color: var(--red);
  font-weight: 700;
}
.lang-sep {
  color: var(--line);
  font-size: 12px;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 4px;
}

.nav-menu {
  display: flex;
  flex: 2;
  align-items: center;
  justify-content: space-between;
}

/* NAV RIGHT */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1; /* แบ่งพื้นที่ฝั่งขวาให้เท่าฝั่งซ้าย */
}

/* NAV LINKS */
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--red);
}

/* PAGES */
.page {
  display: none;
  padding-top: 60px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 48px;
  min-height: 100vh;
  animation: fadeIn 0.3s ease-in;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
}

.page.active {
  display: block;
}

/* Remove bottom padding on home page to prevent space below footer */
#page-home {
  padding-bottom: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* BUTTONS */
.btn {
  border: none;
  padding: 12px 24px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  width: 100%;
  margin-top: 24px;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.btn-primary:hover {
  background: #6d1414;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--green);
  color: var(--white);
  width: 100%;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.btn-secondary:hover {
  background: #15803d;
}

/* FLOATING LINE BUTTON */
.floating-line-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #06C755; /* สีเขียวของ LINE */
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px 8px 8px;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(6, 199, 85, 0.35);
  z-index: 999;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
}
.floating-line-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(6, 199, 85, 0.45);
  background-color: #05b34c;
}

.line-icon-wrap {
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-btn-text {
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 0;
}

.btn-back:hover {
  color: var(--red);
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 16px;
  padding: 0;
}

.link-btn:hover {
  color: var(--ink);
}

/* HEADINGS & TEXT */
h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.tagline {
  font-size: 14px;
  color: #6B7280;
  font-weight: 400;
  margin-bottom: 16px;
}

h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

.red-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* SECTION HEADER */
.section-header {
  margin-bottom: 48px;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--ink);
}

.section-header .red-label {
  letter-spacing: 1px;
}

/* NEW HERO SECTION WITH SCROLL ANIMATION */
.hero-spacer {
  height: 160vh; /* ให้สัมพันธ์กับการย่อวิดีโอ 60% ใน JavaScript เพื่อให้เนื้อหาต่อกันพอดี */
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -60px; /* ดึงขึ้นไปซ่อนใต้ Navbar พอดี */
}
.hero-sticky {
  position: sticky;
  top: 60px; /* ระยะห่างจาก Navbar */
  height: calc(100vh - 60px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-video-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease-out, border-radius 0.1s ease-out;
  /* จุดเริ่มต้นสำหรับ Desktop */
  transform-origin: center center;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  object-fit: cover;
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.3); /* ลดความมืดฟิลเตอร์ลงเพราะวิดีโอดำอยู่แล้ว */
  z-index: -1;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 20px;
  text-align: center;
  max-width: 800px;
  color: var(--white);
}
.hero-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: var(--white);
}
.hero-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 36px;
}
.hero-btn {
  display: inline-block;
  width: auto;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 16px;
}

/* SCROLL INDICATOR */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
  color: var(--white);
  transition: opacity 0.3s ease;
}
.scroll-text {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
}
.scroll-line {
  width: 1.5px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--white);
  animation: scrollAnim 1.5s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}
@keyframes scrollAnim {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 100;
  display: flex;
  align-items: flex-end;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  height: 100vh;
  max-height: 100vh;
  background: var(--white);
  border-radius: 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  z-index: 101;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-pull-bar {
  /* Only show on touch devices, but for simplicity, we'll show it on mobile viewports */
  display: none; /* Hidden by default on desktop */
  width: 40px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin: 12px auto;
  cursor: grab;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  z-index: 10;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-img-area {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  margin-bottom: 12px;
}

.modal-img-area-clean {
  width: 100%;
  padding: 48px 24px 0;
}

.modal-img-area-clean .inner-img-slider {
  height: 300px;
  margin-bottom: 12px;
}

.modal-content {
  padding: 0 24px 28px;
}

.modal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 28px 0;
}

.spec-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.spec-section {
  font-size: 13px;
  line-height: 1.8;
}

.spec-section div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.spec-label {
  color: #6B7280;
  font-weight: 500;
  font-size: 13px;
  min-width: 90px;
}

.spec-value {
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  text-align: right;
  flex: 1;
}

@media (max-width: 480px) {
  .modal-specs {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .modal-content {
    padding: 0 20px 24px;
  }
}

.modal-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.feature-chip {
  background: #ECFDF5;
  color: #0D7C2F;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #E5E7EB;
}

.modal-actions .btn {
  flex: 1;
  margin: 0;
  padding: 12px 16px;
}

.modal-actions .btn-secondary {
  width: 100%;
  margin: 0;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.badge-blockchain {
  background: #FCE7E7;
  color: #A61B1B;
}

.badge-iot {
  background: #E0F0FF;
  color: #0D47A1;
}

.badge-audio {
  background: #E8F9F0;
  color: #0D7C2F;
}

/* SLIDER & PRODUCT CARDS */
.slider-container {
  overflow: hidden;
  margin-bottom: 40px;
  margin-left: -20px;
  margin-right: -20px;
}

.slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 12px 20px 20px 20px;
  justify-content: flex-start;
}

.slider::-webkit-scrollbar {
  height: 4px;
}

.slider::-webkit-scrollbar-track {
  background: transparent;
}

.slider::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 2px;
}

.product-card {
  flex: 0 0 360px;
  scroll-snap-align: center;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid #E5E7EB;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: #D1D5DB;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-badge {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.card-img-area {
  width: 100%;
  height: 160px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  margin-bottom: 24px;
}

.inner-img-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  height: 220px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  background: transparent;
  scrollbar-width: none;
}
.inner-img-slider::-webkit-scrollbar {
  display: none;
}
.inner-img-slider img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  scroll-snap-align: center;
}

.gradient-red {
  background: linear-gradient(135deg, #FEF3F3, #F5DEDE);
}

.gradient-blue {
  background: linear-gradient(135deg, #F0F7FF, #D9E9FC);
}

.gradient-green {
  background: linear-gradient(135deg, #F2FDF2, #D4F4D4);
}

.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  background: #F3F4F6;
  color: #4B5563;
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.product-card h4 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 14px;
  color: #6B7280;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: left;
  flex-grow: 1;
}

.btn-card {
  width: 100%;
  background: #FEF3F3;
  color: var(--red);
  border: 1.5px solid #F5DEDE;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
}

.btn-card:hover {
  background: #8B1A1A;
  color: var(--white);
  border-color: #8B1A1A;
}

/* SLIDER DOTS */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D1D5DB;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  width: 28px;
  border-radius: 4px;
  background: var(--red);
}

/* FOOTER BAR */
.footer-bar {
  background: var(--green);
  color: var(--white);
  padding: 16px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r);
  margin-top: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* EXPANDING WRAPPER (TRANSITION FROM HERO) */
.expand-wrapper {
  --expand-progress: 0; /* ตัวแปรควบคุมการขยายจาก JS */
  padding: 80px 0;
  width: calc(85% + (15% * var(--expand-progress))); /* กางจาก 85% -> 100% */
  max-width: 100%;
  margin: -10vh auto 0;
  background: #ffffff;
  border-radius: calc(80px - (80px * var(--expand-progress))) calc(80px - (80px * var(--expand-progress))) 0 0; /* ความโค้ง 80px -> 0px */
  box-shadow: 0 -20px 40px rgba(0,0,0,calc(0.08 - (0.08 * var(--expand-progress)))); /* เงาจางหายไปเมื่อกางเต็มจอ เพื่อให้กลืนกับพื้นหลัง */
  position: relative;
  z-index: 10;
  transition: width 0.1s ease-out, border-radius 0.1s ease-out, box-shadow 0.1s ease-out; /* ให้ขยายอย่างนุ่มนวล */
}

/* SERVICES SECTION */
.services-section {
  background: var(--bg); /* พื้นหลังสีเทาอ่อน */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 80px max(20px, calc(50vw - 600px));
  box-sizing: border-box;
}

.split-row {
  display: flex;
  align-items: center;
  gap: 64px;
  margin-bottom: 120px;
  position: relative;
}

/* Vertical Divider Line */
.split-row::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 20%, var(--line) 80%, transparent);
  transform: translateX(-50%);
}
.split-row.reverse {
  flex-direction: row-reverse;
}
.split-img {
  flex: 1;
  border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.split-img::-webkit-scrollbar {
  display: none;
}
.split-img img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: block;
  max-height: 400px;
  object-fit: cover;
  scroll-snap-align: center;
  transition: transform 0.5s ease;
}
.split-img:hover img {
  transform: scale(1.05);
}
.split-text {
  flex: 1;
}
.split-text h3 {
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--ink);
}
.split-text p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.8;
}
.check-list {
  list-style: none;
  margin-bottom: 32px;
  color: var(--ink2);
  font-weight: 500;
}
.check-list li {
  margin-bottom: 8px;
}
.btn-outline {
  border: 2px solid var(--red);
  color: var(--red);
  background: transparent;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
}
.btn-outline:hover {
  background: var(--red);
  color: var(--white);
}

/* SCROLL REVEAL ANIMATION */
.reveal-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}
.reveal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* PORTFOLIO SECTION */
.portfolio-section {
  padding: 40px 0;
}
.portfolio-img {
  flex: 0 0 320px;
  height: 400px;
  object-fit: cover;
  border-radius: var(--r-lg);
  scroll-snap-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* SITE FOOTER */
.site-footer {
  background: #111827;
  color: #D1D5DB;
  padding: 60px 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  text-align: left;
}
.footer-inner {
  max-width: 100%;
  margin: 0;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}
.footer-inner h3 {
  color: var(--white);
  font-size: 20px;
  margin-bottom: 16px;
}
.footer-inner p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 4px;
}
.footer-left {
  flex: 1;
  max-width: 600px;
  min-width: 250px;
}
.footer-right {
  flex: 0 0 auto;
  min-width: 250px;
}
.footer-right h4 {
  color: var(--white);
  font-size: 18px;
  margin-bottom: 16px;
}
.footer-right strong {
  color: #F3F4F6;
  font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .floating-line-btn {
    bottom: 20px;
    right: 20px;
    padding: 6px 18px 6px 6px;
  }
  .line-icon-wrap {
    width: 36px;
    height: 36px;
  }
  .line-icon-wrap svg {
    width: 20px;
    height: 20px;
  }
  .line-btn-text {
    font-size: 14px;
  }

  .nav-container {
    padding: 0 16px;
  }

  .nav-left {
    gap: 8px;
  }

  .logo-title {
    font-size: 12px;
  }

  .logo-subtitle {
    font-size: 9px;
  }

  .lang-switcher-group {
    padding: 4px 8px;
  }
  .lang-btn {
    font-size: 11px;
  }

  .hamburger-btn {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 24px 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 20px;
  }
  .nav-link {
    font-size: 16px;
  }
  .nav-right {
    justify-content: center;
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  h2 {
    font-size: 24px;
  }

  .modal {
    max-width: 100%;
    border-radius: 0;
  }

  .product-card {
    flex: 0 0 100%;
  }

  .modal-specs {
    grid-template-columns: 1fr;
  }

  .btn-outline {
    display: block;
    text-align: center;
    width: 100%;
  }

  /* ซ่อนเส้นแบ่งในหน้าจอมือถือ */
  .split-row::after {
    display: none;
  }

  .split-row, .split-row.reverse {
    flex-direction: column;
  }

  .split-img {
    width: 100%;
  }

  .split-img img {
    max-height: 280px;
  }

  .expand-wrapper {
    padding-left: 20px;
    padding-right: 20px;
    width: 100%; /* ในมือถือให้เต็มจอเสมอเพื่อประหยัดพื้นที่ */
    border-radius: 40px 40px 0 0;
  }
  .portfolio-section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .site-footer {
    padding: 48px 0 24px 0;
  }
  .footer-inner {
    padding: 0 24px;
    gap: 36px;
    flex-direction: column;
  }
  .footer-left, .footer-right {
    min-width: 100%;
  }
  .footer-right h4 {
    margin-bottom: 12px;
  }
  .site-footer > div:last-child {
    margin-top: 32px !important;
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 12px;
  }

  .logo-icon {
    font-size: 20px;
  }

  .logo-title {
    font-size: 11px;
  }

  h2 {
    font-size: 20px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .subtitle {
    margin-bottom: 24px;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .page {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 60px;
    padding-bottom: 20px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .product-card {
    flex: 0 0 300px;
  }

  .card-img-area {
    font-size: 52px;
    height: 140px;
  }

  .product-card h4 {
    font-size: 17px;
  }

  .inner-img-slider {
    height: 180px;
  }
  .modal-img-area-clean .inner-img-slider {
    height: 220px;
  }
  
  .split-row, .split-row.reverse {
    gap: 24px;
    margin-bottom: 64px;
  }
  .split-img img {
    max-height: 240px;
  }
  .split-text h3 {
    font-size: 24px;
  }
  .portfolio-img {
    flex: 0 0 260px;
    height: 300px;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-subtitle {
    font-size: 15px;
    margin-bottom: 24px;
  }
  .site-footer {
    padding: 40px 0 24px 0;
  }
  .footer-inner {
    padding: 0 20px;
  }
}
