/* Root Variables */
:root {
  --primary-color: #0077ff;
  --primary-hover: #005ecc;
  --text-dark: #333333;
  --text-light: #777777;
  --blue-bg: #f0f7ff;
  --white: #ffffff;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Prompt", sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.company-name {
  display: flex;
  flex-direction: column; /* เรียงตัวหนังสือแนวตั้ง */
  justify-content: center;
}

.company-name h3 {
  font-size: 1.2rem; /* ปรับให้ใหญ่ขึ้นตามต้องการ */
  line-height: 1.2;
  margin-bottom: 2px;
}

.company-name p {
  font-size: 0.8rem; /* ปรับให้เล็กลง */
  color: var(--text-light);
  letter-spacing: 0.5px;
}

/* Navigation */
.navbar {
  background: var(--white);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-nav-img {
  width: 45px;
  height: 45px;
}
/* .logo-nav-img { width: 45px; height: 45px; border-radius: 50%; } */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 25px;
}
.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  transition: 0.3s;
}
.nav-menu a:hover {
  color: var(--primary-color);
}

/* Hero Section - ปรับปรุงความชัดเจน */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 90vh;
  background-image: url("images/header.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  padding: 100px 0;
  overflow: hidden;
}

/* Overlay ไล่ระดับเพื่อให้ข้อความทางซ้ายเด่น */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.8) 10%,
    rgba(255, 255, 255, 0.3) 60%
  );
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2; /* ให้อยู่เหนือ Overlay */
}

.hero-text {
  max-width: 750px;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;

  /* ใช้สีฟ้าเข้มเพื่อให้ชัดเจน */
  color: #004a99;

  /* เพิ่มเงาเล็กน้อยเพื่อให้ตัวหนังสือตัดกับภาพพื้นหลัง */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-text p {
  font-size: clamp(1rem, 4vw, 1.25rem);
  color: #444;
  margin-bottom: 35px;
  font-weight: 500;
}

/* Animated Waves */
.hero-waves {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 150px; /* จากเดิม 100px */
  min-height: 150px; /* จากเดิม 100px */
  z-index: 3;
}

.waves {
  position: relative;
  width: 100%;
  height: 20vh; /* จากเดิม 15vh */
  margin-bottom: -7px;
  min-height: 150px;
  max-height: 200px; /* จากเดิม 150px */
}
.parallax > use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}
.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}
.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}
.parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}
@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }
  100% {
    transform: translate3d(85px, 0, 0);
  }
}

/* Section Logic */
section {
  padding: 80px 0 120px 0;
  position: relative;
}
.blue-section {
  background-color: var(--blue-bg);
}

/* Wave Dividers */
.wave-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 10;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: 80px;
}
.shape-fill-blue {
  fill: var(--blue-bg);
}
.shape-fill-white {
  fill: var(--white);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 35px;
  border-radius: 50px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 700;
  transition: 0.3s;
  border: none;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 119, 255, 0.3);
}
.btn.secondary {
  background: white;
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  margin-left: 10px;
}

/* Content Elements */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.about {
  padding: 100px 0 250px 0;
}
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.about-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.quality {
  padding: 100px 0 250px 0;
}
.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.quality-card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.quality-icon {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.products {
  padding: 100px 0 250px 0;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.product-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.product-info {
  padding: 25px;
  text-align: center;
}

/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1 / 1; /* ทำให้ทุกรูปเป็นจัตุรัสเท่ากันเสมอ */
  box-shadow: var(--shadow);
  transition: transform 0.4s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* จัดภาพให้พอดีกรอบโดยไม่เสียสัดส่วน */
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  transform: scale(1.03); /* ขยายภาพเล็กน้อยเมื่อวางเมาส์ */
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ปรับ Responsive สำหรับมือถือ */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr); /* มือถือแสดง 2 คอลัมน์ */
    gap: 10px;
  }
}

/* Services */
.services {
  padding: 100px 0 250px 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 50px;
}
.service-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border-bottom: 4px solid transparent;
}
.service-card:hover {
  transform: translateY(-10px);
  border-bottom: 4px solid var(--primary-color);
}
.service-number {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: 700;
  margin: 0 auto 20px auto;
}

/* ส่วนที่ปรับปรุง: CTA Section ให้อยู่ตรงกลาง */
.cta-section {
  padding: 80px 0;
  text-align: center; /* จัดข้อความให้อยู่ตรงกลาง */
  background-color: var(--white);
}

