/* ===== Container chính ===== */
.category-posts {
    margin: 40px 0;
    padding: 0 15px;
}

.category-posts h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
    padding-left: 10px;
    color: #222;
}

/* ===== Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* ===== Item ===== */
.category-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: #222;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* ===== Thumbnail ===== */
.category-item .thumb {
    width: 100%;
    height: 120px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.category-item:hover .thumb img {
    transform: scale(1.05);
}

.category-item .thumb .no-img {
    font-size: 14px;
    color: #aaa;
}

/* ===== Info ===== */
.category-item .info {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-item .info .title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-item .info .date {
    font-size: 13px;
    color: #777;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .category-item .thumb {
        height: 100px;
    }

    .category-item .info .title {
        font-size: 14px;
    }
}