/****************************************** menubar ******************************************/

 body { font-family: 'Inter', sans-serif; margin: 0; padding: 0; }
    
    /* ปรับเส้นใต้เมนูเป็นสีแดง */
    .nav-link-custom { position: relative; transition: all 0.3s ease; }
    .nav-link-custom::after {
        content: ''; position: absolute; width: 0; height: 2px;
        bottom: -5px; left: 0; background-color: #dc3545; transition: width 0.3s ease;
    }
    .nav-link-custom:hover::after { width: 100%; }
    
    .search-container input {
        background-color: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white !important; border-radius: 6px; font-size: 0.85rem;
    }

    /* ปุ่ม Login/Signup ปรับเป็นโทนแดง */
    .btn-login { color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.3); background-color: transparent; border-radius: 6px; }
    .btn-signup { 
        color: #fff; 
        background-color: #dc3545; 
        border: 1px solid #dc3545; 
        border-radius: 6px; 
        font-weight: 600;
        transition: all 0.3s ease;
    }
    .btn-signup:hover {
        background-color: #b02a37;
        border-color: #b02a37;
        color: white;
    }

    /* ปรับสี Info Strip ให้เข้ากับโทนแดง-ดำ */
    .info-strip { 
        background: linear-gradient(90deg, #1a1d20 0%, #dc3545 50%, #1a1d20 100%); 
        padding: 8px 0; 
    }
    .info-text { font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; color: white; }
    
    /* สีของตัวอักษร Language Switcher เมื่อ Active */
    .text-koch-red { color: #dc3545 !important; }

/****************************************** Vedio ******************************************/

   .hero-section {
        position: relative;
        min-height: 80vh;
        display: flex;
        align-items: flex-end; 
        color: white;
        background-color: #000;
        overflow: hidden;
        padding-bottom: 80px; 
    }

    .video-bg {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: translate(-50%, -50%);
        z-index: 0;
        /* ฟิลเตอร์กรองสีทึบ */
        filter: brightness(0.5) grayscale(0.2); 
    }

    .video-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* ไล่เฉดจากโปร่งใสไปมืดสนิทที่ด้านล่าง */
        background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
        z-index: 1;
    }

    .z-index-2 {
        position: relative;
        z-index: 2;
        /* ช่วยให้ตัวหนังสือคมชัดขึ้น */
        text-shadow: 2px 2px 15px rgba(0,0,0,0.6);
    }

    /****************************************** logo และคำอธิบาย ใต้ VDO ******************************************/

     .about-img {
    position: relative;
    padding-left: 45px;
    padding-top: 30px; /* เพิ่มระยะห่างจากด้านบน เพื่อขยับภาพลงมา */
    display: flex;     /* ช่วยให้จัดกึ่งกลางได้ง่ายขึ้น */
    align-items: center; 
    justify-content: center;
}

.about-img img {
    width: 100%;       /* ขยายแนวนอน */
    height: auto;      /* ให้ความสูงปรับตามสัดส่วน */
    max-height: 500px; /* กำหนดความสูงสูงสุดไม่ให้ล้น (ปรับตัวเลขได้ตามต้องการ) */
    object-fit: contain; /* มั่นใจว่ารูปจะไม่บิดเบี้ยว */
}

.about-img::before {
    position: absolute;
    content: "";
    width: 650px;
    height: 610px;
    top: 0;
    left: 0;
    border: 5px solid var(--bs-danger);
    animation: animateUpDown 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes animateUpDown { 
    0% { 
        top: -25px;
    }
    50% { 
        top: -45px;
    }
    100% { 
        top: -25px;
    } 
}

/********** logo และคำอธิบาย ใต้ VDO รูปแบบตัวอักษร **********/

.modern-serif-body {
    font-family: 'Sarabun', sans-serif;
    font-weight: 300; /* ใช้ตัวบางเพื่อให้ดู Modern แบบ Apple */
    line-height: 1.8; /* เว้นระยะบรรทัดให้สระภาษาไทยอ่านง่าย */
    color: #080808;   /* สีขาวนวลช่วยให้ดูแพงและสบายตา */
}

.highlight-red {
    color: #dc3545;
    font-weight: 600; /* เน้นจุดสำคัญด้วยตัวหนาและสีแบรนด์ */
}

.eng-subtext {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    display: block; /* แยกบรรทัดให้ดูเป็นระเบียบ */
    margin-top: 5px;
    opacity: 0.8;
}

/****************************************** 4 Core ******************************************/
/* 1. สร้างกรอบไอคอนให้เท่ากันทุกตัว */
.feature-icon {
    position: relative;
    width: 60px;          /* กำหนดความกว้างตายตัว */
    height: 60px;         /* กำหนดความสูงตายตัว */
    display: flex;        /* จัดกึ่งกลางไอคอนข้างใน */
    align-items: center;
    justify-content: center;
    border-radius: 12px;  /* ทำมุมโค้งมนให้ดู Soft */
    background: #f8f9fa;  /* สีพื้นหลังอ่อนๆ ให้เห็นขอบเขต */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    overflow: visible;    /* ยอมให้เอฟเฟกต์ล้นออกมาได้ */
}

/* 2. เมื่อ Hover: ขยายกรอบและเปลี่ยนสี */
.feature-item:hover .feature-icon {
    margin-left: 1.5rem;
    transform: scale(1.2);          /* ขยายพอดีๆ ไม่ให้แตก */
    background: var(--bs-primary);   /* เปลี่ยนสีพื้นหลังกรอบ */
    color: #ffffff !important;      /* เปลี่ยนสีไอคอนข้างในเป็นขาว */
    box-shadow: 0 10px 20px rgba(var(--bs-danger-rgb), 0.3); /* เงาสีเดียวกับธีม */
}

/* 3. ปรับแต่งเส้นเชื่อม (เชื่อมต่อให้ดูพรีเมียมขึ้น) */
.feature-item a {
    position: relative;
    text-decoration: none;
    z-index: 1;
}

.feature-item a::after {
    position: absolute;
    content: "";
    width: 0;               /* เริ่มต้นจากไม่มีความยาว */
    height: 2px;
    background: var(--bs-danger);
    top: 50%;
    left: -20px;            /* ให้เส้นเริ่มจากหลังไอคอน */
    transition: 0.5s ease;
    z-index: -1;
}

.feature-item:hover a::after {
    width: 100%;            /* เส้นค่อยๆ วิ่งยาวออกมา */
}

/* 4. ส่วนของ Progress Bar ให้ดูเนียนตา */
.experience .progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: visible; /* ให้แสงเรืองล้นออกมาได้ */
}

.experience .progress .progress-bar {
    width: 0;
    transition: 2s cubic-bezier(0.1, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
}


/****************************************** ภาพใหญ่ 4 core ******************************************/

.feature {
    background: linear-gradient(to right, rgba(219, 9, 9, 0.1), rgba(0, 0, 0, 1) 50%), url(../images/4\ Cores.png) left center no-repeat;
    background-size: cover;
}

.feature-row {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.feature-item {
    border-color: rgba(0, 0, 0, .03) !important;
}

/********** รูปแบบตัวอักษร **********/

/* --- Global Weight & Font Setup --- */
/* กำหนดให้ Sarabun หนา 700 เท่ากันทุกหัวข้อ */
.modern-header-bold {
    font-family: 'Sarabun', serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    -webkit-font-smoothing: antialiased;
}

/* --- ส่วนที่ 1: ทำไมต้องเลือกเรา (Feature Section) --- */
.modern-serif-title {
    font-family: 'Sarabun', serif;
    font-weight: 700;
    color: #ffffff; /* สีขาวสำหรับพื้นหลังเข้ม */
    font-size: 2.8rem;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.modern-serif-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    background: #dc3545;
    border-radius: 2px;
}

.feature-description-bold {
    font-family: 'Sarabun', serif;
    font-weight: 700; /* ปรับให้หนาตามหัวข้อ */
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

/****************************************** สาขาโรงาน ******************************************/

/* จัดการกรอบหลักของ Team Item */
.team-item {
    transition: .5s;
    background: #ffffff;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08); /* เพิ่มเงาอ่อนๆ ให้ดูมีมิติ */
}

.team-item:hover {
    transform: translateY(-10px); /* ให้ยกตัวขึ้นเล็กน้อยเมื่อเมาส์วาง */
}

/* จัดการรูปภาพและการซ่อนส่วนเกิน */
.team-item .position-relative {
    overflow: hidden; /* บังคับไม่ให้ของข้างในล้นออกมาข้างนอกกรอบรูป */
}

.team-item img {
    transition: .5s;
}

.team-item:hover img {
    transform: scale(1.1); /* เมื่อเอาเมาส์วาง รูปจะขยายใหญ่ขึ้นเล็กน้อย */
}

/* จัดการส่วนตัวหนังสือ (Bangsaen) ที่ล้น */
.team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--bs-danger-rgb), 0.85); /* พื้นหลังสีใสๆ ตามธีม */
    transition: .5s;
    
    /* หัวใจสำคัญ: ซ่อนไว้ด้านล่างและทำให้มองไม่เห็น */
    opacity: 0;
    transform: translateY(100%); 
}

/* เมื่อเอาเมาส์วาง ให้เลื่อนขึ้นมาและแสดงตัว */
.team-item:hover .team-social {
    opacity: 1;
    transform: translateY(0);
}

.team-social h2 {
    color: #ffffff;
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin: 0;
    padding: 0 15px;
    text-align: center;
}

/********** รูปแบบตัวอักษร **********/

.location-tag {
    font-family: 'Poppins', sans-serif;
    font-weight: 700; /* หนาเท่ากัน */
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: #dc3545;
}

.factory-location-title {
    font-family: 'Sarabun', serif;
    font-weight: 700;
    color: #1a1d20;
    font-size: 2.5rem;
}

/****************************************** สินค้าแนะนำ ******************************************/

/*** Service ***/
.service .service-item {
    position: relative;
    margin-top: 45px;
}

.service .service-inner {
    position: relative;
    height: 100%;
    margin-top: 45px;
    background: var(--bs-white);
    box-shadow: 0 0 45px rgba(243, 2, 2, 0.87);
}

.service .service-inner::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    left: 0;
    bottom: 0;
    transition: 1s;
    background: var(--bs-danger);
}

