:root {
    --witeno-event-bg: #ffffff;
    --witeno-event-text: #17202a;
    --witeno-event-muted: #667085;
    --witeno-event-border: #e4e7ec;
    --witeno-event-accent: #175cd3;
    --witeno-event-radius: 14px;
}

.witeno-events {
    box-sizing: border-box;
    width: 100%;
}

.witeno-events *,
.witeno-events *::before,
.witeno-events *::after {
    box-sizing: inherit;
}

.witeno-events--grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.witeno-event {
    position: relative;
    overflow: hidden;
    background: var(--witeno-event-bg);
    color: var(--witeno-event-text);
    border: 1px solid var(--witeno-event-border);
    border-radius: var(--witeno-event-radius);
}

.witeno-events--grid .witeno-event {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.witeno-event__media {
    aspect-ratio: 1500 / 450;
    overflow: hidden;
    background: #f2f4f7;
}

.witeno-event__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.witeno-event__body {
    display: grid;
    grid-template-columns: minmax(110px, 0.32fr) minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 28px;
}

.witeno-events--grid .witeno-event__body {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
    height: 100%;
}

.witeno-event__date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.witeno-event__weekday {
    color: var(--witeno-event-muted);
    font-size: 0.9rem;
}

.witeno-event__date-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
}

.witeno-event__time {
    margin-top: 4px;
    color: var(--witeno-event-muted);
    font-size: 0.95rem;
}

.witeno-event__title {
    margin: 0 0 10px;
    padding: 0;
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    line-height: 1.15;
}

.witeno-event__title a {
    color: inherit;
    text-decoration: none;
}

.witeno-event__title a:hover,
.witeno-event__title a:focus-visible {
    color: var(--witeno-event-accent);
}

.witeno-event__teaser {
    margin: 0 0 14px;
    color: var(--witeno-event-text);
    line-height: 1.55;
}

.witeno-event__link {
    display: inline-flex;
    font-weight: 700;
    color: var(--witeno-event-accent);
    text-decoration: none;
}

.witeno-event__link:hover,
.witeno-event__link:focus-visible {
    text-decoration: underline;
}

.witeno-event__qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 180px;
}

.witeno-event__qr {
    display: flex;
    width: 180px;
    height: 180px;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #ffffff;
}

.witeno-event__qr img,
.witeno-event__qr canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.witeno-event__qr-label {
    color: var(--witeno-event-muted);
    font-size: 0.78rem;
    text-align: center;
}

.witeno-event__status {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff1f0;
    color: #b42318;
    font-size: 0.8rem;
    font-weight: 700;
}


/*
 * TV-Modus
 * Bewusst stark gekapselt, damit Divi-Theme-Regeln für Überschriften,
 * Abstände und Spalten das Layout nicht überschreiben.
 */
.witeno-events.witeno-events--tv {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 400px !important;
    overflow: visible !important;
}

.witeno-events.witeno-events--tv > .witeno-event {
    display: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 400px !important;
    overflow: hidden !important;
}

.witeno-events.witeno-events--tv > .witeno-event.is-active {
    display: block !important;
    animation: witeno-event-fade 350ms ease-out;
}

.witeno-events.witeno-events--tv .witeno-event__body {
    display: grid !important;
    grid-template-columns: 190px minmax(0, 1fr) 190px !important;
    column-gap: 48px !important;
    row-gap: 0 !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 400px !important;
    margin: 0 !important;
    padding: 44px 52px 48px !important;
}

.witeno-events.witeno-events--tv .witeno-event__date,
.witeno-events.witeno-events--tv .witeno-event__content,
.witeno-events.witeno-events--tv .witeno-event__qr-wrap {
    min-width: 0 !important;
    margin: 0 !important;
}

.witeno-events.witeno-events--tv .witeno-event__date {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
}

.witeno-events.witeno-events--tv .witeno-event__weekday {
    display: block !important;
    margin: 0 0 6px !important;
    color: var(--witeno-event-muted) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

.witeno-events.witeno-events--tv .witeno-event__date-value {
    display: block !important;
    margin: 0 !important;
    color: var(--witeno-event-text) !important;
    font-size: clamp(28px, 1.8vw, 36px) !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
}

.witeno-events.witeno-events--tv .witeno-event__time {
    display: block !important;
    margin: 10px 0 0 !important;
    color: var(--witeno-event-muted) !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
}

.witeno-events.witeno-events--tv .witeno-event__content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.witeno-events.witeno-events--tv .witeno-event__title {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    color: var(--witeno-event-accent) !important;
    font-size: clamp(32px, 2.25vw, 46px) !important;
    font-weight: 500 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    hyphens: auto !important;
}

.witeno-events.witeno-events--tv .witeno-event__title a,
.witeno-events.witeno-events--tv .witeno-event__title a:link,
.witeno-events.witeno-events--tv .witeno-event__title a:visited {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--witeno-event-accent) !important;
    font: inherit !important;
    line-height: inherit !important;
    text-decoration: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__teaser {
    display: block !important;
    max-width: 920px !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    color: var(--witeno-event-text) !important;
    font-size: clamp(17px, 1.05vw, 21px) !important;
    font-weight: 400 !important;
    line-height: 1.42 !important;
}

.witeno-events.witeno-events--tv .witeno-event__link,
.witeno-events.witeno-events--tv .witeno-event__link:link,
.witeno-events.witeno-events--tv .witeno-event__link:visited {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--witeno-event-accent) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__qr-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: end !important;
    width: 180px !important;
    max-width: 180px !important;
    min-width: 180px !important;
    gap: 10px !important;
    overflow: visible !important;
}

