.projects-wrapper {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

/* Style the project blocks */
.project-block {
    display: inline-block;
    width: 300px;
    margin: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    /* Add a smooth transition for the hover effect */
    /* Add any additional styling here, such as padding or border */
}

.project-block:hover {
    transform: scale(1.05);
    /* Scale the block up slightly on hover */
    background-color: rgba(255, 255, 255, 0.1);
    /* Optional: add a subtle background highlight */
}

.project-block::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0);
    /* Transparent by default */
    transition: background-color 0.3s ease;
    /* Transition for smooth effect */
    z-index: 1;
    /* Ensure it's above other content inside the block */
    pointer-events: none;
    /* Ignore all mouse events on this element */
}

.project-block:hover::before {
    background-color: rgba(255, 255, 255, 0.120);
    /* Partially transparent white on hover */
}

.project-image {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* For images that should be cropped from the top */
.project-image.top {
    object-position: top;
}

/* For images that should be cropped from the bottom */
.project-image.bottom {
    object-position: bottom;
}

/* For images that should be cropped from the center */
.project-image.center {
    object-position: center;
}

.project-image.contain {
    object-fit: contain;
    /* Shrink to fit without cropping */
    background-color: black;
    /* Fill extra space with black */
}

.project-image.padded {
    object-fit: contain;
    /* Shrink to fit without cropping */
    padding: 20px;
    /* Add padding around the image */
    background-color: black;
    /* Set the padding color (can be changed) */
}

/* Style the project type caption */
.project-caption {
    display: flex;
    align-items: center;
    justify-content: center;


    padding: 10px;
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    background-color: rgb(17, 66, 63);
    margin: 0px;
    min-height: 60px;
}

.project-block a {
    display: block;
}

.older-projects {
    text-align: center;
    margin: 20px 0;
}

.older-projects a {
    font-size: 1.2em;
    color: #fff;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.older-projects a:hover {
    color: #4a98f7;
}

/* ===== MOBILE RESPONSIVENESS ===== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .project-block {
        width: 280px;
        margin: 15px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-caption {
        font-size: 22px;
        min-height: 55px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .projects-wrapper {
        justify-content: center;
        gap: 15px;
    }
    
    .project-block {
        width: 250px;
        margin: 10px;
    }
    
    .project-image {
        height: 160px;
    }
    
    .project-image.padded {
        padding: 15px;
    }
    
    .project-caption {
        font-size: 20px;
        min-height: 50px;
        padding: 8px;
    }
    
    .older-projects {
        margin: 15px 0;
    }
    
    .older-projects a {
        font-size: 1.1em;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .projects-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .project-block {
        width: 100%;
        max-width: 320px;
        margin: 0 0 15px 0;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-image.padded {
        padding: 10px;
    }
    
    .project-caption {
        font-size: 18px;
        min-height: 45px;
        padding: 6px;
    }
    
    .older-projects {
        margin: 10px 0;
    }
    
    .older-projects a {
        font-size: 1em;
        padding: 8px 16px;
        display: inline-block;
    }
}

/* Small mobile phones */
@media (max-width: 360px) {
    .project-block {
        max-width: 280px;
        margin: 0 0 12px 0;
    }
    
    .project-image {
        height: 160px;
    }
    
    .project-caption {
        font-size: 16px;
        min-height: 40px;
        padding: 5px;
    }
    
    .older-projects a {
        font-size: 0.9em;
        padding: 6px 12px;
    }
}