* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* General Body and HTML Styling */
html {
  scroll-behavior: smooth;
  overflow-y: scroll; /* บังคับให้แสดง scrollbar ตลอด */
  overflow-x: hidden; /* ห้ามแถบเลื่อนแนวนอน background-color: #f4f4f4;*/
}

body {
  font-family: 'Kanit', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.7;
  color: #ffffff;
  
  /* เปลี่ยน 'fixed' เป็น 'scroll' เพื่อรองรับมือถือได้ดีขึ้น */
  
  position: relative;
}

*

header {
  color: white;
  text-align: center;
  position: fixed;
  width: 100%;
  z-index: 1000; /* ให้ navbar อยู่เหนือเนื้อหา */
}
.top-bar {
  background-color: #22538b; /* กำหนดพื้นหลังเป็นสีดำ */
  color: #fff; /* กำหนดสีตัวอักษรเป็นสีขาว */
  padding: 10px 10rem; /* กำหนดระยะห่างด้านใน (บน-ล่าง) */
  display: flex; /* ใช้ Flexbox เพื่อจัดเรียงองค์ประกอบให้เข้าที่ */
  justify-content: flex-start; /* จัดเรียงข้อมูลให้ชิดซ้าย */
  align-items: center; /* จัดเรียงองค์ประกอบให้อยู่กึ่งกลางในแนวตั้ง */
}

.top-contact-info {
  display: flex;
  align-items: center;
}

.top-contact-info a {
  margin: 0;
  font-size: 14px;
  text-decoration: none;
  color:#fff;
  transition: color 0.5s ease;
}
.top-contact-info a:hover{
  color:#b3cfee;
}
/* การใส่ไอคอน */
.icon-location {
  width: 16px;
  height: 16px;
  
  /* ส่วนนี้ใช้โค้ดเพื่อใส่รูปไอคอนจริง
     เช่น background-image: url('path/to/icon.png'); */
}
.icon-mail {
 margin-right: 20px;
}

#overlay-phone-menu {
    position: fixed; /* ให้อยู่เหนือเนื้อหาทั้งหมด */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0); /* เริ่มต้นด้วยความโปร่งใส */
    opacity: 0; /* เริ่มต้นด้วยความโปร่งใส */
    backdrop-filter: blur(0px); /* เริ่มต้นไม่เบลอ */
    -webkit-backdrop-filter: blur(0px); /* สำหรับ Safari */
    z-index: 990; /* ให้อยู่ด้านหลัง dropdown แต่หน้าเนื้อหาหลัก */
    pointer-events: none; /* เพื่อให้คลิกผ่านได้เมื่อไม่ใช้งาน */
    transition: opacity 0.4s ease-out, backdrop-filter 0.4s ease-out; /* เพิ่ม transition */
}
#overlay-phone-menu.active {
    background-color: rgba(0, 0, 0, 0.1); /* สีดำโปร่งแสงเล็กน้อย */
    opacity: 1; /* แสดงผล */
    backdrop-filter: blur(8px); /* เบลอ 5px */
    -webkit-backdrop-filter: blur(5px); /* สำหรับ Safari */
    pointer-events: auto; /* เปิดให้คลิกได้ (เพื่อใช้ปิดเมนูได้) */
}

/* Container for the simple popup */
.simple-popup-container {
  display: none; /* ซ่อน Pop-up ไว้ก่อน */
  position: fixed; /* ให้อยู่เหนือทุกอย่างและอยู่กับที่แม้จะเลื่อนหน้าจอ */
  top: 50%; /* เริ่มต้นที่กึ่งกลางแนวตั้ง */
  left: 50%; /* เริ่มต้นที่กึ่งกลางแนวนอน */
  transform: translate(-50%, -50%); /* จัดกึ่งกลางจริงๆ */
  z-index: 1000; /* ให้ Pop-up อยู่บนสุด */
  background-color: rgba(0, 0, 0, 0.5); /* พื้นหลังทึบแสงเล็กน้อย */
  padding: 20px; /* เพิ่ม padding รอบๆ popup content */
  border-radius: 8px; /* ขอบโค้งมน */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* เงาให้ดูมีมิติ */
}

/* Overlay */
.animated-popup-overlay {
  display: none; /* ซ่อนไว้ก่อน */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.486); /* พื้นหลังทึบแสง */
  display: flex; /* ใช้ Flexbox จัดกึ่งกลาง */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  /* เพิ่ม Transition สำหรับการ Fade-in/Fade-out ของ Overlay */
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

/* Content Box (Animation controlled by JS class 'active') */
.animated-popup-content {
  background-color: #fff;
  padding: 25px ;
  border-radius: 10px; /* เพิ่มความโค้งมน */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* เงาที่ชัดขึ้น */
  text-align: center;
  max-width: 450px;
  width: 90%;
  position: relative;
  /* ตำแหน่งเริ่มต้นสำหรับอนิเมชัน */
  transform: translateY(-50px) scale(0.9); /* เริ่มต้นอยู่สูงขึ้นและเล็กกว่าปกติ */
  opacity: 0; /* ซ่อนไว้ก่อน */
  /* Transition สำหรับ Content Box */
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), /* เอฟเฟกต์เด้ง */
    opacity 0.3s ease-out;
}

/* --- State เมื่อ Pop-up Active (JS จะเพิ่มคลาสนี้) --- */
.animated-popup-overlay.active {
  opacity: 1; /* ทำให้ Overlay แสดงผล */
}

.animated-popup-overlay.active .animated-popup-content {
  transform: translateY(0) scale(1); /* เลื่อนลงมาและขยายเต็ม */
  opacity: 1; /* แสดงผล */
}
.animated-popup-content p{
  margin-bottom:25px;
}
/* Close Button */
.animated-close-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 25px; /* เพิ่มขนาดปุ่ม */
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.15rem; /* Slightly increased */
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration:none;
}

.animated-close-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px); /* ปุ่มเด้งขึ้นเล็กน้อย */
}

/* Spacer for Fixed Header */
.spacer {
  height: 143px; /* Adjust this value to match your header's height */
  width: 100%;
}
.spacer1 {
  height: 20px; /* Adjust this value to match your header's height */
  width: 100%;
  background-color: #ffffff;
}
.spacer2 {
  height: 80px; /* Adjust this value to match your header's height */
  width: 100%;
  background-color: white;
}
.spacer3 {
  height: 80px; /* Adjust this value to match your header's height */
  width: 100%;
  background-color: #e7f3fb;
}
.spacer4 {
  height: 80px; /* Adjust this value to match your header's height */
  width: 100%;
  background-color: #ffffff;
}

