.featured-projects {
    padding: 30px 0;
    background-color: #ffffff;
    overflow-x: hidden;
    text-align: center;
}
.section-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

/* Grid layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    justify-content: center;
    padding-bottom: 25px;
}

/* Cột dự án */
.project {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    padding: 10px;
    border-radius: 0px;
    border: 1px solid #eee;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 300px;
    max-width: 398px;
    text-align: left;
    transition: transform 0.3s ease-in-out;
}

.project:hover {
    transform: translateY(-5px);
}

/* Khung chứa ảnh */
.vp18h-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
    width: 100%;
}

/* Hình ảnh */
.project-image {
    width: 100%;
    height: 268px;
    object-fit: cover;
    border-radius: 0px;
    transition: transform 0.5s ease-in-out;
}

/* Hiệu ứng vệt sáng */
.vp18h-image-wrapper::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 60%);
    transform: scale(1.5) translate(-100%, 100%);
    opacity: 0;
    transition: transform 0.8s ease-in-out, opacity 0.4s ease-in-out;
}

.vp18h-image-wrapper:hover::after {
    transform: scale(1.5) translate(100%, -100%);
    opacity: 1;
}

/* Hiệu ứng zoom ảnh */
.vp18h-image-wrapper:hover .project-image {
    transform: scale(1.1);
}

/* Tiêu đề */
.project-title {
    font-size: 18px;
    margin: 15px 0 10px;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mô tả */
.project-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .ct18h-section {
    grid-template-columns: repeat(2, 1fr);
}
}
/* Responsive: Mobile và Tablet */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(1, 1fr); /* Mỗi hàng 1 cột */
    }
    .ct18h-section {
        grid-template-columns: repeat(2, 1fr);
    }
    .project {
        max-width: 100%;
    }
}
.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slides {
    position: relative;
    display: flex;
    width: 100%;
    z-index: 1;
}

.slide {
    display: none;
    width: 100%;
    transition: opacity 2s ease-in-out;
}

.slide img {
    width: 100%;
    height: auto; 
    object-fit: cover;
    z-index: 1;
}

.active {
    display: block;
    animation: fadeIn 2s;
}

/* Hiệu ứng fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Nút điều hướng */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 5px;
    z-index: 10;
    transition: 0.3s;
}

.prev:hover, .next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 10px;
}
.next {
    right: 10px;
}

/* Dấu chấm chỉ số */
.dots {
    text-align: center;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: white;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background-color: #ffcc00;
    transform: scale(1.2);
}
.ct18h-section {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ct18h-column {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ct18h-image-container {
    position: relative;
    width: 100%;
    max-width: 230px;
    overflow: hidden;
    border-radius: 10px;
}

.ct18h-image-container img {
    width: 100%;
    height: auto;
    transition: transform 0.2s ease-in-out;
}

/* Hiệu ứng zoom ảnh */
.ct18h-image-container:hover img {
    transform: scale(1.1);
}

/* Vệt sáng chạy chéo từ góc dưới trái lên góc trên phải */
.ct18h-image-container::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 60%);
    transform: scale(1.5) translate(-100%, 100%);
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.2s ease-in-out;
}

.ct18h-image-container:hover::after {
    transform: scale(1.5) translate(100%, -100%);
    opacity: 1;
}

.ct18h-column h3 {
    margin: 15px 0 10px;
    font-size: 1.2em;
}

.ct18h-column p {
    flex-grow: 1; 
    font-size: 1em;
    color: #666;
}