.contact-cta {
  max-width: 600px;
  margin: 0 auto; /* จัด block ให้อยู่ตรงกลางหน้าจอ */
  padding: 40px;
  border-radius: 20px;
  /* background: var(--blue-bg); 
    box-shadow: var(--shadow); */
}

.cta-btns {
  display: flex;
  justify-content: center; /* จัดปุ่มให้อยู่กึ่งกลาง */
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap; /* ให้ปุ่มขึ้นบรรทัดใหม่ได้ถ้าจอเล็กเกินไป */
}

/* เพิ่มเติม: ส่วนช่วยแสดงโครงสร้างเพื่อให้เข้าใจง่าย */

/* FAB */
/* --- FAB Container & Main Button --- */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fab-main {
  width: 65px; /* ขนาดใหญ่ขึ้นเล็กน้อย */
  height: 65px;
  background: var(--primary-color);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
}

/* ลูกเล่นหมุนปุ่มหลักเมื่อ Active */
.fab-container.active .fab-main {
  transform: rotate(135deg);
  background: #ff3b30; /* เปลี่ยนเป็นสีแดงเมื่อกดปิด */
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

/* --- FAB Options (รายการปุ่มย่อย) --- */
.fab-options {
  position: absolute;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fab-container.active .fab-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* --- รายรายการปุ่มย่อย (ขยายใหญ่ขึ้นและใส่สี) --- */
.fab-option {
  width: 55px; /* ขนาดใหญ่ขึ้นกว่าเดิม */
  height: 55px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  font-size: 22px;
  transition: all 0.3s ease;
  position: relative;
}

/* เอฟเฟกต์เมื่อ Hover ปุ่มย่อย */
.fab-option:hover {
  transform: scale(1.15);
  color: white !important;
}

/* สีเฉพาะของแต่ละปุ่ม */
.fab-option[data-tooltip="โทร"] { color: #2ecc71; }
.fab-option[data-tooltip="โทร"]:hover { background: #2ecc71; }

.fab-option[data-tooltip="LINE"] { color: #06C755; }
.fab-option[data-tooltip="LINE"]:hover { background: #06C755; }

.fab-option[data-tooltip="Email"] { color: #ea4335; }
.fab-option[data-tooltip="Email"]:hover { background: #ea4335; }

/* --- Tooltip (คำอธิบายปุ่ม) --- */
.fab-option::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 70px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

.fab-option:hover::before {
  opacity: 1;
  right: 65px;
}

/* Mobile Support (Responsive) */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  } /* ซ่อนเมนูตัวอักษรบนมือถือ */

  .hero {
    min-height: 80vh;
    text-align: center;
    background-attachment: scroll !important; /* ปิด parallax บนมือถือเพื่อความลื่นไหล */
  }

  .hero::before {
    background: rgba(255, 255, 255, 0.8); /* Overlay ทั่วจออ่านง่ายกว่า */
  }

  .hero-text {
    margin: 0 auto;
  }

  .hero-btns {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .btn.secondary {
    margin-left: 0;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-waves {
    height: 60px;
  }
}

/* Container สำหรับฟองอากาศ ให้วางไว้ใน section ที่ต้องการ */
/* Container ฟองอากาศสำหรับใส่ใน Section */
.section-bubble-wrapper {
  position: absolute; /* ให้อยู่ในขอบเขตของ section ที่เป็น relative */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bubble-side {
  position: absolute;
  border-radius: 50%;

  opacity: 0.4;
  z-index: -1;
}

/* สีฟ้าเข้มและอ่อน */
.blue-light {
  background: radial-gradient(circle at 30% 30%, #e3f2fd, #bbdefb);
}
.blue-dark {
  background: radial-gradient(circle at 30% 30%, #64b5f6, #1976d2);
}

/* Footer */
.footer {
  background-color: #004a99;
  color: white;
  padding: 20px 0 30px 0; /* เพิ่ม padding บน เพื่อให้มีที่ว่างจากคลื่น */
  position: relative;
  /* margin-top: 50px; */
}

.footer-wave-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg); /* พลิกคลื่นกลับหัวเพื่อให้โค้งรับกับ footer */
}

.footer-wave-top svg {
  display: block;
  width: 100%;
  height: 80px;
}

.shape-fill-footer {
  fill: #ffffff;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  padding-top: 20px; /* เว้นระยะห่างจากตัวคลื่น */
}

.footer-logo {
  width: 60px; /* ปรับค่านี้ให้ใหญ่ขึ้นตามต้องการ เช่น 80px หรือ 100px */
  filter: brightness(0) invert(1);
}
.footer-text {
  flex: 1;
  text-align: center;
}

.footer-social-icons {
  display: flex;
  gap: 15px;
}
.footer-social-icons a {
  font-size: 1.5em;
  color: white;
  transition: 0.3s;
}
.footer-social-icons a:hover {
  color: #80c1ff;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* Sustainability & ESG Section */
.sustainability {
  padding: 100px 0 250px 0;
  background-color: var(--white);
}

.esg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.esg-card {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* เงาเริ่มต้นที่บางเบามาก */
  transition: all 0.5s ease; /* ใช้เวลา 0.5 วินาทีเพื่อให้การเคลื่อนไหวดูสมูท ไม่กระตุกสายตา */
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* เอฟเฟกต์ตอน Hover: เน้นความนิ่งแต่ดูมีมิติ */
.esg-card:hover {
  transform: translateY(-8px); /* ยกตัวขึ้นเบาๆ พอให้รู้ว่าเลือกอยู่ */
  box-shadow: 0 15px 35px rgba(0, 74, 153, 0.1); /* ใช้สีฟ้าเข้มที่คุณชอบทำเป็นเงาจางๆ */
  border-color: rgba(0, 119, 255, 0.15); /* ขอบชัดขึ้นเล็กน้อย */
}


.esg-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.esg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.esg-info {
  padding: 30px;
  text-align: center;
}

.esg-icon {
  font-size: 2.5rem; /* ขนาดใหญ่สะใจตามต้นฉบับ */
  margin-bottom: 20px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* เพิ่มจังหวะเด้งเบาๆ ตอน Hover */
  display: inline-block;
}

/* เมื่อ Hover ให้ไอคอนเด่นขึ้นเบาๆ */
.esg-card:hover .esg-icon {
  transform: scale(1.1); /* ขยายขึ้น 10% ให้ดูมีชีวิตชีวา */
}

/* หัวข้อ: ใช้สีเข้มเพื่อให้ชัดเจนแต่ไม่แข็งกระด้าง */
.esg-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 12px;
}

/* เนื้อหา: เพิ่มระยะห่างบรรทัดให้อ่านง่ายขึ้น */
.esg-info p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light); /* ใช้สีเทาที่คุณตั้งไว้เพื่อความซอฟต์ */
  padding: 0 15px;
}

/* ปรับสี Icon เฉพาะส่วนนี้ให้ดูรักษ์โลก */
.esg-card:nth-child(1) .esg-icon {
  color: #3498db;
} /* น้ำ */
.esg-card:nth-child(2) .esg-icon {
  color: #2ecc71;
} /* ใบไม้ */
.esg-card:nth-child(3) .esg-icon {
  color: #f1c40f;
} /* แดด */


/* ปรับแต่ง Icon Large ให้มีความวาวและสีสัน */
.esg-icon-large {
  font-size: 3.5rem;
  margin-bottom: 25px;
  display: inline-block;
  transition: all 0.5s ease;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

/* กำหนดสีเฉพาะให้แต่ละ Certification (เรียงตามลำดับ HTML ของคุณ) */
.esg-grid-4-col .esg-card:nth-child(1) .esg-icon-large { color: #0056b3; } /* FDA - Blue */
.esg-grid-4-col .esg-card:nth-child(2) .esg-icon-large { color: #27ae60; } /* GHPs - Green */
.esg-grid-4-col .esg-card:nth-child(3) .esg-icon-large { color: #e67e22; } /* HACCP - Orange */
.esg-grid-4-col .esg-card:nth-child(4) .esg-icon-large { color: #d4af37; } /* HALAL - Gold */

/* --- ลูกเล่นเวลา Hover --- */
.esg-card.no-border:hover {
  transform: translateY(-15px); /* ลอยขึ้นสูงขึ้นเล็กน้อย */
}

.esg-card.no-border:hover .esg-icon-large {
  transform: scale(1.2) rotateY(10deg); /* ขยายและบิดเล็กน้อยให้ดูมีมิติ */
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}



@media (max-width: 768px) {
  .esg-grid {
    grid-template-columns: 1fr;
  }
}

.clients {
  padding: 100px 0px 250px;
  /* background-color: var(--white); */
  overflow: hidden;
  user-select: none; /* ป้องกันการคลุมดำเวลาลาก */
}

.slider-container {
  margin-top: 40px;
  cursor: grab; /* เปลี่ยนรูปเมาส์เป็นมือจับ */
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.slider-container:active {
  cursor: grabbing; /* เปลี่ยนรูปเมาส์เมื่อกำลังลาก */
}

.client-track {
  display: flex;
  width: max-content; /* ให้ความกว้างพอดีกับจำนวนโลโก้ */
  will-change: transform; /* ช่วยให้การเคลื่อนไหวสมูทขึ้น */
}

.client-logo {
  width: 250px;
  padding: 0 40px;
  pointer-events: none; /* ป้องกันการลากรูปภาพออกจากเบราว์เซอร์ */
}

.client-logo img {
  max-width: 150px;
  /* filter: grayscale(100%); */
  opacity: 0.9;
}

/* Production Process Flow */

/* ปรับ Grid ให้เป็น 4 คอลัมน์ */
.esg-grid-4-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* บังคับ 4 คอลัมน์ */
  gap: 20px;
  margin-top: 40px;
}

/* เอา Border ออก และทำให้การ์ดเรียบๆ */
.esg-card.no-border {
  background: transparent !important; /* พื้นหลังโปร่งใส */
  box-shadow: none !important; /* เอาเงาออก */
  border: none !important; /* เอาเส้นขอบออก */
}

/* ขยายขนาดไอคอน */
.esg-icon-large {
  font-size: 3rem; /* ปรับขนาดไอคอนให้ใหญ่ขึ้น */
  color: var(--primary-color);
  margin-bottom: 20px;
}

/* ปรับ Responsive สำหรับหน้าจอมือถือ */
@media (max-width: 992px) {
  .esg-grid-4-col {
    grid-template-columns: repeat(2, 1fr); /* มือถือเหลือ 2 คอลัมน์ */
  }
}

@media (max-width: 576px) {
  .esg-grid-4-col {
    grid-template-columns: 1fr; /* จอเล็กมากเหลือ 1 คอลัมน์ */
  }
}

.production-process {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px dashed rgba(0, 119, 255, 0.2);
}

/* ตกแต่งหัวข้อให้ดูพรีเมียมขึ้น */
.process-title {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 50px;
  position: relative;
}

.process-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* ปรับปรุง Card ให้รองรับเนื้อหา */
.process-step {
  flex: 1;
  min-height: 280px; /* ให้ Card สูงเท่ากัน */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 35px 20px;
}

.step-content p {
  font-size: 0.9rem;
  color: #666;
  margin-top: 10px;
}

.process-flow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: nowrap;
}

.process-step:hover {
  transform: translateY(-5px);
  background: #e3f2fd;
}

.step-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 1.5rem;
}

.step-content h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.step-content p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-light);
}

.process-arrow {
  color: var(--primary-color);
  font-size: 1.2rem;
  opacity: 0.5;
}

/* Responsive สำหรับมือถือ */
@media (max-width: 992px) {
  .process-flow {
    flex-direction: column;
    gap: 20px;
  }
  .process-arrow {
    transform: rotate(90deg);
    margin: 5px 0;
  }
  .process-step {
    width: 100%;
    max-width: 400px;
  }
}

/* Responsive ปรับให้เรียงแถวเดียวบนมือถือ */
@media (max-width: 992px) {
  .quality-wrapper {
    grid-template-columns: 1fr !important;
  }
}

/* คุณภาพมาตรฐานสากล */
/* Cert Bar: เรียงแถวเดียว */
/* จัดการส่วน Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.cert-item {
  background: var(--white);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
  box-shadow: var(--shadow);
  border: 1px solid #e0e0e0;
}

/* จัดการรูปภาพกระบวนการผลิต */
.production-flow-section {
  margin-top: 50px;
}
.flow-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.flow-step {
  flex: 1;
}
.step-box {
  background: #ffffff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 2px solid var(--primary-color);
}
.arrow {
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: bold;
}

/* สำหรับมือถือ */
@media (max-width: 768px) {
  .flow-container {
    flex-direction: column;
  }
  .arrow {
    transform: rotate(90deg);
  }
}

/* Contact Section */
.contact-section {
  padding: 100px 0 0 0;
  background-color: var(--white);
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}
.sub-title {
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* Grid Layout */
.contact-grid {
  display: grid;
  /* ปรับจาก 280px เป็น 220px หรือ 240px */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
  gap: 20px; /* ลดช่องว่างระหว่างกล่องเล็กน้อยช่วยให้ประหยัดพื้นที่ */
  margin-bottom: 80px;
}
.contact-item {
  text-align: center;
  padding: 40px;
  background: #f9f9f9;
  border-radius: 20px;
  transition: 0.3s;
}
.contact-item:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-10px);
}

/* ตกแต่งไอคอน LINE เฉพาะในส่วน Contact */


/* หากต้องการให้ icon-box ของ LINE เป็นสีเขียวเด่นขึ้นมา */
.contact-item.line-phone .icon-box {
    background: rgba(0, 119, 255, 0.1); /* สีฟ้าจางๆ */
    color: #0077ff;
}
.contact-item.line-email .icon-box {
    background: rgba(255, 153, 0, 0.1); /* สีส้มจางๆ */
    color: #ff9900;
}
.contact-item.line-box .icon-box {
    background: rgba(6, 199, 85, 0.1); /* สีเขียวจางๆ เป็นพื้นหลังไอคอน */
    color: #06C755;
}
.contact-item.line-address .icon-box {
    background: rgba(255, 59, 48, 0.1); /* สีแดงจางๆ */
    color: #ff3b30;
}

/* สไตล์สำหรับปุ่มกด (ถ้ามี) */
.line-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #06C755;
    color: white !important;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.line-btn:hover {
    background-color: #05a346;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(6, 199, 85, 0.3);
}

.icon-box {
  width: 70px;
  height: 70px;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  transition: 0.3s;
}
.contact-item:hover .icon-box {
  background: white;
  color: var(--primary-color);
}

/* สำหรับหน้าจอคอมพิวเตอร์ (กว้างกว่า 1024px) */
@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(4, 1fr); /* บังคับให้มี 4 คอลัมน์ */
  }
}

/* สำหรับหน้าจอ Tablet (กว้าง 768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr); /* แสดง 2 แถว แถวละ 2 กล่อง จะดูสมดุลกว่า 3 แล้วตก 1 */
  }
}

/* สำหรับมือถือ (ต่ำกว่า 767px) */
@media (max-width: 767px) {
  .contact-grid {
    grid-template-columns: 1fr; /* แสดงแถวละ 1 กล่องเรียงลงมา */
  }
}

/* Map Section */
.map-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  filter: grayscale(50%) contrast(1.1);
}
.map-overlay-text {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 30px 50px;
  border-radius: 50px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 20px;
}
.btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

/* Responsive */
@media (max-width: 768px) {
  .map-overlay-text {
    width: 90%;
    flex-direction: column;
    text-align: center;
    border-radius: 20px;
  }
}

/* คลื่นสำหรับวางบนแผนที่ (คว่ำลง) */
.wave-divider-top {
  position: absolute;
  top: -79px; /* ปรับค่านี้ให้คลื่นไปวางอยู่เหนือ map-wrapper พอดี */
  left: 0;
  width: 100%;
  z-index: 2;
  line-height: 0;
  transform: rotate(180deg); /* พลิกกลับด้านเพื่อให้โค้งลงมา */
}

.wave-divider-top svg {
  display: block;
  width: 100%;
  height: 80px;
}

/* ตรวจสอบให้แน่ใจว่าสีคลื่นตรงกับพื้นหลังของหน้าเว็บ (ในกรณีนี้คือสีขาว) */
.shape-fill-white {
  fill: var(--white);
}

/* ปรับแต่ง map-wrapper เล็กน้อย */
.map-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  margin-top: 80px; /* เพิ่มระยะห่างเพื่อให้มีที่วางคลื่น */
}

/* เพิ่ม Animation สำหรับเลื่อนโลโก้ */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  } /* เลื่อนไปครึ่งหนึ่งของความกว้างทั้งหมด */
}

.slider-container {
  overflow: hidden; /* ซ่อนส่วนเกิน */
  width: 100%;
  cursor: grab;
}

.client-track {
  display: flex;
  width: max-content;
  animation: scroll 20s linear infinite;
}

/* หยุด Animation เมื่อมีคลาส paused */
.client-track.paused {
  animation-play-state: paused;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  } /* ต้องมีโลโก้ชุดที่ 2 ใน HTML เพื่อให้เนียน */
}

/* สร้าง Animation ชื่อ fade-up */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* คลาสสำหรับเรียกใช้งาน */
.animate-fade-up {
  animation: fade-up 1s ease-out forwards;
}

/* คลาสสำหรับรูปภาพที่ค่อยๆ ขยาย */
@keyframes zoom-in {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-zoom {
  animation: zoom-in 1.2s ease-out forwards;
}
