/* projects.css */

.projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 2rem 0;
}

.project {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
    width: 30%; /* 30% of the viewport width */
    box-sizing: border-box;
    position: relative;
}

.project:nth-child(odd) {
    transform: translateX(-10%); /* Offset to the left */
}

.project:nth-child(even) {
    transform: translateX(10%); /* Offset to the right */
}

.project .project-image-wrapper {
    position: relative;
    width: 100%;
}

.project h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    z-index: 1;
}

.project img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.project p {
    text-align: center;
    font-size: 1rem;
    margin-top: 1rem;
}

.project:hover img {
    transform: scale(1.05);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .project {
        width: 45%; /* Increase width for tablet sizes */
    }
    
    .project h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .project {
        width: 100%;
        transform: none;
    }

    .project img {
        width: 100%;
    }

    .project h3 {
        font-size: 1.2rem;
    }
}
