/* Folie im 16:9-Format. Alle Größen in cqw (1cqw = 1 % der Folienbreite),
   damit die Folie auf jedem Bildschirm exakt gleich skaliert. */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
    background: #000;
    color: #000;
    font-family: Calibri, Carlito, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.slide {
    position: relative;
    width: min(100vw, 100vh * 16 / 9);
    aspect-ratio: 16 / 9;
    background: #fff;
    container-type: inline-size;
    overflow: hidden;
}

/* ---------- Wochenübersicht ---------- */

.wochen-kopf {
    position: absolute;
    top: 14%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5cqw;
}

.wochen-titel {
    margin: 0;
    font-size: 1.8cqw;
    font-weight: 400;
    color: #555;
}

/* Blättern-Buttons erscheinen nur beim Drüberfahren (oder per Tastatur-Fokus). */
.blaettern {
    padding: 0 0.6cqw;
    font-size: 2.4cqw;
    line-height: 1;
    color: #555;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.wochen-kopf:hover .blaettern,
.blaettern:focus-visible { opacity: 1; }

.blaettern:hover { color: #000; }

/* Platzhalter am Ende des erlaubten Zeitraums, damit das Datum mittig bleibt. */
.blaettern.gesperrt { visibility: hidden; }

/* Geräte ohne Maus (Handy, Tablet) können nicht hovern – dort immer anzeigen. */
@media (hover: none) {
    .blaettern { opacity: 1; }
}

.woche {
    position: absolute;
    top: 26.5%;
    left: 0;
    right: 0;
    display: flex;
}

.tag {
    flex: 1 1 0;
    min-width: 0;
    min-height: 23.5cqw;
    padding: 0.4cqw 0.8cqw;
    text-align: center;
    hyphens: manual;
}

.tag + .tag { border-left: 0.1cqw solid #000; }

.tag h2 {
    margin: 0 0 1.6cqw;
    font-size: 2.25cqw;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 0.12cqw;
    text-underline-offset: 0.3cqw;
    white-space: nowrap;
}

.termin {
    margin: 0;
    font-size: 1.6cqw;
    line-height: 1.4;
}

.termin strong { font-weight: 700; }

/* ---------- Anstehend ---------- */

.anstehend {
    position: absolute;
    /* Beginnt bei 79 % wie auf der Folie und wächst bei vielen Einträgen nach oben. */
    bottom: 2%;
    min-height: 19%;
    left: 1.9cqw;
    right: 13cqw;
    font-size: 1.6cqw;
    line-height: 1.4;
}

.anstehend h3 {
    display: inline;
    margin: 0;
    font: inherit;
    text-decoration: underline;
    text-decoration-thickness: 0.08cqw;
    text-underline-offset: 0.25cqw;
}

.anstehend ul {
    margin: 0.4cqw 0 0;
    padding-left: 1.6cqw;
    columns: 2;
    column-gap: 3cqw;
}

.anstehend li { break-inside: avoid; }

/* ---------- Logo ---------- */

.logo {
    position: absolute;
    right: 0.6cqw;
    bottom: 1cqw;
    width: 9.8cqw;
    height: auto;
}

/* ---------- Handy / Hochformat: Tage untereinander ---------- */

@media (max-width: 700px), (orientation: portrait) {
    body {
        display: block;
        background: #fff;
        overflow: auto;
    }

    .slide {
        width: 100%;
        aspect-ratio: auto;
        container-type: normal;
        padding: 24px 16px 32px;
        display: flex;
        flex-direction: column;
    }

    .wochen-kopf,
    .woche,
    .anstehend,
    .logo { position: static; }

    .wochen-kopf {
        gap: 12px;
        margin-bottom: 8px;
    }

    .wochen-titel { font-size: 18px; }

    .blaettern {
        padding: 4px 12px;
        font-size: 28px;
    }

    .woche { flex-direction: column; }

    .tag {
        flex: none;
        min-height: 0;
        padding: 16px 0;
    }

    .tag + .tag {
        border-left: 0;
        border-top: 1px solid #000;
    }

    .tag h2 {
        margin-bottom: 8px;
        font-size: 26px;
        text-decoration-thickness: 2px;
        text-underline-offset: 4px;
    }

    .termin { font-size: 19px; }
    .termin + .termin { margin-top: 6px; }

    .anstehend {
        min-height: 0;
        margin-top: 24px;
        font-size: 19px;
    }

    .anstehend h3 {
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }

    .anstehend ul { margin-top: 6px; padding-left: 20px; columns: 1; }

    .logo {
        width: 120px;
        margin: 32px auto 0;
    }
}