/* Header and Navigation Bar background-color: #f5f5f7;*/
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  color: #fff;
  padding: 0.5rem 8.5rem;
  height: 100px;
  position: relative; /* สำหรับ mobile menu absolute positioning */
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
  text-decoration: none;
  z-index: 20; /* ให้โลโก้อยู่ด้านบนเสมอ */
  height: auto;
  padding-left: 48px;
}
.navbar-brand img {
  height: 60px;
 /* filter: drop-shadow(2px 2px 3px rgba(37, 37, 37, 0.39));*/
}
.logodesktop{
  display: block;
}
.logophone{
  display: none;
/*border: solid 3px #22538b;
  background-color: #E4AF2C;*/ 
}

.text-brand{
  font-family: 'Allerta Stencil', sans-serif;
  font-size: 36px;
  font-weight: 600;
  background: linear-gradient(45deg,  #0056b3, #858585, #00244b); /* Blue to Purple */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block; /* Essential for gradient text */
  background-clip: text;
  color: transparent;
}
.text-brand2{
  font-size: 30px;
}
/* Desktop Navigation */
.navbar-nav {
  list-style: none;
  display: flex; /* Display as a row   margin: auto;*/
  margin: 0;
  padding: 0;
  position: relative; /* สำคัญมาก! */
}

.nav-item {
  margin-left: 15px;
  
}
.nav-link {
  position: relative;
  color: #666;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: all ease-out 250ms; /* Transition for color */
  font-size: 1.2em; /* Slightly increased */
  z-index: 2;
}

/* สร้างพื้นหลังที่จะใช้สไลด์ */
.active-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #b3d0eeab;
  border-radius: 50px;
  z-index: 1; /* ให้พื้นหลังอยู่ด้านหลังเมนู */
  transition: all 0.5s ease-in-out; /* ทำให้การสไลด์นุ่มนวล */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ซ่อนพื้นหลังของเมนู active เดิม */
.nav-item.active .nav-link {
  color: #22538b;
  background-color: transparent !important;
}

/* กฎสำหรับ Hover บนเมนูทั่วไป */
.nav-link:hover {
  color:#22538b;
}

/* กฎที่เพิ่มเข้ามา: กำหนด Hover ให้กับเมนูที่ Active ด้วย เพื่อให้มีน้ำหนักสูงขึ้น */
.nav-item.active .nav-link:hover {
  background-color: #b3d0eeab; /* สามารถกำหนดสีพื้นหลังเดิม หรือสีอื่นได้ */
  color: #22538b; /* ตัวอักษรสีเดิม หรือสีอื่นได้ */
}
/* โค้ดนี้จะแทนที่การแสดงผลของ hover เมื่อ body มีคลาส is-scrolling */
body.is-scrolling .nav-item a:hover {
  /*
    คุณสามารถใช้ .navbar-nav .nav-item a:hover
    หรือแค่ .nav-item a:hover ได้ตามความเหมาะสม
  */
  color: inherit; /* ใช้สีตัวอักษรเดิม */
  background-color: transparent; /* ทำให้พื้นหลังโปร่งใส */
  transition: none; /* ปิดการเปลี่ยนสีแบบนุ่มนวลชั่วคราว */
}

/* Hamburger Toggler (Hidden by default for Desktop).nav-link:hover {
    background-color: #dbdbdb;
    border-radius: 4px;
} */
.navbar-toggler {
  display: none; /* Hide on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 20; /* ให้ปุ่มอยู่ด้านบนเสมอ */
}

.navbar-toggler .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #22538b;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
}
/* สไตล์สำหรับเนื้อหาหลัก */
#main-content {
    transition: margin-top 0.5s ease-in-out; /* ทำให้การเลื่อนของเนื้อหาดูสมูท */
}

/* คลาสที่จะดันเนื้อหาลงมา */
body.menu-open #main-content {
    margin-top: 200px; /* ควรมีค่าเท่ากับความสูงของเมนู */
}

/* Media Query เพื่อให้ใช้ได้เฉพาะในโหมดมือถือ */

/* Page Sections */
.BG {
  padding: 45px;
  background-color: #adadad9d;
  /*  Near-opaque white for crispness background-image: linear-gradient(to bottom, #ffffffe3, #ffffff00);*/
  border-radius: 25px; /* Prominent, soft corners */
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.18); /* Softer, more diffuse shadow */
  border: 1px solid rgba(255, 255, 255, 0.253); /* Subtle white border for depth */
  backdrop-filter: blur(8px); /* Gentle blur for a frosted glass effect */
  animation: fadeInScale 1.5s ease-out forwards; /* Initial section animation */
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.page-section {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  z-index: 1;
  background: url("img-page/page-02-9-18.jpg") no-repeat center center/cover ; 
  background-attachment:scroll;
  position: relative;
}
.page-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(156, 156, 156, 0.281); /* สีดำโปร่งแสง 40% */
  backdrop-filter: blur(2.5px);
  z-index: -2; /* วาง overlay เหนือภาพพื้นหลัง */
}

.page-content {
  text-align: center;
  justify-content: center;
  max-width:90%;
  margin: auto;
  padding-top: 60px;
  padding-bottom: 60px;
  z-index: 100;
}

.page-content h1,
.page-content h2 {
  color:#002855 ;
  margin-bottom: 15px;
  font-size: 4em; /* Slightly increased for better prominence สี#00244b */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.473);
  font-weight: 600;
}

.text-gradient { /* New class for gradient text 
  background: linear-gradient(45deg,#00244b,  #b8b8b8,#fff );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block; 
  background-clip: text;
  color: transparent;*/
  color:#fff;
}

.page-content p {
  margin-bottom: 20px;
  font-weight: 300;
}


.mini-text{
  font-size: 1.5em; /* Slightly increased for better readability #555*/
  display: inline-block;
  color: #E4AF2C;
  margin-bottom: 20px;
  font-weight: 300;
  border: solid 2px #22538b;
  background-color: #22538b;
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.highlight-text {
  color:#002855 ; /* #e74c3cBold, passionate red highlight */
  font-weight: 400;
  font-size: 2.3em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.226);
  font-weight: 600;
}
.border-highlight-text{
  /* ใส่สีพื้นหลังแบบโปร่งแสง */
  background: rgba(255, 255, 255, 0.2); 

  /* ใส่ border แบบโปร่งแสง */
  border: 1px solid rgba(255, 255, 255, 0.5); 

  /* ทำให้มุมโค้งมนเล็กน้อย */
  border-radius: 10px;

  /* สร้างเงาให้ดูมีมิติ */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); 

  /* ✨ นี่คือหัวใจสำคัญ: ทำให้เกิดความเบลอของฉากหลัง ✨ */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); /* สำหรับ Safari */
  padding: 10px 20px;
  display: inline-block;
}
.responsive-text {
    font-size: 2.3em;
    color: #ffffff;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.226);
}