.witeno-events.witeno-events--tv .witeno-event__qr {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 170px !important;
    height: 170px !important;
    min-width: 170px !important;
    min-height: 170px !important;
    max-width: 170px !important;
    max-height: 170px !important;
    margin: 0 !important;
    padding: 4px !important;
    background: #ffffff !important;
    overflow: hidden !important;
}

.witeno-events.witeno-events--tv .witeno-event__qr img,
.witeno-events.witeno-events--tv .witeno-event__qr canvas {
    display: block !important;
    width: 162px !important;
    height: 162px !important;
    max-width: 162px !important;
    max-height: 162px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.witeno-events.witeno-events--tv .witeno-event__qr-label {
    display: block !important;
    margin: 0 !important;
    color: var(--witeno-event-muted) !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.witeno-events.witeno-events--tv .witeno-event__counter {
    position: absolute !important;
    left: 16px !important;
    bottom: 12px !important;
    margin: 0 !important;
    color: var(--witeno-event-muted) !important;
    font-size: 12px !important;
    line-height: 1 !important;
}

.witeno-eveeno-error,
.witeno-eveeno-empty {
    padding: 16px 18px;
    border: 1px solid var(--witeno-event-border, #e4e7ec);
    border-radius: 10px;
    background: #ffffff;
}

@keyframes witeno-event-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1200px) {
    .witeno-events.witeno-events--tv .witeno-event__body {
        grid-template-columns: 155px minmax(0, 1fr) 160px !important;
        column-gap: 30px !important;
        padding: 36px 38px 42px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__title {
        font-size: clamp(28px, 3vw, 38px) !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr-wrap {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr {
        width: 145px !important;
        height: 145px !important;
        min-width: 145px !important;
        min-height: 145px !important;
        max-width: 145px !important;
        max-height: 145px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr img,
    .witeno-events.witeno-events--tv .witeno-event__qr canvas {
        width: 137px !important;
        height: 137px !important;
        max-width: 137px !important;
        max-height: 137px !important;
    }
}

@media (max-width: 820px) {
    .witeno-events.witeno-events--tv,
    .witeno-events.witeno-events--tv > .witeno-event,
    .witeno-events.witeno-events--tv .witeno-event__body {
        min-height: 0 !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__body {
        grid-template-columns: 1fr !important;
        row-gap: 24px !important;
        padding: 28px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr-wrap {
        justify-self: start !important;
        width: 150px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .witeno-events--tv .witeno-event.is-active {
        animation: none;
    }
}


/* ========================================================================
   TV-MODUS V2 – gehärtet gegen Divi/Theme-CSS
   Normale Grid-Ansicht oberhalb bleibt unverändert.
   ======================================================================== */

.witeno-events.witeno-events--tv {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    transform: none !important;
    isolation: isolate;
}

.witeno-events.witeno-events--tv > .witeno-event {
    display: none !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: clamp(380px, 45vh, 520px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 1 !important;
    visibility: hidden !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

.witeno-events.witeno-events--tv > .witeno-event.is-active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__body {
    display: grid !important;
    grid-template-columns: 200px minmax(0, 1fr) 224px !important;
    grid-template-rows: auto !important;
    gap: 48px !important;
    align-items: center !important;
    justify-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: clamp(380px, 45vh, 520px) !important;
    margin: 0 !important;
    padding: 48px 64px 54px !important;
    overflow: hidden !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__date,
.witeno-events.witeno-events--tv .witeno-event__content,
.witeno-events.witeno-events--tv .witeno-event__qr-wrap {
    min-width: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__date {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    width: 200px !important;
    max-width: 200px !important;
    padding: 0 !important;
}

.witeno-events.witeno-events--tv .witeno-event__weekday {
    display: block !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: var(--witeno-event-muted) !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    opacity: 1 !important;
}

.witeno-events.witeno-events--tv .witeno-event__date-value {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--witeno-event-text) !important;
    font-family: inherit !important;
    font-size: clamp(30px, 1.85vw, 36px) !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    opacity: 1 !important;
}

.witeno-events.witeno-events--tv .witeno-event__time {
    display: block !important;
    margin: 11px 0 0 !important;
    padding: 0 !important;
    color: var(--witeno-event-muted) !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    opacity: 1 !important;
}

.witeno-events.witeno-events--tv .witeno-event__content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: visible !important;
}

.witeno-events.witeno-events--tv .witeno-event__title {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--witeno-event-accent) !important;
    font-family: inherit !important;
    font-size: clamp(34px, 2.25vw, 46px) !important;
    font-style: normal !important;
    font-weight: 500 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.015em !important;
    text-transform: none !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    hyphens: auto !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__title a,
.witeno-events.witeno-events--tv .witeno-event__title a:link,
.witeno-events.witeno-events--tv .witeno-event__title a:visited,
.witeno-events.witeno-events--tv .witeno-event__title a:hover,
.witeno-events.witeno-events--tv .witeno-event__title a:focus {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--witeno-event-accent) !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-style: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    text-decoration: none !important;
    text-transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__teaser {
    display: block !important;
    width: 100% !important;
    max-width: 1000px !important;
    margin: 0 0 17px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--witeno-event-text) !important;
    font-family: inherit !important;
    font-size: clamp(18px, 1.1vw, 22px) !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1.42 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    opacity: 1 !important;
}

.witeno-events.witeno-events--tv .witeno-event__link,
.witeno-events.witeno-events--tv .witeno-event__link:link,
.witeno-events.witeno-events--tv .witeno-event__link:visited,
.witeno-events.witeno-events--tv .witeno-event__link:hover,
.witeno-events.witeno-events--tv .witeno-event__link:focus {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--witeno-event-accent) !important;
    font-family: inherit !important;
    font-size: 18px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__qr-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: end !important;
    width: 224px !important;
    min-width: 224px !important;
    max-width: 224px !important;
    padding: 0 !important;
    gap: 9px !important;
    overflow: visible !important;
}

.witeno-events.witeno-events--tv .witeno-event__qr {
    display: block !important;
    box-sizing: border-box !important;
    width: 224px !important;
    height: 224px !important;
    min-width: 224px !important;
    min-height: 224px !important;
    max-width: 224px !important;
    max-height: 224px !important;
    margin: 0 !important;
    padding: 12px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    line-height: 0 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__qr img,
.witeno-events.witeno-events--tv .witeno-event__qr canvas {
    width: 200px !important;
    height: 200px !important;
    min-width: 200px !important;
    min-height: 200px !important;
    max-width: 200px !important;
    max-height: 200px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.witeno-events.witeno-events--tv .witeno-event__qr-label {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--witeno-event-muted) !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
    opacity: 1 !important;
}

.witeno-events.witeno-events--tv .witeno-event__counter {
    position: absolute !important;
    left: 16px !important;
    bottom: 12px !important;
    z-index: 3 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--witeno-event-muted) !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    opacity: 1 !important;
    filter: none !important;
}

@media (max-width: 1499px) {
    .witeno-events.witeno-events--tv .witeno-event__body {
        grid-template-columns: 170px minmax(0, 1fr) 204px !important;
        gap: 32px !important;
        padding: 38px 42px 46px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__date {
        width: 170px !important;
        max-width: 170px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__title {
        font-size: clamp(31px, 2.55vw, 40px) !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr-wrap,
    .witeno-events.witeno-events--tv .witeno-event__qr {
        width: 204px !important;
        min-width: 204px !important;
        max-width: 204px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr {
        height: 204px !important;
        min-height: 204px !important;
        max-height: 204px !important;
        padding: 12px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr img,
    .witeno-events.witeno-events--tv .witeno-event__qr canvas {
        width: 180px !important;
        height: 180px !important;
        min-width: 180px !important;
        min-height: 180px !important;
        max-width: 180px !important;
        max-height: 180px !important;
    }
}

@media (max-width: 1099px) {
    .witeno-events.witeno-events--tv .witeno-event__body {
        grid-template-columns: 145px minmax(0, 1fr) 184px !important;
        gap: 24px !important;
        padding: 30px 30px 40px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__date {
        width: 145px !important;
        max-width: 145px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__date-value {
        font-size: 27px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__title {
        font-size: clamp(28px, 3.2vw, 34px) !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__teaser {
        font-size: 17px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__link {
        font-size: 16px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr-wrap,
    .witeno-events.witeno-events--tv .witeno-event__qr {
        width: 184px !important;
        min-width: 184px !important;
        max-width: 184px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr {
        height: 184px !important;
        min-height: 184px !important;
        max-height: 184px !important;
        padding: 12px !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr img,
    .witeno-events.witeno-events--tv .witeno-event__qr canvas {
        width: 160px !important;
        height: 160px !important;
        min-width: 160px !important;
        min-height: 160px !important;
        max-width: 160px !important;
        max-height: 160px !important;
    }
}

@media (max-width: 760px) {
    .witeno-events.witeno-events--tv > .witeno-event,
    .witeno-events.witeno-events--tv .witeno-event__body {
        min-height: 0 !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__body {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 28px !important;
        overflow: visible !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__date,
    .witeno-events.witeno-events--tv .witeno-event__content,
    .witeno-events.witeno-events--tv .witeno-event__qr-wrap {
        width: 100% !important;
        max-width: 100% !important;
        justify-self: start !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr-wrap {
        align-items: flex-start !important;
    }

    .witeno-events.witeno-events--tv .witeno-event__qr-label {
        text-align: left !important;
    }
}
