.dw-ytg {
    --dw-ytg-blue: #63717f;
    --dw-ytg-dark: #17212b;
    --dw-ytg-light: #f3f6f8;
    --dw-ytg-border: #d8e0e6;
    margin: 28px 0;
}

.dw-ytg-title {
    margin: 0 0 18px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.dw-ytg-message {
    padding: 16px 18px;
    background: #fff8e5;
    border: 1px solid #f0d99b;
    border-radius: 10px;
}

.dw-ytg-featured {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 22px;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--dw-ytg-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0,0,0,.08);
    margin-bottom: 24px;
}

.dw-ytg-featured-button,
.dw-ytg-card-button {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
    font: inherit;
}

.dw-ytg-featured-button {
    position: relative;
    min-height: 300px;
    background: #000;
}

.dw-ytg-featured-button img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.dw-ytg-featured-button iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 300px;
}

.dw-ytg-play,
.dw-ytg-card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: var(--dw-ytg-dark);
    font-size: 28px;
    box-shadow: 0 8px 22px rgba(0,0,0,.22);
}

.dw-ytg-featured-text {
    padding: 24px 24px 24px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dw-ytg-featured-text h3 {
    margin: 0 0 10px;
    font-size: clamp(22px, 2.4vw, 32px);
    line-height: 1.15;
}

.dw-ytg-featured-text p,
.dw-ytg-card-date {
    color: #5d6873;
}

.dw-ytg-featured-text a {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--dw-ytg-blue);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
}

.dw-ytg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.dw-ytg-card {
    background: #fff;
    border: 1px solid var(--dw-ytg-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0,0,0,.055);
    transition: transform .18s ease, box-shadow .18s ease;
}

.dw-ytg-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,.09);
}

.dw-ytg-thumb-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--dw-ytg-light);
    overflow: hidden;
}

.dw-ytg-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Alleen de kleine videokaarten: tekst die in de YouTube-thumbnail zit rustiger maken.
   De grote uitgelichte video wordt hiermee niet aangepast. */
.dw-ytg-card .dw-ytg-small-thumb-mask::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.78) 55%, rgba(255,255,255,0.92) 100%);
    z-index: 2;
    pointer-events: none;
}

.dw-ytg-card .dw-ytg-small-thumb-mask img {
    filter: saturate(.95) contrast(.96);
}

.dw-ytg-card .dw-ytg-small-thumb-mask .dw-ytg-card-play {
    z-index: 3;
}

.dw-ytg-card-play {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

.dw-ytg-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    padding: 12px 14px 2px;
    font-weight: 700;
    line-height: 1.22;
}

.dw-ytg-card-date {
    display: block;
    padding: 0 14px 14px;
    font-size: 14px;
}

.dw-ytg-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.dw-ytg-load-more {
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    background: var(--dw-ytg-blue);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.dw-ytg-load-more[disabled] {
    display: none;
}

.dw-ytg-load-more.is-loading {
    opacity: .65;
    cursor: wait;
}

@media (max-width: 900px) {
    .dw-ytg-featured {
        grid-template-columns: 1fr;
    }
    .dw-ytg-featured-text {
        padding: 0 18px 20px;
    }
    .dw-ytg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .dw-ytg-grid {
        grid-template-columns: 1fr;
    }
    .dw-ytg-featured-button,
    .dw-ytg-featured-button img,
    .dw-ytg-featured-button iframe {
        min-height: 210px;
    }
}