/* Hero Section Buttons */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px; /* More spacing between buttons */
    margin-bottom: 30px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 50px; /* Larger, more substantial buttons */
  border-radius: 50px; /* Perfectly round edges */
  text-decoration: none;
  font-weight: 500; /* Bolder text */
  font-size: 1.5em; /* More prominent button text */
  letter-spacing: 1px; /* Slightly wider letter spacing */
  transition: background-size 0.5s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), /* Springy bounce */
                box-shadow 0.4s ease;
  margin: 0; /* Managed by parent .hero-buttons gap */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Consistent initial shadow */
  background-size: 200% auto; /* For gradient animation */
  text-transform: uppercase; /* Bold text */
  
}
.bnt img {
  width: 50px;
}
.btn a {
  text-decoration: none;
  color: white;
}

.btn-line {
  background-image: linear-gradient(to right, #2ecc70 0%, #27ae60 50%, #2ecc71 100%);
  color: white;
  position: relative;
  overflow: visible; /* Allow popup to overflow */
  text-decoration: none;
  
}

.line-phone{
  display: none;
}

.line-desktop{
  display: block;
}

.btn-line:hover {
  background-position: right center; /* Move gradient on hover */
  transform: translateY(-8px); /* Significant lift */
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35); /* Deeper, wider shadow */
}

