html {
    overflow-y:scroll;
}

main {
    padding-top: 80px;
    padding-bottom: 40px;
    padding-left: 150px;
    padding-right: 150px;
    color: #1c2b33;
}

.project img {
    /* Causing the nav bar to format weird */
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.project h3 {
    font-family: "pain-de-mie", sans-serif;
    font-size: 26px;
    font-weight: 200;
    color: #827ba0;
    /* font-size: 18px; */
    margin-top: 10px;
    margin-bottom: 10px;
}
.project p {
    font-family: 'Inter';
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    color: #1c2b33;
}
.project-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}
.project-overlay img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}
.project-overlay:hover img {
    transform: scale(1.1);
}
.project-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay color */
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}
.project-overlay:hover::after {
    opacity: 1;
}

/* Project Overlay Buttons */
.overlay-button {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.hover-button {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    padding: 10px 20px;
    background-color: #8079a0;
    border-radius: 20px;
    transition: background-color 0.3s ease;
    text-align: center;
}
.hover-button:hover {
    background-color: #635d7c;
}
.project-overlay:hover .overlay-button {
    opacity: 1;
}



@media screen and (max-width: 968px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media screen and (max-width: 768px) {
    main {
        padding: 40px 20px;
    }
    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Ensure the overlay is hidden by default on mobile */
@media screen and (max-width: 768px) {
    .project-overlay::after {
        opacity: 0;
    }

    .overlay-button {
        opacity: 0;
        pointer-events: none; /* Prevents buttons from being clicked when hidden */
    }

    .project-overlay.active .overlay-button,
    .project-overlay.active::after {
        opacity: 1;
        pointer-events: all; /* Allows buttons to be clicked when visible */
    }
}

