/* ==========================================================================
   css/main.css
   สไตล์เสริมที่ Tailwind (CDN) ทำไม่ได้โดยตรง เช่น backdrop-filter, custom
   transition, scroll-behavior ตามดีไซน์ระบบ .claude/docs/DESIGN.md
   (โทนสีขาว 60% / เทา 30% / ดำ 10% ตามที่กำหนด)
   ========================================================================== */

/* เลื่อนหน้าแบบ smooth ทั้งเว็บ เวลาคลิกเมนู anchor link */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans Thai", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #171a20;
  background-color: #ffffff;
}

/* ----------------------------------------------------------------------
   Header / Navbar แบบ frosted glass ลอยด้านบน ตาม DESIGN.md
   ---------------------------------------------------------------------- */
.site-header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.33s ease, background-color 0.33s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(23, 26, 32, 0.08);
}

/* ----------------------------------------------------------------------
   Hero section
   ---------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 100vh; /* fallback สำหรับเบราว์เซอร์ที่ไม่รองรับ svh */
  min-height: 100svh; /* กันปัญหาแถบ address bar มือถือดันเนื้อหาเกินจอ */
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(23, 26, 32, 0.55) 0%,
    rgba(23, 26, 32, 0.75) 60%,
    rgba(23, 26, 32, 0.92) 100%
  );
}

/* ----------------------------------------------------------------------
   การ์ดสินค้า / เทคโนโลยี - ไม่มีเงาหนัก ตาม flat design ของ DESIGN.md
   ---------------------------------------------------------------------- */
.product-card,
.tech-card {
  transition: transform 0.33s ease, border-color 0.33s ease;
}

.product-card:hover,
.tech-card:hover {
  transform: translateY(-4px);
  border-color: #171a20;
}

/* เส้นเชื่อมขั้นตอน (process timeline) แสดงเฉพาะตอนจัดวางแนวนอน (sm ขึ้นไป)
   ป้องกันเส้นลากทับเนื้อหาตอนจอมือถือที่ขั้นตอนเรียงเป็นแนวตั้ง (flex-col) */
@media (min-width: 640px) {
  .process-line::after {
    content: "";
    position: absolute;
    top: 28px;
    left: 50%;
    width: 100%;
    height: 1px;
    background-color: #d0d1d2;
    z-index: 0;
  }

  .process-step:last-child .process-line::after {
    display: none;
  }
}

.process-number {
  position: relative;
  z-index: 1;
}

/* ----------------------------------------------------------------------
   Gallery - การ์ดแบบมีมิติ (เงานุ่ม + ยกตัวขึ้นตอน hover) เพื่อความพรีเมี่ยม
   ---------------------------------------------------------------------- */
.gallery-card {
  box-shadow: 0 2px 8px rgba(23, 26, 32, 0.06), 0 1px 2px rgba(23, 26, 32, 0.04);
  transition: transform 0.33s ease, box-shadow 0.33s ease, border-color 0.33s ease;
}

.gallery-item:hover .gallery-card {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px -12px rgba(23, 26, 32, 0.25), 0 4px 10px rgba(23, 26, 32, 0.08);
  border-color: #d0d1d2;
}

.gallery-item:focus-visible .gallery-card {
  outline: 2px solid #171a20;
  outline-offset: 2px;
}

/* ----------------------------------------------------------------------
   ตารางเปรียบเทียบรุ่น - เส้นบางแบบ minimal
   ---------------------------------------------------------------------- */
.compare-table th,
.compare-table td {
  border-bottom: 1px solid #eeeeee;
}

.compare-table thead th {
  border-bottom: 2px solid #171a20;
}

/* ----------------------------------------------------------------------
   ปุ่มลอย ติดต่อ (โทร / Line) มุมขวาล่าง
   ---------------------------------------------------------------------- */
.floating-contact {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
}

.floating-contact .fab-btn {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(23, 26, 32, 0.25);
}

.floating-contact .fab-btn:hover {
  transform: scale(1.08);
}

/* ----------------------------------------------------------------------
   Mobile menu (slide down)
   ---------------------------------------------------------------------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.33s ease;
}

#mobile-menu.is-open {
  max-height: 600px;
}

/* Scrollbar บาง (ไม่บังคับ แต่ช่วยให้ดูพรีเมี่ยมขึ้นบน desktop) */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background-color: #d0d1d2;
  border-radius: 999px;
}
