body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}
p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #333;
    text-align: justify;
    text-indent: 2em;
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 60vh; /* ขนาดความสูงของ Hero Section */
    min-height: 300px;
    max-height: 700px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* เพิ่มเงา */
    z-index: 1;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
    transform: scale(1.1); /* ซูมเล็กน้อย */
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1); /* กลับสู่ขนาดปกติ */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    filter: brightness(0.8); /* ทำให้ภาพดูเข้มขึ้น */
    transition: transform 1.5s ease-in-out, filter 1.5s ease-in-out;
}

.carousel-slide.active img {
    filter: brightness(1); /* ทำให้ภาพสว่างเมื่อแสดงผล */
}

.service-card:hover, .products-card:hover,.customer-card:hover, .slide img:hover{
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
/* ข้อความใน Hero Section */
.hero-text {
    position: absolute;
    z-index: 10;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); /* เพิ่มมิติให้ข้อความ */
    animation: fadeInUp 1.5s ease-in-out;
}

.hero-text h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: bold;
}

.hero-text p {
    font-size: 1.2rem;
    margin: 10px 0 0;
}

/* เพิ่ม Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.services {
    padding: 1rem 1rem;
    text-align: center;
    background: #f9f9f9;
    min-height: 600px;
}

.services h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.service-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-height: none;
    padding-bottom: 20px;
}

.service-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px;
    width: 100%;
    max-width: 400px;
    text-align: left;
}

.service-card p {
  font-size: 15px;
  color: #333;
  line-height: 1.8;
  text-align: justify;
  text-indent: 2em;
  margin-bottom: 15px;
  word-break: break-word;
}

.service-card p > span:first-child,
.service-card p > strong:first-child {
  display: inline-block;
}

.service-card p::first-letter {
  margin-left: 0.2em;
}



@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }
    .hero-text {
        width: 90%;
        padding: 0 10px;
    }
    .service-card {
      width: 90%;
    }
  
    .service-cards {
      flex-direction: column;
      align-items: center;
    }
    .service-card h3 {
      font-size: 1.2rem !important;

    }
  }

.service-card:hover{
    transform: scale(1.01);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.1);
}
.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: .5rem;
    text-align: center;
}

.service-card img {
    width: 100%;
    height: 400px;
    border-radius: 1px;
    margin-bottom: 5px;
}
ul {
    text-align: left;
    list-style-type: none;
    padding: 0;
}
ul li {
    font-size: 15px;
    padding: 3px 0;
}
.btn-center {
    text-align: center;
    margin-top: 15px;
}
.service-btn {
    display: inline-block;
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 8px 12px;
    background: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.service-btn:hover {
    background: #0056b3;
}

/* About Us Section */
.about {
    max-width: 1400px;
    margin: 50px auto;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    border-radius: 10px;
    
}

@media (max-width: 768px) {
    .about {
      flex-direction: column;
      align-items: center;
      padding: 2rem 1rem;
    }
  
    .about img {
      width: 100%;
      height: auto;
    }
  
    .about-text {
      width: 90%;
      text-align: center;
    }
    .about-text p {
    font-size: 15px !important;
    line-height: 1.6;
  }

  .about-text h2 {
    font-size: 20px;
  }
}
  
.about img {
    width: 50%;
    border-radius: 1px;
    object-fit: cover;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* เพิ่มมิติให้กับรูปภาพ */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.about img:hover {
    transform: scale(1.05); /* ขยายภาพเล็กน้อยเมื่อโฮเวอร์ */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); /* เพิ่มเงาเมื่อโฮเวอร์ */
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #00274d; /* สีของหัวข้อ */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* เพิ่มเงาให้ข้อความ */
}

.about-text p {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.8;
    text-align: justify; /* จัดข้อความให้อ่านง่าย */
}

.about-text .cta {
    margin-top: 20px;
    display: inline-block;
    background-color: #007BFF;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.about-text .cta:hover {
    background-color: #0056b3;
}

/*สำหรับ contact*/
.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #ccc;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
    margin-left: auto; 
    margin-right: auto;      
}

