.project-section {
    padding: 50px;
}

.project-section h1 {
    padding-bottom: 30px;
}

.project-item {
    user-select: none;
    margin: 0 15px 55px;
    width: calc((100% / 3) - 30px);
}

.project-item h2 {
    margin: 20px 0;
    font-size: large;
}

.project-thumbnail-container {
    overflow: hidden;
    position: relative;
    display: inline-block;
    width: calc(1140px * 0.25);
    height: calc(900px * 0.25);
    border: 5px solid var(--white-alpha-40);
    border-radius: 5px;
}

.project-thumbnail-scale {
    width: 1100px;
    height: 900px;
    position: relative;
    -moz-transform-origin: 0 0;
    -moz-transform: scale(0.25);
    -webkit-transform-origin: 0 0;
    -webkit-transform: scale(0.25);
}

.project-thumbnail-scale iframe {
    width: 1100px;
    height: 860px;
}

.project-frame-cover {
    top: 0; 
    left: 0;
    opacity: 0;
    width: 1140px;
    height: 900px;
    cursor: pointer;
    position: absolute;
    display: inline-block;
}

.project-item-thumbnail {
    margin: auto;
    border-radius: 5px;
    transition: all 0.25s ease-in-out;
}

.project-item-thumbnail:hover {
    transform: translateY(-5px);
}

.project-main-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: inline-block;
}

.project-main-scale {
    width: 100%;
    height: 100%;
    position: relative;
}

.project-main-scale iframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.project-item-details {
    display: none;
}

.project-skill-item {
    cursor: pointer;
    font-weight: 500;
    padding: 5px 15px;
    margin: 0 5px 5px 0;
    border-radius: 20px;
    color: var(--dark-blue);
    border: 5px solid var(--white-alpha-40);
    background-color: var(--white-alpha-25);
    transition: all 0.25s ease;
}

.project-skill-item:hover {
    border-color: var(--white-alpha-25);
    background-color: var(--white-alpha-40);
}

.project-item-btn {
    width: 40px;
    height: 40px;
    margin: 5px 5px;
    cursor: pointer;
    font-size: x-large;
    border-radius: 50%;
    align-items: center;
    display: inline-flex;
    justify-content: center;
    color: var(--dark-blue);
    transition: all 0.25s ease;
    border: 1px solid var(--white-alpha-40);
    background-color: var(--white-alpha-25);
}

.project-item-btn:hover {
    color: var(--white);
    background-color: var(--dark-blue);
}

.project-popup {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    position: fixed;
    visibility: hidden;
}

.project-popup.open {
    overflow-y: auto;
    visibility: visible;
}

.popup-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
    min-height: 100vh;
}

.popup-content {
    opacity: 0;
    width: 100%;
    padding: 20px;
    max-width: 900px;
    border-radius: 5px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--white-alpha-40);
    background-color: var(--white-alpha-25);
    transform: scale(0.5);
}

.project-popup.open .popup-content {
    opacity: 1;
    transform: scale(1);
    transition: all 0.25s ease;
}

.popup-header {
    position: relative;
}

.popup-header .btn {
    padding: 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    border-radius: 50%;
    font-size: larger;
    right: -40px;
    top: -40px;
}

.popup-header h2 {
    margin: 20px;
    font-size: larger;
    text-transform: capitalize;
}

.popup-close:hover {
    color: var(--white);
    background-color: var(--dark-blue);
}

.popup-close i {
    font-size: x-large;
}

.popup-thumbnail {
    padding: 10px;
    height: 700px;
}

.popup-thumbnail iframe {
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    border-radius: 5px;
}

.popup-body {
    display: flex;
    flex-wrap: wrap;
}

.popup-body > div {
    width: 50%;
    height: auto;
    margin: 0 auto;
    padding: 20px 0;
}

.popup-body .description {
    width: 65%;
    text-align: left;
    padding: 20px 25px;
}

.popup-body .description a {
    cursor: pointer;
    color: var(--blue);
    text-decoration: none;
    transition: all 0.25s;
}

.popup-body .description a:hover {
    color: var(--dark-blue);
}

.popup-body .project-links {
    height: auto;
    margin: 20px auto;
}

.popup-body .project-links a {
    margin: 5px;
}

.popup-body .project-links a:hover {
    color: var(--white);
    background-color: var(--dark-blue);
}

.popup-body .general-info {
    width: 35%;
}

.popup-body .general-info h5,
.project-links h5 {
    white-space: pre;
    font-size: medium;
    padding-bottom: 20px;
    text-transform: capitalize;
}

.popup-body .general-info a {
    display: inline-block;
}

/* ~~~~~~~~~~~~~~~~~~~~~ RESPONSIVE ~~~~~~~~~~~~~~~~~~~~~ */

@media (max-width: 1045px) {
    .project-item {
        width: calc(50% - 30px);
    }

    .popup-header h2 {
        margin: 10px;
    }

    .popup-body {
        flex-direction: column;
    }

    .popup-body > div {
        width: 90%;
    }

    .popup-body .description {
        width: 100%;
    }

    .popup-body .general-info {
        width: 100%;
    }

    .popup-body .general-info h5 {
        padding-bottom: 30px;
    }

    .popup-header .btn {
        width: 30px;
        height: 30px;
        right: -30px;
        top: -35px;
    }

    .popup-close i {
        font-size: large;
    }
}

@media (max-width: 767px) {
    .popup-body .description {
        text-align: center;
    }

    .project-item {
        width: calc(100% - 30px);
    }

    .project-skill-item {
        font-size: small;
        padding: 5px 10px;
        margin: 5px 1px 1px 0;
    }
}

@media (max-width: 575px) {
    .popup-header h2 {
        font-size: medium;
    }

    .popup-body > div {
        width: 100%;
    }

    .popup-body .description {
        margin-top: -20px;
        padding: 20px 20px;
    }
}

@media (max-width: 460px) {
    .popup-thumbnail {
        height: auto;
    }

    .project-main-container {
        width: calc(1050px * 0.25);
        height: calc(860px * 0.25);
        border-radius: 5px;
    }

    .project-main-scale {
        -moz-transform-origin: 0 0;
        -moz-transform: scale(0.25);
        -webkit-transform-origin: 0 0;
        -webkit-transform: scale(0.25);
    }

    .project-main-scale iframe {
        width: 1050px;
        height: 900px;
        margin: -5px auto;
    }

    .project-thumbnail-container {
        width: calc(1140px * 0.25);
        height: calc(900px * 0.25);
    }
    
    .project-frame-cover,
    .project-thumbnail-scale,
    .project-thumbnail-scale iframe {
        width: 1100px;
    }
}
