body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

.tfoot{
  background-color: #ffd700;
  height: 150px;
  margin: 10px 10px 0 10px;
  border-radius: 15px;
}

/* ----------------banner and slider---------------- */
.box-banner {

  aspect-ratio: 3 / 1;
  width: calc(100% - 20px);
  margin: 10px 10px 0px 10px;
  background: linear-gradient(to bottom, #ffffff, #ffd700, #ffa200);

  /* ... ค่าเดิม ... */

  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
  border-bottom: 5px solid #cc8e00;
  display: flex;

  /* ✅ แก้ไข 1: เปลี่ยนการจัดวางจากกึ่งกลาง (center) เป็นเริ่มจากบน (flex-start) 
     เพื่อที่เราจะกำหนดระยะห่างเองได้แม่นยำกว่า */
  /* justify-content: center; */ /* อันนี้คงไว้ หรือลบก็ได้ เพราะ slider กว้าง 100% อยู่แล้ว */
  align-items: center; /* ให้คง center ไว้ เพื่อให้รูปอยู่กลางในแนวตั้งของพื้นที่ที่เหลือ */
  /* ✅ แก้ไข 2: เพิ่ม Padding ด้านล่าง */
  /*padding-bottom: 25px;*/
  /* ✅ แก้ไข 3: สำคัญมาก! ต้องใส่บรรทัดนี้ เพื่อไม่ให้ Padding ไปดันให้กล่องขยายใหญ่เกิน aspect-ratio */

  box-sizing: border-box;
}

.slider {
 display: flex;
 width: 100%;
 height: 100%;
 transition: transform 0.5s ease-in-out;
}

.slide {
 min-width: 100%;
 height: 100%;
 opacity: 0;
 position: absolute;
 top: 0;
 left: 0;
 transition: opacity 1s ease-in-out;
 display: flex;
 justify-content: center;
 align-items: center;
}

.slide img {
 /* ✅ 1. เปลี่ยนเป็นยึดความกว้างเป็นหลัก (เพื่อให้กว้างเกือบเต็มกรอบ) */
 width: 95%;
 /* ป้องกันรูปทะลุจอแนวนอน กรณีรูปยาวมากๆ */
 max-width: 100%;
 /* ✅ 2. เปลี่ยน height เป็น auto (เพื่อให้ความสูงปรับตามขนาดรูปจริง) */
 height: auto;
 /* จัดกึ่งกลาง */
 display: block;
 margin: auto;
 /* ✅ 3. ใส่ขอบมน (ตอนนี้จะเห็นผลแล้ว) */
 border-radius: 20px;
}

.slide.active {
  opacity: 1;
  position: relative;
}
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  background: rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  z-index: 10;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.prev:hover, .next:hover {
  background: rgba(0,0,0,0.6);
}

.prev { left: 20px; }
.next { right: 20px; }

.dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.9);
}

.active-dot {
  background: white;
}

