﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    position: relative;
    background-color: #fafafa;
    font-family: "source sans pro", sans-serif;
}

.image-gallery {
    width: 100%;
    /*max-width: 950px;*/
    margin: 0 auto;
    padding: 50px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    grid-gap: 20px;
}

    .image-gallery .image-box {
        position: relative;
        background-color: #d7d7d8;
        overflow: hidden;
        border-radius:8px;
    }

        .image-gallery .image-box:nth-child(7n + 1) {
            grid-column: span 2;
            grid-row: span 2;
        }

        .image-gallery .image-box img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: all 0.5s ease;
        }

        .image-gallery .image-box:hover img {
            transform: scale(1.1);
        }

        .image-gallery .image-box .overlay {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: #fafafaf2;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: all 0.5s ease;
            z-index: 1;
            border-radius: 8px;
        }

        .image-gallery .image-box:hover .overlay {
            top: 20px;
            right: 20px;
            bottom: 20px;
            left: 20px;
            opacity: 1;
        }

        .image-gallery .image-box .details {
            text-align: center;
        }

            .image-gallery .image-box .details .title {
                margin-bottom: 8px;
                font-size: 24px;
                font-weight: 600;
                position: relative;
                top: -5px;
                opacity: 0;
                visibility: hidden;
                transition: all 0.3s ease;
            }

            .image-gallery .image-box .details .category {
                font-size: 18px;
                font-weight: 400;
                position: relative;
                bottom: -5px;
                opacity: 0;
                visibility: hidden;
                transition: all 0.3s ease;
            }

        .image-gallery .image-box:hover .details .title {
            top: 0px;
            opacity: 1;
            visibility: visible;
            transition: all 0.3s 0.2s ease;
        }

        .image-gallery .image-box:hover .details .category {
            bottom: 0;
            opacity: 1;
            visibility: visible;
            transition: all 0.3s 0.2s ease;
        }

        .image-gallery .image-box .details .title a,
        .image-gallery .image-box .details .category a {
            color: #222222;
            text-decoration: none;
        }

/* Let's make it responsive */
@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        grid-auto-rows: 250px;
    }

        .image-gallery .image-box:nth-child(7n + 1) {
            grid-column: unset;
            grid-row: unset;
        }
}






/*body {
    background-color: #eee;
}

.hello {
    opacity: 1 !important;
}

.full {
    position: center;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

    .full .content {
        background-color: rgba(0,0,0,0.75) !important;
        height: 100%;
        width: 100%;
        display: grid;
    }

        .full .content img {
            left: 50%;
            transform: translate3d(0, 0, 0);
            animation: zoomin 1s ease;
            max-width: 100%;
            max-height: 100%;
            margin: auto;
        }

.byebye {
    opacity: 0;
}

    .byebye:hover {
        transform: scale(0.2) !important;
    }

.gallery {
    width: 100%;
    height: auto;
    display: grid;
    grid-column-gap: 10px;
    grid-row-gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    padding: 30px;
    margin: 30px 0;
    background-color: #e3e3ed;
}

    .gallery img {
        max-width: 100%;
        border-radius: 8px;
        box-shadow: 0 0 10px #333;
        transition: all 1.5s ease;
        position: relative;
    }

        .gallery img:hover {
            box-shadow: 0 0 20px #333;
        }

    .gallery .content {
        padding: 4px;
    }

    .gallery .gallery-item {
        transition: grid-row-start 300ms linear;
        transition: transform 300ms ease;
        transition: all 0.5s ease;
        cursor: pointer;
        position: relative;
    }

        .gallery .gallery-item:hover {
            transform: scale(1.025);
        }


@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(40%, 1fr));
    }
}

@media (max-width: 400px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(50%, 1fr));
    }
}

@-moz-keyframes zoomin {
    0% {
        max-width: 50%;
        transform: rotate(-30deg);
        filter: blur(4px);
    }

    30% {
        filter: blur(4px);
        transform: rotate(-80deg);
    }

    70% {
        max-width: 50%;
        transform: rotate(45deg);
    }

    100% {
        max-width: 100%;
        transform: rotate(0deg);
    }
}

@-webkit-keyframes zoomin {
    0% {
        max-width: 50%;
        transform: rotate(-30deg);
        filter: blur(4px);
    }

    30% {
        filter: blur(4px);
        transform: rotate(-80deg);
    }

    70% {
        max-width: 50%;
        transform: rotate(45deg);
    }

    100% {
        max-width: 100%;
        transform: rotate(0deg);
    }
}

@-o-keyframes zoomin {
    0% {
        max-width: 50%;
        transform: rotate(-30deg);
        filter: blur(4px);
    }

    30% {
        filter: blur(4px);
        transform: rotate(-80deg);
    }

    70% {
        max-width: 50%;
        transform: rotate(45deg);
    }

    100% {
        max-width: 100%;
        transform: rotate(0deg);
    }
}

@keyframes zoomin {
    0% {
        max-width: 50%;
        transform: rotate(-30deg);
        filter: blur(4px);
    }

    30% {
        filter: blur(4px);
        transform: rotate(-80deg);
    }

    70% {
        max-width: 50%;
        transform: rotate(45deg);
    }

    100% {
        max-width: 100%;
        transform: rotate(0deg);
    }
}*/
