/* =========================================================
   KIBiS – Bericht / Podcast Einzelansicht
   ========================================================= */


/* =========================================================
   1. GRUNDLAYOUT
   ========================================================= */

.kibis-bericht {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding: 24px 20px 64px;

    color: #FFFFFF;
}


/*
   Ollie rendert im Standard-Single-Template Beitragsbild und Titel vor
   dem historischen Bericht nochmals. Diese Beiträge bringen beides
   bereits innerhalb von .kibis-bericht mit.
*/
.single-post:has(.kibis-bericht) main > .wp-block-group:first-child {
    display: none;
}


.single-post:has(.kibis-bericht) main {
    padding-top: var(--wp--preset--spacing--large) !important;
}


/* Die Folgebeitrags-Query des Ollie-Single-Templates ist für diese
   eigenständig aufgebauten historischen Berichte nicht vorgesehen. */
.single-post:has(.kibis-bericht) .wp-site-blocks > .wp-block-group:has(> .wp-block-query) {
    display: none;
}


/* =========================================================
   2. BEITRAGSBILD / HERO
   ========================================================= */

.kibis-bericht-beitragsbild {
    width: 100%;

    margin: 0 0 24px;

    overflow: hidden;

    border-radius: 14px;
}


.kibis-bericht-beitragsbild img {
    display: block;

    width: 100%;
    height: auto;

    aspect-ratio: 16 / 9;

    object-fit: cover;
    object-position: center;

    border-radius: 14px;
}


/* =========================================================
   3. BEITRAGSTITEL / H1
   ========================================================= */

.kibis-bericht-titel {
    margin: 0 0 14px;

    color: #FFFFFF;

    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}


/* =========================================================
   4. AUTOR
   ========================================================= */

.kibis-bericht-autor {
    display: block;

    margin: 0 0 18px;

    color: #FFFFFF;

    font-size: 16px;
    line-height: 1.5;
}


.kibis-bericht-autor span {
    color: rgba(255, 255, 255, 0.9);
}


/* =========================================================
   5. SELBSTHILFEGRUPPE
   ========================================================= */

.kibis-bericht-gruppe {
    margin: 0 0 20px;

    color: #FFFFFF;

    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
}


/* =========================================================
   6. ARTIKELBOX
   ========================================================= */

.kibis-bericht-inhalt {
    margin: 0 0 38px;

    padding: 24px 28px;

    background:
        linear-gradient(
            110deg,
            #1A287A 0%,
            #202F82 52%,
            #1A287A 100%
        );

    border-radius: 14px;
}


/* =========================================================
   6.1 ARTIKELTEXT
   ========================================================= */

.kibis-bericht-text {
    color: #FFFFFF;

    font-size: 18px;
    line-height: 1.65;
}


.kibis-bericht-text p {
    margin: 0 0 1em;
}


.kibis-bericht-text p:first-child {
    margin-top: 0;
}


.kibis-bericht-text p:last-child {
    margin-bottom: 0;
}


.kibis-bericht-text a {
    color: #FFFFFF;

    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}


.kibis-bericht-text a:hover {
    color: #66C7E8;
}


/* =========================================================
   7. ABSCHNITTSÜBERSCHRIFTEN
   ========================================================= */

.kibis-section-heading {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;

    gap: 16px;

    margin: 0 0 20px;

    padding: 12px 0 12px 16px;

    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            rgba(102, 199, 232, 0.17) 0%,
            rgba(102, 199, 232, 0.12) 22%,
            rgba(102, 199, 232, 0.07) 42%,
            rgba(102, 199, 232, 0.025) 62%,
            rgba(102, 199, 232, 0) 82%
        );
}


/* Roter Balken links */

.kibis-section-heading::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 5px;

    background: #D31335;
}


/* H2 */

.kibis-section-heading h2 {
    position: relative;

    z-index: 2;

    flex: 0 0 auto;

    margin: 0;

    color: #FFFFFF;

    font-size: 25px;
    line-height: 1.25;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   7.1 AUSLAUFENDE HELLBLAUE LINIE
   ========================================================= */

.kibis-section-line {
    position: relative;

    z-index: 2;

    flex: 1 1 auto;

    min-width: 40px;

    height: 4px;

    background:
        linear-gradient(
            90deg,
            #66C7E8 0%,
            rgba(102, 199, 232, 0.95) 16%,
            rgba(102, 199, 232, 0.78) 36%,
            rgba(102, 199, 232, 0.52) 58%,
            rgba(102, 199, 232, 0.27) 76%,
            rgba(102, 199, 232, 0.09) 90%,
            rgba(102, 199, 232, 0) 100%
        );

    clip-path:
        polygon(
            0 0,
            100% 47%,
            100% 53%,
            0 100%
        );
}


/* =========================================================
   8. WEITERE BILDER
   ========================================================= */

.kibis-bericht-bilder {
    margin: 0 0 38px;
}


.kibis-bilder-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}


.kibis-bericht-bild {
    margin: 0;

    overflow: hidden;

    border-radius: 14px;
}


.kibis-bericht-bild img {
    display: block;

    width: 100%;

    aspect-ratio: 4 / 3;

    object-fit: cover;

    border-radius: 14px;

    transition: transform 0.25s ease;
}


.kibis-bericht-bild:hover img {
    transform: scale(1.02);
}


/* =========================================================
   9. PODCAST
   ========================================================= */

.kibis-bericht-podcast {
    margin: 0 0 38px;
}


