:root {
  --green: #1f2b26;
  --brown: #4a3728;
  --bg: #e9e3da;
  --card: #ffffff;
  --gold: #c9a44c;
  --text: #1c1c1c;
  --muted: rgba(0, 0, 0, .6);
  --radius: 18px;
  --shadow: 0 10px 22px rgba(0, 0, 0, .10);
  --max: 1100px;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Kanit', sans-serif;
  background-color: #E5E4E2;
  color: var(--text);
}

.container {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== HEADER (Green) ===== */
header.site-header {
  background: var(--green);
  color: #ffffff;
  padding: 20px 0;
  /* เพิ่มพื้นที่บน-ล่างเล็กน้อยให้ดูไม่อึดอัด */
}

.header-inner {
  display: flex;
  flex-direction: column;
  /* จัดให้ข้อความซ้อนกันในแนวตั้ง */
  align-items: center;
  /* จัดให้อยู่กึ่งกลางในแนวนอน */
  justify-content: center;
  text-align: center;
  /* gap: 10px; (เอาออกหรือเก็บไว้ก็ได้ ถ้าใช้ column มันจะเว้นระยะระหว่าง h1 กับ p) */
}

.header-title {
  font-weight: 800;
  letter-spacing: .5px;
  font-size: clamp(18px, 2.4vw, 28px);
  margin: 0;
  line-height: 1.2;
  /* ปรับให้ดูไม่ติดกันเกินไป */
}

.header-sub {
  margin: 8px 0 0;
  /* เว้นระยะห่างจากหัวข้อนิดหน่อย */
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

.gold {
  color: var(--gold);
}

/* --- ส่วนที่ 1: footer-blocks (ส่วนข้อมูล 4 คอลัมน์ด้านบน) --- */
.footer-blocks {
  background-color: #2b3628;
  /* หรือเปลี่ยนเป็น var(--green) ให้เข้ากับด้านล่าง */
  color: #ffffff;
  padding: 60px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  /* เส้นแบ่งจางๆ ก่อนถึงแถบลิขสิทธิ์ */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-column {
  flex: 1;
  min-width: 250px;
}

.footer-column h3 {
  color: #ffffff;
  /* สีทองที่เป็นเอกลักษณ์ของ TRONGJAI */
  font-size: 1.2rem;
  margin-bottom: 25px;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: 0.3s;
}

.footer-column ul li a:hover {
  color: #d4af37;
  padding-left: 5px;
}

/* ส่วนจัดการข้อมูลติดต่อในคอลัมน์ขวาสุด */
.contact-info p {
  margin-bottom: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contact-info i {
  color: #d4af37;
  margin-top: 5px;
  width: 20px;
}

/* --- ส่วนที่ 2: site-footer (แถบลิขสิทธิ์ด้านล่างสุดที่คุณใช้อยู่) --- */
footer.site-footer {
  background: var(--green);
  /* ใช้ตัวแปรสีเขียวของคุณ */
  color: #fff;
  padding: 20px 0;
  /* margin-top: 8px; เอาออกเพื่อให้ติดกับ footer-blocks */
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-inner b {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-inner small {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}


/* แถบ Navbar */

.navbar {
  background-color: #2b3628;
  height: 80px;

  /* ส่วนสำคัญที่ทำให้เลื่อนตาม */
  position: sticky;
  top: 0;
  /* ล็อคไว้ที่ขอบบนสุด */
  z-index: 2000;
  /* ให้ค่าสูงๆ ไว้เพื่อให้อยู่เหนือรูปภาพหรือเนื้อหาอื่นๆ */

  /* เพิ่มเงาเล็กน้อยเพื่อให้ดูมีมิติเวลาเลื่อนทับเนื้อหา */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar .container {
  max-width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  /* ตัวนี้จะดันโลโก้ไปซ้าย และเมนูไปขวาเอง */
  align-items: center;
  height: 100%;
  padding: 0 40px;
  position: relative;
  /* เก็บไว้เพื่อให้ dropdown อ้างอิงได้ */
  width: 100%;
}

.logo {
  position: static;
  /* ปลดล็อกจากการเป็น absolute */
  transform: none;
  /* ลบการตั้งค่าเยื้องกลางออก */
  z-index: 1001;
  display: flex;
  /* ช่วยให้จัดกึ่งกลางแนวตั้งในแถบได้ง่ายขึ้น */
  align-items: center;
}

.logo img {
  height: 220px;
  /* ขนาดที่คุณต้องการใน PC */
  width: auto;
  display: block;
  filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.3));
  transition: 0.3s ease;
  padding-top: 30px;
  /* ค่าเดิมที่คุณตั้งไว้ */
}

/* 3. เมนูชิดขวา */
.nav-links {
  list-style: none;
  display: flex;
  margin-left: auto;
}

.nav-links a {
  display: block;
  padding: 0 15px;
  line-height: 80px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

/* ส่วนที่เหลือคงเดิมตามที่คุณต้องการ */
.nav-links a:hover {
  color: #d4af37;
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-links li {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  list-style: none;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
  overflow: hidden;
  z-index: 1000;
}

.dropdown-content li a {
  padding: 12px 16px;
  font-size: 14px;
  color: #333333;
  border-bottom: 1px solid #f1f1f1;
  line-height: normal;
  text-align: left;
}

.dropdown-content li a:hover {
  background-color: #f8f8f8;
  color: #4a3728;
  padding-left: 20px;
}

.dropdown:hover .dropdown-content {
  display: block;
  animation: fadeInCenter 0.3s ease;
}


/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*                 หน้าIndex                    */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */

/* พื้นหลังมืดด้านหลัง Popup */
.popup-overlay {
  display: none;
  /* เริ่มต้นให้ซ่อนไว้ */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  /* สีดำโปร่งแสง */
  z-index: 9999;
  /* ให้อยู่บนสุดเหนือทุกอย่าง */
  justify-content: center;
  align-items: center;
}

/* กล่องเนื้อหา */
.popup-content {
  position: relative;
  max-width: 500px;
  /* ปรับขนาดความกว้างตามใจชอบ */
  width: 90%;
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  animation: popupScale 0.4s ease;
  /* ใส่ Animation ให้เด้งออกมาสวยๆ */
}

.popup-content img {
  width: 100%;
  height: auto;
  display: block;
}

/* ปุ่มปิด (X) */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: 0.3s;
}

.close-btn:hover {
  background: #d4af37;
  /* เปลี่ยนเป็นสีทองเวลาเอาเมาส์ชี้ */
}

/* Animation ขยายตัว */
@keyframes popupScale {
  from {
    transform: scale(0.7);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* การจัด Layout หลัก */
/* ขยาย Container ให้เต็มหน้าจอเพื่อให้ดันชิดขอบได้จริง */
.main-content.container {
  max-width: 100% !important;
  padding: 0 40px;
  width: 100%;
}

.content-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  /* ล็อคเส้นแบ่งไว้กลางจอ */
  padding: 40px 0;
  /* ลด padding ลงเพื่อให้กระชับขึ้น */
  width: 100%;
}

/* ฝั่งซ้าย: เนื้อหาชิดซ้ายสุด */
.article-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 50px;
}

/* เส้นแบ่งกึ่งกลาง */
.vertical-divider {
  width: 3px;
  height: 250px;
  background: linear-gradient(to bottom, transparent, #d4af37, transparent);
  opacity: 1;
  flex-shrink: 0;
}

/* ฝั่งขวา: รูปภาพชิดขวาสุด */
.article-image {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  /* ดันกลุ่มรูปไปชิดขวาสุด */
  gap: 0;
  /* ลบช่องว่างระหว่างรูปตามที่ต้องการ */
  padding-left: 50px;
}

.article-image img {
  width: 280px;
  /* ขนาดใหญ่เด่นชัด */
  height: 280px;
  object-fit: cover;
  /* เอา border ออกเพื่อให้รูปดูเชื่อมต่อกัน หรือเก็บไว้บางๆ */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  flex-shrink: 1;
}

/* เอฟเฟกต์ยกตัวแยกจากกันเฉพาะตอน Hover */
.article-image img:hover {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* ลบโค้งมนเฉพาะด้านในเพื่อให้รูปดูแนบชิดกัน (Optional) */
.article-image img:not(:first-child):not(:last-child) {
  border-radius: 0;
}

.article-image img:first-child {
  border-radius: 12px 0 0 12px;
}

.article-image img:last-child {
  border-radius: 0 12px 12px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1b4332;
  margin-bottom: 25px;
  line-height: 1.3;
}

.article-text {
  font-size: 1.05rem;
  color: #333333;
  line-height: 1.8;
  margin-bottom: 5px;
  margin-top: 5px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.feature-list li {
  margin-bottom: 10px;
  color: #333;
  font-weight: 500;
}

.feature-list i {
  color: #d4af37;
  /* สีทอง */
  margin-right: 10px;
}

/* ฝั่งวิดีโอ */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 45%;
  height: 0;
  overflow: hidden;
  /* มั่นใจว่าไม่มี margin บน-ล่าง */
  margin: 0 !important;
}

.video-container .video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* สำคัญ: ใช้ cover เพื่อให้วิดีโอยืดเต็มพื้นที่ที่เกือบเต็มนี้ */
  object-fit: cover;
  border: none;
}

/* Layer โปร่งใสทับวิดีโอ (กันคลิก) */

.video-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));

  /* เพิ่มมิติเล็กน้อย */

}

/* ซ่อน Controls สำหรับบราวเซอร์ต่างๆ */

.video-player::-webkit-media-controls {

  display: none !important;

}

.video-player::-webkit-media-controls-enclosure {

  display: none !important;

}

.video-player::-moz-media-controls {

  display: none !important;

}

.video-player::-ms-media-controls {

  display: none !important;

}

/* รูปใหญ่ใต้วิดีโอ */
.drag-slider {
  position: relative;
  width: 100%;
  /* เปลี่ยนจาก 100vw เพื่อป้องกันการล้น */
  height: 850px;
  overflow: hidden;
  cursor: grab;
  /* กำหนด margin ด้านล่างให้เป็น 0 เพื่อให้ชิดกับวิดีโอ */
  margin-bottom: 0 !important;
  display: block;
  /* ป้องกันช่องว่างที่เกิดจากพฤติกรรมของ inline element */
}

.drag-slider:active {
  cursor: grabbing;
  /* เปลี่ยนรูปมือเมื่อคลิกค้าง */
}

/* ซ่อนลูกศรออกตามคำขอ */
.slider-arrow {
  display: none;
}

.slider-inner {
  display: flex;
  height: 100%;
  transition: transform 0.1s ease-out;
  /* ให้ความรู้สึกนุ่มนวลเวลาลาก */
  will-change: transform;
}

.slide-item {
  flex: 0 0 100vw;
  /* ให้แต่ละรูปกว้างเต็มจอพอดี */
  height: 100%;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* รูปเต็มพื้นที่ไม่เบี้ยว */
  pointer-events: none;
  /* ป้องกันการลากรูปภาพของ Browser แทรกแซง */
}

/* จัดวางกลุ่มปุ่มโซเชียล */
.social-pills {
  display: flex;
  flex-wrap: wrap;
  /* เปลี่ยนจาก center เป็น flex-end เพื่อดันปุ่มไปชิดขวาสุด */
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  /* กำหนดระยะห่างจากขอบขวาตามความสวยงาม */
  padding: 0 40px;
  width: 100%;
  box-sizing: border-box;
}

/* สไตล์พื้นฐานของปุ่ม (ทรงแคปซูล) */
.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px;
  /* ปรับให้ดูเพรียวขึ้น (บน-ล่างน้อย, ซ้าย-ขวามาก) */
  border-radius: 50px;

  /* ปรับโทนสีให้ดูหรูขึ้น */
  background-color: #1f2b26;
  border: 1px solid #ffffff;
  /* เพิ่มเส้นขอบสีทองเพื่อให้แมตช์กับหัวเว็บ */
  color: #ffffff;
  /* เปลี่ยนตัวอักษรเป็นสีทองเพื่อให้ดูพรีเมียม */

  text-decoration: none;
  font-size: 0.85rem;
  /* ลดขนาดลงเล็กน้อยเพื่อให้ดูสะอาดตา */
  font-weight: 500;
  transition: all 0.3s ease;
}

.pill i {
  font-size: 1.1rem;
}

/* สีแต่ละโซเชียล */
.pill.fb {
  background-color: #1b4332;
}

.pill.line {
  background-color: #1b4332;
}

.pill.ig {
  background-color: #1b4332;
}

.pill.tiktok {
  background-color: #1b4332;
}

/* เอฟเฟกต์เวลา Hover */
.pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.why-trust-us-container {
  width: 100%;
  padding: 60px 0;
  text-align: center;
  background-color: #E5E4E2;
  margin-top: -40px;
}

.why-trust-us-container .section-title {
  margin-bottom: 20px;
  font-size: 2rem;
  color: #1b4332;
  /* สีเขียวเข้มตามแบรนด์ */
}

.feature-highlights {
  display: flex;
  justify-content: center;
  /* จัดกลุ่มรูปให้อยู่กลางจอ */
  align-items: center;
  gap: 0;
  /* หัวใจสำคัญ: กำหนดช่องว่างระหว่างรูปเป็น 0 */
  width: 100%;
  overflow: hidden;
  margin-top: -70px;
}

.feature-highlights img {
  /* กำหนดขนาดรูปให้เท่ากันเพื่อให้เรียงสวย */
  width: 350px;
  height: 350px;
  object-fit: cover;
  /* ป้องกันรูปบี้แบน */
  display: block;
  /* กำจัดช่องว่างเล็กน้อยที่ขอบล่างของรูป */

  /* ลบ border หรือปรับให้บางที่สุดเพื่อให้ดูเป็นเนื้อเดียวกัน */
  border: none;

  /* หากต้องการความพรีเมียม สามารถใส่โค้งมนแค่รูปแรกและรูปสุดท้ายได้ */
  transition: transform 0.3s ease;
}


/* ส่วนบริการของเรา */
.services-overview {
  padding: 40px 0;
  width: 100%;
  display: block;
  /* มั่นใจว่าเป็น Block ปกติ */
  clear: both;
  /* ป้องกันการโดนดึงจาก Float ด้านบน */
  margin-top: -70px;
}

/* จัดหัวข้อให้อยู่กึ่งกลางและสูงกว่ารูป */
.section-title.center {
  display: block;
  /* บังคับให้ครองพื้นที่เต็มบรรทัด */
  width: 100%;
  /* ขยายเต็มความกว้างหน้าจอ */
  text-align: center;
  /* จัดตัวอักษรไว้กึ่งกลาง */
  margin-bottom: 30px;
  /* ระยะห่างระหว่างหัวข้อกับกลุ่มรูปภาพ */
  font-size: 2.2rem;
  /* ขนาดตัวอักษร */
  color: #1b4332;
  /* สีเขียวเข้ม (ปรับตามแบรนด์คุณได้) */
}

/* ส่วนจัดการรูปภาพ 3 คอลัมน์ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* แบ่งเป็น 3 คอลัมน์เท่ากัน */
  gap: 20px;
  max-width: 1200px;
  /* จำกัดความกว้างไม่ให้รูปขยายจนแตก */
  margin: 0 auto;
  /* จัดกลุ่ม Grid ทั้งหมดไว้กลางหน้าจอ */
  padding: 0 20px;
}

/* การ์ดแต่ละใบ */
.service-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
  padding-bottom: 25px;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-img {
  height: 220px;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.service-card:hover .service-img img {
  transform: scale(1.1);
}

.service-name {
  margin: 25px 0 15px;
  color: #1b4332;
  font-size: 1.4rem;
  font-weight: 700;
}

/* รายการเนื้อหาใต้รูป */
.service-details {
  list-style: none;
  padding: 0 20px;
  margin: 0;
}

.service-details li {
  color: #666;
  margin-bottom: 10px;
  font-size: 0.95rem;
  position: relative;
}

/* ส่วนผลงานของเรา */
.portfolio-section {
  padding: 60px 0;
  /* เพิ่มพื้นที่บนล่างให้ดูไม่เบียด */
  width: 100%;
  display: block;
  margin-top: -70px;
}

/* หัวข้อหลัก: ใช้สไตล์เดียวกับ "บริการของเรา" */
.section-title.center {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  /* ลด margin เพื่อให้หัวข้อย่อยขยับขึ้นมาใกล้ */
  font-size: 2.2rem;
  color: #1b4332;
  position: relative;
}

.section-title.center::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  margin: 15px auto 0;
}

/* Grid จัดวางผลงาน: 3 คอลัมน์ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* สไตล์ไอเทมผลงาน */
.portfolio-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.3s;
}

.portfolio-img {
  position: relative;
  height: 280px;
  /* สูงกว่าส่วนบริการเพื่อให้เห็นงานชัดๆ */
  overflow: hidden;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.view-project {
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
}

/* ข้อมูลใต้รูป */
.portfolio-info {
  padding: 15px 0;
  text-align: center;
}

.project-name {
  font-size: 1.1rem;
  color: #1b4332;
  margin-bottom: 5px;
}

/* ปุ่มดูผลงานทั้งหมด */
.center-btn {
  text-align: center;
  margin-top: 40px;
}

.btn-primary {
  display: inline-block;
  background-color: #1b4332;
  color: #fff;
  padding: 12px 35px;
  border-radius: 50px;
  text-decoration: none;
  transition: 0.3s;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: #d4af37;
  transform: translateY(-3px);
}

.map-wrapper {
  width: 100%;
  padding: 60px 0;
  /* เพิ่มระยะบน-ล่างให้ดูโปร่ง */
  text-align: center;
  margin-top: -70px;
}

.address-title {
  color: #1b4332;
  font-size: 2.2rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.address-detail {
  color: #666;
  margin-bottom: 40px;
}

/* ปรับแต่งปุ่มให้ดูสวยและพรีเมียม */
.map-wrapper a {
  text-decoration: none;
  display: inline-block;
  margin-bottom: 30px;
  /* ลดระยะห่างลงเล็กน้อยให้ดูพอดี */
}

.map-wrapper button {
  /* ใช้สีเขียวเข้มแบรนด์เป็นพื้นหลัง */
  background: #1b4332;
  color: #ffffff;
  border: 1px solid #d4af37;
  /* เพิ่มเส้นขอบทองบางๆ ให้ปุ่มดูมีมิติ */
  padding: 14px 45px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-wrapper button:hover {
  /* เมื่อ Hover ให้เปลี่ยนเป็นสีทองและตัวอักษรสีเขียวเข้ม */
  background: #d4af37;
  color: #1b4332;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

/* ส่วนแผนที่รูปภาพ */
.map-section {
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
  /* ปรับความสูงลดลงให้ใกล้เคียงสัดส่วนรูปใหม่ */
  height: 580px;
  overflow: hidden;
  position: relative;
  border-radius: 15px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-section img {
  width: 100%;
  height: 100%;
  /* สั่งให้รูปยืดเต็มพื้นที่กรอบ 580px โดยสัดส่วนไม่เพี้ยน */
  object-fit: cover;
  object-position: center;
  display: block;
}




/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*                 หน้า about                   */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */

/* About Home Page Layout */
.about-page {
  padding: 60px 20px;
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* แบ่ง 3 คอลัมน์ */
  gap: 30px;
  margin-top: 40px;
}

/* สไตล์ของการ์ดแต่ละใบ */
.about-card {
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: 0.3s ease;
  display: block;
}

.about-card:hover {
  transform: translateY(-10px);
  /* ลอยขึ้นเมื่อ hover */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ส่วนรูปภาพในการ์ด */
.about-card-img {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.about-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

.about-card:hover .about-card-img img {
  transform: scale(1.1);
  /* ซูมรูปภาพเล็กน้อย */
}

/* Overlay ที่จะโชว์เมื่อเอาเมาส์ชี้ */
.about-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(74, 55, 40, 0.4);
  /* สีน้ำตาลโปร่งแสงตามธีม Navbar */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.3s ease;
}

.about-overlay i {
  color: #fff;
  font-size: 2rem;
  border: 2px solid #fff;
  padding: 15px;
  border-radius: 50%;
}

.about-card:hover .about-overlay {
  opacity: 1;
}

/* ข้อมูลใต้รูป */
.about-card-info {
  padding: 20px;
  text-align: center;
}

.about-card-info h3 {
  color: #1b4332;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* --- ส่วนภาพรวมของ Team Section --- */
.team-section {
  padding: 60px 0;

}

.team-title {
  text-align: center;
  font-size: 2.5rem;
  color: #1b4332;
  margin-bottom: 10px;
  font-weight: 700;
}

.team-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 50px;
  font-size: 1.1rem;
}

/* --- การจัดวาง Grid --- */
.team-grid {
  display: flex;
  justify-content: center;
  /* จัดการ์ดให้อยู่กึ่งกลาง */
  gap: 20px;
  padding: 0 20px;
  flex-wrap: nowrap;
  /* บังคับไม่ให้ขึ้นบรรทัดใหม่ */
}

.team-card {
  flex: 1;
  /* ให้การ์ดทุกใบมีความกว้างเท่าๆ กัน */
  min-width: 200px;
  max-width: 280px;
  /* คุมขนาดไม่ให้ใหญ่เกินไปจนดูไม่สวย */
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-bottom: 4px solid #d4af37;
  /* สีทองเมื่อเอาเมาส์วาง */
}

/* --- รูปภาพบุคลากร --- */
.team-image {
  width: 100%;
  height: 300px;
  /* กำหนดความสูงให้เท่ากันทุกรูป */
  overflow: hidden;
  background-color: #f0f0f0;
}

.team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* บังคับให้รูปเต็มกรอบโดยไม่เสียสัดส่วน */
  transition: transform 0.5s ease;
}

.team-card:hover .team-image img {
  transform: scale(1.05);
  /* ซูมรูปเล็กน้อยเมื่อ hover */
}

/* --- ข้อมูลชื่อและตำแหน่ง --- */
.team-info {
  padding: 20px;
}

.team-info h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #1b4332;
  font-weight: 600;
}

.team-info .position {
  color: #666;
  font-weight: 500;
  margin-top: 5px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- ปุ่มย้อนกลับ --- */
.back-btn-container {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 20px;
}

.btn-back-simple {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  transition: 0.3s;
  background: #1b4332;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
}

.btn-back-simple:hover {
  background: #d4af37;
  color: #fff;
  padding-left: 25px;
  /* เลื่อนไปทางขวาเล็กน้อย */
}

/* --- ส่วนภาพรวมของข้อมูลบริษัท --- */
/* 1. ส่วน Section (พื้นหลัง) */
.company-info-section {
  padding: 60px 0;
  /* ลด padding ลงเล็กน้อยให้ดูไม่โล่งเกินไป */
  min-height: 60vh;
}

/* 2. ส่วน Container (ตัวคุมความกว้าง) */
/* แก้จุดนี้: ใส่ margin: 0 auto เพื่อให้เนื้อหามาอยู่ตรงกลางหน้าจอ */
.company-info-container {
  max-width: 1000px;
  /* ขยับจาก 900px เป็น 1000px เพื่อให้ดูโปร่งขึ้นในหน้าจอใหญ่ */
  margin: 0 auto;
  /* สำคัญมาก! ตัวนี้จะทำให้เนื้อหาอยู่กึ่งกลาง */
  padding: 0 20px;
}

/* 3. ปรับ Title ให้ดูเป็นระเบียบ */
.company-title {
  text-align: center;
  font-size: 2.5rem;
  color: #1b4332;
  /* สีเขียวเดียวกับแบรนด์ */
  margin-bottom: 30px;
  font-weight: 700;
}

/* --- การ์ดครอบตาราง --- */
.company-card {
  background: #ffffff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* --- การจัดการตาราง --- */
.company-table {
  width: 100%;
  border-collapse: collapse;
  /* ยุบเส้นขอบเข้าด้วยกัน */
}

.company-table tr {
  border-bottom: 1px solid #eee;
  /* เส้นแบ่งแถว */
}

.company-table tr:last-child {
  border-bottom: none;
  /* แถวสุดท้ายไม่ต้องมีเส้น */
}

.company-table th {
  text-align: left;
  width: 30%;
  /* กำหนดความกว้างหัวข้อ */
  padding: 20px 15px;
  color: #4a3728;
  font-weight: 600;
  background-color: #fafafa;
  /* ไฮไลท์พื้นหลังหัวข้อนิดๆ */
}

.company-table td {
  padding: 20px 15px;
  color: #555;
  line-height: 1.6;
}

.company-table td a {
  color: #1b4332;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.company-table td a:hover {
  color: #d4af37;
  text-decoration: underline;
}

/* --- ส่วนภาพรวมของ History Section --- */
.company-history-section {
  padding: 80px 0;
  min-height: 70vh;
}

.company-history-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.history-title {
  text-align: center;
  font-size: 2.8rem;
  color: #1b4332;
  margin-bottom: 60px;
}

/* --- การจัดการรายการ Timeline --- */
.history-list {
  position: relative;
  padding-left: 50px;
  /* เว้นที่ด้านซ้ายสำหรับเส้น Timeline */
}


/* --- รายการปีแต่ละรายการ --- */
.history-item {
  position: relative;
  margin-bottom: 40px;
  padding: 20px 30px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: 0.3s ease;
}

.history-item:hover {
  transform: translateX(10px);
  /* เลื่อนขวานิดๆ เมื่อ Hover */
  box-shadow: 0 8px 25px rgba(74, 55, 40, 0.1);
}

/* จุดกลมบนเส้น Timeline */
.history-item::before {
  content: '';
  position: absolute;
  left: -42px;
  /* ดันออกไปทับเส้นแนวตั้ง */
  top: 25px;
  width: 15px;
  height: 15px;
  background: #fff;
  border: 3px solid #d4af37;
  border-radius: 50%;
  z-index: 1;
  transition: 0.3s;
}

/* ไฮไลท์สำหรับรายการที่ active หรือล่าสุด */
.history-item.active {
  border-left: 5px solid #d4af37;
}

.history-item.active::before {
  background: #d4af37;
  /* จุดทึบสีทองสำหรับรายการล่าสุด */
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* ตัวเลขปี */
.history-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d4af37;
  margin-bottom: 8px;
}

/* เนื้อหาประวัติ */
.history-text {
  color: #555;
  line-height: 1.7;
  font-size: 1.1rem;
}

.history-text strong {
  color: #4a3728;
}




/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*                 หน้า services                   */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
.services-section {
  padding: 80px 0;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.services-main-title {
  font-size: 2.5rem;
  color: #1b4332;
  margin-bottom: 50px;
  position: relative;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* เรียง 3 คอลัมน์ */
  gap: 30px;
  padding: 0 20px;
}

/* --- การ์ดบริการ (Service Item) --- */
.service-item {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: 0.3s ease;
  padding-bottom: 25px;
  border: 1px solid #eee;
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-link-wrapper {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* --- รูปภาพพรีวิว --- */
.service-thumbnail {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.service-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

.service-item:hover .service-thumbnail img {
  transform: scale(1.1);
}

/* --- หัวข้อและรายละเอียด --- */
.service-title {
  margin: 20px 0 15px;
  font-size: 1.6rem;
  color: #1b4332;
}

.service-features {
  list-style: none;
  padding: 0 20px;
  text-align: left;
  /* รายละเอียดชิดซ้ายเพื่อให้อ่านง่าย */
}

.service-features li {
  padding: 8px 0;
  color: #666;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.service-features li i {
  color: #d4af37;
  /* ไอคอนสีทอง */
  margin-right: 10px;
}


/* --- ส่วนหัวข้อบริการออกแบบ --- */
.services-home {
  padding: 60px 0 20px;
  text-align: center;
}

.services-home h2 a {
  text-decoration: none;
  color: #1b4332;
  font-size: 2.5rem;
  position: relative;
  padding-bottom: 10px;
}

/* --- การจัดการแถวเนื้อหาแบบสลับฝั่ง (Alternating Section) --- */
.alternating-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 80px;
}

/* บังคับให้แถวคู่ (แถวที่ 2, 4, 6...) สลับตำแหน่งรูปไปทางขวา */
.info-row:nth-child(even) {
  flex-direction: row-reverse;
}

.info-image {
  flex: 1;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  /* กำหนดความสูงของกรอบให้เท่ากัน (เลือกตัวเลขที่เหมาะสมกับดีไซน์ของคุณ) */
  height: 350px;
  display: flex;
  /* ช่วยให้รูปภาพจัดวางได้ดีขึ้นในบางกรณี */
}

.info-image img {
  width: 100%;
  height: 100%;
  /* บังคับให้รูปสูงเต็มกรอบ .info-image */
  display: block;
  object-fit: cover;
  /* สำคัญ: ทำให้รูปไม่เบี้ยวและเต็มกรอบ โดยการครอปส่วนเกินออก */
  object-position: center;
  /* จัดให้จุดกึ่งกลางของรูปอยู่ตรงกลางกรอบ */
  transition: transform 0.5s ease;
}

.info-row:hover .info-image img {
  transform: scale(1.05);
}

.info-text {
  flex: 1;
}

.info-text h2 {
  color: #1b4332;
  font-size: 1.8rem;
  margin-bottom: 20px;
  border-left: 5px solid #d4af37;
  padding-left: 15px;
}

.info-text p {
  color: #666;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* --- ส่วนแกลเลอรี (Gallery Section) --- */
.gallery-section {
  background-color: #E5E4E2;
  padding: 60px 0 0 0;
  /* คงไว้ตามเดิม */
  margin-bottom: 0;
  display: flex;
  /* ช่วยจัดการช่องว่างด้านล่างได้แม่นยำขึ้น */
  flex-direction: column;
}

.gallery-grid {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 0;
  line-height: 0;
  /* ป้องกันช่องว่างจิ๋วที่เกิดจาก inline elements */
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 0;
  height: 300px;
  /* บังคับความสูงให้เท่ากันทุกรูป */
  border: none;
  /* เอาเส้นขอบออกเพื่อให้ชิดกันสนิท */
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  /* บังคับให้รูปสูงเท่ากับ gallery-item */
  object-fit: cover;
  /* สำคัญ: ทำให้รูปเต็มกรอบโดยไม่เสียสัดส่วน */
  display: block;
  /* ลบช่องว่างด้านล่างของ tag <img> */
}

/* --- Modal ระบบขยายรูป --- */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 85%;
  max-height: 85%;
  border-radius: 5px;
  animation: zoomIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ขั้นตอนการทำงาน */
.process-section {
  /* สีพื้นหลังครีมนวล */
  padding: 80px 20px;
  text-align: center;
  /* ใช้ฟอนต์แบรนด์ */
  margin-top: -70px;
}

.process-container {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 50px auto 0;
  position: relative;
}

/* เส้นเชื่อมต่อระหว่างขั้นตอน */
.process-container::before {
  content: "";
  position: absolute;
  top: 50px;
  left: 5%;
  width: 90%;
  height: 2px;
  background-color: #1b4332;
  /* สีทอง */
  z-index: 1;
}

.process-item {
  position: relative;
  z-index: 2;
  flex: 1;
}

.process-circle {
  width: 100px;
  height: 100px;
  background-color: #1b4332;
  /* สีเขียวเข้มแบรนด์ */
  /* ขอบทอง */
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  transition: all 0.3s ease;
}

.process-item:hover .process-circle {
  transform: scale(1.1);
  background-color: #d4af37;
  /* เปลี่ยนเป็นสีทองเมื่อ Hover */
  color: #ffffff;
}



.process-item:hover .process-circle span {
  color: #1f2b26;
}

/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*                 หน้า portfolio                  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */

/* --- Portfolio Section Container --- */
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  /* ปรับจำนวนคอลัมน์ตามความกว้างหน้าจอ */
  gap: 30px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- การ์ดผลงานแต่ละชิ้น --- */
.portfolio-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  /* ลอยขึ้นเมื่อ hover */
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* --- ส่วนรูปภาพและ Overlay --- */
.portfolio-image {
  position: relative;
  height: 280px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* ขยายรูปเล็กน้อยเมื่อ hover */
.portfolio-item:hover .portfolio-image img {
  transform: scale(1.1);
}

/* Layer สีดำที่จะปรากฏเมื่อเอาเมาส์วาง */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 57, 50, 0.7);
  /* สีเขียวเข้มโปร่งแสงตามธีมปุ่มย้อนกลับ */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay span {
  color: #fff;
  border: 1px solid #fff;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 300;
}

.portfolio-item:hover .overlay {
  opacity: 1;
}

/* --- ส่วนข้อมูลด้านล่างรูป --- */
.portfolio-info {
  padding: 20px;
  text-align: left;
}

.portfolio-info h3 {
  margin: 0 0 10px 0;
  font-size: 1.25rem;
  color: #1b4332;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* ตัดคำถ้าชื่อยาวเกินไป */
}

.view-more {
  font-size: 0.9rem;
  color: #4a3728;
  /* สีทอง */
  font-weight: 500;
  display: inline-block;
  transition: 0.3s;
}

.portfolio-item:hover .view-more {
  letter-spacing: 1px;
  /* ขยับตัวอักษรเล็กน้อยเมื่อ hover */
  color: #d4af37;
}


/* สำหรับ Animation Reveal (ถ้าคุณใส่ JavaScript ไว้แล้ว) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* work------------------------------ */
/* --- โครงสร้างหลัก --- */
.project-detail-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.project-header h1 {
  font-size: 28px;
  color: #1b4332;
  margin: 0;
}

.social-share {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 15px;
}

.share-btn {
  width: 40px;
  /* เพิ่มขนาดขึ้นเล็กน้อยให้กดง่าย */
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;

  /* เปลี่ยนจากสีแบรนด์สดๆ เป็นโทนหรู */
  background: #1f2b26;
  /* สีเขียวเข้มจากธีมหลัก */
  color: #f1efe5;
  /* สีทองจากโลโก้ */


  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
}


.share-btn:hover {
  transform: translateY(-5px);
  /* ลอยขึ้นสวยๆ */
  background: #d4af37;
  /* สลับเป็นสีทองทึบตอน Hover */
  color: #1f2b26;
  /* ไอคอนเปลี่ยนเป็นเขียวเข้ม */
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
  /* เงาสีทองจางๆ */
}

/* --- รูปภาพหลัก --- */
.main-project-image img {
  width: 100%;
  border-radius: 8px;
  display: block;
  margin-bottom: 30px;
}

/* --- เนื้อหาโครงการ (ปรับให้ตารางอยู่บน รูปอยู่ล่าง) --- */
.project-content {
  display: flex;
  flex-direction: column;
  /* เปลี่ยนเป็นแนวตั้งเพื่อให้รูปย่อยอยู่ล่างตาราง */
  gap: 20px;
  align-items: start;
  margin-top: 30px;
}

.company-name {
  width: 100%;
  font-size: 18px;
  color: #1a4d2e;
  font-weight: bold;
  margin-bottom: 15px;
  border-bottom: 2px solid #1a4d2e;
  padding-bottom: 10px;
}

.info-table1 {
  width: 100%;
  /* ให้ตารางยืดเต็มความกว้าง */
  margin-bottom: 10px;
}

.info-row1 {
  display: grid;
  grid-template-columns: 150px auto;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.label1 {
  font-weight: 600;
  color: #333;
}

/* --- แกลเลอรีรูปย่อย (เรียงแนวนอนใต้ตาราง) --- */
.thumbnail-grid {
  width: 100%;
  /* ยืดพื้นที่รูปให้เต็มหน้า */
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.thumb-item {
  /* เรียงแถวละ 5 รูปตามตัวอย่างภาพที่ส่งมาล่าสุด */
  flex: 0 0 calc(20% - 10px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: 0.3s;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item:hover {
  border-color: #1a4d2e;
  transform: scale(1.03);
}

/* --- ส่วนผลงานอื่นๆ --- */
.other-works-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid #1a4d2e;
  /* เส้นคั่นหนาตามแบบ */
}

.random-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.random-item {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

.random-item:hover {
  transform: translateY(-5px);
}

.random-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
}

.random-item p {
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
}

/* Modal CSS */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 80%;
}

/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*                 หน้า ติดต่อเรา                */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/*  */
/* --- Contact Page Styles --- */
/* --- Contact Page Custom Style --- */
.contact-page {
  padding: 40px 15px;
}

.contact-container {
  display: flex;
  gap: 25px;
  margin-top: 30px;
}

/* การ์ดหลักฝั่งซ้าย */
.contact-main-card {
  flex: 2;
  background: #fff;
  padding: 35px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.contact-main-card h3 {
  color: #1a4d2e;
  font-size: 22px;
  margin-bottom: 5px;
}

.contact-subtitle {
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}

.contact-details {
  margin-bottom: 35px;
}

.detail-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.detail-item i {
  font-size: 18px;
  color: #333;
  margin-top: 5px;
}

.detail-item p {
  color: #555;
  margin: 0;
}

/* ปุ่มโซเชียลแบบ Grid */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.social-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid #eee;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  transition: 0.3s;
}

.social-button:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.social-button i {
  font-size: 24px;
}

.social-button.fb i {
  color: #1f2b26;
}

.social-button.line i {
  color: #1f2b26;
}

.social-button.ig i {
  color: #1f2b26;
}

/* ฝั่งขวา (QR Code) */
.contact-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qr-card {
  background: #fff;
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.qr-code img {
  width: 80%;
  margin: 15px 0;
}

.qr-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.qr-actions a {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.btn-open-line {
  background: #1f2b26;
  color: #fff;
}

.btn-open-fb {
  border: 1px solid #ddd;
  background: #1f2b26;
  color: #ffffff;
}

.contact-banner img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* ====================================================
   MOBILE FIX / RESPONSIVE
   วางไว้ท้ายไฟล์ CSS
======================================================*/

/* กัน element ใดๆ ดันจอล้น */

img,
video {
  max-width: 100%;
  height: auto;
}

/* ทำให้ container ไม่ดันล้น */
.container {
  width: min(var(--max), 100%);
}

/* --- Navbar: เพิ่มปุ่ม hamburger --- */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {

  /* --- จัดการ Slider ให้ปัดได้ด้วยนิ้ว --- */
  .drag-slider {
    height: auto !important;
    /* ให้ความสูงปรับตามรูปภาพ */
    overflow-x: auto !important;
    /* เปิดการสกロールแนวนอน */
    scroll-snap-type: x mandatory;
    /* บังคับให้รูปดีดเข้ากึ่งกลางจอ */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* ให้ปัดลื่นๆ ใน iPhone */
    cursor: default;
  }

  /* ซ่อน Scrollbar ของ Slider เพื่อความสวยงาม */
  @media (max-width: 900px) {

    /* --- 1. จัดการ Slider ให้สูงเท่ากับวิดีโอ (16:9) และชิดขอบ --- */
    .drag-slider {
      width: 100% !important;
      /* ใช้ aspect-ratio เพื่อให้สูงเท่ากับวิดีโอ 16:9 */
      aspect-ratio: 16 / 9 !important;
      height: auto !important;
      overflow-x: auto !important;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      margin: 0 !important;
      /* กำจัดระยะห่างภายนอก */
      padding: 0 !important;
      /* กำจัดระยะห่างภายใน */
      background: #000;
    }

    .drag-slider::-webkit-scrollbar {
      display: none;
    }

    .slider-inner {
      display: flex !important;
      transform: none !important;
      width: auto !important;
      height: 100% !important;
    }

    .slide-item {
      flex: 0 0 100% !important;
      width: 100vw;
      height: 100% !important;
      scroll-snap-align: start;
    }

    .slide-item img {
      width: 100% !important;
      height: 100% !important;
      /* ใช้ object-fit: cover เพื่อให้รูปเต็มพื้นที่เท่ากับวิดีโอพอดี */
      object-fit: cover !important;
      display: block;
      border-radius: 0 !important;
      /* ลบขอบมนออกเพื่อให้รอยต่อสนิท */
    }

    /* --- 2. จัดการส่วนวิดีโอให้ชิดขอบล่างของ Slider --- */
    .video-section {
      width: 100% !important;
      margin-top: 0 !important;
      /* บังคับให้ขอบบนติด Slider */
      padding: 0 !important;
      background: #000;
    }

    .video-container {
      position: relative;
      width: 100%;
      padding-bottom: 56.25% !important;
      /* สัดส่วน 16:9 */
      height: 0;
      overflow: hidden;
    }

    .video-player {
      position: absolute;
      top: 0;
      left: 0;
      width: 100% !important;
      height: 100% !important;
      object-fit: cover;
      display: block;
    }
  }
}

@media (max-width: 900px) {
  .drag-slider {
    overflow-x: auto;
    /* เปิดให้ปัดได้ */
    scroll-snap-type: x mandatory;
    /* บังคับให้รูปดีดเข้าที่ */
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* ซ่อน scrollbar */
    scrollbar-width: none;

  }

  .drag-slider::-webkit-scrollbar {
    display: none;
  }

  .slider-inner {
    transform: none !important;
    /* ยกเลิกการใช้ JS Transform บนมือถือ */
    display: flex;
    width: auto !important;
  }

  .slide-item {
    scroll-snap-align: start;
    /* จุดที่รูปจะดีดมาหยุด */
    scroll-snap-stop: always;
  }

  /* ซ่อนปุ่มลูกศรบนมือถือ */
  .slider-arrow {
    display: none !important;
  }

  .social-pills {
    /* ในมือถือ ถ้าปุ่มเยอะจนล้น จะเริ่มสกロールจากทางขวา */
    justify-content: flex-start;
    flex-direction: row-reverse;
    /* บังคับให้ปุ่มเกาะกลุ่มชิดขวา แต่เรียงลำดับจากขวามาซ้าย */
    padding: 15px 20px;
    gap: 8px;
  }

  .pill {
    padding: 6px 14px;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .feature-highlights {
    flex-direction: column;
    /* เรียงแนวตั้ง */
    align-items: center;
  }

  .feature-highlights img {
    max-width: 100%;
    /* เต็มความกว้างมือถือ */
  }
}

/* --- จัดการส่วนแผนที่ --- */
@media (max-width: 900px) {

  /* --- 1. แผนที่: ขยายให้เต็มขอบจอซ้าย-ขวา --- */
  .map-wrapper {
    padding: 20px 0 !important;
    /* นำ padding ซ้ายขวาออกเพื่อให้แผนที่ชนขอบ */
    width: 100% !important;
  }

  .address-title,
  .address-detail {
    padding: 0 20px;
    /* เพิ่ม padding ให้ตัวอักษรแทน เพื่อไม่ให้ชิดขอบจอ */
  }

  .map-wrapper a {
    display: block;
    padding: 0 20px;
    /* ให้ปุ่มมีระยะห่างจากขอบ */
    margin-bottom: 15px;
  }

  .map-section {
    width: 100% !important;
    height: auto !important;
    /* เปลี่ยนจาก 300px เป็น auto */
    border-radius: 0 !important;
    margin-top: 10px;
    background-color: #f4f4f4;
    /* เผื่อสีพื้นหลังถ้าสัดส่วนรูปไม่พอดีจอ */
  }

  .map-section img {
    width: 100% !important;
    height: auto !important;
    /* ให้ความสูงปรับตามรูปจริง */
    object-fit: contain !important;
    /* บังคับให้แสดงรูปครบทั้งใบ */
    display: block;
  }

  /* --- 2. ขั้นตอนการทำงาน: ปรับขนาดวงกลมให้พอดี (แถวละ 2) --- */
  .process-container {
    display: flex;
    flex-wrap: wrap;
    /* ยอมให้ขึ้นบรรทัดใหม่ */
    justify-content: center;
    gap: 20px 10px;
    /* ระยะห่าง บน-ล่าง และ ซ้าย-ขวา */
    padding: 20px 10px;
  }

  .process-item {
    flex: 0 0 calc(50% - 20px);
    /* บังคับให้ขนาดเป็น 50% ของหน้าจอ (แถวละ 2) */
    display: flex;
    justify-content: center;
  }

  .process-circle {
    width: 120px !important;
    /* ปรับขนาดวงกลมให้เล็กลงพอดีกับมือถือ */
    height: 120px !important;
    font-size: 14px !important;
    border-width: 3px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .step-content strong {
    font-size: 16px;
  }
}

/* --- สำหรับ PC (901px ขึ้นไป) --- */
@media (min-width: 901px) {
  .drag-slider {
    overflow: hidden;
    /* ปิดการปัดบน PC เพื่อให้ใช้ปุ่มแทน */
  }
}

/* ========== Breakpoint มือถือ ========== */
@media (max-width: 900px) {

  /* ลด padding ใน navbar */
  .navbar .container {
    padding: 0 16px;
  }

  /* แสดงปุ่ม hamburger */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    z-index: 1100;
  }

  /* เมนูแนวนอนเดิม -> กลายเป็น drawer */
  .nav-links {
    position: fixed;
    top: 80px;
    /* เท่าความสูง navbar */
    right: -320px;
    /* ซ่อนอยู่นอกจอ */
    width: 300px;
    max-width: 85vw;
    height: calc(100vh - 80px);
    background: #2b3628;
    box-shadow: -10px 0 25px rgba(0, 0, 0, .25);
    margin: 0;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: right .28s ease;
    overflow-y: auto;
    z-index: 1050;
  }

  /* เวลาเปิดเมนู */
  body.nav-open .nav-links {
    right: 0;
  }

  .nav-links a {
    line-height: normal;
    padding: 14px 14px;
    border-radius: 10px;
  }

  /* dropdown บนมือถือ: ไม่ใช้ hover ให้เปลี่ยนเป็นคลิก (เราจะทำด้วย JS ด้านล่าง) */
  .dropdown-content {
    position: static;
    transform: none;
    min-width: unset;
    box-shadow: none;
    border-radius: 10px;
    margin: 0 8px 8px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
  }

  .dropdown-content li a {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }

  .dropdown-content li a:hover {
    background: rgba(255, 255, 255, .08);
    color: #d4af37;
    padding-left: 20px;
  }

  /* กัน hover เปิดเองบนมือถือ */
  .dropdown:hover .dropdown-content {
    display: none;
  }
}

/* ========== ปรับ Grid/Layouts ให้ไม่ล้นบนมือถือ ========== */
@media (max-width: 900px) {

  /* 1. จัด Layout หลักให้เป็นแนวตั้ง */
  .content-layout {
    flex-direction: column !important;
    padding: 20px !important;
    text-align: center;
  }

  /* 2. ซ่อนเส้นแบ่ง (Vertical Divider) ไม่ให้แสดงบนมือถือ */
  .vertical-divider {
    display: none !important;
  }

  /* 3. จัดการส่วนบทความให้เต็มความกว้าง และเอา margin-bottom ออกเพราะไม่มีรูปต่อท้ายแล้ว */
  .article-section {
    padding: 0 !important;
    width: 100%;
    margin-bottom: 0 !important;
  }

  /* 4. แก้ไข: สั่งซ่อนส่วนรูปภาพทั้งหมด ไม่ให้แสดงผลในมือถือ */
  .article-image {
    display: none !important;
    /* ซ่อนรูปภาพ 3 รูปนี้ทันที */
  }

  .article-image img {
    width: 100% !important;
    /* ขยายเต็มความกว้างเพื่อให้ขอบชนกันพอดี */
    max-width: 100%;
    /* ปรับให้เต็มจอ */
    height: auto !important;
    display: block;
    /* ป้องกันช่องว่างเล็กๆ ใต้รูป (Baseline gap) */
    border-radius: 0 !important;
    /* ยกเลิกขอบมนเพื่อให้รอยต่อเรียบสนิท */
    box-shadow: none !important;
    /* ยกเลิกเงาเพื่อไม่ให้เห็นรอยแยกระหว่างรูป */
    margin: 0 !important;
  }


  .services-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    flex-wrap: wrap;
  }

  /* เดิม nowrap ทำให้ล้น */
  .team-card {
    max-width: 100%;
  }

  .footer-container {
    gap: 24px;
  }

  .footer-column {
    min-width: 100%;
  }

  .contact-container {
    flex-direction: column;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }

  .info-row {
    flex-direction: column;
  }

  .info-row:nth-child(even) {
    flex-direction: column;
  }

  .random-projects-grid {
    grid-template-columns: 1fr;
  }

  .thumb-item {
    flex: 0 0 calc(33.333% - 10px);
  }
}


@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .thumb-item {
    flex: 0 0 calc(50% - 10px);
  }

  /* จอเล็ก 2 ต่อแถว */
}



/* มือถือ/แท็บเล็ต */
@media (max-width: 900px) {

  .navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* ผลักปุ่มไปทางขวา */
    position: relative;
    height: 80px;
    padding: 0 16px;
  }


  /* เปลี่ยนโลโก้จาก absolute เป็นปกติบนมือถือ */

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    /* ดันไปขวาสุด */
    z-index: 1100;
    position: relative;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: calc(100vh - 80px);
    background: #2b3628;
    box-shadow: -10px 0 25px rgba(0, 0, 0, .25);
    margin: 0;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    transition: right .28s ease;
    z-index: 1050;
  }

  body.nav-open .nav-links {
    right: 0;
  }

  body.nav-open .nav-overlay {
    display: block;
  }

  .nav-links a {
    line-height: normal;
    padding: 14px 14px;
    border-radius: 10px;
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 1001;
  }

  .logo img {
    /* ปรับให้ขนาดพอดีกับแถบ 80px */
    height: 230px !important;
    /* เล็กลงเพื่อให้ดูแพงและสะอาดตา */
    width: auto !important;
    padding: 0 !important;
    /* ล้างค่า padding-top ของ PC ทิ้งให้หมด */
    padding-top: 35px !important;
    /* สำคัญมาก: ต้องเป็น 0 ไม่งั้นโลโก้เบี้ยวลงล่าง */
  }

  /* dropdown บนมือถือ: ทำให้เนียน + ไม่ใช้ hover เปิด */
  .dropdown:hover .dropdown-content {
    display: none;
  }

  .dropdown-content {
    position: static;
    transform: none;
    min-width: unset;
    box-shadow: none;
    border-radius: 10px;
    margin: 0 8px 8px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
    display: none;
    /* ปิดไว้ก่อน แล้วค่อยเปิดด้วย JS */
  }

  .dropdown-content li a {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }

  .dropdown-content li a:hover {
    background: rgba(255, 255, 255, .08);
    color: #d4af37;
  }

  .navbar {
    z-index: 3000;
  }
}

/* เมนู ในมือถือ ขีด 3ขีด */
@media (max-width: 900px) {

  /* 1. ปิด Hover เดิม */
  .dropdown:hover .dropdown-content {
    display: none !important;
  }

  /* 2. สร้าง Class สำหรับการกดเปิดเมนูย่อย */
  .dropdown.open>.dropdown-content {
    display: block !important;
    /* แสดงเมื่อมีการกด */
    position: static;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 5px;
  }

  /* 3. ปรับ Overlay ให้กดทะลุได้เฉพาะตอนปิด แต่ถ้าเปิดต้องรับแรงกดเพื่อปิดเมนู */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    /* ลดความเข้มจาก .45 เหลือ .2 เพื่อให้หน้าแรกสว่างขึ้น */
    background: rgba(0, 0, 0, 0.2) !important;
    z-index: 1500 !important;
    /* อยู่หลังเมนู แต่หน้าเนื้อหาเว็บ */
    backdrop-filter: blur(3px);
    /* เพิ่มความนวลตา */
    pointer-events: auto !important;
    /* ยอมให้คลิกเพื่อปิดเมนูได้ */
  }

  /* 4. แก้ไขเรื่อง z-index ให้ลำดับถูกต้อง */
  .nav-links {
    z-index: 1050 !important;
    pointer-events: auto !important;
  }

  .dropdown-content {
    z-index: 999999 !important;
    pointer-events: auto !important;
  }
}