
.txt1 {
  text-align: center; /* căn giữa toàn bộ */
  padding: 20px;
}

.txt1 p {
  color: black;
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 20px 0;
}

    .grid-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Chia thành 2 cột */
        gap: 20px;
        padding: 20px;
        justify-content: center;
    }
    .category {
        position: relative;
        overflow: hidden;
        text-align: center;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease-in-out;
    }
    .category img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 10px;
        object-fit: cover; /* Hình ảnh co giãn để phủ đầy */
        transition: transform 0.5s ease;
    }
    .category:hover img {
        transform: scale(1.1);
    }
    .overlay {
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translate(-50%, 0);
        color: white;
        font-size: 24px;
        font-weight: bold;
        background: rgba(0, 0, 0, 0.6);
        padding: 10px 20px;
        border-radius: 5px;
        opacity: 0;
        transition: bottom 3.5s ease, opacity 3.5s ease;
        width:30vw;
    }
    .category.visible .overlay {
        bottom: 20px;
        opacity: 1;
    }

    
    .more-btn {
        display: block;
        margin: 10px auto;
        padding: 10px 20px;
        background: #007BFF;
        color: #fff;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        text-align: center;
        font-weight: bold;
    }
    .more-btn:hover {
        background: yellow;
        color: black;
        box-shadow: 0px 4px 10px rgba(255, 255, 0, 0.6); /* Hiệu ứng nổi */
    }
    .highlight .overlay {
        color: yellow;
        background: rgba(0, 0, 0, 0.8);
    }
    .highlight .more-btn {
        background: rgba(255, 215, 0, 1);
        color: black;
    }
    
    .popup {
        display: none;
        position: fixed;
        top: 15%;
        bottom: 20%;
        left: 50%;
        transform: translate(-50%, 0);
        background: white;
        padding: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        border-radius: 8px;
        width: 80%;
        height: 80vh; /* Chiều cao tự động theo nội dung */
    }                                               

    .overlayHome {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5); /* Làm tối nền */
        backdrop-filter: blur(8px); /* Hiệu ứng làm mờ */
        z-index: 999; /* Đặt dưới modal nhưng trên nội dung */
        display: none; /* Ẩn mặc định */
    }
    .popup-container {
        display: flex;
        width: 100%;
        height: 90%;
    }
    
    .popup-left {
        flex: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .popup-left img {
        width: 100%;
        max-width: auto;
    }
    
    .popup-right {
        flex: 2;
        padding-left: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .close-btn {
        position: absolute;
        top: 10px;
        right: 15px;
        cursor: pointer;
        font-size: 14px;
        border: 2px solid black;
        padding: 5px 12px;
        border-radius: 5px;
        transition: background 0.3s ease, color 0.3s ease;
    }
    
    .close-btn:hover {
        background: red;
        color: white;
        border-color: red;
    }
    .popup-navigation {
            display: flex;
            justify-content: space-between;
            margin-top: -45px;
        }
    
    .popup-navigation button {
        cursor: pointer; /* Biến con trỏ thành hình bàn tay */
        transition: background-color 0.3s, color 0.3s;
        padding: 8px 16px;
        border: none;
        background-color: rgb(8, 93, 153); /* Màu nền mặc định */
        color: white;
        border-radius: 5px;
        font-weight: bold;
        font-size: 20px;
        transition: all 0.3s ease-in-out;

    }
    
    .popup-navigation button:hover {
        background-color: #007bff; /* Màu nền khi hover */
        color: white; /* Màu chữ khi hover */
        transform: scale(1.1);
    }
    .page-indicator {
        display: inline-block;
        padding: 5px 15px;
        font-size: 16px;
        font-weight: bold;
        color: #fff;
        background: rgb(8, 93, 153);
        border-radius: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease-in-out;
    }
    
    .page-indicator:hover {
        background: rgb(8, 93, 153);
        transform: scale(1.1);
    }
    
    .popup-category-title {
        text-align: center;
        font-size: 24px;
        font-weight: bold;
        color: red;
        margin-bottom: 15px;
    }
    
    .popup-categories {
        display: flex;
        justify-content: center; /* Căn giữa ngang */
        gap: 15px; /* Khoảng cách giữa các nút */
        margin: 0;
    }
    
    .popup-categories button {
        padding: 8px 16px;
        border: none;
        background: #007bff;
        color: white;
        font-size: 12px;
        cursor: pointer;
        border-radius: 5px;
        transition: background 0.3s ease;
    }
    
    .popup-categories button:hover {
        background: #0056b3;
    }

    #popup-category-title {
        text-transform: uppercase;
    }
    
    .popup-categories button.active {
        background-color: red;
        color: white;
        font-weight: bold;
    }
    

/*///////////////////////////////////////////////////
//
//            ▼ 工場設備02 ▼
//
///////////////////////////////////////////////////*/
.facility02 .facility02_in h3 {
  position: relative;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 0 2rem 2.25rem;
  margin-bottom: 1.5rem;
  color: #085d99;
  border-bottom: solid 1px #085d99;
}

.facility02 .facility02_in h3::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 1.375rem;
  height: 1.375rem;
  background: #085d99;
}