.kibis-audio-liste {
    display: grid;

    gap: 20px;
}


/* =========================================================
   9.1 AUDIO-KARTE
   ========================================================= */

.kibis-audio-item {
    width: 100%;

    padding: 18px 20px 20px;

    background:
        linear-gradient(
            105deg,
            #1A287A 0%,
            #202F82 55%,
            #1A287A 100%
        );

    border:
        1px solid
        rgba(102, 199, 232, 0.55);

    border-radius: 12px;
}


/* =========================================================
   9.2 AUDIO-TITEL
   ========================================================= */

.kibis-audio-titel {
    margin: 0 0 16px;

    color: #FFFFFF;

    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;

    overflow-wrap: anywhere;
}


/* =========================================================
   9.3 NATIVER AUDIOPLAYER
   ========================================================= */

.kibis-audio-item audio {
    display: block;

    width: 100%;
    max-width: 720px;

    min-height: 44px;

    margin: 0;

    accent-color: #66C7E8;
}


/* =========================================================
   10. SERVER-VIDEOS / MP4
   ========================================================= */

.kibis-bericht-video-server {
    margin: 0 0 38px;
}


.kibis-video-server-liste {
    display: grid;

    gap: 28px;
}


/* =========================================================
   10.1 EINZELNES SERVER-VIDEO
   ========================================================= */

.kibis-video-server-item {
    width: 100%;
}


/* =========================================================
   10.2 VIDEO-TITEL
   ========================================================= */

.kibis-video-server-titel {
    margin: 0 0 16px;

    color: #FFFFFF;

    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;

    overflow-wrap: anywhere;
}


/* =========================================================
   10.3 VIDEO-PLAYER
   ========================================================= */

.kibis-video-server-item video {
    display: block;

    width: 100%;
    max-width: 720px;

    height: auto;

    margin: 0;

    background: #08075F;

    border-radius: 12px;
}


/* =========================================================
   11. EXTERNES VIDEO / OEMBED
   ========================================================= */

.kibis-bericht-video {
    margin: 0 0 48px;
}


.kibis-video {
    width: 100%;

    background: transparent;

    border: 0;

    overflow: hidden;

    border-radius: 14px;
}


.kibis-video iframe,
.kibis-video video {
    display: block;

    width: 100% !important;
    max-width: 100%;

    aspect-ratio: 16 / 9;

    height: auto;

    border: 0;

    border-radius: 14px;
}


/* =========================================================
   12. FOKUS / BARRIEREFREIHEIT
   ========================================================= */

.kibis-bericht a:focus-visible,
.kibis-bericht audio:focus-visible,
.kibis-bericht video:focus-visible {
    outline: 3px solid #FFFFFF;

    outline-offset: 3px;
}


/* =========================================================
   13. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .kibis-bericht *,
    .kibis-bericht *::before,
    .kibis-bericht *::after {
        scroll-behavior: auto !important;

        transition: none !important;

        animation: none !important;
    }
}


/* =========================================================
   14. TABLET
   ========================================================= */

@media (max-width: 900px) {

    .kibis-bericht {
        padding:
            22px
            20px
            56px;
    }


    .kibis-bericht-titel {
        font-size: 30px;
    }


    .kibis-bilder-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .kibis-audio-item audio,
    .kibis-video-server-item video {
        max-width: 100%;
    }
}


/* =========================================================
   15. SMARTPHONE
   ========================================================= */

@media (max-width: 700px) {

    .kibis-bericht {
        padding:
            18px
            16px
            48px;
    }


    /* Beitragsbild */

    .kibis-bericht-beitragsbild {
        margin-bottom: 20px;
    }


    .kibis-bericht-beitragsbild img {
        aspect-ratio: 4 / 3;
    }


    /* H1 */

    .kibis-bericht-titel {
        margin-bottom: 12px;

        font-size: 26px;
        line-height: 1.25;
    }


    /* Autor */

    .kibis-bericht-autor {
        margin-bottom: 16px;

        font-size: 15px;
    }


    /* Selbsthilfegruppe */

    .kibis-bericht-gruppe {
        margin-bottom: 18px;

        font-size: 19px;
        line-height: 1.35;
    }


    /* Artikelbox */

    .kibis-bericht-inhalt {
        margin-bottom: 32px;

        padding:
            20px
            18px;
    }


    .kibis-bericht-text {
        font-size: 17px;
    }


    /* Abschnittsüberschriften */

    .kibis-section-heading {
        gap: 10px;

        margin-bottom: 16px;

        padding:
            9px
            0
            9px
            12px;
    }


    .kibis-section-heading h2 {
        font-size: 21px;

        white-space: normal;
    }


    .kibis-section-line {
        min-width: 20px;
    }


    /* Bilder */

    .kibis-bilder-grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }


    /* Podcast */

    .kibis-audio-liste {
        gap: 16px;
    }


    .kibis-audio-item {
        padding:
            16px
            14px
            18px;
    }


    .kibis-audio-titel {
        margin-bottom: 14px;

        font-size: 15px;
    }


    .kibis-audio-item audio {
        width: 100%;
        max-width: 100%;
    }


    /* Server-Videos */

    .kibis-video-server-liste {
        gap: 24px;
    }


    .kibis-video-server-titel {
        margin-bottom: 14px;

        font-size: 15px;
    }


    .kibis-video-server-item video {
        width: 100%;
        max-width: 100%;

        border-radius: 10px;
    }
}