.main-content {
    margin: 0 5vw 10vh 5vw;
}

.grid-container {
    /* display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: 1vw; */
    width: 100%;
    max-width: 100%;
    column-count: 6;
    column-gap: 1vw;
}

.content {
    /* display: flex;
    flex-direction: column;
    align-items: center;
    height: fit-content;
    
    gap: 0.2em; */
    position: relative;
    display: inline-block;
    width: 100%;
    break-inside: avoid; 
    padding-bottom: 0.5em;
    background-color: var(--background-color);
    border: 2px solid var(--secondary-color);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;

    * {
        height: auto;
    }

    img.content-thumbnail {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    video.content-thumbnail {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    h5.content-title {
        text-align: center;
        font-size: 0.5em;
    }

    &:hover {
        h5.content-title {
            color: var(--primary-color);
        }
    }
}

.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    justify-content: center;
    align-items: center;
    z-index: -1;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;

    &.active {
        display: flex;
        z-index: 99999;
        background-color: rgba(0, 0, 0, 0.8);

        .preview-container {
            animation: stretch-up 0.1s;
        }
    }
}

.preview-container {
    display: flex;
    height: fit-content;
}

.preview-container .content {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    cursor: default;
    transition: transform 0.3s ease-in-out;

    img {
        min-width: 50vw;
        max-height: 80vh;
    }

    video {
        max-height: 90vh;
    }
}


@media (max-width: 900px) {
    .grid-container {
        column-count: 3;
    }

    .content {
        h5.content-title {
            text-align: center;
            font-size: 0.8em;
        }
    }
}

@media (max-width: 430px) {
    .grid-container {
        column-count: 1;
    }

    .content {
        h5.content-title {
            text-align: center;
            font-size: 1em;
        }
    }
}

@keyframes stretch-up {
    0% {
        transform: scale(0%);
    }
    100% {
        transform: scale(100%);
    }
}