.ct18h-button {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    background: #03512E;
    color: white;
    font-size: 1em;
    border-radius: 99px;
    width: 120px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.ct18h-button:hover {
    background: #012717;
}

/* Responsive */
@media (min-width: 768px) {
    .ct18h-section {
        grid-template-columns: repeat(4, 1fr);
    }
}

.main-video lite-youtube {
    width: 100%;
    max-width: 1000px;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: auto;
}
.container-video-slider {
    max-width: 1260px;
    margin: auto;
    padding: 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
/* Cột trái */
.left-column {
    flex: 7;
}

.right-column {
    flex: 3;
}

/* Hộp thông tin */
.info-box {
    background: none; /* sẽ được phủ bằng overlay */
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box:hover .overlayp {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Hình ảnh */
.image-wrapperp {
    position: relative;
    overflow: hidden;
}

.image-wrapperp img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Zoom ảnh khi hover */
.info-box:hover .image-wrapperp img {
    transform: scale(1.05);
}

/* Overlay trắng chồng 50% lên ảnh, 50% nằm ngoài */
.overlayp {
    background: white;
    padding: 10px;
    margin: -60px 10px 15px 10px; 
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Tiêu đề căn giữa, giới hạn 2 dòng */
.article-textp {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.4em;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

/* Hover đổi màu tiêu đề */
.info-box a:hover .article-textp {
    color: #047338;
}

/* Mô tả căn giữa, giới hạn 2 dòng */
.overlayp p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4em;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* End cam ket */
.camnhan-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}
/* ======== KHỐI 1 - VIDEO SLIDER ======== */
.video-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 175px; /* Độ cao cho PC */
}

/* Slider chứa tất cả video */
.video-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

/* PC: 3 video trên 1 hàng */
.video-item {
    min-width: calc(100% / 3);
    cursor: pointer;
    text-align: center;
    margin: 2px;
    position: relative;
}

.video-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ccc;
    object-fit: cover;
}

/* Nút điều hướng */
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* ======== KHỐI 1 - POPUP VIDEO ======== */
#videoPopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.video-popup-content {
    position: relative;
    width: 80%;
    max-width: 730px;
    background: rgb(1, 153, 115);
    border-radius: 10px;
    padding: 10px;
}

.video-popup-content lite-youtube {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* ======== KHỐI 2 - SLIDER ======== */
.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 200%; /* Số slide * 100% */
}

.slidecn {
    display: flex;
    flex-wrap: wrap;
    width: 50%; /* Mỗi slide chiếm 50% container */
    box-sizing: border-box;
}

.cnvideo-item {
    width: 50%;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
}

.cnvideo-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
}

.cnvideo-item:hover img {
    transform: scale(1.05);
}

/* ======== KHỐI 2 - POPUP VIDEO ======== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    position: relative;
    width: 80%;
    max-width: 730px;
    background: rgb(1, 153, 115);
    border-radius: 10px;
    padding: 10px;
}

.popup-content lite-youtube {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* ======== NÚT ĐÓNG POPUP ======== */
.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FFF;
    color: red;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 500;
}

/* ======== NÚT ĐIỀU HƯỚNG SLIDER KHỐI 2 ======== */
.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
}

.prevcn { left: 10px; }
.nextcn { right: 10px; }

/* ======== HIỆU ỨNG NÚT PLAY ======== */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 30px;
    background: rgba(255, 37, 37, 0.7);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.play-button::before {
    content: '▶';
    color: white;
    font-size: 21px;
    font-weight: bold;
}

.cnvideo-item:hover .play-button {
    opacity: 1;
}

