.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 -0.7rem;
    padding-top: 2rem;
    padding-bottom: 4.5rem;
}

.gallery-item {
    flex-basis: 100%;
    padding: 0.7rem;
}

.gallery-item div.item-holder {
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    transition: transform 0.5s ease, opacity 0.5s ease;
    cursor: pointer;
}

.gallery-item div.item-holder.zoomout {
    opacity: 0;
    transform: scale(0.5);
}

.gallery-item div.item-holder img {
    display: block;
    width: 100%;
    transition: transform 0.3s ease;
}

.gallery-item div.item-holder img:hover {
    transform: scale(1.1);
}

/* POPUP LAYOUT STYLES */

.popup-layout {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 20;
}

.popup-layout.active {
    display: block;
}

.noscroll {
    overflow: hidden;
}

.popup-layout .popup-layout-navi {
    display: flex;
    justify-content: space-around;
    max-width: 600px;
    width: 90%;
    padding: 1rem 0;
    margin: 0 auto;
}

.popup-layout button {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.popup-layout button span.navi-btn-icon {
    display: inline-block;
    font-size: 2.5em;
    line-height: 0;
    vertical-align: middle;
    transform: scaleX(1.3);
    margin: 0.7rem;
}

.popup-layout button span.navi-btn-text {
    display: none;
}

.popup-layout button.close .cross {
    position: relative;
    right: 16px;
    bottom: 2px;
}

.popup-layout button.close .cross span {
    position: absolute;
    width: 32px;
    height: 3px;
    background-color: white;
    margin: 0;
}

.popup-layout button.close .cross span:first-child {
    transform: rotate(45deg);
}

.popup-layout button.close .cross span:last-child {
    transform: rotate(-45deg);
}

.popup-layout button:focus {
    outline: none;
}

.popup-layout button.noActiveBtn {
    color: grey;
    cursor: default;
}

.popup-layout>.inner-wrapper {
    overflow-x: auto;
    max-width: 1400px;
    width: 100%;
    height: 93%;
    margin: 0 auto;
    background-color: white;
}

.popup-layout .content-holder {
    max-width: 1000px;
    width: 100%;
    padding: 3rem 0;
    margin: 0 auto;
}

.popup-layout .inner-wrapper .project-images img {
    width: 100%;
}

.popup-layout .description {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    margin: 5rem auto;
}

.popup-layout .description p {
    font-size: 1.1em;
    line-height: 1.5em;
}

.popup-layout .description h2 {
    font-size: 1.2em;
}

.popup-layout .inner-wrapper .project-images img {
    margin: 1rem auto;
}

.popup-layout .inner-wrapper .description .title,
.popup-layout .inner-wrapper .description .text {
    width: 90%;
}

.popup-layout .inner-wrapper .description .text {
    padding-top: 1.5rem;
}

@media (min-width: 600px) {
    .gallery-item {
        flex-basis: 50%;
    }
    .popup-layout button span.navi-btn-text {
        display: inline-block;
    }
}

@media (min-width: 900px) {
    .gallery-item {
        flex-basis: 33%;
    }
    .popup-layout>.inner-wrapper {
        width: 90%;
    }
    .popup-layout .content-holder {
        width: 80%;
    }
    .popup-layout .description {
        display: flex;
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        align-items: baseline;
        margin: 5rem auto;
    }
    .popup-layout .inner-wrapper .description .title {
        width: 40%;
        padding-right: 1rem;
    }
    
    .popup-layout .inner-wrapper .description .text {
        width: 60%;
        padding-top: 0;
    }
}

@media (min-width: 1200px) {
    .popup-layout .description h2 {
        font-size: 1.4em;
    }
}