body{
    margin: 0;
    padding: 0;
}
.tfoot{
  background-color: #ffd700;
  height: 150px;
}


.box-banner {
  background: linear-gradient(to bottom, #ffffff, #ffd700, #ffa200);
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 600px; /* เดสก์ท็อป */
}

.slider {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.slide.active {
  opacity: 1;
  position: relative;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 570px;
  object-fit: cover;
}

.slide-text {
  position: absolute;
  bottom: 150px;
  left: 150px;
  background: rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 20px;
  color: white;
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide-buttons {
  position: absolute;
  right: 150px;
  bottom: 150px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  z-index: 2;
}

.slide-buttons a {
  display: inline-block;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s;
}

.btn-detail {
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 2px solid #FFA200;
}

.btn-chat {
  background: #FFB300;
  color: #000;
}

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 2rem;
  color: #fff;
  background: linear-gradient(to bottom, #FFD90D, #FFA200);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.prev:hover, .next:hover {
  transform: translateY(-50%) scale(1.1);
}

.prev { left: calc(50% - 700px); }
.next { right: calc(50% - 700px); }

/* 📱 Responsive สำหรับจอเล็ก */
@media (max-width: 768px) {
  .box-banner {
    height: 400px; /* ลดความสูง */
  }

  .slide img {
    height: 400px;
  }

  .slide-text {
    bottom: 50px;
    left: 20px;
    font-size: 14px;
    padding: 8px 12px;
  }

  .slide-buttons {
    right: 20px;
    bottom: 50px;
    flex-direction: column; /* ปุ่มเรียงแนวตั้ง */
    gap: 8px;
  }

  .slide-buttons a {
    padding: 8px 12px;
    font-size: 14px;
  }

  .prev, .next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .prev { left: 10px; }
  .next { right: 10px; }
}

@media (max-width: 480px) {
  .box-banner {
    height: 300px;
  }

  .slide img {
    height: 300px;
  }

  .slide-text {
    bottom: 30px;
    left: 15px;
    font-size: 12px;
    padding: 6px 10px;
  }

  .slide-buttons {
    right: 15px;
    bottom: 30px;
    gap: 6px;
  }

  .slide-buttons a {
    font-size: 12px;
    padding: 6px 10px;
  }

  .prev, .next {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
}



/* -------------------------------------------------------- */
.ourpro {
  padding: 50px 20px;
  background-color: #fff;
  text-align: center;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center; /* ✅ จัดให้ underline อยู่กลาง */
  margin-bottom: 20px;
}

.underline {
  width: 80px;
  height: 7px;
  background-color: #FFD90D;
  margin-top: 5px;
  border-radius: 15px;

  /* เตรียมสำหรับ animation */
  transform-origin: left;  
  transform: scaleX(1);
  transition: transform 0.4s ease;
}

.header:hover .underline {
  transform: scaleX(2); 
}

.ourpro h1 {
  font-size: 2.5em;
  font-weight: bold;
  background: linear-gradient(to right, #FFD90D, #998208);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.ourpro p {
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
  color: #998208;
  font-size: 1.1em;
}

/* ------------------------------------ */
.type-service {
  padding: 40px;
  background-color: #fff;
}

.service-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* ✅ ปุ่มอยู่กลาง */
  gap: 15px;
}

.service-btn {
  background-color: #fff;
  border: 1px solid #ffcc00;
  color: #333;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.service-btn.active,
.service-btn:hover {
  background-color: #ffb700;
  color: #fff;
  border-color: #ffb700;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .ourpro {
    padding: 30px 15px;
  }

  .ourpro h1 {
    font-size: 2em;
  }

  .ourpro p {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .underline {
    width: 60px;
    height: 5px;
  }

  .service-btn {
    font-size: 0.9em;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .ourpro h1 {
    font-size: 1.6em;
  }

  .ourpro p {
    font-size: 0.9em;
  }

  .underline {
    width: 50px;
    height: 4px;
  }

  .service-buttons {
    flex-direction: column; /* ✅ ปุ่มเรียงลงแทนแถวเดียว */
    align-items: center;
  }

  .service-btn {
    width: 100%; /* ✅ ปุ่มเต็มความกว้างมือถือ */
    max-width: 280px;
    text-align: center;
  }
}

/* --------------------------------- */
.house-plan {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

.title {
  font-size: 2em;
  font-weight: bold;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* เดสก์ท็อป: 4 คอลัมน์ */
  gap: 20px;
}

.card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 350px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

/* hover effect */
.card:hover {
  transform: translateY(-8px);
  border: 2px solid #FFD90D;
  box-shadow: 0 0 20px 15px rgba(255, 206, 10, 0.3);
}

/* ปุ่มเปลี่ยนสีพร้อมกับ hover การ์ด */
.card:hover .card-footer button {
  background-color: #ffb700;
  color: #fff;
}

.card-footer button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #fff;
  border: 1px solid #ffcc00;
  color: #ffb700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}

.card-image {
  height: 50%;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.star {
  color: #ffb700;
  font-size: 1em;
}

.rating span:not(.star) {
  font-size: 0.9em;
  color: #555;
}

.card-footer button:hover {
  background-color: #ffb700;
  color: #fff;
}

.card-text h4 {
  margin: 0;
  font-size: 1rem;
}

.card-text p {
  margin: 5px 0 0;
  font-size: 0.9rem;
  color: #555;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr); /* แท็บเล็ต: 2 คอลัมน์ */
  }

  .card {
    height: 320px;
  }
}

@media (max-width: 600px) {
  .type-service {
    padding: 15px;
  }

  .service-title {
    font-size: 1.3em;
    text-align: center;
  }

  .service-buttons {
    justify-content: center;
    gap: 10px;
  }

  .service-btn {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  .grid-container {
    grid-template-columns: 1fr; /* 1 คอลัมน์ */
    gap: 15px;
  }

  .card {
    height: auto;
    border-radius: 12px;
  }

  .card-image {
    height: 200px; /* fix ความสูงรูปในมือถือ */
  }

  .card-body {
    padding: 10px;
  }

  .card-text h4 {
    font-size: 1rem;
  }

  .card-text p {
    font-size: 0.85rem;
  }

  .rating .star {
    font-size: 0.9em;
  }

  .card-footer button {
    font-size: 0.85em;
    padding: 6px 12px;
  }
  .underline {
    margin: 5px auto 0 auto; /* อยู่ตรงกลาง */
  }
}


/* ------------------------------- */

.arrow2 {
  display: block;   /* บังคับให้ svg ลงบรรทัดใหม่ */
  margin-left: 150px;
  margin-bottom: 50px;
}


.content-header {
  display: inline-block;
  cursor: pointer;
  margin-bottom: 30px;
  margin-left: 150px; /* ✅ ใช้เฉพาะ desktop */
}

.content-header h2 {
  font-size: 2em;
  font-weight: bold;
  color: #998208;
  margin: 0;
}

.underline1 {
  width: 80px;
  height: 7px;
  background-color: #FFD90D;
  margin-top: 5px;
  border-radius: 15px;
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 0.4s ease;
}

.header:hover .underline1 {
  transform: scaleX(2);
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .content-header {
    margin-left: 0;        /* ยกเลิก margin-left */
    display: block;        /* ให้กว้างเต็ม */
    text-align: center;    /* หัวข้อกับเส้นอยู่กลาง */
  }

  .content-header h2 {
    font-size: 1.6em;      /* ลดขนาด font */
  }

  .underline1 {
    margin-left: auto;
    margin-right: auto;    /* เส้นอยู่กลาง */
    width: 60px;           /* ลดความกว้าง */
    height: 5px;
  }
}

@media (max-width: 480px) {
  .content-header h2 {
    font-size: 1.4em;
  }

  .underline1 {
    width: 50px;
    height: 4px;
  }
}



/* ---------------------------------- */

.contentfa {
  padding: 50px 20px;
  background-color: #ffffff;
}

.content-header {
  display: inline-block;
  cursor: pointer;
  margin-bottom: 30px;
}

.content-header h2 {
  font-size: 2em;
  font-weight: bold;
  color: #998208;
  margin: 0;
  margin-left: 230px;
}

.underline1 {
  width: 80px;
  height: 7px;
  background-color: #FFD90D;
  margin-top: 5px;
  margin-left: 230px;
  border-radius: 15px;

  transform-origin: left; 
  transform: scaleX(1);
  transition: transform 0.4s ease;
}

.content-header:hover .underline1 {
  transform: scaleX(3.6);
}

.content-wrapper {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

a.content-box {
  display: block;
  width: 60vw;
  height: 70vh;     
  max-width: 600px;  
  max-height: 500px;
  background-color: #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
}

a.content-box img {
  width: 100%;
  height: 100%; 
  object-fit: cover; 
  display: block;
}

.content-box:hover {
  transform: scale(1.05) translateY(-5px);
  transition: transform 0.3s ease;
}

.content-box {
  display: block;
  width: 55vw;
  height: 70vh;     
  max-width: 500px;  
  max-height: 500px;
  background-color: #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
}

.content-box img {
  width: 100%;
  height: 100%; 
  object-fit: cover; 
  display: block;
}



/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .content-header h2 {
    margin-left: 0;       /* รีเซ็ต */
    text-align: center;   /* จัดกลาง */
    font-size: 1.5em;
  }

  .underline1 {
    margin-left: 0;       /* รีเซ็ต */
    margin: 5px auto 0;   /* จัดกลาง */
    display: block;
  }

  a.content-box {
    width: 100%;         /* เต็มจอมือถือ */
    height: auto;        /* ให้สูงตามสัดส่วนรูป */
    min-height: 200px;   /* กันไม่ให้เล็กเกิน */
  }
  
  .content-box {
    width: 100%;         /* เต็มจอมือถือ */
    height: auto;        /* ให้สูงตามสัดส่วนรูป */
    min-height: 200px;   /* กันไม่ให้เล็กเกิน */
  }
}

@media (max-width: 480px) {
  .content-header h2 {
    font-size: 1.2em;
  }

  .underline1 {
    width: 60px;
    height: 5px;
  }

  a.content-box {
    min-height: 150px;
  }
}


.Knowhouses {
  text-align: center;
  padding: 20px;
}

.Knowhouses h1 {
  font-size: 2.5em;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  font-weight: bold;
  background: linear-gradient(to right, #FFD90D, #998208);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.konetext {
  display: inline-block;
  cursor: pointer;
}

.underline2 {
  width: 80px;
  height: 7px;
  background-color: #FFD90D;
  margin-top: 5px;
  border-radius: 15px;
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 0.4s ease;
}

.konetext:hover .underline2 {
  transform: scaleX(2);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Desktop: 3 คอลัมน์ */
  gap: 40px;
  margin: 50px 100px 100px 100px;
}

.cards {
  background-color: white;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  transition: transform 0.2s;
}

.cards:hover {
  transform: translateY(-5px);
}

.cards-content {
  width: 100%;
  height: 330px;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 15px;
}

.cards-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
  border: 5px solid #FFD700;
}

.cards h3 {
  font-size: 1.2em;
  color: #998208;
  margin: 0;
  padding: 0 5px;
}

.cards-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 50px 0;
}

.btn-see-more {
  padding: 12px 30px;
  background-color: #ffffff;
  color: #FFA200;
  font-weight: bold;
  text-decoration: none;
  border: 2px solid;
  border-image: linear-gradient(to right, #FFD90D, #FFA200);
  border-image-slice: 1;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-see-more:hover {
  background-color: #FFA200;
  color: #ffffff;
  cursor: pointer;
  transform: translateY(-2px);
}

/* 📱 Responsive */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr); /* Tablet: 2 คอลัมน์ */
    margin: 40px 40px 80px 40px;
    gap: 30px;
  }

  .Knowhouses h1 {
    font-size: 2em;
  }

  .cards-content {
    height: 280px;
  }
}

@media (max-width: 600px) {
  .cards-grid {
    grid-template-columns: 1fr; /* Mobile: 1 คอลัมน์ */
    margin: 30px 15px 60px 15px;
    gap: 20px;
  }

  .Knowhouses h1 {
    font-size: 1.6em;
  }

  .underline2 {
    width: 50px;
    height: 4px;
  }

  .cards-content {
    height: auto; /* ให้ยืดตามรูป */
  }

  .cards h3 {
    font-size: 1em;
  }

  .btn-see-more {
    padding: 10px 20px;
    font-size: 0.9em;
  }
}