/* ======== RESPONSIVE - MOBILE ======== */
@media (max-width: 768px) {
    .container-video-slider {
        flex-direction: column;
    }
    /* Khối 1 */
    .video-slider-container {
        height: 515px;
    }

    .video-slider {
        flex-direction: column;
    }

    .video-item {
        width: 100%;
        height: 177px; /* Mỗi video chiếm đúng 1 hàng */
    }

    /* Khối 2 */
    .slidecn {
        width: 100%;
    }

    .cnvideo-item {
        width: 100%;
    }

    .slider-track {
        width: 200%;
    }

    .popup-content iframe {
        height: 300px;
    }
}
/* Lý do */
.lydo-section {
    background-color: #fff;
    padding: 40px 10px;
  }

  .lydo-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 40px;
  }

  .grid {
    display: grid;
    grid-template-areas:
      "box1 box1 box2"
      "box1 box1 box3"
      "box4 box5 box6";
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-rows: 250px;
    gap: 0;
  }

  .box {
    position: relative;
    overflow: hidden;
  }

  .box img.bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease;
  }

  .box .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.68);
    z-index: 2;
    transition: background-color 0.5s ease;
  }

  .box-content {
    position: relative;
    z-index: 3;
    padding: 30px;
  }

  .box h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .box p {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .box:hover {
    color: #fff;
  }

  .box button {
    border: 2px solid;
    background: transparent;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
  }

  /* Hover effect cho box3 và box4 */
  .box.box1:hover img.bg-img,
  .box.box2:hover img.bg-img,
  .box.box3:hover img.bg-img,
  .box.box4:hover img.bg-img,
  .box.box5:hover img.bg-img,
  .box.box6:hover img.bg-img {
    transform: scale(1.1);
  }

  .box.box1:hover .overlay,
  .box.box2:hover .overlay,
  .box.box3:hover .overlay,
  .box.box4:hover .overlay,
  .box.box5:hover .overlay,
  .box.box6:hover .overlay {
    background-color: rgba(0, 0, 0, 0.51);
    color: #fff;
  }
 
  /* Grid area assignment */
  .box1 { grid-area: box1; color: #1d1d1d;}
  .box2 { grid-area: box2; color: #1d1d1d;}
  .box3 { grid-area: box3; color: #1d1d1d;}
  .box4 { grid-area: box4; color: #1d1d1d;}
  .box5 { grid-area: box5; color: #1d1d1d;}
  .box6 { grid-area: box6; color: #1d1d1d;}

  /* Button màu riêng từng box */
  .box1 button { border-color: #00C16A; color: #00C16A; }
  .box1 button:hover { background: #00C16A; color: #fff; }

  .box2 button { border-color: #00C16A; color: #00C16A; }
  .box2 button:hover { background: #00C16A; color: #fff; }

  .box3 button { border-color: #00C16A; color: #00C16A; }
  .box3 button:hover { background: #00C16A; color: #fff; }

  .box4 button { border-color: #00C16A; color: #00C16A; }
  .box4 button:hover { background: #00C16A; color: #fff; }

  .box5 button { border-color: #00C16A; color: #00C16A; }
  .box5 button:hover { background: #00C16A; color: #fff; }

  .box6 button { border-color: #00C16A; color: #00C16A; }
  .box6 button:hover { background: #00C16A; color: #fff; }

  /* Responsive */
  @media (max-width: 768px) {
    .grid {
      display: flex;
      flex-direction: column;
    }

    .box {
      min-height: 250px;
    }

    .box-content {
      padding: 10px;
    }

    .box h3 {
      font-size: 18px;
    }

    .box p {
      font-size: 14px;
    }
  }
  /* Popup */
  /* Nút mở popup */
.home-btn-open-popup {
    padding: 10px 20px;
    background-color: #034A25;
    color: #fff;
    border: none;
    /* border-radius: 4px; */
    cursor: pointer;
}

/* Overlay */
.home-popup-overlay {
    position: fixed;
    /* top: 0; */
    left: 10px;
    /* right: 0; */
    bottom: 10px;
    /* background-color: rgba(0, 0, 0, 0.6); */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.home-popup-box {
    background: transparent;
    width: 100%;
    height: auto;
    max-width: 500px;
    max-height:300px;
    /* border: 1px solid #ddd; */
    position: relative;
    z-index: 10000; /* Quan trọng */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
    color: #000; /* Tránh chữ trắng trên nền trắng */
    overflow-y: auto;
}

.home-popup-box h2 {
    margin-top: 0;
    color: #034A25;
    font-size: 22px;
    margin-bottom: 20px;
}

/* Close Button */
/* .home-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    color: #333;
    cursor: pointer;
} */

.home-popup-box.image-popup {
    padding: 0;
    overflow: hidden;
    position: relative;
}

.home-popup-box.image-popup img.popup-image {
    width: 100%;
    display: block;
    height: auto;
    /* border-radius: 10px; */
}

.home-popup-box.image-popup .home-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 28px;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 32px;
    cursor: pointer;
    z-index: 10;
}
/* Form styling */
/* .home-popup-form input,
.home-popup-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.home-popup-form textarea {
    min-height: 80px;
    resize: vertical;
}

.home-popup-form .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 12px;
}

.home-popup-form .checkbox-group label {
    flex: 0 0 calc(50% - 10px);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.home-btn-submit {
    background-color: #F9940B;
    color: #fff;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 4px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
} */

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.excerpt {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .excerpt {
        font-size: 13px;
    }
}