div:has(>.link-wrapper) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
}

.link-wrapper {
    width: 100%;
    height: 100%;
    align-items: stretch;
    display: flex;
    flex-direction: column;
}

.link-wrapper img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.link-wrapper .image-wrapper {
    position: relative;
}

.link-wrapper:hover .overlay-grid {
    opacity: 1;
}

.overlay-grid {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 19, 19, 0.80);
    z-index: 1;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 450ms ease-in-out;
}

.overlay-grid p {
    color: var(--wp--preset--color--blue);
    font-family: var(--wp--preset--font-family--jost);
    font-size: var(--wp--preset--font-size--callout);
    font-weight: 600;
    text-align: center;
}

.link-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    z-index: 2;
    border-top: 1px solid var(--wp--preset--color--blue);
    border-bottom: 1px solid var(--wp--preset--color--blue);
    border-right: 1px solid var(--wp--preset--color--blue);
    padding: 20px;
    height: 100%;
    gap: 17px;
}

.link-content p:first-child {
    font-family: var(--wp--preset--font-family--jost);
    font-size: var(--wp--preset--font-size--callout);
    font-weight: 600;
}

.fake-button {
    width: fit-content;
    display: none;
}

.border-left {
    border-left: 1px solid var(--wp--preset--color--blue);
}

.top-left {
    position: absolute;
    top: 0px;
    left: -1px;
    transform: translate(-50%, -50%);
}

.top-right {
    position: absolute;
    top: 0px;
    right: 0px;
    transform: translate(50%, -50%);
}

.bot-right {
    position: absolute;
    bottom: 0px;
    right: 0px;
    transform: translate(50%, 50%);
}

.bot-left {
    position: absolute;
    bottom: 0px;
    left: -1px;
    transform: translate(-50%, 50%);
}




@media not all and (min-width: 1025px) {
    div:has(>.link-wrapper) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    div:has(>.link-wrapper) .link-wrapper:nth-child(3) .link-content {
        border-left: 1px solid var(--wp--preset--color--blue);
    }

    .fake-button {
        display: block;
    }
}

@media not all and (min-width: 641px) {
    div:has(>.link-wrapper) {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .link-content {
        border-left: 1px solid var(--wp--preset--color--blue);
    }
}