.projectgallery_enter a {
    break-inside: avoid;
    /* Prevent break/jump */
}

.projectimg {

    padding: 13px 12px 11px 12px;
    display: flex !important;
    flex-direction: column;
    transition: var(--transitioneffect);
    break-inside: avoid;
    overflow: hidden;

}

.img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
}

.projectimg p {

    display: block;
    margin: 0;
    z-index: 1 !important;

}

.img {

    margin-bottom: 8px;
    display: block;
    z-index: 1 !important;
}

#margins {

    z-index: 10;

}

.projectgallery_enter {

    width: 100%;
    display: block;
}

.projectgallery_enter a {

    width: calc(100%/3);
    margin: 0;
    background-color: transparent;

}

.projectimg .img,
.video {

    z-index: -1 !important;
    border-style: solid;
    border-width: 0;
    border-radius: calc(var(--borderradius) - 3px);

}

.projectimg p {

    z-index: 0 !important;
}

.gallery {

    height: calc(100dvh - 31px);
}

.projectgallery_enter a {

    width: calc(100%/3) !important;

}


@media only screen and (max-width: 880px) {

    .gallery {

        z-index: 0;
    }

    .gallery_enter {

        height: calc(100dvh - 100px);

    }

}


@media only screen and (max-width: 655px) {

    .projectgallery_enter a {

        width: calc(100%/2) !important;

    }

}

@media only screen and (max-width: 455px) {

    .projectgallery_enter a {

        width: calc(100%/1) !important;

    }

}