.tl_linkcollection_wrap {
    width: 100%;
    padding: 2rem 0;
    margin-bottom: 2.8rem;
}

.tl_linkcollection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.2rem;
}

.tl_linkcollection a {
    --overlay-color: rgba(0, 0, 0, 0);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    aspect-ratio: 1.54 / 1;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    text-align: center;

    border-radius: 3px;
    overflow: hidden;
    text-shadow: 0 0 5px #000;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.tl_linkcollection a::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--overlay-color);
    z-index: 0;
}

.tl_linkcollection a {
    z-index: 1;
}

.tl_linkcollection a > * {
    position: relative;
    z-index: 1;
}


.tl_linkcollection a:hover,
.tl_linkcollection a:focus-visible,
.tl_linkcollection a:focus
{
    color: white;
}

.tl_linkcollection a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* text layer */
.tl_linkcollection a {
    z-index: 1;
}

.tl_linkcollection a:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

@media (max-width: 800px) {
    .tl_linkcollection {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}


/* optional: slightly bigger text on large screens */
@media (min-width: 1200px) {
    .tl_linkcollection a {
        font-size: 1.35rem;
    }

}


@media print {
    .tl_linkcollection>a {
        border: solid 1px black;
    }
}