/* Basic styles */
body,
html {
    margin: 0;
    padding: 0;
    font-family: Helvetica, Arial, sans-serif;
    background-color: white;
    color: black;
}

/* Work Page */
.work-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1; /* Ensure it's above the overlay */
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent black */
    z-index: 2; /* Below interactive elements */
    pointer-events: none; /* Allow interaction with underlying elements */
    display: none; /* Hidden by default */
}

.overlay.show {
    display: block;
}


/* Projects Container */
.projects-container {
    padding: 8% 0 0;
    display: flex;
    flex-direction: column; /* Stack projects vertically */
    gap: 40px; /* Spacing between projects */
}

/* Individual Project */
.project {
    position: relative;
    display: block;
    width: 100%; /* Make it slightly smaller than the screen width */
    max-width: 1200px; /* Limit the maximum width */
    margin: 0 auto; /* Center the image */
    overflow: hidden;
    text-decoration: none; /* Remove underline */
    border-radius: 0px; /* Optional: Add rounded corners */
    z-index: 3; /* Above the overlay */
}

/* Project Image */
.project-image {
    width: 100%;
    height: 280px; /* Adjust height as needed */
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 0.3s ease, filter 0.3s ease;
    /* Smooth transitions for hover and parallax */
    will-change: transform; /* Optimize for GPU rendering */
}

/* Hover Effect: Zoom and Darken */
.project:hover .project-image {
    transform: scale(1.05);
    filter: brightness(0.6); /* Darkens the image */
}

/* Hover Text Overlay */
.project-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.project-hover h3 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.project-hover p {
    margin: 5px 0 0;
    font-size: 16px;
}

/* Show hover text */
.project:hover .project-hover {
    opacity: 1;
}

/* Always Show Overlay on Mobile */
@media screen and (max-width: 768px) {
    .project-hover {
        opacity: 1 !important; /* Always show overlay */
        transform: translate(0, 0);
        top: 20px;
        left: 10px;
        padding: 5px 10px;
        text-align: left;
    }

    .project-hover h3 {
        font-size: 18px;
    }

    .project-hover p {
        font-size: 14px;
    }

    .project-image {
        filter: brightness(0.85); /* Always apply the darkened effect */
    }
}