.service .service-inner:hover::before {
    height: 100%;
    top: 0;
}

.service .service-item img {
    margin-top: -45px;
    padding-left: 45px;
}

.service .service-item * {
    position: relative;
    transition: .5s;
    z-index: 1;
}

.service .service-item:hover h5,
.service .service-item:hover p {
    color: var(--bs-white);
}

.service .service-item:hover a {
    padding-left: 45px !important;
}

/********** รูปแบบตัวอักษร **********/

/* หัวข้อเล็กด้านบน (Poppins) */
.location-tag {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: #dc3545; /* สีแดง */
    display: block;
    margin-bottom: 10px;
}

/* หัวข้อภาษาไทยหลัก (Sarabun) */
.factory-location-title {
    font-family: 'Sarabun', sans-serif;
    font-weight: 700;
    color: #1a1d20;
    font-size: 2.5rem;
    letter-spacing: 0; /* ภาษาไทยไม่ควรมีระยะห่างตัวอักษรมากเกินไป */
}

/* คำบรรยายใต้หัวข้อ */
.partnership-subtitle {
    font-family: 'Sarabun', sans-serif;
    font-weight: 400;
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* ปรับฟอนต์หัวข้อสินค้าใน Card */
.service-text h5 {
    font-family: 'Poppins', 'Sarabun', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
}

/****************************************** ภาพใหญ่โรงงาน ******************************************/

.appoinment {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../images/BG-Home.png) left center no-repeat;
    background-size: cover;
}

