
/* ==========================================
   RALPH YOUTUBE GRID
   ========================================== */

/* Grid */
.rwyg-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 30px !important;
    width: 100%;
}

/* Video-Container */
.rwyg-tile {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Video-Link */
.rwyg-link {
    position: absolute !important;
    inset: 0;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    appearance: none;
    text-decoration: none !important;
    overflow: hidden;
    cursor: pointer;
    line-height: 0;
}

/* Vorschaubild */
.rwyg-link img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: transform 0.3s ease;
}

/* Hover-Effekt */
.rwyg-link:hover img {
    transform: scale(1.03);
}

/* Weißer Play-Button */
.rwyg-play {
    position: absolute !important;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 85px;
    height: 85px;
    border: 5px solid #fff !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    pointer-events: none;
    transition: transform 0.25s ease;
}

/* Play-Dreieck */
.rwyg-triangle {
    display: block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 26px solid #fff;
}

/* Play-Button Hover */
.rwyg-link:hover .rwyg-play {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Tastaturbedienung */
.rwyg-link:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: -3px;
}

/* YouTube-Player */
.rwyg-tile iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

/* Fehlermeldungen */
.rwyg-notice {
    padding: 10px 14px;
    border-left: 3px solid #dba617;
    background: #fff8de;
    color: #333;
}

/* Tablet */
@media (max-width: 1024px) {
    .rwyg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Smartphone */
@media (max-width: 767px) {
    .rwyg-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px !important;
    }

    .rwyg-play {
        width: 65px;
        height: 65px;
        border-width: 4px !important;
    }

    .rwyg-triangle {
        border-top-width: 12px;
        border-bottom-width: 12px;
        border-left-width: 20px;
    }
}
