.youtube-element {
    position: relative;
}

.youtube-link {
    position: absolute;
    top: 1em;
    left: 1em;
    z-index: 2;
}

.youtube-link a {
    display: inline-block;
    background-color: rgb(0 0 0 / 80%);
    color: #fff;
    line-height: inherit;
    padding: .375em .75em;
    border-radius: 3em;
}

.youtube-link a:is(:hover, :focus) {
    color: #fff;
}

.link-info {
    position: absolute;
    bottom: 1em;
    left: 1em;
    background-color: rgb(0 0 0 / 30%);
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: .75em;
    border-radius: 2em;
    padding: .25em .75em;
}

.youtube-image:before {
    display: block;
    content: '';
    position: absolute;
    top: calc(50% - 2em);
    left: calc(50% - 2em);
    width: 4em;
    height: 4em;
    border-radius: 50%;
    background-color: red;
    background-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='29' viewBox='0 0 25 29'%3E%3Cpath id='Polygon_8' data-name='Polygon 8' d='M12.77,2.983a2,2,0,0,1,3.46,0L27.258,22a2,2,0,0,1-1.73,3H3.472a2,2,0,0,1-1.73-3Z' transform='translate(25) rotate(90)' fill='%23fff'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-position: left 60% center;
    background-size: 1.5em;
    pointer-events: none;
    z-index: 2;
}

.youtube-image img {
    aspect-ratio: 16/9;
    width: 100%;
    height: 100%;
}

@media (max-width: 550px) {
    .youtube-link {
        top: .5em;
        left: .5em;
    }

    .youtube-link a {
        font-size: .75em;
        hyphens: auto;
    }

    .link-info {
        bottom: .5em;
        left: .5em;
    }

    .youtube-image:before {
        width: 3em;
        height: 3em;
        background-size: 1.25em;
        top: calc(50% - 1.5em);
        left: calc(50% - 1.5em);
    }
}