.btn-call {
  /*animation: color-change 5s linear infinite;*/
  animation: pulse 2s infinite;
  /*background-image: linear-gradient(to right, #3498db 0%, #2980b9 50%, #3498db 100%); /* Blue */
  color: white;
}
@keyframes color-change {
  0% { background-color: #3498db; }  /* สีเริ่มต้น (น้ำเงิน) */
  25% { background-color: #e74c3c; } /* เปลี่ยนไปสีแดง */
  50% { background-color: #f1c40f; } /* เปลี่ยนไปสีเหลือง */
  75% { background-color: #2ecc71; } /* เปลี่ยนไปสีเขียว */
  100% { background-color: #3498db; } /* กลับไปสีเริ่มต้น */
}
@keyframes pulse {
   0% {
    transform: scale(1); /* ขนาดปกติที่เริ่มต้น */
    background-color: #22538b;
  }
  50% {
    transform: scale(1.1); /* ขยายใหญ่ขึ้น 1.1 เท่า ที่กึ่งกลาง */
    background-color: #00244b;
  }
  100% {
    transform: scale(1); /* กลับมาขนาดปกติที่จุดสิ้นสุด */
    background-color: #22538b;
  }
}
.btn-call:hover {
  background-position: right center; /* Move gradient on hover */
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

.contact-strip-cover {
    /* จัดตำแหน่งให้อยู่ภายใน container ปก */
  position: absolute;
     /*bottom: 0; หรือ top: 0; ถ้าต้องการให้อยู่ด้านบน */
  left: 0;
  width: 100%;
  background-color: #22538b;
    /* จัดรูปแบบแถบ */
    /*  สีพื้นหลังโปร่งแสงเล็กน้อย */
  padding: 15px 20px;
  display: flex; /* ใช้ Flexbox เพื่อจัดองค์ประกอบ */
  justify-content: center; /* จัดให้อยู่กึ่งกลางแนวนอน */
  align-items: center; /* จัดให้อยู่กึ่งกลางแนวตั้ง */
  gap: 50px; /* ระยะห่างระหว่างเบอร์โทรศัพท์กับ Line ID */
}

.contact-item {
  display: flex;
  align-items: center;
  font-size: 40px;
  font-weight: bold;
  color: #1d1d1d;
  border:2px solid #ffffff;
  background-color: #ffffff;
  border-radius: 50px;
  padding: 10px 20px;
}

.contact-item img {
  height: 40px; /* ขนาดไอคอน */
  margin-right: 10px;
}

/* QR Code Popup */
.popup-image {
  display: none;
  position: absolute;
  top: 100%; /* Position below the button */
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 5px;
  width: 150px; /* Adjust size as needed */
  text-align: center;
  z-index: 1000;
}

.popup-image img {
  max-width: 100%;
  height: auto;
}

.btn-line:hover .popup-image {
  display: block;
}

/* Triangle Image Boxbackground-color: #22538b; */
.triangle-image-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding-bottom: 30px;
  z-index: 90;
  
  width: 100%;
  padding: 20px;
}
/* จัดสไตล์ข้อความบนหัวภาพ */
.image-label {
  text-align: center; /* จัดข้อความให้อยู่กึ่งกลาง */
  font-size: 14px; /* กำหนดขนาดตัวอักษร */
  color: #444; /* กำหนดสีตัวอักษร */
  margin-bottom: 5px; /* กำหนดระยะห่างระหว่างข้อความกับรูปภาพ */
}

/* จัดรูปแบบคอนเทนเนอร์ย่อย */
.image-with-text {
  display: inline-block; /* ทำให้กล่องแต่ละกล่องอยู่บรรทัดเดียวกัน */
  vertical-align: top;
  text-align: center;
  margin: 10px; /* เพิ่มระยะห่างระหว่างแต่ละกล่อง */
}
.mini-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.mini-img:hover {
  transform: scale(1.05);
  border: solid 5px #ffffff;
}
section {
  text-align: center;
  width: 100%;
  padding: 0px;
  /* box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);*/
}

/* เลือกได้: ลบระยะขอบออกจาก section แรกสุด หากอยู่ด้านบนสุดของหน้า */
section:first-of-type {
  margin-top: 0;
}
/* Section 1 - Promotion and Video */
#section1 {
  background-color: #ffffff;
  text-align: center;
  margin: 0;
}

.home-area p {
  padding-top:60px;
  font-size: 1.25em; /* Slightly increased */
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #444;
  padding-left: 10px;
  padding-right: 10px;
}

.icon-section1 {
    display: flex; /* ใช้ Flexbox เพื่อจัดเรียงคอลัมน์ในแนวนอน */
    justify-content: space-between; /* จัดระยะห่างระหว่างคอลัมน์ให้เท่ากัน */
    gap: 0px; /* เพิ่มระยะห่างระหว่างแต่ละคอลัมน์ */
    padding: 20px;
    margin:auto;
    max-width: 1000px;
}

.photo-icon-section1 {
    flex: 1; /* ทำให้แต่ละคอลัมน์มีความกว้างเท่ากัน */
    text-align: center; /* จัดเนื้อหาภายในให้อยู่กึ่งกลาง */ 
}
.photo-icon-barder{
    border-right: solid 2px #afafaf;
}

.photo-icon-section1 img {
    width: 35%; /* ทำให้ภาพมีความกว้างเต็มคอลัมน์ */
    height: auto;
    display: block;
    border-radius: 8px; /* เพิ่มขอบมนให้ภาพ */
    margin:auto;
}

.photo-icon-section1 p {
    margin-top: 10px; /* เพิ่มระยะห่างด้านบนของข้อความ */
    font-size: 16px;
    color: #333;
}

/* responsive สำหรับหน้าจอขนาดเล็ก */
@media (max-width: 480px) {
    .icon-section1 {
       display: grid; /* ทำให้คอนเทนเนอร์เป็น Grid */
       grid-template-columns: 1fr 1fr; /* สร้าง 2 คอลัมน์ที่มีขนาดเท่ากัน */
       gap: 10px; /* เว้นช่องว่างระหว่างคอลัมน์ */
    }
    .photo-icon-barder{
        border:none;
    }
    .photo-icon-section1 img {
      width:50%;
    }
}

.highlight-text-promo {
  color: #00244b;
  font-weight: bold;
}

.vdo2 {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  gap: 20px; /* ระยะห่างระหว่างวิดีโอ */
  justify-content: center;
  padding: 20px 10px;
  margin-bottom: 25px;
  margin: auto;
}
.vdo-item {
  flex: 1 1 calc(33.33% - 20px); /* 3 คอลัมน์ */
  min-width: 280px; /* ขนาดขั้นต่ำก่อนที่จะขึ้นบรรทัดใหม่ */
  border: 1px solid #ddd;
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  background: linear-gradient(to top, rgba(52, 152, 219, 0.247) 0%, rgba(52, 152, 219, 0) 50%);
  border-radius: 8px;
}

.vdo-item:hover{
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); 
}

.vdo-item .text h5 {
  color: #00244b;
  font-size: 1.3em; /* Slightly increased */
  margin-bottom: 10px;
}
/*.vdo-wrapper img {
  aspect-ratio: 1 / 0.7;
  object-fit: cover;
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
  }
*/
.vdo-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
}

.vdo-wrapper img {
  aspect-ratio: 1 / 0.7;
  object-fit: cover;
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.vdo-wrapper:hover img {
  transform: scale(1.05);
  filter: brightness(70%);
}
.play_icon {
  font-size: 50px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #00244b;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.vdo-wrapper:hover .play_icon {
  opacity: 0;
}
.play_icon2 {
  font-size: 50px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.vdo-wrapper:hover .play_icon2 {
  opacity: 1;
}
 /* ซ่อนแท็ก <video> ต้นฉบับที่อยู่ในหน้าเว็บ */
.hidden-video {
  display: none;
}

.linkcon2 img {
  max-width: 250px;
  height: auto;
  transition: transform 0.3s ease;
}

.linkcon2 img:hover {
  transform: translateY(-8px);
  filter: drop-shadow(0px 10px 8px rgba(0, 0, 0, 0.5));
}

/* Section 2 - Services */
#section2 {
  background-color: #e7f3fb;
  padding-top: 30px;
}

.txt-section {
  text-align: center;
  padding-left: 10px;
  padding-right: 10px;
  margin-bottom: 15px;
}

.txt-section h2 {
  color: #00244b;
  font-size: 2.3em; /* Slightly increased */
  padding: 30px;
}

.txt-section p {
  max-width: 900px;
  margin: 0 auto;
  color: #555;
  font-size: 1.15em; /* Slightly increased */
}

.service-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.service-content {
  background: linear-gradient(to top, rgba(52, 152, 219, 0.15) 0%, rgba(52, 152, 219, 0) 50%);
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-content:hover{
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); 
}

.image-wrapper2 {
  position: relative;
  width: 100%;
  height: 220px; /* Fixed height for service images */
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
}

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

.image-wrapper2:hover img {
  transform: scale(1.05);
  filter: brightness(70%);
}

.zoomin_icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-wrapper2:hover .zoomin_icon {
  opacity: 1;
}

.service-content .text h3 {
  color: #00244b;
  font-size: 1.5em; /* Slightly increased */
  margin-bottom: 10px;
}

.service-content .text p {
  font-size: 1em; /* Slightly increased */
  color: #666;
  margin-bottom: 20px;
}

.con-ser-link a {
  display: inline-block;
  /*background-color: #28a745;*/
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  transition: transform 0.3s ease;
  animation: color-change2 7s linear infinite;
}
@keyframes color-change2 {
  0% { background-color: #218838; }  
  50% { background-color: #e74c3c; } 
  100% { background-color: #218838; }
}
.con-ser-link a:hover {
  transform: translateY(-5px);
  background-color: #218838;
}

.service-txt {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.service-txt h3 {
  color: #00244b;
  font-size: 1.9em; /* Slightly increased */
  margin-bottom: 15px;
}

.service-txt p {
  font-size: 1.15em; /* Slightly increased */
  color: #555;
}

/* Hidden Fancybox Thumbnails (for better SEO and accessibility of all images) */
.hidden-fancybox-thumb {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Section 3 - Portfolio/Gallery */
#section3 {
  background-color: #f4f4f4;
  padding-top: 30px;
}
.SP{
  height: 70px;
}
.work-label{
  text-align: left;
  
  margin-bottom: 10px;
  padding-bottom: 20px;
}
.work-label h3{
  font-size: 22px;
  font-weight: 500;
  color: #666;
}

.gallery1_container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 10px;
  padding-right: 10px;
}

.gallery1_grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  justify-content: center;
}

.gallery1_item {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}

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

.gallery1_item .img_wrapper {
  width: 100%;
  height: 250px; /* Fixed height for gallery images */
  overflow: hidden;
  position: relative;
}

.gallery1_item .img_wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery1_item:hover .img_wrapper img {
  transform: scale(1.05);
  filter: brightness(70%);
}

.zoom_icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery1_item:hover .zoom_icon {
  opacity: 1;
}
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(31, 45, 64, 0.85); /* primary-navy with transparency */
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 300;
}

.gallery1_item:hover .overlay {
    transform: translateY(0);
}
/* Section 4 - Contact */
/*#section4 {
  background-color: #333;
  color: white;
  text-align: center;
}

.linkcon {
  padding-top: 30px;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 50px;
}

.linkcon img {
  max-width: 280px;
  height: auto;
  transition: transform 0.3s ease;
}

.linkcon img:hover {
  transform: translateY(-8px);
  filter: drop-shadow(0px 10px 8px rgba(0, 0, 0, 0.5));
}

.raw {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.column {
  flex: 1;
  min-width: 280px;
  padding: 20px;
  max-height: 410px;
}

.iconbottom,
.iconbottom img {
  height: 70px;
  margin-bottom: 20px;
  text-align: left;
}

.main-contact h4,
.menu-contact h4 {
  color: #007bff;
  font-size: 1.2em; 
  margin-bottom: 15px;
  text-align: left;
}

.main-contact p,
.menu-contact p {
  margin-bottom: 10px;
  font-size: 0.9em; 
  text-align: left;
}

.main-contact a,
.menu-contact a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-contact a:hover,
.menu-contact a:hover {
  color: #007bff;
}

.main-contact i,
.menu-contact i {
  margin-right: 8px;
  color: #007bff;
}

.image-row {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: center; 
}

.image-row img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  transition: transform 0.3s ease;
  border-radius: 50%;
}

.image-row img:hover {
  transform: scale(1.3) rotate(8deg); 
  filter: grayscale(0%) brightness(1.2); 
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.menu-contact hr {
  border: 0;
  height: 3px; 
  background: linear-gradient(to right, rgba(52, 152, 219, 0) 0%, #007bff 50%, rgba(52, 152, 219, 0) 100%); 
  margin: 25px 0;
  width: 80%; 
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.column iframe {
  width: 100%;
  max-height: 370px;
  border-radius: 8px;
}
 
.QR{
  width: 100%;
  height: auto;
}
.QR img{
  width: 40%;
  justify-content: center!important;
  border-radius: 5px;
}*/

/* Social Links Aside Bar */
/* Contact Widget Styling */


.contact-widget {
    position: fixed; /* ทำให้ปุ่มอยู่กับที่เมื่อเลื่อนหน้าจอ */
    bottom: 30px;    /* ห่างจากขอบล่าง 25px */
    right: 30px;     /* ห่างจากขอบขวา 25px */
    z-index: 1000;   /* ทำให้ปุ่มอยู่เหนือเนื้อหาอื่นๆ */
    display: flex;
    flex-direction: column; /* จัดเรียงองค์ประกอบในแนวตั้ง */
    align-items: flex-end;  /* ชิดขวา */
}

.contact-toggle-button {
    background-color: #007bff; /* สีน้ำเงินสำหรับปุ่มหลัก */
    color: white;
    border: none;
    border-radius: 30px; /* ทำให้มุมมนหรือเป็นวงกลม */
    /*width: 140px;  ความกว้างของปุ่ม */
    /*height: 60px;  ความสูงของปุ่ม */
    font-size: 1.1em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* เงาปุ่ม */
    transition: all 0.3s ease; /* ภาพเคลื่อนไหวเมื่อโต้ตอบ */
    padding: 10px; /* เพิ่ม padding ด้านใน */
    position: relative; /* สำหรับการจัดวาง icon/text */
}

.contact-toggle-button:hover {
    background-color: #0056b3; /* สีเข้มขึ้นเมื่อเมาส์ชี้ */
    transform: translateY(-8px); /* ยกขึ้นเล็กน้อย */
}

.contact-toggle-button .icon {
    font-size: 1.1em; /* ขนาดไอคอน */
    margin-right: 8px; /* ระยะห่างระหว่างไอคอนกับข้อความ */
    line-height: 1; /* จัดแนวไอคอน */
    transition: transform 0.3s ease; /* ภาพเคลื่อนไหวไอคอน */
}

.contact-toggle-button .button-text {
    white-space: nowrap; /* ป้องกันข้อความขึ้นบรรทัดใหม่ */
}

/* Rotate the icon when the button is active (options are visible) */
.contact-toggle-button.active .icon {
    transform: rotate(180deg); /* หมุนไอคอน 180 องศา (จาก X เป็น + หรือลูกศร) */
}

/* Contact Options Container Styling */
.contact-options-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); /* เงาของเมนูตัวเลือก */
    padding: 10px 0; /* padding แนวตั้ง */
    margin-bottom: 15px; /* ระยะห่างจากปุ่มหลัก */
    width: 220px; /* ความกว้างของเมนูตัวเลือก */
    opacity: 0; /* ซ่อนเริ่มต้น */
    visibility: hidden; /* ซ่อนเริ่มต้น */
    transform: translateY(20px); /* เลื่อนลงมาเล็กน้อยตอนซ่อน */
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease; /* ภาพเคลื่อนไหว */
    position: absolute; /* วางตำแหน่งเหนือปุ่ม */
    bottom: 75px; /* ตำแหน่งด้านบนของปุ่มหลัก (ปรับตามความสูงปุ่ม) */
    right: 0; /* ชิดขวาเดียวกับปุ่ม */
    display: flex;
    flex-direction: column; /* จัดเรียงตัวเลือกในแนวตั้ง */
}

/* Show options when 'visible' class is added by JavaScript */
.contact-options-container.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* เลื่อนกลับมาตำแหน่งเดิม */
}

/* Individual Contact Option Styling */
.contact-option {
    display: flex;
    align-items: center;
    padding: 12px 15px; /* padding สำหรับแต่ละตัวเลือก */
    text-decoration: none; /* ไม่มีขีดเส้นใต้ */
    color: #333; /* สีข้อความ */
    font-size: 1em;
    border-bottom: 1px solid #eee; /* เส้นแบ่งระหว่างตัวเลือก */
    transition: background-color 0.2s ease; /* ภาพเคลื่อนไหวเมื่อเมาส์ชี้ */
}

.contact-option:last-child {
    border-bottom: none; /* ไม่มีเส้นแบ่งที่ตัวเลือกสุดท้าย */
}

.contact-option:hover {
    background-color: #f5f5f5; /* สีพื้นหลังเมื่อเมาส์ชี้ */
}

.contact-option img {
    width: 28px; /* ขนาดไอคอน */
    height: 28px; /* ขนาดไอคอน */
    margin-right: 12px; /* ระยะห่างจากข้อความ */
    object-fit: contain; /* ปรับขนาดรูปภาพให้พอดีโดยไม่บิดเบือน */
}
/* Footer */
.spacer-footer {
  height: 30px; /* Adjust this value to match your header's height */
  width: 100%;
  background-color: #333;
}
/* footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 0.95em; Slightly increased 
}*/
.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 80px;
}
.footer {
    background-color: #22538b;
    color: #fff;
    padding: 60px 0 20px;
    text-align: left;
}

