.hero-section {
    position: relative;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Lớp phủ màu đen để làm nổi bật chữ trắng/vàng */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Độ mờ 50%, tăng số 0.5 lên nếu muốn tối hơn */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Phải cao hơn overlay */
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 700;
    color: #f39c12; /* Màu vàng cam đặc trưng của TNC */
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 2px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
    text-transform: uppercase;
}

/* Hiệu ứng Responsive cho mobile */
@media (max-width: 768px) {
    .hero-title {
        margin-bottom: 15px;
    }
}



.about-section {
    padding: 80px 0;
    background-color: #fff;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Chia đôi 2 cột */
    align-items: center;
    gap: 50px;
    position: relative;
}

/* Xử lý hình ảnh và hiệu ứng mờ dần */
.about-image {
    position: relative;
    height: 100%;
    min-height: 500px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-gradient-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%; /* Làm mờ dần ở 50% phía bên phải ảnh */
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
}

/* Nội dung văn bản */
.about-content {
    padding: 20px;
}

.sub-title {
    color: #f39c12;
    font-weight: 500;
    display: block;
    margin-bottom: 15px;
}

.main-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 25px;
    color: #000;
}

.description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Grid các con số */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.stat-item {
    text-align: center;
}

.stat-item img {
    width: 60px;
    height: 60px;
}

.stat-item h3 {
    color: #FF9D00;
    font-size: 36px;
    font-weight: 700;
}

.stat-item p {
    font-weight: 700;
    font-size: 16px;
    color: #000;
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr; /* Chuyển thành 1 cột trên tablet/mobile */
    }
    .image-gradient-overlay {
        width: 100%;
        background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
        bottom: 0;
        top: auto;
        height: 30%;
    }
}

