.image-gallery {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.image-gallery .image-card {
    width: 24%;
    aspect-ratio: 1;
    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;
}

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

.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: 101;
    padding: 2vh 0;
    background-color: var(--dark);
}

.image-displayer button {
    font-size: 2rem;
    background-color: transparent;
    border: none;
    color: var(--light);
    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: 850px) { 
    .image-gallery .image-card {
        width: 49%;
    }
}

@media screen and (max-width: 600px) { 
    .image-displayer {
    }
    
    .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%;
    }
}

@media screen and (max-width: 550px) { 
    .image-gallery .image-card {
        width: 100%;
    }
}