.contact-item {
    display: flex;
    align-items: center;
    max-width: 350px; /* ปรับขนาดแต่ละช่อง */
    text-align: left;
    padding: 10px;
    border-radius: 5px;    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-item:hover{
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    
}
.contact-item img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

.contact-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.contact-item p strong {
    display: block;
    font-size: 16px;
    color: #000;
}

.divider {
    height: 50px;
    width: 1px;
    background-color: #ccc;
    margin: 0 20px;
}

@media (max-width: 768px) {
  .contact-section {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .contact-item {
    width: 90%;
    max-width: none;
  }

  .divider {
    display: none; /* ซ่อนเส้นคั่นกลาง */
  }
 .underline_customers {
    width: 300px !important;
    margin: 8px auto;
  }
  .underline {
    width: 150px !important;
  }
  .title {
    font-size: 24px !important; /* ปรับให้เล็กลงกว่าปกติ */
    font-weight: bold !important;
    text-align: center;
  }
}

/*ผลงานของเรา */
.customer-card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 10px 60px 10px;
    justify-content: center;
    background-color: #f9f9f9;
}

@media (max-width: 768px) {
    .customer-card {
      width: 90%;
    }
  }
  
.customer-card {
    background: #fff;
    border: 1px solid #ccc;
    overflow: hidden;
    border-radius: 3px;
    width: 300px;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
    text-align: center;
    }

.customer-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.customer-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.customer-card :hover img {
    transform: scale(1.1);
}

.customer-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.customer-card:hover .overlay {
    opacity: 1;
}


.customer-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

.customer-description {
    font-size: 0.85rem;
    color: #555;
    margin: 0 10px 10px;
    line-height: 1.4;
}

.customer-btn {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.customer-btn:hover {
    background: #0056b3;
}

/*สินค้าของเรา*/

.products-card-container {
display: flex;
flex-direction: column; /* จัดเรียงตามแนวตั้ง */
align-items: center; /* จัดกึ่งกลางแนวแกน X */
justify-content: center; /* จัดกึ่งกลางแนวแกน Y */
max-width: 1600px;
margin: 0 auto; /* จัดกึ่งกลางหน้าเว็บ */
padding: 20px;
text-align: center;
}

/* ปรับ layout ของสินค้าให้กึ่งกลาง */
.products-card {
background: #fff;
border: 1px solid #ccc;
border-radius: 3px;
padding: 5px;
overflow: hidden;
width: 300px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
text-align: center;
transition: box-shadow 0.2s;
}

.products-list {
display: flex;
flex-wrap: wrap;
gap: 15px;
justify-content: center; /* จัดกึ่งกลางสินค้า */
max-width: 1600px; /* ป้องกันไม่ให้กว้างเกินไป */
margin-top: 20px;
}

/* ปรับขนาดของรูปสินค้า */
.customer-image {
width: 100%;
height: 200px; /* กำหนดความสูงคงที่ */
object-fit: cover; /* ป้องกันภาพบิดเบี้ยว */
border-bottom: 1px solid #ddd;
}

/* ปรับขนาดข้อความ */
.customer-title {
font-size: 18px;
font-weight: bold;
padding: 10px;
}

.customer-description {
padding: 10px;
font-size: 14px;
color: #555;
}

/* ปรับสไตล์ปุ่ม */
.customer-btn {
display: inline-block;
background: #007bff;
color: white;
text-decoration: none;
padding: 10px 15px;
border-radius: 5px;
margin-bottom: 10px;
transition: background 0.3s;
}

.customer-btn:hover {
background: #0056b3;
}

/* For Logo */
.logo-slider {
    padding: 0.5rem 2rem 2rem 2rem;
    background: #f9f9f9;
    text-align: center;
    margin: 20px 0;
}
.slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}
.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: fit-content;
    margin: 5px;
}
.slide {
    min-width: 200px;
    margin: 0 10px;
}
.slide img {
    max-width: 100%;
    height: 200px;
    display: block;
    margin: 0 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .slide {
    min-width: 120px;
    margin: 0 5px;
  }

  .slide img {
    height: 100px;
  }
}


/* กล่องแสดงโลโก้ 3D */
.carousel2-container {
    perspective: 1000px;
    width: 600px;
    height: 300px;
    margin: 20px auto;
    position: relative;
}

.carousel2 {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition: transform 1s ease-in-out;
}

.carousel2-item {
    width: 120px;
    height: 120px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    transform-style: preserve-3d;
    transition: transform 1s ease-in-out;
}

.carousel2-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.logo-carousel2 {
    padding: 0px; /* 🔹 ลดช่องว่างด้านบนและล่าง */
    margin: 0 auto;
}

.title {
font-size: 2rem;
font-weight: bold;
color: #00274d; /* ใช้สีน้ำเงินเข้ม */
text-align: center; /* จัดข้อความให้อยู่กึ่งกลางแนวนอน */
position: relative; /* ใช้สำหรับจัดการเส้นใต้ */
margin-bottom: 10px;
display: inline-block;
width: 100%; /* ขยายความกว้างให้ครอบคลุมทั้งหน้าจอ */
}
.underline {
width: 200px;
height: 3px;
background-color: #FFD700; /* ใช้สีเหลือง */
margin: 5px auto 0;
}
.underline_customers {
    width: 500px;
    height: 3px;
    background-color: #FFD700; /* ใช้สีเหลือง */
    margin: 5px auto 0;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }
    .hero-text {
        width: 90%;
        padding: 0 10px;
    }
    .service-card {
      width: 90%;
    }
  
    .service-cards {
      flex-direction: column;
      align-items: center;
    }
  }