/* --- WORKS SECTION STYLE --- */

/* 1. Thanh Bộ Lọc (Filter Buttons) */
.works-filter {
    display: flex;
    justify-content: flex-start;
    /* Căn trái hoặc center tùy thích */
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    /* Xuống dòng nếu màn hình nhỏ */
}

.filter-btn {
    background: transparent;
    border: none;
    color: #a6a6a6;
    /* Màu xám mờ */
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
    transition: 0.3s;
}

/* Hiệu ứng khi hover hoặc active */
.filter-btn:hover,
.filter-btn.active {
    color: var(--accent);
    /* Màu xanh chủ đạo */
}

/* Dấu gạch chân nhỏ khi active */
.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* 2. Lưới Dự Án (Grid) */
.works-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    /* Chia 2 cột */
    gap: 30px;
}

/* 3. Thẻ Dự Án (Project Card) */
.work-item {
    background: #252525;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #333;
    transition: 0.3s;
    cursor: pointer;
    position: relative;
    /* Để căn chỉnh overlay nếu cần */
}

.work-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Ảnh dự án */
.work-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.work-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-item:hover .work-img img {
    transform: scale(1.1);
    /* Phóng to ảnh khi hover */
}

/* Thông tin dự án */
.work-info {
    padding: 20px;
}

.work-cat {
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.work-title {
    font-size: 18px;
    color: white;
    margin-bottom: 10px;
    font-weight: 600;
}

.work-link {
    font-size: 14px;
    color: #a6a6a6;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.work-item:hover .work-link {
    color: white;
}

/* Hiệu ứng ẩn hiện (Dùng cho Filter) */
.work-item.hide {
    display: none;
}

.work-item.show {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile: 1 cột */
@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
}