.image-gallery {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-basis: 30%;
    padding: 0 5vw;
    position: relative;
    width: 20vw;
    height: 20vw;
    margin: 0 auto;
}

.image-gallery .image-card {
    width: 100%;
    height: 100%;
    aspect-ratio: 1.2;
    margin-bottom: 2rem;
    padding: .3rem;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    text-align: center;
    font-style: italic;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: bottom center;
}

.image-gallery .image-card:nth-child(1) {
    transform: rotate(-14deg);
}

.image-gallery .image-card:nth-child(2) {
    transform: rotate(-7deg);
}

.image-gallery .image-card:nth-child(4) {
    transform: rotate(7deg);
}

.image-gallery .image-card:nth-child(5) {
    transform: rotate(14deg);
}

.image-gallery .image-card:nth-child(6) {
    transform: rotate(21deg);
}

.image-gallery .image-card:nth-child(7) {
    transform: rotate(-21deg);
}

.image-card img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    height: auto;
    border-radius: 1em;
}

.image-card .image-title {
    width: 100%;
    padding: .5rem;
}

.image-card > .image-title p {
    margin: 0;
}

/* Image Displayer styling */

.image-displayer {
    position: fixed;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 2vh 0;
    background-color: black;
}

.image-displayer button {
    font-size: 2rem;
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

.image-displayer > .btn-close {
    width: fit-content;
    height: fit-content;
    float: right;
    margin: 2rem 5vw 0 auto;
    font-size: 2em;
    box-sizing: border-box;
}

.image-displayer > .image-displayer-image-frame {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-height: 80%;
    justify-content: space-between;
}

.image-displayer > .image-displayer-image-frame > .btn-image-switch {
    height: 100%;
    width: 9%;
}

.image-displayer > .image-displayer-image-frame > .image-displayer-image {
    max-width: 80%;
    max-height: 95%;
}

.image-displayer p {
    margin: 0;
    text-align: center;
    font-weight: 100;
    font-style: italic;
}

@media screen and (max-width: 600px) { 
    .image-gallery {
        width: 50vw;
        height: 50vw;
    }

    .image-displayer button {
        position: absolute;
        transition: .2s;
    }
    
    .image-displayer > .btn-close {
        margin: 1rem;
        top: 0;
        right: 0;
        width: calc(100% - 2rem);
        opacity: .6;
        font-size: 3rem;
        text-align: right;
        box-sizing: border-box;
    }

    .image-displayer > .btn-close:hover {
        opacity: .9;
    }
    
    .image-displayer > .image-displayer-image-frame {
        box-sizing: border-box;
        margin-top: 4.5rem;
        margin-left: 50%;
        transform: translateX(-50%);
        display: block;
        height: fit-content;
        width: calc(100% - 2rem);
        position: relative;
    }
    
    .image-displayer > .image-displayer-image-frame > .btn-image-switch {
        margin: 0;
        width: fit-content;
        padding: 0 40% 0 0;
        font-size: 3rem;
        opacity: .4;
    }
    
    .image-displayer > .image-displayer-image-frame > .btn-image-switch:hover {
        opacity: .9;
    }
    
    .image-displayer > .image-displayer-image-frame > .btn-image-switch:last-child {
        right: 0;
        padding: 0 0 0 40%;
    }
    
    .image-displayer > .image-displayer-image-frame > .image-displayer-image {
        max-width: 100%;
        max-height: 70vh;
        margin: 0;
    }
    
    .image-displayer p {
        margin-top: 5%;
    }
}