.footer .container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: space-between;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px; /* Ensure it doesn't get too small */
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 500;
    border-bottom: solid 2px #fff;
}

.contact-info p {
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

/* Font Awesome Icons for Contact Info */
.contact-info p i {
    margin-right: 10px;
    font-size: 1.3rem;
    width: 25px; /* Ensure consistent spacing */
    text-align: center;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    margin-right: 15px;
    display: inline-block;
    color: var(--white); /* For Font Awesome icons */
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1);
    color: #007bff;
}
/* Hide previous image-based social icons if you switch to Font Awesome */
.social-links img {
    display: none;
}


.map-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--secondary-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.map-container iframe {
    border-radius: 10px;
    width: 100%;
    height: 100%;
    border: 0;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.fancybox__backdrop {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.2)!important; /* ยังคงมีสี overlay บางๆ */
}
.f-button{
    background-color:rgba(0, 0, 0, 0.1)!important; /* ยังคงมีสี overlay บางๆ */  
}
.fancybox__thumb::after{
  border-color: #fff!important;
}

/*line page*/
.nav__line{
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-image: linear-gradient(to bottom, #0000004b, #05050500);
  color: #000000;
  padding: 25px 35px;
  position: relative; /* สำหรับ mobile menu absolute positioning */
  font-family: 'Roboto', sans-serif;
}

#myBtn {
  transform: scale(0.7) translateY(20px); /* เริ่มต้นด้วยขนาดเล็กลงและเลื่อนลง */
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s linear 0.3s; /* เพิ่ม visibility delay */
  position: fixed; /* ให้อยู่กับที่เมื่อเลื่อนหน้าจอ */
  bottom: 20px; /* ห่างจากขอบล่าง 20px */
  left: 20px; /* ห่างจากขอบขวา 30px */
  z-index: 99; /* ให้ปุ่มอยู่เหนือองค์ประกอบอื่นๆ */
  border: none; /* ลบขอบปุ่ม */
  outline: none; /* ลบเส้นกรอบเวลาคลิก */
  background-color: rgba(255, 255, 255, 0.623); /* สีพื้นหลังปุ่ม  */
  color: #22538b; /* สีข้อความปุ่ม */
  cursor: pointer; /* เปลี่ยนเคอร์เซอร์เป็นรูปมือเมื่อชี้ */
  border-radius: 50%; /* Makes it a perfect circle */
  width: 60px; /* Standard FAB size */
  height: 60px; /* Standard FAB size */
  font-size: 16px; /* ขนาดฟอนต์ */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* เพิ่มเงาให้ปุ่มดูมีมิติ */
  transition: background-color 0.3s, opacity 0.3s; /* เพิ่มเอฟเฟกต์ตอนโฮเวอร์และแสดง/ซ่อน */
  transition: transform 0.3s ease;
}

