.popup-overlay {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.5);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.project-popup {
    position: absolute;
    overflow-y: auto;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 90%;
    opacity: 1;
    z-index: 999;

    padding: 25px;
}

.project-popup::-webkit-scrollbar {
    display: none;
}

.project-popup__button-container {
    position: relative;
}

.button-container__close-button {
    width: 50px;
    height: 50px;
    position: absolute;
    top: 1%;
    right: 1%;
    border: none;
    background: transparent;
    cursor: pointer;
}

.button-container__close-button::before,
.button-container__close-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 95%;
    height: 10%;
    background-color: gray;
    border-radius: 3px;
}

.button-container__close-button::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.button-container__close-button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.project-popup__name {
    font-size: 64px;
    text-align: left;
    margin-top: 0px;
    margin-bottom: 0px;
}


.project-popup__fields {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    white-space: nowrap;
}

.project-popup__fields p {
    padding: 0px 0.7%; 
    border-radius: 5px;
    font-size: clamp(10px, 4vw, 24px); 
}


.project-popup__project-representation {
    display: flex;
    margin-bottom: 10px;
}


.project-representation__images {
    display: inline-block;
    height: 65%;
    width: 85%;
}

.images__image-panel {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-left: 3%;
}

.image-panel__next-button, .image-panel__previous-button {
    position: relative;
    width: 50px;
    height: 200px;
    border: none;
    cursor: pointer;
    background: transparent;
}

.image-panel__next-button::before,
.image-panel__next-button::after,
.image-panel__previous-button::before,
.image-panel__previous-button::after {
    content: "";
    position: absolute;
    top: 55%;
    left: 50%;
    width: 95%;
    height: 3%;
    background-color: gray;
    border-radius: 3px;
}

.image-panel__next-button::before {
    transform: translate(-50%, -500%) rotate(45deg);
}

.image-panel__next-button::after {
    transform: translate(-50%, 0) rotate(-45deg);
}

.image-panel__previous-button::before {
    transform: translate(-50%, -500%) rotate(-45deg);
}

.image-panel__previous-button::after {
    transform: translate(-50%, 0) rotate(45deg);
}


.image-panel__current-image {
    width: 85%;
    height: 500px;
    border-radius: 15px;
    box-shadow: 2px 8px 16px rgba(0,0,0,0.2);
    object-fit: cover;
}

.project-representation__info {
    height: fit-content;
    width: 30%;
    border: 5px, solid, rgb(108, 15, 151);
    border-radius: 15px;

    font-size: clamp(6px, 3vw, 14px); 

    padding: 15px;
    text-align: left;
    font-size: 24px;
    margin-right: 3%;

    display: inline-block;
}


.project-popup__source {
    display: flex;
    margin-right: auto;
    align-items: center;
    border: 3px, solid, rgb(108, 15, 151);
    border-radius: 15px;
    width: fit-content;
    height: 35px;

    padding: 15px;
}

.project-popup__source img {
    height: 35px;

    transition: transform 0.3s ease;
}

.project-popup__source img:hover {
    transform: scale(1.15);
}

@media (max-width: 1280px) {
    .project-popup {
        transform: translate(-50%, -51.5%);
        width: 90%;
        height: 95%;
        padding: 10px;
    }
    .project-popup__name {
        font-size: 42px;
        text-align: center;
    }
    .project-popup__fields {
        justify-content: center;
    }
    .project-popup__project-representation {
        flex-direction: column;
        gap: 15px;
    }
    .project-representation__images {
        display: inline-block;
        height: 35%;
        width: 100%;
    }
    .images__image-panel {
        margin: 0 auto;
    }
    .image-panel__current-image {
        width: 80%;
        height: 100%;
        max-height: 200px;
        object-fit: contain;
        margin: 0 auto;
    }
    .image-panel__next-button, .image-panel__previous-button {
        width: 25px;
        height: 100px;
        margin: 0 auto;
    }

    .project-representation__info{
        width: fit-content;
        padding: 10px;
        align-self: center;
    }
    .project-representation__info p, span {
        margin: 0px;
    }
    .project-popup__source { 
        height: 20px;
        margin: 0 auto;
    }
}
