.kursgrid{
    display: grid;
    gap: var(--wp--preset--spacing--30);
    grid-template-columns: repeat(auto-fill, minmax(max(290px, 10%), 1fr));

    @media (max-width: 990px) {
    grid-template-columns: repeat(2, 1fr);
        }
        @media (max-width: 768px) {
            grid-template-columns: 1fr;
        }

    article {
        overflow: hidden;
        border-radius: var(--wp--custom--border-radius);
        background: var(--wp--preset--color--light);
        transition: var(--wp--custom--main-trans);
        font-family: var(--wp--preset--font-family--heading);
        box-shadow: var(--wp--custom--box-shadow);
        border: var(--wp--custom--main-border);
		display: flex;
        flex-direction: column;

        --tint: rgba(0, 0, 0, .5);

        figure{
            margin: 0;
            aspect-ratio: 16 / 9;
            height: auto;
            width: 100%;
            overflow: hidden;
            position: relative;
			flex-shrink: 0;

            border-top-left-radius: var(--wp--custom--border-radius);
            border-top-right-radius: var(--wp--custom--border-radius);

            img{
                object-fit: cover;
                width: 100%;
                height: 100%;
                 transition: var(--wp--custom--main-trans);
                 border-radius: 0;
                 margin: 0 !important;
            }

            figcaption{
                position: absolute;
                top: 1rem;
                left: 1rem;
                color: var(--wp--preset--color--light);
                backdrop-filter: blur(10);
                background-color:var(--tint);
                padding: .5rem;
                border-radius: var(--wp--custom--border-radius);
                font-size: .8rem;
                font-family: var(--wp--preset--font-family--heading);
            }
        }

         &[data-abschluss="zertifikat"]{
            --tint: rgb(from var(--wp--preset--color--zertifikat-dark) r g b / 0.8);
        }

        &[data-abschluss="cas"]{
            --tint: rgb(from var(--wp--preset--color--cas-dark) r g b / 0.8);
        }

        &[data-abschluss="diplom"]{
            --tint: rgb(from var(--wp--preset--color--diplom-dark) r g b / 0.8);
        }

        &[data-abschluss="fachausweis"]{
            --tint: rgb(from var(--wp--preset--color--fachausweis-dark) r g b / 0.8);
        }

        .content{
            padding: var(--wp--preset--spacing--20);
			flex: 1;
            display: flex;
            flex-direction: column;
            padding: var(--wp--preset--spacing--20);

            h3{
                margin-bottom: 1em;
                text-wrap: balance;
                margin-top: 0;
                line-height: 1.2;
            }

            .meta{
                display: flex;
                gap: var(--wp--preset--spacing--10);
                font-size: 1rem;

                border-bottom: var(--wp--custom--main-border);
                border-color: var(--wp--preset--color--dark);
                padding-top: .5rem;
                padding-bottom: .5rem;

                &:last-of-type{
                    border-bottom: 0px;
                    margin-bottom: 2rem;
                }

               span{

                    &:first-of-type{
                        min-width: 15ch;
                    }

                    p{
                        margin-bottom: 0;
                    }
                }
            }

            a{
                display: block;
				height: auto;
				flex-shrink: 0;
                font-size: 1rem;
                font-weight: 500;
                font-family: var(--wp--preset--font-family--heading);
                color: var(--wp--preset--color--light);
                background: var(--wp--preset--color--petrol);

                &:hover{
                    background-color: var(--wp--preset--color--petrol);
                     color: var(--wp--preset--color--light);
                     text-decoration: none;
                }

                &:first-of-type{
					margin-top: auto;
                    margin-bottom: 1rem;
                }
            }
        }

        &:hover{

            box-shadow: none;

            figure{
                img{
                    scale: 1.1;
                }
            }
        }

    }
}

@media screen and (max-width: 768px) {
    .kursgrid{
        
        article{
            max-width: unset;
            margin-bottom: 1.5rem;

            .content{
                padding: var(--wp--preset--spacing--30);

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