#myBtn.show{
  transform: scale(1) translateY(0); /* กลับสู่ขนาดเดิมและตำแหน่งเดิม */
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 0s, 0s; /* ลบ delay เมื่อแสดง */
}

#myBtn:hover {
  background-color: #fff; /* เปลี่ยนสีเมื่อเมาส์ชี้ */
  transform: translateY(-8px); /* Significant lift */
}

/* Material Icons Integration */
/* Basic styling to ensure Material Icons display correctly */
/* --- Widget & Main Button --- */
    .contact-widget {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 2000;
    }
    .main-btn {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: #FF3333;
      color: white;
      border: none;
      outline: none;
      font-size: 22px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 3px 8px rgba(0,0,0,0.3);
      transition: transform 0.3s;
      position: relative;
    }
    .main-btn:hover{
      transform: scale(1.1);
      background-color: #DD1111;
    }

    /* --- Icon toggle --- */
    .main-btn i {
      position: absolute;
      transition: all 0.3s ease;
      transform-origin: center;
    }
    .icon-open { opacity: 1; transform: scale(1) rotate(0deg); }
    .icon-close { opacity: 0; transform: scale(0.8) rotate(-180deg); }
    .contact-widget.active .icon-open { opacity: 0; transform: scale(0.8) rotate(180deg); }
    .contact-widget.active .icon-close { opacity: 1; transform: scale(1) rotate(0deg); }

    /* --- Label for Main Button --- */
    .main-label {
      position: absolute;
      right: 70px;
      top: 50%;
      transform: translateY(-50%) scale(1);
      padding: 5px 12px;
      background: rgba(255,255,255,0.95);
      color: #333;
      font-size: 15px;
      font-weight: bold;
      border-radius: 5px;
      white-space: nowrap;
      box-shadow: 0 2px 6px rgba(0,0,0,0.25);
      opacity: 1;
      transition: all 0.3s ease;
    }
    .contact-widget.active .main-label {
      opacity: 0;
      transform: translateY(-50%) scale(0.8);
    }

    /* --- Social Buttons --- */
    .social-btn{
      position: absolute; 
      width: 50px;
      height: 50px;
      border-radius: 50%;
      color: white;
      border: none;
      font-size: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transform: scale(0);
      transition: all 0.3s;
      box-shadow: 0 3px 8px rgba(0,0,0,0.25);
      text-decoration: none;
    }
    .social-btn i{transition:transform 0.3s ease-in-out;}
    .social-btn i:hover{transform: rotate(40deg);}
    .contact-widget.active .social-btn {
      opacity: 1;
      transform: scale(1);
    }

    /* --- LABEL Styles (Social buttons) --- */
    .social-btn .label {
      position: absolute;
      right: 60px; 
      top: 50%;
      transform: translateY(-50%) scale(0.9);
      padding: 5px 10px;
      background-color: rgba(255, 255, 255, 0.95);
      color: #333;
      border-radius: 5px;
      font-size: 14px;
      white-space: nowrap;
      box-shadow: 0 0px 5px rgba(0, 0, 0, 0.2);
      opacity: 0;
      pointer-events: none;
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    }
    .contact-widget.active .social-btn .label {
      opacity: 1;
      transform: translateY(-50%) scale(1);
    }
    .social-btn:hover .label {
      opacity: 1;
      background-color: #fff;
    }

    /* --- Positioning & Colors --- */
    .btn-tel   { bottom: 80px;  right: 6px; background-color: #FF6633; }
    .btn-fb    { bottom: 140px; right: 6px; background-color: #1877F2; }
    .btn-mail  { bottom: 200px; right: 6px; background-color: #00B900; }
    .btn-tel:hover   { background-color: #CC5229; }
    .btn-fb:hover    { background-color: #0f4d9e;}
    .btn-mail:hover  { background-color: #008700; }

    /* Animation Delay */
    .contact-widget.active .btn-tel   { transition-delay: 0.1s; }
    .contact-widget.active .btn-fb    { transition-delay: 0.25s; }
    .contact-widget.active .btn-mail  { transition-delay: 0.4s; }
    .contact-widget.closing .btn-tel   { transition-delay: 0.4s; }
    .contact-widget.closing .btn-fb    { transition-delay: 0.25s; }
    .contact-widget.closing .btn-mail  { transition-delay: 0.1s; }
    .contact-widget.active .btn-tel .label   { transition-delay: 0.15s; }
    .contact-widget.active .btn-fb .label    { transition-delay: 0.3s; }
    .contact-widget.active .btn-mail .label  { transition-delay: 0.45s; }

.service-area-container {
    padding: 40px;
    border-radius: 10px;
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
    margin: auto;
}

.section-title {
    text-align: center;
    color: #00244b;
    font-size: 2.3em;
    margin-bottom: 30px;
    font-weight: bold;
   /* border-bottom: 3px solid #007bff;*/
    padding-bottom: 10px;
    display: inline-block;
    width: 100%;
}

.service-list-grid {
    display: grid;
    /* กำหนด 4 คอลัมน์สำหรับหน้าจอขนาดใหญ่ */
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    
}

.service-list {
    list-style: none;
    padding: 0;
    margin-left: 30%;
    justify-content: center;
}

.service-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1em;
    color: #555;
    transition: color 0.3s;
}

.service-list li:hover {
    color: #3094ff;
}

.service-list li .fas {
    color: #3094ff;
    font-size: 1em;
    margin-right: 12px;
}

/* === Responsive Design === */

/* สำหรับมือถือขนาดเล็ก (หน้าจอต่ำกว่า 480px) */
@media (max-width: 480px) {
  .top-bar{
    display: none!important;
  }
  .spacer {
    height: 60px!important;
  }
  .spacer1{
    height: 20px!important;
  }
  .navbar{
    height: 60px;
    padding: 0.5rem 0.5rem!important;
  }
  .navbar-brand img {
    height: 45px;
  }
  
  .logodesktop{
    display: none;
  }
  .logophone{
    display: block;
  }
  .nav-link {
    padding: 1rem;
    font-size: 1.2em; 
  }
  .BG{
    padding: 20px;
  }
  .page-section {
    width: 100%;
    padding: 0px 10px!important;
  }
  .page-content{
    text-align: center;
    padding-top: 40px;
    padding-bottom: 10px;
    max-width:100% ;
  }
  .page-content h1 {
    font-size: 1.5em!important; /* Adjusted for mobile */
  }
  .highlight-text{
    font-size: 1.2em!important;
  }
  .responsive-text{
    font-size: 1.2em!important;
  }
  .mini-text{
    font-size: 1.3em;
    width: 100%;
  }
  .hero-buttons{
    justify-content: center;
  }
  .btn {
    padding: 10px 20px;
    font-size: 1.5em; /* Adjusted for mobile */
    width: 80%;
  }
  .triangle-image-box {
    gap: 10px;
  }
  .mini-img {
    width: 100px;
    height: 100px;
  }
  .home-area p {
    font-size: 1.05em; /* Adjusted for mobile */
    padding-right:15px!important;
    padding-left:15px!important;
  }
  
  .vdo-item {
    flex: 1 1 100%; /* 1 คอลัมน์บนมือถือ */
  }
  .txt-section h2 {
    font-size: 1.9em; /* Adjusted for mobile */
  }
  .service-content{
    max-width: 90%!important;
  }
  .service-area{
    gap:10px!important;
  }
  
  .gallery1_grid{
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr))!important;
    gap: 7px!important;
  }
  .gallery1_container{
    margin-left:15px!important;
    margin-right:15px!important;
  }
  .gallery1_item .img_wrapper{
    height:166px!important;
  }
  .linkcon img {
    max-width: 120px;
  }
  .column {
    padding: 15px;
  }
  .main-contact h4,
  .menu-contact h4 {
    font-size: 1.4em; /* Adjusted for mobile */
  }
  .main-contact p,
  .menu-contact p {
    font-size: 0.9em; /* Adjusted for mobile */
  }
  .image-row img {
    height: 35px;
    width: 35px;
  }
  ._social-link a {
    padding: 10px;
    font-size: 1.3em;
  }
  .container{
    padding: 20px;
  }
  .map-container {
    height: 230px;
}
  .SP{
    height: 30px;
  }
  .work-label{
    margin-bottom: 6px;
    padding-bottom: 15px;
  }
  .work-label h3{
    font-size: 18px;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 15px;
    left: 15px;
  }
  
}
/* สำหรับมือถือขนาดเล็ก (หน้าจอ 480px-768px) */
@media (min-width: 481px) and (max-width: 768px) {

  .navbar-brand img {
    height: 50px;
  }
  
  .page-content h1 {
    font-size: 2.2em!important; /* Adjusted for tablet */
  }

  .highlight-text{
     font-size: 1.6em!important;
  }

  .responsive-text {
    font-size: 1.6em!important; /* Adjusted for tablet */
  }

  .home-area p {
    font-size: 1.2em; /* Adjusted for tablet */
  }

  .txt-section h2 {
    font-size: 2.1em; /* Adjusted for tablet */
  }

  .txt-section p {
    font-size: 1.1em; /* Adjusted for tablet */
  }

  .gallery1_grid{
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr))!important;
    gap: 10px!important;
  }
  .gallery1_container{
    margin-left:35px!important;
    margin-right:35px!important;
  }
  .gallery1_item .img_wrapper{
    height:200px!important;
  }

  .linkcon img {
    max-width: 150px;
  }

  #backToTop {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.3em;
  }
  
  .service-content{
    max-width: 90%!important;
  }
  .service-area{
    gap:10px!important;
  }
}
/* สำหรับมือถือ (หน้าจอต่ำกว่า 768px) */
@media (max-width: 768px) {
    .service-area-container {
        padding: 20px;
    }
    .section-title {
        font-size: 1.8em;
    }
    .service-list-grid {
        /* ปรับเป็น 2 คอลัมน์ */
        grid-template-columns: repeat(2, 1fr);
    }
    .service-list li {
        font-size: 1em;
    }
    
}
/* สำหรับแท็บเล็ต (หน้าจอ 992px) */
@media (max-width: 1024px) {
  .spacer{
    height: 130px;
  }
  .navbar {
    flex-wrap: wrap; /* Allow items to wrap */
    padding: 0.5rem 2rem;
  }

  .navbar-toggler {
    display: block; /* Show on mobile */
  }
  
  .navbar-nav {
    flex-direction: column; /* Stack items vertically */
    width: 100%; /* Full width */
    background-color:#fff ; /* Background for mobile menu */
    position: absolute;
    top: 100%; /* Position below the header */
    left: 0;
    max-height: 0; /* Initially hidden */
    overflow: hidden; /* Hide overflowing content */
    transition: max-height 0.4s ease-out; /* Smooth transition for opening/closing */
    z-index: 10;
  }

   body.menu-open #main-content {
      margin-top: 0px; /* ควรมีค่าเท่ากับความสูงของเมนู */
      transition: margin-top 0.4s ease-in-out;
    }

  .d-none-mobile {
    display: none!important;
  }
  .active-bg{
    display: none;
  }
  .nav-item {
    margin: 0; /* Reset margin */
    width: 100%;
    text-align: center;
    border-bottom: 2px solid #22538b;
    overflow: hidden;
  }