.facility02 .facility02_in .box .item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 5rem;
}

@media screen and (min-width: 768px) and (max-width: 1025.999px) {
  .facility02 .facility02_in .box .item {
    gap: 1.5rem 3rem;
  }
}

.facility02 .facility02_in .box .item .machine_list {
  grid-area: item01;
}

.facility02 .facility02_in .box .item .machine_list li {
  font-size: 1rem;
  font-weight: 700;
  color: #085d99;
}

.facility02 .facility02_in .box .item .machine_list li+li {
  margin-top: 1.5rem;
}

.facility02 .facility02_in .box .item figure img {
  width: 100%;
  height: auto;
}

.facility02 .facility02_in .box .item .spec.spec01 {
  grid-area: spec01;
}

.facility02 .facility02_in .box .item .spec.spec02 {
  grid-area: spec02;
}

.facility02 .facility02_in .box .item .spec h4 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #085d99;
  text-align: center;
  padding: 0.9375rem;
}

.facility02 .facility02_in .box .item .spec dl {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.3125rem;
  margin-top: 0.625rem;
}

.facility02 .facility02_in .box .item .spec dl dt,
.facility02 .facility02_in .box .item .spec dl dd {
  font-size: 1rem;
  line-height: 1;
  color: #085d99;
  text-align: center;
  padding: 1.25rem 0.9375rem;
  border: solid 1px #085d99;
}

@media screen and (min-width: 1026px) and (max-width: 1279.999px) {
  .facility02 .facility02_in .box .item .spec dl dd {
    display: flex;
    align-items: center;
  }
}

@media screen and (min-width: 768px) and (max-width: 1025.999px) {
  .facility02 .facility02_in .box .item .spec dl dd {
    display: flex;
    align-items: center;
  }
}

.facility02 .facility02_in .box01 {
  margin-top: 3.75rem;
}

.facility02 .facility02_in .box01 .item {
  grid-template-areas: "item01 item01" "img01 img02";
}

.facility02 .facility02_in .box01 .item .img01 {
  grid-area: img01;
}

.facility02 .facility02_in .box01 .item .img02 {
  grid-area: img02;
}

.facility02 .facility02_in .box02 {
  margin-top: 7.5rem;
}

.facility02 .facility02_in .box02 .item {
  grid-template-areas: "item01 img01" "spec01 spec02";
}

.facility02 .facility02_in .box02 .item .img01 {
  grid-area: img01;
}

.facility02 .facility02_in .box03 {
  margin-top: 7.5rem;
}

