html {
  scroll-behavior: smooth;

/* Global */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222;
}
img { display: block; }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}
.line {
  width: 60px;
  height: 3px;
  background: #003399;
  margin-top: 10px;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffffee;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #e0e0e0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-box img {
  height: 48px;
  width: auto;
  display: block;
}

/* เมนู */
.main-nav a {
  margin-left: 24px;
  text-decoration: none;
  font-size: 15px;
  color: #333;
  font-weight: 500;
  transition: 0.2s;
}
.main-nav a:hover {
  color: #003399;
}

/* HERO BANNER */
.hero-section img {
  width: 100%;
  height: 100vh; /* เต็มจอ */
  object-fit: cover;
  display: block;
}

/* เพิ่มช่องว่างระหว่าง Hero กับ About */
.hero-section {
  margin-bottom: 120px; /* ปรับได้ 60–120px ตามความโปร่งที่ต้องการ */
}

/* ABOUT SECTION */
.about-section {
  scroll-margin-top: 180px;

}

.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 120px;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
}

.about-text p {
  margin: 12px 0;
  line-height: 1.8;
  font-size: 19px;
}

/* Services */
.services-section {
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 260px);
  gap: 20px;
  margin-top: 32px;
}
.service-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

/* Big slide 2x2 */
.big-slide {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}
.big-slide-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}
.big-slide-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.big-slide-wrapper img.active {
  opacity: 1;
}
.big-slide-overlay {
  position: absolute;
  left: 24px;
  bottom: 24px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.title-lg {
  font-size: 22px;
  font-weight: 700;
}
.subtitle-sm {
  font-size: 14px;
  margin-top: 4px;
}
.big-slide-dots {
  position: absolute;
  bottom: 16px;
  right: 20px;
  display: flex;
  gap: 6px;
}
.big-slide-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}
.big-slide-dots .dot.active {
  background: #fff;
}

/* Service image boxes */
.service-img {
  position: relative;
  width: 100%;
  height: 100%;
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.overlay-text {
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.7);
}
.overlay-top-left {
  position: absolute;
  left: 16px;
  top: 16px;
  color: #000;
  text-shadow: 0 2px 6px rgba(255,255,255,.6);
}
.black { color: #000; }

/* Product 1x2 */
.product {
  grid-column: 3;
  grid-row: 1 / span 2;
}
.download-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(0, 102, 204, 0.35);
  color: #ffffff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 102, 204, 0.45);
  transition: 0.25s ease;
}
.download-btn:hover {
  background: rgba(0, 102, 204, 0.55);
  border-color: rgba(0, 102, 204, 0.75);
}

/* Bottom row services */
.engineer { grid-column: 1; grid-row: 3; }
.aftersales { grid-column: 2; grid-row: 3; }
.custom { grid-column: 3; grid-row: 3; }

/* Projects */
.projects-section {
  padding: 60px 0;

}
.projects-slider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.projects-track-wrapper {
  overflow: hidden;
  width: 100%;
}
.projects-track {
  display: flex;
  gap: 20px;
  transform: translateX(0);
  will-change: transform;
}
.project-card {
  width: calc((100% - 40px) / 3);
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f0;
}
.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
.project-card h3 {
  margin: 8px 12px 12px;
  font-size: 15px;
  font-weight: 600;
}
.projects-arrow {
  background: #003399;
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.projects-arrow:hover {
  background: #001f66;
}

/* Footer */
.site-footer {
  background: #111;
  color: #eee;
  padding: 32px 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-info h3 {
  margin: 0 0 8px;
}
.footer-info p {
  margin: 4px 0;
  font-size: 14px;
}
.footer-copy {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 900px) {
  .about-inner {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .big-slide,
  .product,
  .engineer,
  .aftersales,
  .custom {
    grid-column: auto;
    grid-row: auto;
    height: 260px;
  }
  .projects-track {
    gap: 12px;
  }
  .project-card {
    width: calc((100% - 24px) / 3);
  }
}