/****************************************** รูปลูกค้า(พันธมิตร) ******************************************/
/* ส่วนกล่องแม่ (Wrapper) */
.clients .clients-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px; /* ระยะห่างระหว่างกล่อง */
  padding: 30px 0;
}

/* ส่วนกล่องโลโก้แต่ละใบ */
.clients .client-logo {
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  
  /* บังคับแถวละ 4 คอลัมน์ (25%) */
  flex: 0 0 calc(25% - 20px); 
  min-width: 200px; /* เพิ่มความกว้างขั้นต่ำเล็กน้อย */
  height: 140px;    /* เพิ่มความสูงให้กล่องดูใหญ่ขึ้น */
  
  border-radius: 12px;
  padding: 15px;    /* ลด Padding ลงเพื่อให้รูปภาพขยายได้กว้างขึ้น */
  position: relative;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* เงาบางๆ ให้ดูละมุน */
}

/* ส่วนตัวรูปโลโก้ - ปรับให้ใหญ่ขึ้น */
.clients .client-logo img {
  width: auto;
  height: auto;
  /* ขยายขนาดรูปให้ใหญ่ขึ้นเกือบเต็มกล่อง */
  max-width: 92%; 
  max-height: 85%;
  object-fit: contain;
  
  /* เน้นสีสันและความคมชัด */
  filter: brightness(1) contrast(1.05);
  transition: all 0.4s ease;
}

