/* General Styles */
.projects {
    width: 80%;
    margin: auto;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Project Card */
.project-card {
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    border-left: 4px solid #c1076a;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 350px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

/* Image Section */
.project-image {
    flex: 1;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.project-image img {
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Buttons Section */
.project-buttons {
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.project-buttons .btn {
    color: rgb(240, 232, 220);
    text-decoration: none;
    border: 1px solid rgb(240, 232, 220);
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
    font-size: 0.9em;
}

.project-buttons .details-btn {
    background: #007bff;
    border: 1px solid #007bff;
}

.project-buttons .btn:hover {
    background: #02eeff;
    color: #000;
}

/* Popup Overlay */
.popup-overlay2 {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: none; /* Prevents clicking the overlay while the popup is hidden */
    opacity: 0;
    transition: opacity 0.3s ease-in-out; /* Smooth fade-in/out transition */
}

/* Popup Content */
.popup-content2 {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    position: relative;
    text-align: center;
    opacity: 0; /* Initially hidden */
    transform: translateY(-30px); /* Start with a slight upward shift */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth appearance animation */
}

/* Close Button */
.close-btn2 {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    color: #000;
    cursor: pointer;
}

/* Details Text */
.details-text2 {
    font-size: 1.2em;
    color: #333;
}

/* Show popup */
.popup-overlay2.show {
    display: flex;
    opacity: 1;
    pointer-events: auto; /* Enable pointer events when shown */
}

.popup-content2.show {
    opacity: 1;
    transform: translateY(0); /* Bring the popup content into view */
}

/* Media Query for Smaller Screens */
@media (max-width: 480px) {
    .popup-content2 {
        width: 90%; /* Ensure popup doesn't take up full width on small screens */
        padding: 15px; /* Adjust padding for smaller screens */
    }
}

/* Styles for screens 768px and below */
@media (max-width: 768px) {
    .projects {
        width: 90%;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .projects-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }

    .project-card {
        height: auto;
    }

    .project-buttons .btn {
        font-size: 0.8em;
        padding: 6px 10px;
    }

    .popup-content {
        padding: 15px;
    }

    .details-text {
        font-size: 1em;
    }
}

/* Styles for screens 480px and below */
@media (max-width: 480px) {
    .projects {
        width: 95%;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .project-buttons .btn {
        font-size: 0.7em;
        padding: 5px 8px;
    }

    .popup-content {
        padding: 10px;
    }

    .details-text {
        font-size: 0.9em;
    }
}