.gallerycards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
}

.mobile {
    display: none;
}

.videodescript {
    display: none;
}

.gallerycards .card video, .gallerycards .card iframe {
    display: none;
}

.gallerycards .card video {
    height: auto;
}

.gallerycards .card .linkbtn {
    display: none;
}

.gallerycards .card {
    cursor: pointer;
}

.readmore {
    display: none;
}

.gallerycards:first-child {
    margin-bottom: 4rem;
}

div.gallerycards.lastCardsGallery {
    margin-bottom: 0;
}

.readmorebtn {
    font-weight: 700;
    color: rgb(174, 214, 255);
}

@media only screen and (min-width: 701px) {
    .gallerycards .card .videotitle {
        margin-bottom: 0;
    }

    .gallerycards .card {
        margin-bottom: 0;
    }
}

@media (max-width: 1400px) {
    .gallerycards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .gallerycards {
        display: block;
    }

    .gallerycards .videotitle {
        margin-bottom: 1rem;
        font-weight: 500;
        font-size: 1.5rem;
    }

    .mobile {
        display: block;
    }

    .projectmodal {
        display: none;
    }

    div.gallerycards {
        margin-bottom: initial;
    }

    /*.gallerycards .card {
        background: linear-gradient(rgb(19, 19, 19), black);
        border: 2px solid rgb(40, 40, 40);
    }*/

    .gallerycards .card img {
        display: none;
    }

    .gallerycards .card video, .gallerycards .card iframe, .videodescript, .gallerycards .card .linkbtn {
        display: block;
    }
}

.gallerycards .card .thumbnail {
    aspect-ratio: 16/9;
    object-fit: cover;
}

.videotitle {
    font-family: "Eurostile";
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: -0.5rem;
}

.gallerycards iframe {
    aspect-ratio: 560/315;
    width: 100%;
    height: 100%;
}

.projectmodal {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-inline: var(--inlinemargin);
    padding-block: 4rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999999999;
    visibility: hidden;
}

@media only screen and (max-width: 1100px) {
    .projectmodal {
        padding: 4rem;
    }
}

.modalcardholders {
    min-width: min(100%, 800px);
    position: relative;
    height: 100%;
}

.projectcard {
    top: 50%;
    left: 50%;
    display: flex;
    position: absolute;
    width: 100%;
    flex-direction: column;
    padding: 2rem;
    background: linear-gradient(rgb(0, 0, 0), rgb(24, 24, 24));
    border-radius: 1rem;
    border: 2px solid rgb(62, 62, 62);
    max-height: 100%;
    overflow-y: auto;
    visibility: hidden;
}

.projectcard p:last-of-type {
    max-width: 100%;
    margin-bottom: 2rem;
}

.projectcard video, .projectcard iframe {
    margin-bottom: 1rem;
}

.projectcard video {
    height: auto;
}

.projectcard h3 {
    margin-bottom: 1rem;
}

.modalcardholders .linkbtn {
    margin-inline: auto;
    display: block;
    width: fit-content;
    margin-top: auto;
    margin-bottom: 0;
}

.projectcard .type {
    overflow-y: auto;
    margin-bottom: 2rem;
    min-height: 4rem;
}

.projectcard .type >:last-child {
    margin-bottom: 0;
}

.directionbtn {
    top: 50%;
    position: absolute;
    aspect-ratio: 1/1;
    width: 3.5rem;
    border-radius: 50%;
    background-color: rgb(17, 17, 17);
    border: 2px solid rgb(62, 62, 62);
    z-index: 9999;
}

.directionbtn:hover {
    background-color: rgb(25, 25, 25);
}

.directionbtn:active {
    background-color: rgb(41, 41, 41);
}

.directionbtn.next {
    right: 0;
    translate: 50% -50%;
}

.directionbtn.prev {
    left: 0;
    translate: -50% -50%;
}

.directionbtn svg {
    --svgOffset: 3.5%;
    stroke: white;
    stroke-width: 4px;
    scale: 0.5;
    width: 100%;
    height: 100%;
    top: 0;
    position: absolute;
}

.directionbtn.next svg {
    transform: scaleX(-1);
    left: var(--svgOffset);
}

.directionbtn.prev svg {
    right: var(--svgOffset);
}

@media only screen and (max-width: 700px) {
    .modalcardholders .linkbtn {
        width: 100%;
    }

    .gallerycards .videotitle:last-child {
        margin-bottom: 0;
    }
}

@media only screen and (min-width: 701px) {
    .projectcard iframe {
        aspect-ratio: 560/315;
        width: 100%;
        height: 100%;
    }

    .projectcard iframe:last-child {
        margin-bottom: 0;
    }

    .projectcard h3:last-child {
        margin-bottom: 0;
    }
}

section {
    padding-block: 2rem;
}

section:last-of-type {
    margin-bottom: 2rem;
}

@media only screen and (max-width: 700px) {
    section {
        padding-block: 1rem;
    }

    section, section:last-of-type {
        margin-bottom: 0;
    }

    section h3 {
        margin-bottom: 2rem;
    }
}