.facility02 .facility02_in .box03 .item {
  grid-template-areas: "item01 img01" "spec01 img01" ". img01";
  row-gap: 1.5rem;
  align-items: start;
}

.facility02 .facility02_in .box03 .item .img01 {
  grid-area: img01;
}

.facility02 .facility02_in .box04 {
  margin-top: 7.5rem;
}

.facility02 .facility02_in .box04 dl .item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
  border-bottom: solid 1px #085d99;
}

.facility02 .facility02_in .box04 dl .item+.item {
  margin-top: 3rem;
}

.facility02 .facility02_in .box04 dl .item dt,
.facility02 .facility02_in .box04 dl .item dd {
  font-weight: 700;
  color: #085d99;
  padding-bottom: 1.125rem;
}

.facility02 .facility02_in .box04 dl .item dt {
  position: relative;
  font-size: 1.375rem;
  line-height: 1;
  padding-left: 2.25rem;
}

.facility02 .facility02_in .box04 dl .item dt::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 1.375rem;
  height: 1.375rem;
  background: #085d99;
}

.facility02 .facility02_in .box04 dl .item dd {
  font-size: 1rem;
}

/*///////////////////////////////////////////////////
//
//            ▼ 工場設備02【英語】 ▼
//
///////////////////////////////////////////////////*/
.facility02.facility_en02 .box04 dl .item dt {
  width: 20%;
  min-width: 186px;
}

/*///////////////////////////////////////////////////
//
//            ▼ 工場設備02【ベトナム語】 ▼
//
///////////////////////////////////////////////////*/
.facility02.facility_vn02 .box02 .item .spec dl,
.facility02.facility_vn02 .box03 .item .spec dl {
  grid-template-columns: 1.6fr 2fr;
}

@media screen and (min-width: 768px) and (max-width: 1025.999px) {

  .facility02.facility_vn02 .box02 .item .spec dl,
  .facility02.facility_vn02 .box03 .item .spec dl {
    grid-template-columns: 1.55fr 2fr;
  }
}

.facility02.facility_vn02 .box04 dl .item dt {
  width: 22%;
  min-width: 220px;
}

/*///////////////////////////////////////////////////
//
//            ▼ 工場設備03 ▼
//
///////////////////////////////////////////////////*/
.facility03 {
  margin-top: 7.5rem;
  padding: 0 0 40.625rem;
}

@media screen and (min-width: 1280px) and (max-width: 1439.999px) {
  .facility03 {
    padding: 0 0 28.75rem;
  }
}

@media screen and (min-width: 768px) and (max-width: 1279.999px) {
  .facility03 {
    padding: 0 0 10rem;
  }
}

.facility03::before {
  position: absolute;
  content: "";
  top: 34%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-94deg, #085d99 50.77%, rgba(8, 93, 153, 0.8) 88.05%);
  clip-path: polygon(0 24%, 100% 0%, 100% 46%, 0 70%);
}

@media screen and (min-width: 768px) and (max-width: 1279.999px) {
  .facility03::before {
    top: 30%;
    clip-path: polygon(0 47%, 100% 28%, 100% 76%, 0 95%);
  }
}

.facility03 .swiper {
    margin-top: 3.75rem;
    position: relative;
    width: 100%;
    max-width: 1600px;  /* Tăng kích thước tối đa */
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    
}