.nav-item.active .nav-link {
  color: #22538b;
}
.nav-item.active .nav-link:hover {
  color: #22538b; /* ตัวอักษรสีเดิม หรือสีอื่นได้ */
}
  .nav-item:last-child {
    border-bottom: none;
  }
.nav-link:hover{
  color: inherit;}

  .nav-link {
    display: block; /* Make link fill the whole item */
    padding: 0.9rem;
    font-size: 1.2em; /* Maintain consistency for mobile */
    color: #22538b;
  }
  .nav-link::after{
    display: none;
  }
  /* JavaScript will add this class to .navbar-nav when menu is open */
  .navbar-nav.active {
    max-height: 300px; /* Adjust based on your content, or use a larger value like 500px or fit-content if possible */
    overflow-y: auto; /* Allow scrolling if menu is too long */
  }

  /* Animation for Hamburger Icon when active */
  .navbar-toggler.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: #22538b;
  }
  .navbar-toggler.active .bar:nth-child(2) {
    opacity: 0;
  }
  .navbar-toggler.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: #22538b;
  }
  
  .page-section {
    padding: 40px 15px;
  }
  .page-content h1{
    font-size: 2.3rem;
  }
  .highlight-text{
     font-size: 1.7em;
  }

  .responsive-text {
    font-size: 1.7em; /* Adjusted for tablet */
  }