/* ---------------- Responsive for Mobile ---------------- */
@media (max-width: 768px) {
  .box-banner {
    height: 350px;
    margin: 5px;
    border-radius: 8px;
  }

  .slide {
    top: 20px;
  }

  .slide img {
    width: 95%;
    height: auto;
    max-height: 250px;
    border-radius: 10px;
  }

  .prev, .next {
    font-size: 1.5rem;
    padding: 6px;
  }

  .prev { left: 10px; }
  .next { right: 10px; }

  .dots {
    bottom: 10px;
    gap: 6px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .box-banner {
    height: 200px;
  }

  .slide img {
    width: 100%;
    max-height: 200px;
  }

  .prev, .next {
    font-size: 1.2rem;
    padding: 5px;
  }
}


/* ------------------ สอบถามเพิ่มเติม ----------------- */
.diagonal {
  width: 90vw;
  height: 30vh;
  background: linear-gradient(to bottom, #ffa200, #ffa200);
  clip-path: polygon(0 0, 60% 0, 53% 100%, 0% 100%);
  margin-left: 10px;
  border-radius: 15px;
  margin-top: -10px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
  border-bottom: 5px solid #cc8e00;
}

.oter h5 {
  padding-top: 20px;
  padding-left: 120px;
  margin: 0;
  color: #ffffff;
  font-size: 1.5rem;
}

.oter h5 {
  padding-top: 20px;
  padding-left: 120px;
  margin: 0;
  font-size: 1.5rem;
}

.oter h5 a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.oter h5 a:hover {
  color: #FFD90D;
}


.left-yellow-line {
  width: 5%;
  border: none;
  height: 6px;
  background-color: #FFD90D;
  margin-left: 120px;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.oter:hover .left-yellow-line {
  width: 13%;
}

.conteat {
  display: flex;
  align-items: center;
  margin-top: 20px;
  color: white;
  flex-wrap: wrap;
  margin-left: 40px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: 'Kanit', sans-serif;
  font-size: 15px;
  width: 180px;
}
.contact-item3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: 'Kanit', sans-serif;
  font-size: 15px;
  width: 100px;
}

.contact-item i {
  color: white;
  font-size: 28px;
  margin-bottom: 8px;
}
.contact-item3 i {
  color: white;
  font-size: 28px;
  margin-bottom: 8px;
}

/* ---------------- Responsive diagonal ---------------- */
@media (max-width: 768px) {
  .diagonal {
    width: 95vw;
    height: auto;
    clip-path: none; /* ยกเลิกเอียง เพื่อไม่ให้บีบเนื้อหา */
    padding: 20px 10px;
    margin: 10px auto;
    border-radius: 10px;
  }

  .oter h5 {
    padding: 0;
    text-align: center;
    font-size: 1.3rem;
  }

  .left-yellow-line {
    margin: 10px auto;
    width: 20%;
  }

  .conteat {
    flex-direction: column;
    align-items: center;
    margin: 20px auto 0 auto;
  }

  .contact-item, .contact-item3 {
    width: 100%;
    margin-bottom: 15px;
    font-size: 14px;
  }

  .contact-item i,
  .contact-item3 i {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .oter h5 {
    font-size: 1.1rem;
  }

  .left-yellow-line {
    width: 30%;
  }

  .contact-item, .contact-item3 {
    font-size: 13px;
  }

  .contact-item i,
  .contact-item3 i {
    font-size: 22px;
  }
}


/* -------------------------services-------------------- */
.services {
  height: 700px;
  background-color: #ffffff;
  margin-top: 150px;
}

.service-title h3 {
  font-size: 30px;
  background: linear-gradient(to right, #FFD90D, #998208);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-align: center;
  
  /* --- เพิ่มบรรทัดนี้ --- */
  line-height: 1.5; /* หรือ 1.5 (ลองปรับค่าดู) */
}

.service-title p {
  font-size: 22px;
  color: #998208;
  text-align: center;
}

.serviceme h1{
  padding-top: 80px;
  padding-left: 120px;
  margin: 0;
  color: #988C8C;
  font-size: 1.5rem;
}

.left-yellow-line1 {
  width: 5%;
  border: none;
  height: 6px;
  background-color: #FFD90D;
  margin-left: 120px;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.serviceme:hover .left-yellow-line1 {
  width: 10%;
}

.serviceicon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 40px 20px;
  font-family: 'Kanit', sans-serif;
}

.service-row {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.service-item {
  width: 170px;
  text-align: center;
}

.service-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.service-item img {
  width: 150px;
  height: 140px;
  border: 5px solid #f5b800;
  border-radius: 50%;
  padding: 5px;
  background-color: white;
  box-sizing: border-box;
}

.service-item p {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
  line-height: 1.4;
}


/* ==========================================================
   ✅ START: โค้ดสำหรับปรับให้รองรับมือถือ (Responsive)
   ========================================================== */

@media (max-width: 768px) {

  .services {
    height: auto; /* 🔹 Key: ปรับความสูงอัตโนมัติ */
    margin-top: 50px; /* ลดระยะห่างจากส่วนบน */
    padding: 20px 0; /* เพิ่ม padding ให้มีพื้นที่หายใจ */
  }

  .service-title h3 {
    font-size: 24px; /* ลดขนาดฟอนต์ */
  }

  .service-title p {
    font-size: 16px;
    padding: 0 15px; /* เพิ่ม padding กันข้อความชิดขอบ */
  }

  .serviceme h1 {
    padding-top: 40px;
    padding-left: 0; /* 🔹 Key: เอา padding ด้านซ้ายออก */
    text-align: center; /* 🔹 Key: จัดให้อยู่กึ่งกลาง */
    font-size: 1.25rem;
  }

  .left-yellow-line1 {
    margin-left: auto; /* 🔹 Key: จัดเส้นให้อยู่กึ่งกลาง */
    margin-right: auto;
    width: 15%; /* ปรับความกว้างให้เห็นชัดขึ้น */
  }
  
  .serviceme:hover .left-yellow-line1 {
    width: 30%;
  }

  .serviceicon {
    gap: 20px;
    padding: 30px 10px;
  }

  .service-row {
    gap: 20px; /* 🔹 Key: ลดระยะห่างระหว่างไอคอน */
  }

  .service-item {
    width: 120px; /* 🔹 Key: ลดขนาด container ของไอคอน */
  }

  .service-item img {
    width: 100px; /* 🔹 Key: ลดขนาดรูปไอคอน */
    height: 100px;
  }

  .service-item p {
    font-size: 13px;
  }

}



/* ---------------------------top-houses------------------------- */
.top-houses {
  padding: 30px 20px;
  background-color: #F5F2EA;
  margin-top: 50px;
}

.homeh2 h2 {
  color: #988C8C;
  font-size: 1.5rem;
  position: relative;
  display: inline-block;
  margin: 100px 0 0 120px;
}

.left-yellow-line2 {
  width: 5%;
  border: none;
  height: 6px;
  background-color: #FFD90D;
  margin-left: 120px;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.homeh2:hover .left-yellow-line2 {
  width: 15%;
}

.slider-container {
  overflow: hidden;
  width: 100%;
  max-width: 1100px;
  margin: auto;
  position: relative;
  background-color: #F5F2EA;
}

.house-cards {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: auto;
  padding-bottom: 10px;
  cursor: grab;
  height: auto;
  align-items: flex-start;
}

.house-cards:active {
  cursor: grabbing;
}

.house-cards::-webkit-scrollbar {
  display: none;
}

.card {
  background: white;
  border: 3px solid transparent;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: 0.3s ease;
  min-width: 230px;
  max-width: 250px;
  height: auto;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
}

.card-image .info {
  position: relative;
  z-index: 2;
}

.card:hover {
  border-color: #ffd700;
  box-shadow: 0 0 10px #ffd700;
}

.card-image {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
}

/* overlay สีเหลืองจาง ๆ */
.card-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.737),
    rgba(255, 217, 0, 0.805)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-image:hover::after {
  opacity: 1;
}

/* คำอธิบายที่แสดงเมื่อ hover */
.hover-description {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  color: #000000;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.card-image:hover .hover-description {
  opacity: 1;
}

.card-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

/* ✅ กล่อง info ล่าง */
.card-image .info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ✅ Rating */
.card-image .rating {
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #FFD90D;
}

.card-image:hover .rating {
  color: #ffffff;
}

.card-image .inra{
  font-size: 0.85rem;
  color: #000;
}

/* ✅ ปุ่มอ่านเพิ่มเติม */
.card-image .btn {
  background: #ffffff;
  color: #333;
  padding: 5px 10px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes flash-twice {
  0%   { opacity: 1; }
  25%  { opacity: 0; }
  50%  { opacity: 1; }
  75%  { opacity: 0; }
  100% { opacity: 1; }
}

.btn:hover i {
  animation: flash-twice 0.8s ease-in-out 1;
}

/* ✅ Progress bar */
.slider-progress {
  margin-top: 20px;
  height: 8px;
  background: #eee;
  border-radius: 10px;
  width: 300px;
  margin-inline: auto;
  position: relative;
  cursor: pointer; 
}

.slider-progress .bar {
  width: 0%;
  background: #ffd700;
  height: 100%;
  border-radius: 10px;
  transition: width 0.1s linear;
}

/* ---------------- Responsive Top Houses ---------------- */
@media (max-width: 1024px) {
  .homeh2 h2 {
    font-size: 1.4rem;
    margin: 80px 0 0 60px;
  }

  .left-yellow-line2 {
    margin-left: 60px;
    width: 8%;
  }

  .slider-container {
    max-width: 95%;
    padding: 0 10px;
  }

  .card {
    min-width: 200px;
    max-width: 220px;
  }
}

@media (max-width: 768px) {
  .homeh2 h2 {
    font-size: 1.2rem;
    margin: 60px 0 0 20px;
  }

  .left-yellow-line2 {
    margin-left: 20px;
    width: 15%;
  }

  .slider-container {
    max-width: 100%;
    padding: 0 5px;
  }

  .card {
    min-width: 180px;
    max-width: 200px;
  }

  .card-image .hover-description {
    font-size: 0.6rem;
    bottom: 40px;
  }

  .card-image .btn {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .card-image .info {
    gap: 5px;
  }

  .card-image .rating,
  .card-image .inra {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .homeh2 h2 {
    font-size: 1rem;
    margin: 40px 0 0 10px;
  }

  .left-yellow-line2 {
    margin-left: 10px;
    width: 25%;
  }

  .card {
    min-width: 150px;
    max-width: 160px;
  }

  .card-image .hover-description {
    font-size: 0.55rem;
    bottom: 30px;
  }

  .card-image .btn {
    font-size: 0.65rem;
    padding: 3px 6px;
  }

  .card-image .info {
    gap: 4px;
  }

  .card-image .rating,
  .card-image .inra {
    font-size: 0.65rem;
  }

  .slider-progress {
    width: 80%;
  }
}


/*--------------------- custom-frame ------------------*/
.home-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: relative;
  margin-top: 80px;
}

  .custom-frame {
  width: 950px;
  height: 550px;
  position: relative;
  border-radius: 30px;
}

.notch-top-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 80px;
  background: rgb(255, 255, 255);
  border-bottom-right-radius: 30px;
}

.notch-bottom-right {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 250px;
  height: 80px;
  background: rgb(255, 255, 255);
  border-top-left-radius: 30px;
}

.image-inside {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
}

/* กล่องที่อยู่ข้างหน้ารูปภาพ */
.floating-box {
  position: absolute;
  top: calc(50% - 310px);
  left: calc(50% - 520px);
  width: 450px;
  height: 410px;
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  z-index: 3;
  font-weight: bold;
  font-size: 1.5rem;
  box-shadow: 
  0 -12px 10px -8px rgba(255, 217, 13, 0.6),   
  0 12px 10px -8px rgba(255, 217, 13, 0.6);   
}

.container::before {
  content: "";
  background: url('https://via.placeholder.com/600x400') no-repeat center;
  background-size: cover;
  opacity: 0.1;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #5c4a47;
  padding: 20px;
}

.content h2 {
  font-size: 24px;
  margin-bottom: 20px;
  background: linear-gradient(to right, #998208, #FFA200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.content p {
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 20px;
  color: #272626;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.buttons a {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 30px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.3s ease;
  text-decoration: none;
  font-weight: bold;
}

.buttons .detail-btn {
  background-color: white;
  color: #998208;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.buttons .chat-btn {
  background-color: white;
  color: #FFA200;
  border: 2px solid transparent;
  border-radius: 30px;
  background-image: 
    linear-gradient(white, white),
    linear-gradient(to bottom, #FFD90D, #FFA200);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.buttons a:hover {
  opacity: 0.8;
}

.floating-box2 {
  position: absolute;
  top: calc(50% - 320px);
  right: calc(50% - 400px);
  width: 170px;
  height: 70px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  z-index: 3;
  font-weight: bold;
  font-size: 1.5rem;
}

.content2 { display: flex; align-items: center; gap: 1rem; }
.content2 img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 10px; }
.content2 h2 { font-size: 1.5rem; font-weight: bold; color: #998208; margin: 0; line-height: 1; text-align: center; }
.content2 p { font-size: 0.7rem; color: #998208; margin: 0; line-height: 1; }

.floating-box3 {
  position: absolute;
  bottom: calc(50% - 180px);
  right: calc(50% - 550px);
  width: 210px;
  height: 70px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  z-index: 3;
  font-weight: bold;
  font-size: 1.5rem;
}

.content3 { display: flex; align-items: center; gap: 1rem; }
.content3 img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 10px; }
.content3 h2 { font-size: 1.5rem; font-weight: bold; color: #b8860b; margin: 0; line-height: 1; text-align: center; }
.content3 p { font-size: 0.7rem; color: #b8860b; margin: 0; line-height: 1; }


/* ==========================================================
   ✅ START: โค้ดสำหรับปรับให้รองรับมือถือ (Responsive)
   ========================================================== */

@media (max-width: 768px) {

  .home-frame {
    height: auto; /* 🔹 Key: ปรับความสูงอัตโนมัติ */
    margin-top: 30px;
    padding: 20px 15px;
    flex-direction: column; /* 🔹 Key: เปลี่ยน Layout หลักเป็นแนวตั้ง */
    gap: 25px; /* เพิ่มระยะห่างระหว่างแต่ละกล่อง */
  }

  /* กล่องข้อความหลัก */
  .floating-box {
    position: relative; /* 🔹 Key: ยกเลิกการลอยตัว */
    top: auto;
    left: auto;
    width: 100%; /* ทำให้กล่องเต็มความกว้าง */
    height: auto;
    order: 1; /* 🔹 Key: จัดลำดับให้กล่องนี้ขึ้นก่อน */
    background-color: rgba(255, 255, 255, 0.8); /* ทำให้พื้นหลังทึบขึ้นเล็กน้อย */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); /* ปรับเงาให้สวยงาม */
    padding: 25px;
    box-sizing: border-box;
  }

  .content h2 { font-size: 22px; }
  .content p { font-size: 15px; line-height: 1.6; }

  .buttons {
    flex-direction: column; /* ทำให้ปุ่มเรียงกันแนวตั้ง */
    gap: 12px;
  }
  .buttons a {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 12px 20px;
  }

  /* กรอบรูปภาพ */
  .custom-frame {
    width: 100%;
    height: auto; /* ปรับความสูงตามอัตราส่วนรูป */
    min-height: 250px;
    position: relative;
    order: 2; /* 🔹 Key: จัดลำดับให้รูปภาพอยู่ลำดับที่ 2 */
  }

  .notch-top-left, .notch-bottom-right {
    display: none; /* 🔹 Key: ซ่อนรอยบากที่ไม่จำเป็น */
  }
  
  .image-inside {
    min-height: 250px; /* กำหนดความสูงขั้นต่ำให้รูปด้วย */
  }

  /* กล่องข้อมูลย่อย */
  .floating-box2, .floating-box3 {
    position: relative;
    top: auto; right: auto; bottom: auto; left: auto;
    width: 100%;
    max-width: 300px; /* กำหนดความกว้างสูงสุดไม่ให้ใหญ่เกินไป */
    height: auto;
    padding: 15px;
    order: 3; /* 🔹 Key: จัดลำดับให้อยู่ท้ายสุด */
    box-sizing: border-box;
  }
  
  .content2, .content3 {
      gap: 15px;
  }

  .content2 h2, .content3 h2 {
    font-size: 1.3rem;
  }

  .content2 p, .content3 p {
    font-size: 0.75rem;
  }
}

/* -------------Our Technology------------------ */
.orutitel {
  text-align: center;
  margin-bottom: 100px;
}

.orutitel h3 {
  font-size: 30px;
  background: linear-gradient(to right, #B0970E, #996100);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.left-yellow-line3 {
  width: 80px; /* กำหนดความยาวคงที่ */
  border: none;
  height: 6px;
  background-color: #FFD90D;
  margin: 10px auto; /* จัดให้อยู่ตรงกลางอัตโนมัติ */
  border-radius: 10px;
}

.orutitel p {
  font-size: 22px;
  color: #875E5E;
}

.construction-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1250px;
  margin: 40px auto;
  margin-bottom: 100px;
}

.construction-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border-left: 4px solid #f6b400;
}

.construction-icon {
  margin-bottom: 10px;
  text-align: center;
}

.construction-icon img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.construction-card h3 {
  color: #875E5E;
  margin: 0 0 10px;
  font-size: 18px;
}

.construction-list { 
  padding: 0;
  list-style: none;
  margin: 0;
}

.construction-list li {
  margin-bottom: 8px;
  padding-left: 24px;
  position: relative;
  color: #875E5E;
}

.construction-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #FFD700;
  font-size: 20px;
  top: 0;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .construction-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 20px;
  }

  .orutitel h3 {
    font-size: 26px;
  }

  .orutitel p {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .construction-container {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .orutitel h3 {
    font-size: 22px;
  }

  .orutitel p {
    font-size: 16px;
  }

  .construction-card {
    padding: 15px;
  }
}


/* ---------------Why Choose Us------------------- */
.whychoose {
  font-size: 20px;
  background: linear-gradient(to right, #B0970E, #996100);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 150px;
}

.whychoose-container {
  max-width: 1000px;
  margin: 50px auto;
  padding: 0 20px;
  text-align: center;
}

.whychoose-container h2 {
  color: #f6b400;
  font-size: 22px;
  margin-bottom: 5px;
}

.whychoose-container h3 {
  font-size: 26px;
  margin: 0 0 50px;
  color: #d4a900;
}

.whychoose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  gap: 0;
}

/* เส้นตรงกลาง */
.whychoose-grid::before {
  content: "";
  position: absolute;
  top: 60px;
  height: 285px;
  left: 50%;
  width: 8px;
  border-radius: 15px;
  background-color: #FFD90D;
  transform: translateX(-50%);
  z-index: 1;
}

/* เส้นนอน (Desktop เท่านั้น) */
.whychoose-grid::after,
.whychoose-grid > :first-child::before,
.whychoose-grid > :nth-child(2)::after,
.whychoose-grid > :nth-child(2)::before {
  content: "";
  position: absolute;
  height: 8px;
  border-radius: 15px;
  background-color: #FFD90D;
  z-index: 1;
}

.whychoose-grid::after {
  top: 185px;
  left: 230px;
  width: 25%;
}

.whychoose-grid > :first-child::before {
  top: 185px;
  right: 230px;
  width: 25%;
}

.whychoose-grid > :nth-child(2)::after {
  top: 345px;
  left: 230px;
  width: 25%;
}

.whychoose-grid > :nth-child(2)::before {
  top: 345px;
  right: 230px;
  width: 25%;
}

.whychoose-item {
  padding: 20px 70px;
  text-align: center;
}

.whychoose-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}

.whychoose-item h4 {
  color: #f6b400;
  margin-bottom: 8px;
  font-size: 18px;
}

.whychoose-item p {
  color: #777;
  font-size: 15px;
  margin: 0;
}

.whychoose-item:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 600px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .whychoose {
    margin-left: 0;   /* ให้หัวข้ออยู่กึ่งกลางมือถือ */
    text-align: center;
  }

  .whychoose-container h2 {
    font-size: 18px;
  }

  .whychoose-container h3 {
    font-size: 20px;
    margin-bottom: 30px;
  }

  .whychoose-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .whychoose-item {
    padding: 15px 20px;
    border: none !important;
    border-top: 3px solid #f6b400;
  }

  .whychoose-item:first-child {
    border-top: none;
  }

  /* เอาเส้นตรง/เส้นนอนออก */
  .whychoose-grid::before,
  .whychoose-grid::after,
  .whychoose-grid > :first-child::before,
  .whychoose-grid > :nth-child(2)::after,
  .whychoose-grid > :nth-child(2)::before {
    display: none;
  }
}


/* ---------------section------------------- */
.section-container {
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
  border: 2px solid #f6b400;
  border-radius: 10px;
  overflow: hidden;
}

.section-content {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 20px;
}

.left-content {
  flex: 1 1 350px;
}

.left-content h2 {
font-size: 26px;
font-weight: bold;
color: #f6b400;
margin-bottom: 15px;
}

.left-content h2 span {
  color: #ff9900;
}

.left-content p {
  margin: 10px 0 20px;
  font-size: 16px;
  color: #444;
  line-height: 1.5em;
}

.arrow-icon {
  color: #f6b400;
  font-size: 22px;
  margin-right: 8px;
}

.image-box {
  margin-bottom: 20px;
}

.image-box img {
  max-width: 100%;
  border-radius: 10px;
  display: block;
}

.button-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 25px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
}

.btn-primary {
  background: #fff;
  color: #f6b400;
  border: 2px solid #f6b400;
}

.btn-primary:hover {
  background: #f6b400;
  color: #fff;
}

.btn-secondary {
  background: #f6b400;
  color: #fff;
  border: none;
}

.btn-secondary:hover {
  background: #d49a00;
}

.right-content {
  flex: 1 1 350px;
  display: flex;
  align-items: center;
}

.right-content img {
  max-width: 100%;
  border-radius: 10px;
  display: block;
}

.bottom-bar {
  border-top: 2px solid #f6b400;
  padding: 15px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  font-size: 14px;
}

.bottom-bar .contact-btn {
  background: #fff;
  border: 2px solid #f6b400;
  color: #f6b400;
  border-radius: 15px;
  padding: 5px 15px;
  font-weight: 500;
}

.bottom-bar .contact-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  color: #555;
}

.contact-info div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon {
  color: #f6b400;
}

/* ---------------ModHou------------------- */
.ModHou-container {
  position: relative;
  width: 1242px;
  height: 668px;
  border-radius: 30px;
  overflow: hidden;
  color: rgb(0, 0, 0);
  padding: 20px 0 0 100px;
  box-sizing: border-box;
  margin: 0 auto;
}

.frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 600px;
  pointer-events: none;
  z-index: 1;
}

.top-left-text {
  position: relative;
  z-index: 2;
}

.top-left-text h1 {
  font-size: 32px;
  background: linear-gradient(to right, #998208, #FFA200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  margin: 20px 0 10px 0;
}

.top-left-text p {
  font-size: 22px;
  color: #875E5E;
  margin: 0;
  line-height: 1.6;
  z-index: 10; 
}

.highlight-icon {
    font-size: 40px;
    color: #FBC02D;
}

.bottom-images {
  position: absolute;
  top: 200px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  padding: 0 60px;
  z-index: 2;
}

.Left-Image{
  width: 400px;
  height: auto;
  border-radius: 10px;
}

.Right-Image {
  width: 450px;
  height: auto;
  border-radius: 10px;
}

.ModHou-container .btn-additional-info,
.ModHou-container .btn-chat-inquiry {
  padding: 0.75rem 2.5rem;
  border-radius: 9999px;
  font-size: 1.25rem;
  border: 4px solid #FBC02D;
  margin-top: 300px;
}

.ModHou-container .btn-additional-info {
  background-color: white;
  color: #FBC02D;
  text-decoration: none;
}

.ModHou-container .btn-chat-inquiry {
  background-color: #FBC02D;
  color: #998208;
  text-decoration: none;
}

.bottom-btnwhy {
  position: relative;
  margin-top: 300px;
  z-index: 9999;
  text-decoration: none;
}

.floating-boxcon {
  position: absolute;
  bottom: 45px; 
  right: 60px;
  width: 700px;
  min-height: 130px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  border: 1px solid #FBC02D;
  z-index: 3;
  font-size: 1.5rem;
  font-family: 'Kanit', sans-serif;
}

.floating-boxcon .contact-itemcon {
  display: flex;
  align-items: center;
  text-align: center;
  font-size: 32px;
  width: 180px;
  margin-left: 12px;
  color: #998208;
}

.floating-boxcon .contact-icon {
  width: 40px;
  height: 40px;
  color: #FBC02D;
}

.floating-boxcon .contact-info {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  color: #333;
}

.floating-boxcon .contact-label {
  font-size: 1rem;
  color: #000000;
  white-space: nowrap;
}

.floating-boxcon .contact-text {
  font-size: 13px;
  color: #998208;
}

.floating-boxcon .contact-itemcon,
.floating-boxcon .contact-address {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 20px;
}

.floating-boxcon .contact-address {
  width: auto;
}

.floating-boxcon .address-placeholder {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 150px;
}

.floating-boxcon .fa-phone-alt,
.floating-boxcon .fa-envelope,
.floating-boxcon .fa-map-marker-alt {
  color: #FBC02D;
  font-size: 28px;
}

.icon-label {
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* ==========================================================
   ✅ START: โค้ดสำหรับปรับปรุงดีไซน์มือถือ (Responsive)
   ========================================================== */

@media (max-width: 768px) {

  /* --- 🎨 [ปรับปรุง] .section-container --- */
  .section-container {
    margin: 30px 15px;
    padding: 0;
  }
  .section-content {
    flex-direction: column;
    padding: 20px;
    gap: 30px;
  }
  .left-content h2 {
    font-size: 24px;
    text-align: center;
  }
  .left-content p {
    font-size: 16px;
    text-align: center;
  }
  .button-group {
    justify-content: center;
  }
  .bottom-bar {
    padding: 20px;
    flex-direction: column;
    gap: 20px;
  }
  .bottom-bar .contact-info {
    justify-content: center;
    gap: 15px 25px;
  }

  /* --- 🎨 [ปรับปรุง] .ModHou-container --- */
  .ModHou-container {
    width: auto;
    height: auto;
    padding: 25px 20px;
    border-radius: 20px;
    margin: 30px 15px;
    overflow: visible;
  }
  .top-left-text {
    text-align: center;
    margin-bottom: 25px;
  }
  .top-left-text h1 {
    font-size: 26px;
  }
  .top-left-text p {
    font-size: 16px;
  }

  .bottom-images {
    position: relative;
    top: auto;
    left: auto;
    flex-direction: row; /* 🔹 Key: เปลี่ยนเป็นแนวนอน */
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-top: 0;
    gap: 10px; /* 🔹 Key: เพิ่มระยะห่างระหว่างรูป */
  }

  .Left-Image, .Right-Image {
    width: 48%; /* 🔹 Key: ลดขนาดรูป */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }

  .bottom-btnwhy {
  display: flex;
  flex-direction: row; /* ✅ Key: เปลี่ยนเป็นแนวนอน */
  justify-content: center; /* จัดให้อยู่กลาง */
  align-items: center;
  gap: 15px;
  margin-top: 30px;

  }
  .ModHou-container .btn-additional-info,
  .ModHou-container .btn-chat-inquiry {
    margin-top: 0;
    width: auto; /* ✅ Key: ให้ความกว้างพอดีกับเนื้อหาและ padding */
    flex-shrink: 0; /* ป้องกันปุ่มถูกบีบ */
    font-size: 1rem;
    text-align: center;
    padding: 0.7rem 1.5rem;
  }
  
  .floating-boxcon {
    position: relative;
    bottom: auto; right: auto;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    margin-top: 30px;
    gap: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    box-sizing: border-box;
  }
  .floating-boxcon .contact-itemcon,
  .floating-boxcon .contact-address {
    flex: 1 1 200px;
    margin-right: 0;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 8px;
  }
  .icon-label {
    flex-direction: row;
    gap: 10px;
  }
  .floating-boxcon .contact-text {
    font-size: 14px;
  }
  .frame {
    display: none;
  }
}


/* ---------------example-home------------------- */
.example-home {
  margin-top: 100px;
}

.example-text {
  text-align: center;
  margin-bottom: 30px;
}

.example-text h1 {
  font-size: 32px;
  background: linear-gradient(to right, #FFA200, #996100);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.example-text p {
  font-size: 18px;
  color: #875E5E;
}

.example {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* เดิม fix → ให้ยืดได้ */
  margin: 0;
  background-color: #FCC900;
  padding: 20px 0;
}

.grid-container {
  display: grid;
  grid-template-columns: 2fr 1.5fr 2fr;
  grid-template-rows: repeat(3, 200px);
  gap: 10px;
  width: 900px;
  max-width: 100%;
}

.item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Overlay */
.item .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(254, 232, 107, 0.6); 
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 60px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item:hover img {
  transform: scale(1.05);
}

.item:hover .overlay {
  opacity: 1;
}

/* ปุ่ม See More */
.overlay button {
  background: #FFA200;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.overlay button:hover {
  background: #ff8400;
}

/* Badge */
.circle-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: #FFD90D;
  color: #000;
  font-weight: bold;
  font-size: 14px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background-color 0.3s, transform 0.2s;
}

.circle-badge:hover {
  background-color: #e6c208;
  transform: scale(1.05);
}

/* Grid layout Desktop */
.item1 { grid-column: 1 / 2; grid-row: 1 / 3; }
.item2 { grid-column: 2 / 3; grid-row: 1 / 2; }
.item3 { grid-column: 3 / 4; grid-row: 1 / 3; }
.item4 { grid-column: 2 / 3; grid-row: 2 / 3; }
.item5 { grid-column: 1 / 2; grid-row: 3 / 4; }
.item6 { grid-column: 2 / 4; grid-row: 3 / 4; }

/* ✅ Responsive */
@media (max-width: 992px) {
  .grid-container {
    grid-template-columns: 1fr 1fr; /* Tablet → 2 คอลัมน์ */
    grid-template-rows: auto;
    width: 100%;
  }

  .item {
    height: 250px; /* fix ความสูงพอเหมาะ */
  }

  /* ยกเลิกตำแหน่งซ้อน */
  .item1, .item2, .item3, .item4, .item5, .item6 {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr; /* Mobile → 1 คอลัมน์ */
    gap: 15px;
  }

  .item {
    height: 220px;
  }

  .example-text h1 {
    font-size: 24px;
  }

  .example-text p {
    font-size: 16px;
  }

  .overlay button {
    font-size: 12px;
    padding: 8px 14px;
  }

  .circle-badge {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }
}


/* ---------------contect-bt------------------- */
.contect-bt{
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  height: 50vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-btn {
  background: linear-gradient(180deg, #F9D038 0%, #F5AE23 100%);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 1rem 3rem;
  border-radius: 9999px;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-decoration: none;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
}

/* ----- New CSS for the floating contact button and menu ----- */
.floating-contact-container {
  position: fixed;
  bottom: 10rem;
  right: 2rem;
  z-index: 100;
}

.floating-main-btn {
  background: linear-gradient(180deg, #F9D038 0%, #F5AE23 100%);
  color: white;
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.floating-main-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
}

.floating-menu {
  position: absolute;
  bottom: 5rem; /* Position above the main button */
  right: 0;
  display: none; /* Initially hidden */
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.floating-menu.active {
  display: flex;
}

.floating-main-btn i {
  color: white;
  font-size: 32px; /* ให้ใกล้เคียงขนาด SVG เดิม */
}

       
.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-text {
  background-color: #AEAEAE;
  color: #333;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  
  /* ซ่อนข้อความตอนปกติ */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px); /* ขยับนิดหน่อยเพื่อให้มี effect */
  transition: all 0.2s ease-in-out;
}

/* โชว์ข้อความเมื่อ hover */
.menu-item:hover .menu-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.menu-btn {
  background-color: white;
  color: #F5AE23;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 15px; /* 🔹 เปลี่ยนจาก 50% เป็น 0 เพื่อทำให้เป็นสี่เหลี่ยม */
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.menu-btn img {
  width: 80%;    /* ปรับให้เต็มกรอบประมาณ 70% ของปุ่ม */
  height: 80%;
  object-fit: contain; /* ป้องกันรูปบิดเบี้ยว */
}

.menu-btn:hover {
  transform: scale(1.1);
}