/* --- ลูกเล่นเมื่อ Hover --- */
.clients .client-logo:hover {
  transform: translateY(-8px); /* ลอยขึ้น */
  box-shadow: 0 12px 30px rgba(0,0,0,0.1); /* เงาเข้มขึ้น */
}

.clients .client-logo:hover img {
  transform: scale(1.08); /* ขยายรูปอีกนิดตอน Hover */
}

/* เส้นสีแดง (ลบออกได้ถ้าต้องการความ Clean ที่สุด) */
.clients .client-logo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 4px;
  background-color: #dc3545;
  border-radius: 10px 10px 0 0;
  transition: all 0.3s ease;
}

.clients .client-logo:hover::after {
  width: 60%;
  left: 20%;
}

/* ปรับแต่งสำหรับ Tablet และ มือถือ */
@media (max-width: 992px) {
  .clients .client-logo {
    flex: 0 0 calc(33.33% - 20px); /* หน้าจอขนาดกลาง 3 คอลัมน์ */
  }
}

@media (max-width: 768px) {
  .clients .client-logo {
    flex: 0 0 calc(50% - 15px); /* มือถือ 2 คอลัมน์ */
    height: 110px;
  }
}

/********** รูปแบบตัวอักษร **********/

/* หัวข้อภาษาอังกฤษด้านบน (Poppins) */
.location-tag {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: #dc3545; /* สีแดง Danger */
    display: block;
    margin-bottom: 10px;
}

/* หัวข้อภาษาไทยหลัก (Sarabun) */
.factory-location-title, .partnership-title {
    font-family: 'Sarabun', sans-serif;
    font-weight: 700;
    color: #1a1d20;
    font-size: 2.5rem; /* ขนาดใหญ่พิเศษตามที่คุณต้องการ */
    line-height: 1.2;
}

/* คำบรรยายใต้หัวข้อ (Sarabun) */
.partnership-subtitle {
    font-family: 'Sarabun', sans-serif;
    font-weight: 400;
    color: #444; /* สีเทาเข้มให้อ่านง่าย */
    line-height: 1.6;
}

/****************************************** Footer ******************************************/

/* บังคับให้ปุ่ม Link ใน Footer ชิดซ้ายสุดและไม่มี Padding ส่วนเกิน */
.footer .btn.btn-link {
    display: block;
    padding-left: 0 !important; /* ล้างค่าเดิมของ Bootstrap */
    padding-top: 0;
    padding-bottom: 8px; /* ระยะห่างระหว่างบรรทัด */
    color: #ffffff !important;
    text-decoration: none;
    transition: 0.3s;
}

/* ถ้าอยากให้มีลูกศรนำหน้าแล้วยังดูตรงกัน */
.footer .btn.btn-link::before {
    content: "\f105"; /* ไอคอนลูกศร */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    padding-left: 10px !important; /* เวลา Hover ให้ขยับขวาเล็กน้อย */
    color: rgba(255,255,255,0.7) !important;
}

