.ers-tv-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.ers-tv-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Widget-Container boxed auf 1300px (3 Boxen pro Reihe zu je ~403px).
 * Spezifität 0,4,0 = wie das Widget-Custom-CSS, garantiert 1300 in allen Sprachen. */
.elementor .e-con .elementor-element.elementor-element-80addc9 {
    width: 100% !important;
    max-width: 1300px !important;
}

.ers-tv-list-container {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

/* Videobox: immer 3 pro Reihe, bis max. 463px breit, 353px hoch, 15px Rand.
 * 90px = 6×15px (linker+rechter Rand der 3 Boxen). */
.ers-tv-item-row {
    flex: 1 1 calc((100% - 90px) / 3);
    max-width: 463px;
    height: 353px;
    margin: 15px;
}
@media (max-width: 1024px) {
    .ers-tv-item-row { /* 2 pro Reihe auf Tablet */
        flex-basis: calc((100% - 60px) / 2);
        max-width: none;
    }
}
@media (max-width: 600px) {
    .ers-tv-item-row { /* 1 pro Reihe auf Mobil */
        flex-basis: 100%;
        max-width: none;
    }
}

.ers-tv-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
}

/* Thumbnail oben – füllt den Platz über dem Titel */
.ers-tv-thumb {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden; /* Hover-Zoom wird sauber geclippt */
}

.ers-tv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

/* beim Hovern etwas größer – beim Verlassen zurück auf Normalgröße */
.ers-tv-item:hover .ers-tv-thumb img {
    transform: scale(1.06);
}

/* Live-Badge oben rechts (nur wenn Video als „Live" markiert ist) */
.ers-tv-live {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.ers-tv-live__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E5471B;
}

/* Videoname unter dem Bild – h5 */
.ers-tv-item h5 {
    flex: 0 0 auto;
    margin: 0;
    padding: 12px 14px;
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.96px;
    line-height: 1.4;
    color: #000;
}

/* Lightbox: Klick auf Kachel öffnet das Video im Overlay */
.ers-tv-item { cursor: pointer; }
.ers-tv-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vmin;
}
.ers-tv-lightbox[hidden] { display: none; }
.ers-tv-lightbox__frame {
    position: relative;
    width: min(90vw, 1280px);
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}
.ers-tv-lightbox__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.ers-tv-lightbox__close {
    position: absolute;
    top: 16px;
    right: 26px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