.facility03 .swiper .swiper-container {
    padding-bottom: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Slide Video */
.facility03 .swiper .swiper-container .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.facility03 .swiper .swiper-container .swiper-slide video {
    aspect-ratio: 16/9;
    width: 100%;  /* Video chiếm toàn bộ chiều ngang */
    height: auto;
    transition: transform 0.3s ease-in-out;
}

.facility03 .swiper .swiper-container .swiper-slide video:hover {
    transform: scale(1.03);
}

/* Pagination - Hình chữ nhật */
.facility03 .swiper .swiper-container .swiper-pagination-bullet {
    width: 30px;  /* Chiều dài hình chữ nhật */
    height: 8px;  /* Chiều cao */
    background: #ccc;
    border-radius: 4px; /* Bo nhẹ các góc */
    transition: background-color 0.3s, transform 0.3s;
    cursor: pointer;
    opacity: 1;
}

.facility03 .swiper .swiper-container .swiper-pagination-bullet-active {
    background: #ff6b6b; /* Màu nổi bật */
    transform: scaleX(1.4); /* Nhấn mạnh nút active */
}


/*///////////////////////////////////////////////////
//
//            ▼ CTA（工場設備） ▼
//
///////////////////////////////////////////////////*/
#facility .contact_cta {
  margin-top: calc(clamp(400px, 33.8541666667vw, 650px) * -1);
}

@media screen and (min-width: 1026px) and (max-width: 1279.999px) {
  #facility .contact_cta {
    margin-top: -5rem;
  }
}

@media screen and (min-width: 768px) and (max-width: 1025.999px) {
  #facility .contact_cta {
    margin-top: -3.75rem;
  }
}

/*video background*/
/* Container chứa video */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -999; /* Đặt video ở lớp dưới */
}

/* Video nền */
.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lớp phủ màu trắng với opacity */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85); /* Màu trắng với độ mờ 60% */
    z-index: 0; /* Đặt trên video */
}

/* Lớp phủ màu trắng với opacity */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85); /* Màu trắng với độ mờ 60% */
    z-index: 0; /* Đặt trên video */
}

@media (max-width: 767px) {
    .overlay {
        padding: 8px; /* Giảm khoảng cách padding */
        font-size: 8px; /* Thu nhỏ chữ */
    }

    .overlay .more-btn {
        font-size: 6px; /* Thu nhỏ nút MORE */
        padding: 3px 8px;
    }
}

/* Ẩn popup container trên mobile */
/* Điều chỉnh container cho mobile */
@media (max-width: 767px) {
    .container {
        width: 100%;
        padding: 10px;
    }

    /* Ẩn popup container trên mobile */
    .popup .popup-right {
        display: none !important;
    }

    /* Chỉnh overlay nhỏ lại trên mobile */
    .overlay {
        font-size: 14px;
        padding: 8px;
    }

    /* Điều chỉnh các item trong section */
    .service03_in .item {
        padding: 15px;
        text-align: center;
    }

    /* Ẩn một số item trên mobile nếu cần */
    .service03_in .item04, 
    .service03_in .item05 {
        display: none;
    }

    /* Điều chỉnh grid cho danh mục facility */
    .grid-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .category {
        width: 100%;
        text-align: center;
    }

    /* Hình ảnh danh mục thu nhỏ lại trên mobile */
    .category img {
        max-width: 100%;
        height: auto;
    }

    /* Nút MORE nhỏ lại */
    .more-btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Chỉnh sửa tiêu đề */
    .section_ttl {
        font-size: 18px;
        text-align: center;
    }

    /* Điều chỉnh icon */
    .section_ttl i {
        font-size: 35px !important;
    }

    /* Điều chỉnh popup navigation */
    .popup-navigation {
        display: flex;
        justify-content: space-between;
    }

    .popup-navigation button {
        font-size: 12px;
        padding: 5px;
    }
}
@media (max-width: 767px) {
    /* Giảm kích thước nút chung */
    button {
        font-size: 12px;
        padding: 5px 10px;
        border-radius: 5px;
    }

    /* Chỉnh sửa nút "MORE" */
    .more-btn {
        font-size: 11px;
        padding: 4px 8px;
        width: auto;
    }

    /* Điều chỉnh các nút trong popup */
    .popup-categories button {
        font-size: 3px;
        padding: 3px 1px;
        margin: -1px;
    }

    /* Nút navigation trong popup */
    .popup-navigation button {
        font-size: 12px;
        padding: 5px;
        min-width: 60px;
    }
}


