.project-thumbnail {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-thumbnail:hover {
    transform: scale(1.05);
}

.project-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content h2 {
    text-align: center;
    margin-bottom: 20px;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

.popup-description p {
    margin: 0 0 1em 0;  /* Add space between paragraphs */
}

.popup-description p:empty {
    margin: 0.5em 0;  /* Add space for empty lines */
}

.popup-description p:last-child {
    margin-bottom: 0;  /* Remove margin from last paragraph */
}

/* Updated popup layout styles */
.popup-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    margin: 0; /* Remove margin since title is no longer above */
}

.popup-media {
    width: 100%;
    margin: 0 0 20px 0;
}

.popup-media iframe,
.popup-media video {
    width: 100%;
    height: 250px;
    border-radius: 10px;
}

.popup-left-column {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
}

.popup-metadata {
    width: 100%;
    padding: 15px;
    background-color: rgba(0.9, 0.9, 0.9, 0.1);
    border-radius: 10px;
    box-sizing: border-box;
}

.popup-metadata p {
    margin: 10px 0;
}

.popup-right-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.popup-right-column h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.popup-description {
    flex-grow: 1;
    text-align: justify;
    padding-right: 20px;
    min-width: 0;
}

.project-popup {
    /* background-color: rgba(184, 217, 184, 0.95); */
    background-color: rgba(235, 245, 220, 0.95);
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .popup-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .popup-left-column {
        max-width: 100%;
    }

    .popup-media iframe,
    .popup-media video {
        height: 300px;
    }

    .popup-description {
        padding-right: 0;
    }
}