.counter-value {
    display: block;
    min-width: 80px;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.catalogue-container {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.catalogue-header-container{
    display: flex;
    justify-content: space-between;
}

.catalogue-header{
    font-size: 32px;
    font-weight: bold;
    color: #000;
}

/* SỬA ĐỔI: Thêm border mặc định để tránh bị giật khung khi hover */
.catalogue-btn-more {
    background-color: #FF9D00;
    color: white;
    text-decoration: none;
    margin-top: 6px;
    margin-bottom: 6px;
    padding: 6px 30px;
    border: 2px solid #FF9D00; /* Thêm border mặc định trùng màu nền */
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* SỬA ĐỔI: Hiệu ứng dịch chuyển mũi tên nhẹ nhàng */
.catalogue-arrow {
    margin-left: 10px;
    font-size: 1.2rem;
    transition: transform 0.3s ease; /* Thêm transition cho mũi tên */
}

.catalogue-category{
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.catalogue-category-grid-1, 
.catalogue-category-grid-2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    width: 100%;
}

.catalogue-category-grid-1 > *, 
.catalogue-category-grid-2 > * { 
    flex: 0 0 calc(25% - 2.25rem); 
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.catalogue-category-item{
    width: 200px;
    text-decoration: none;
    color: #000;
    text-align: center;
    
    /* HIỆU ỨNG: Animation xuất hiện khi load trang */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* HIỆU ỨNG: Tạo độ trễ (delay) cho từng item xuất hiện lần lượt */
.catalogue-category-grid-1 > :nth-child(1) { animation-delay: 0.1s; }
.catalogue-category-grid-1 > :nth-child(2) { animation-delay: 0.2s; }
.catalogue-category-grid-1 > :nth-child(3) { animation-delay: 0.3s; }
.catalogue-category-grid-1 > :nth-child(4) { animation-delay: 0.4s; }

.catalogue-category-grid-2 > :nth-child(1) { animation-delay: 0.2s; }
.catalogue-category-grid-2 > :nth-child(2) { animation-delay: 0.3s; }
.catalogue-category-grid-2 > :nth-child(3) { animation-delay: 0.4s; }
.catalogue-category-grid-2 > :nth-child(4) { animation-delay: 0.5s; }

.catalogue-category-item img {
    border-radius: 20px;
    width: 100%;
    height: 100%;
    max-width: 180px;
    max-height: 180px;
    aspect-ratio: 1;
    object-fit: cover;
    /* HIỆU ỨNG: Mượt mà khi phóng to ảnh */
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}

.catalogue-category-item p{
    font-size: 16px;
    font-weight: 700;
    transition: color 0.3s ease; /* HIỆU ỨNG: Mượt mà khi đổi màu chữ */
}

/* ==========================================================================
   HIỆU ỨNG HOVER (Chỉ áp dụng trên máy tính để tránh lỗi trên thiết bị di động)
   ========================================================================== */
@media (hover: hover) {
    .catalogue-btn-more:hover {
        background-color: #fff;
        border-color: #FF9D00;
        color: #FF9D00;
    }

    .catalogue-btn-more:hover .catalogue-arrow {
        transform: translateX(5px); /* Mũi tên dịch sang phải nhẹ */
    }

    .catalogue-category-item:hover img {
        transform: scale(1.04); /* Phóng to ảnh nhẹ */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Thêm bóng đổ nhẹ tạo chiều sâu */
    }

    .catalogue-category-item:hover p {
        color: #FF9D00; /* Chuyển màu chữ tiêu đề sang cam */
    }
}

/* ==========================================================================
   KEYFRAMES ANIMATION (Xuất hiện khi tải trang)
   ========================================================================== */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
/* 1. Cho máy tính bảng (Tablet) */
@media (max-width: 1024px) {
    .catalogue-category-grid-1 > *, 
    .catalogue-category-grid-2 > * { 
        flex: 0 0 calc(50% - 1.5rem); 
        max-width: 50%;
    }

    .catalogue-header {
        font-size: 32px; 
    }
}

/* 2. Cho điện thoại (Mobile) */
@media (max-width: 600px) {
    /* Đảm bảo trên mobile không bị giật lag do hiệu ứng phức tạp */
    .catalogue-category-item {
        /* Có thể giảm bớt khoảng cách dịch chuyển trên mobile để mượt hơn */
        transform: translateY(10px); 
    }

    .catalogue-header-container {
        flex-direction: column; 
        align-items: center;
        gap: 1rem;
    }

    .catalogue-category-grid-1, 
    .catalogue-category-grid-2 {
        gap: 2rem; 
                display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .catalogue-category-grid-2 .catalogue-category-item:last-child {
    grid-column: span 2;
    max-width: 100%;
}

    .catalogue-category-grid-1 > *, 
    .catalogue-category-grid-2 > * { 
        flex: 0 0 100%; 
        max-width: 100%;
    }

    .catalogue-category-item {
        width: 100%; 
        max-width: 280px; 
    }

    .catalogue-header {
        font-size: 24px;
    }
    
    .catalogue-category-grid-2 {
        margin-top: 0; 
    }
    
    /* Hover dự phòng tối giản cho thiết bị di động (khi người dùng nhấn giữ) */
    .catalogue-btn-more:active {
        background-color: #e08a00;
    }

    .catalogue-btn-more {
        padding: 0px 10px;
    }
}

.tnc-solutions h2{
    color: #FF9D00;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3rem;
}

.tnc-wrapper {
    display: flex;
    width: 100%;
    overflow: hidden;
    min-height: 85vh;
    max-height: 85vh;
}

.tnc-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    transition: flex 1.5s ease;
    /* aspect-ratio: 2752 / 1536; */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    cursor: pointer;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.tnc-clip-path {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transition: clip-path 0.3s ease, background 0.3s ease;
    background: rgba(0, 0, 0, 0.8);
    clip-path: polygon(0 0, calc(0% + 60px) 10%, calc(0% + 60px) 90%, 0 100%);
    z-index: 2;
    pointer-events: none;
}

.tnc-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.9) 20%, rgba(255, 255, 255, 0) 100%);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.tnc-item span {
    color: #fff;
    font-weight: 700;
    text-align: center;
    z-index: 3;
    writing-mode: sideways-lr;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 24px;
    padding: 50px 10px;
    transition: font-size 0.4s ease,
                padding 0.4s ease,
                color 0.4s ease,
                opacity 0.3s ease;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.tnc-hover-content {
    flex: 6;
    position: relative;
    align-items: flex-end;
    justify-content: flex-start;
    transform: translateY(-50%) translateX(20px);
    width: 100%;
    /* max-width: 320px; */
    opacity: 0;
    z-index: 4;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.tnc-hover-content p {
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    text-align: left;
    font-weight: 300;
}
/* --- HIỆU ỨNG HOVER --- */

/* Hiệu ứng HOVER */
.tnc-item:hover {
    flex: 6;
    align-items: flex-end;
    justify-content: flex-start;
}

.tnc-item:hover .tnc-clip-path {
    background: rgba(0,0,0,0.8);
    /* clip-path: polygon(0 calc(100% - 42px), 85% calc(100% - 42px), 100% 100%, 0 100%); */
    clip-path: polygon(0 calc(100% - 120px), 85% calc(100% - 120px), 100% 100%, 0 100%);
}

.tnc-item:hover .tnc-overlay {
    opacity: 1;
}

.tnc-item:hover span {
    color: #fff;
    opacity: 0;
}

.tnc-wrapper:hover .tnc-item {
    flex: 0.4 1 0;
    min-width: 0;
}

/* Item đang hover thì nở ra */
.tnc-wrapper .tnc-item:hover {
    flex: 6 1 0;
}

.tnc-hover {
    position: relative;
    bottom: 10px;
    left: 1rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    /* text-transform: uppercase; */
    white-space: normal;
    z-index: 3;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.tnc-item:hover .tnc-hover,
.tnc-item:hover .tnc-hover .tnc-hover-title,
.tnc-item:hover .tnc-hover .tnc-hover-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1s;
}

.tnc-item:hover .tnc-hover-content {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* RESPONSIVE */
/* RESPONSIVE */
@media (max-width: 1024px) {
    .tnc-wrapper {
        flex-direction: column; /* Stack items vertically */
        height: auto;
        min-height: auto;   /* Reset desktop constraint */
        max-height: none;   /* Reset desktop constraint */
        gap: 16px;          /* Add comfortable spacing between cards */
        padding: 10px;
        box-sizing: border-box;
    }
    
    .tnc-item {
        pointer-events: none;
        flex: none !important;
        width: 100%;
        min-height: 240px;  /* Defined height to showcase background image */
        height: auto;
        border-right: none;
        border-bottom: none;
        border-radius: 8px; /* Subtle rounded corners for a modern card feel */
        display: flex;
        flex-direction: column; 
        justify-content: flex-end; /* Align content nicely at the bottom of the card */
        align-items: flex-start;
        padding: 24px;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* 1. Hide desktop-only overlay */
    .tnc-overlay {
        display: none !important;
    }

    /* 2. Replace diagonal clip-path with a readable bottom-to-top gradient */
    .tnc-clip-path {
        clip-path: none !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 100%) !important;
        z-index: 1;
    }

    /* 3. Reset title span to flow naturally */
    .tnc-item span {
        display: none;
    }

    /* 4. Reset the hover wrapper so contents are visible */
    .tnc-hover {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        opacity: 1 !important;
        transform: none !important;
        z-index: 2;
        pointer-events: none !important;
        width: 100%;
    }

    /* 5. Clean up description layout */
    .tnc-hover-content {
        position: relative !important; 
        transform: none !important;  
        width: 100% !important;
        max-width: 100% !important;
        opacity: 1 !important;       
        pointer-events: none !important;
        z-index: 2;
    }

    .tnc-hover-content p {
        color: rgba(255, 255, 255, 0.9) !important; 
        font-size: 14px; 
        line-height: 1.5;
        margin: 0;
        text-align: left;
    }
    
    /* 6. Avoid desktop hover interactions on touch screens */
    .tnc-wrapper:hover .tnc-item,
    .tnc-wrapper .tnc-item:hover {
        flex: none !important;
    }

    .tnc-item:hover .tnc-hover,
    .tnc-item:hover .tnc-hover .tnc-hover-title,
    .tnc-item:hover .tnc-hover .tnc-hover-content {
        transition-delay: 0s; /* Remove the 1s delay on mobile tap */
    }
}



/* Container tổng */
.marquee-section {
    padding: 50px 0;
    text-align: center;
    overflow: hidden;
}

.marquee-section h2 {
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 25px;
    color: #FF9D00;
}

/* Vùng chứa giới hạn hiển thị */
.marquee-container {
    display: flex;
    overflow: hidden;
    user-select: none;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); /* Làm mờ 2 đầu */
}

/* Khối nội dung chạy */
.marquee-content-partners {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-shrink: 0;
    min-width: 100%;
    gap: 50px; /* Khoảng cách giữa các logo */
    animation: scroll-left 30s linear infinite; /* Chỉnh tốc độ ở đây (30s) */
}

.marquee-content-clients {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-shrink: 0;
    min-width: 100%;
    gap: 50px; /* Khoảng cách giữa các logo */
    animation: scroll-left 45s linear infinite; /* Chỉnh tốc độ ở đây (30s) */
}

/* Tạm dừng khi di chuột vào (tùy chọn) */
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

/* Style cho từng logo */
.logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-item img {
    height: 90px; /* Độ cao đồng nhất cho logo */
    width: 120px;
    object-fit: contain;
    transition: 0.3s;
}

.logo-item img:hover {
    opacity: 1;
}

/* Keyframes cho hiệu ứng chạy vô tận */
@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); } /* Chạy đến một nửa danh sách rồi lặp lại */
}

/* Responsive cho Mobile/Tablet */
@media (max-width: 768px) {
    .logo-item img {
        height: 40px; /* Logo nhỏ hơn trên mobile */
    }
    .marquee-content {
        gap: 30px;
        animation-duration: 20s; /* Chạy nhanh hơn một chút trên màn hình hẹp */
    }
}

.tnc-cta {
    background-color: #ff9800;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    padding: 0px 20px; /* Thêm padding để container không sát mép trình duyệt */
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.tnc-cta-container {
    max-width: 1100px; /* Thu hẹp nhẹ so với 1200px để gọn hơn */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.tnc-cta-content {
    flex: 1;
}

.tnc-cta-text {
    color: #ffffff;
    font-size: 1.6rem; /* Giảm nhẹ font chữ */
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: left;
}

.tnc-cta-button {
    display: inline-block;
    background-color: #ffffff;
    color: #ff9800;
    padding: 12px 30px; /* Gọn gàng hơn */
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.tnc-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.tnc-cta-image {
    flex: 0 0 30%; /* Giảm tỉ lệ chiếm dụng của logo */
    display: flex;
    justify-content: flex-end;
}

.svg-placeholder {
    width: 100%;
    max-width: 250px; /* Thu nhỏ logo lại để tinh tế hơn */
    height: auto;
}

.svg-placeholder img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Responsive cho Mobile & Tablet */
@media (max-width: 768px) {
    .tnc-cta {
        padding: 30px 15px;
    }

    .tnc-cta-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .tnc-cta-text {
        font-size: 1.3rem; /* Chữ nhỏ lại trên mobile */
        text-align: center;
        margin-bottom: 20px;
    }

    .tnc-cta-image {
        flex: 0 0 auto;
        justify-content: center;
        order: -1; /* Đưa logo lên trên nội dung nếu muốn, hoặc xóa dòng này để giữ nguyên thứ tự */
    }

    .svg-placeholder {
        max-width: 150px; /* Logo nhỏ xinh trên mobile */
    }
    
    .tnc-cta-button {
        padding: 10px 25px;
        font-size: 1rem;
    }
}