.line-phone{
  display: block;
}

.line-desktop{
  display: none;
}
.home-area p{
  padding-left :60px;
  padding-right :60px;
}

  
  .raw {
    flex-direction: column;
    align-items: center;
  }

  .column {
    width: 90%;
    min-width: unset;
  }

  .image-row {
    justify-content: center;
  }
  .gallery1_grid{
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 15px;
  }
  .gallery1_container{
    margin-left:40px;
    margin-right:40px;
  }
  .gallery1_item .img_wrapper{
    height:216px;
  }

  .service-content{
    max-width: 280px;
  }
  .service-area{
    gap:15px;
  }
}

/* สำหรับแท็บเล็ต (หน้าจอ1024px) */
@media (max-width: 1024px) {
  
  .navbar-brand{
    padding-left: 25px;
  }
}
@media (min-width: 992px) and (max-width: 1366px) {
  /* This targets larger desktop screens but excludes some tablets in landscape mode */
  .page-section {
    background-attachment: scroll !important;
  }
  .page-content h1{
    font-size: 3rem;
  }
}

@media (min-width: 1367px) {
  /* This targets very large screens like desktops */
  .page-section {
    background-attachment: fixed !important;
  }
}
/*VDO สไลด์*/
.video-container {
  display: flex;
  justify-content: space-between;
  gap: 10px; /* ระยะห่างระหว่างวิดีโอ */
  width: 100%;
  max-width: 900px;
  position: relative;
  margin: auto;
  height: 500px;
}
.video-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s ease-in-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

.video-wrapper video {
  width:100%;
  height: auto;
  display: block;
  margin: auto;
  object-fit: cover;
}
.video-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* ทำให้ภาพปกพอดีกับขนาดของวิดีโอ */
  transition: opacity 0.5s ease-in-out;
}

.video-wrapper.playing .video-poster {
  opacity: 0;
  visibility: hidden;
}

/* ปรับโค้ด CSS เดิมของวิดีโอที่ไม่ได้เล่นให้แสดงภาพปก */
.video-wrapper.inactive .video-poster {
  filter:brightness(80%) blur(5px); /* ฟิลเตอร์สีดรอปๆ เหมือนในวิดีโอ */
}

.video-wrapper.active .video-poster {
  /* ทำให้ภาพปกในวิดีโอที่แอคทีฟดูปกติ */
  filter: none;
}
.video-wrapper.active {
  transform: scale(1); /* ขยายวิดีโอที่เล่นอยู่ */
  z-index: 10;
}

.video-wrapper.inactive video {
  filter: brightness(80%) blur(5px); /* ฟิลเตอร์สีดรอปๆ */
  transition: filter 0.5s ease-in-out;
}
.video-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 50px;
  z-index: 20;
}

.dots-container {
  display: flex;
  gap: 10px;
  margin-right: 20px;
}

.dot {
  width: 10px;
  height: 10px;
  background-color: #555;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.5s;
}

.dot.active {
  background-color: #fff;
  width: 25px;
  border-radius: 10px;
}

.play-pause-button {
  width: 45px;
  height: 45px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.play-icon, .pause-icon {
  width: 24px;
  height: 24px;
  fill: #333;
}

/* Styles for screens up to 480px wide (e.g., small phones) */
@media (max-width: 480px) {
  .video-container {
    height: 234px!important; /* Reduced container height */
    gap: 5px; /* Reduced gap between videos */
    padding: 15px!important;
  }

  .video-wrapper video {
    height: 100%; /* Ensures video fills the wrapper */
  }

  .video-controls {
    bottom: 15px; /* Moves controls up slightly */
    padding: 5px 10px; /* Reduces padding */
  }

  .dots-container {
    gap: 5px;
    margin-right: 10px;
  }

  .dot {
    width: 6px; /* Smaller dot size */
    height: 6px;
  }

  .dot.active {
    width: 15px;
    border-radius: 8px;
  }

  .play-pause-button {
    width: 30px; /* Smaller button size */
    height: 30px;
  }

  .play-icon, .pause-icon {
    width: 16px; /* Smaller icon size */
    height: 16px;
  }
}

/* Styles for screens between 481px and 768px wide (e.g., tablets) */
@media (min-width: 481px) and (max-width: 768px) {
  .video-container {
    height: 400px; /* Adjusted height for tablets */
    gap: 8px; /* Reduced gap between videos */
    padding: 25px;
  }

  .video-controls {
    bottom: 25px; /* Adjusts control position */
    padding: 8px 15px; /* Reduces padding */
  }

  .dots-container {
    gap: 8px;
    margin-right: 15px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  .dot.active {
    width: 20px;
    border-radius: 10px;
  }

  .play-pause-button {
    width: 40px; /* Reduced button size */
    height: 40px;
  }

  .play-icon, .pause-icon {
    width: 20px; /* Reduced icon size */
    height: 20px;
  }
}

@media (max-width: 1023px){
  .video-container {
    height: 450px; /* Adjusted height for tablets */
    gap: 8px; /* Reduced gap between videos */
    padding: 30px;
  }
}
