/* Method 1: Target by position - works for most grid layouts */
div[class*="grid"] > div:nth-child(1)::before,
div[class*="Grid"] > div:nth-child(1)::before,
section div > div:nth-child(1)::before {
    content: '';
    display: block;
    width: 100%;
    height: 250px;
    background-image: url('../images/project1.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 15px;
}

div[class*="grid"] > div:nth-child(2)::before,
div[class*="Grid"] > div:nth-child(2)::before,
section div > div:nth-child(2)::before {
    content: '';
    display: block;
    width: 100%;
    height: 250px;
    background-image: url('../images/project2.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 15px;
}

div[class*="grid"] > div:nth-child(3)::before,
div[class*="Grid"] > div:nth-child(3)::before,
section div > div:nth-child(3)::before {
    content: '';
    display: block;
    width: 100%;
    height: 250px;
    background-image: url('../images/project3.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 15px;
}

div[class*="grid"] > div:nth-child(4)::before,
div[class*="Grid"] > div:nth-child(4)::before,
section div > div:nth-child(4)::before {
    content: '';
    display: block;
    width: 100%;
    height: 250px;
    background-image: url('../images/project4.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 15px;
}

div[class*="grid"] > div:nth-child(5)::before,
div[class*="Grid"] > div:nth-child(5)::before,
section div > div:nth-child(5)::before {
    content: '';
    display: block;
    width: 100%;
    height: 250px;
    background-image: url('../images/project5.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 15px;
}

div[class*="grid"] > div:nth-child(6)::before,
div[class*="Grid"] > div:nth-child(6)::before,
section div > div:nth-child(6)::before {
    content: '';
    display: block;
    width: 100%;
    height: 250px;
    background-image: url('../images/project6.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 15px;
}