h1, h2 {
    text-align: center;
    margin-block: 2rem;
}

h1 + p {
    font-size: 1.2rem;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;

    div {
        display: flex;
        flex-direction: column;
        position: relative;
    }
}

.overlay-link {
    position: absolute;
    inset: 0;
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.cards div a:not(.overlay-link) {
    z-index: 1;
}

.labo-card {
    min-height: 20rem;
    display: block;
    background-color: var(--bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px oklch(0 0 0 / 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 1rem;
    width: 100%;
    text-align: center;

    img {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    p {
        font-size: 1rem;
        color: var(--txt);
        margin-bottom: 1rem;
    }

    &:hover {
        box-shadow: 0 6px 16px oklch(0 0 0 / 0.2);
    }

    a {
        text-decoration: none;
        color: var(--link);
        font-weight: bold;
        transition: color 0.2s ease;

        &:hover {
            color: var(--link-hover);
        }
    }
}

.lijn {
    height: 3px;
    width: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--link), var(--link-hover));
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 48em) {
    h1, h2 {
        text-align: left;
    }

    h1 + p {
        text-align: left;
    }

    .cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* inspiratie van https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/grid-template-columns maar code zelf geschreven ook vorig jaar gezien in front-end*/
    }
}

