/*
 * Eigenes Seitengerüst (Kopfzeile, Navigation, Fußzeile, Typografie).
 * Wird NACH site.css geladen. site.css (alte Kopie des MediaWiki-Skins "Timeless")
 * liefert weiterhin die Styles für den Artikelinhalt (Infoboxen, Tabellen, Bilder ...).
 * Eigene Klassen sind mit "wc-" präfixiert, damit sich die alten Timeless-Regeln
 * nicht auf das neue Gerüst auswirken.
 */

:root {
    --wc-accent: #0e7c86;
    --wc-accent-dark: #0a5f67;
    --wc-accent-soft: #e6f4f3;
    --wc-link: #0f6b8a;
    --wc-header-bg: #0e3b4a;
    --wc-footer-bg: #0b2530;
    --wc-ink: #1b2430;
    --wc-heading: #111922;
    --wc-muted: #5d6874;
    --wc-line: #e2e7ec;
    --wc-bg: #f3f5f7;
    --wc-surface: #ffffff;
    --wc-radius: 14px;
    --wc-gradient: linear-gradient(135deg, #2bb3a3 0%, #1479a8 100%);
    --wc-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --wc-header-h: 3.75rem;
    --wc-nav-w: 15rem;
    --wc-aside-w: 300px;
    --wc-max-w: 92rem;
}

html {
    scroll-padding-top: calc(var(--wc-header-h) + 1rem);
}

body.wc-site {
    margin: 0;
    background: var(--wc-bg);
    color: var(--wc-ink);
    font-family: var(--wc-font);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.wc-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wc-skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 300;
    padding: .5rem 1rem;
    border-radius: 8px;
    background: #fff;
    color: var(--wc-ink);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}

    .wc-skip-link:focus {
        top: .75rem;
    }

/* ---------- Kopfzeile ---------- */

.wc-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--wc-header-bg);
    color: #fff;
    box-shadow: 0 4px 18px rgba(14, 59, 74, .18);
}

.wc-header-inner {
    max-width: var(--wc-max-w);
    min-height: var(--wc-header-h);
    margin: 0 auto;
    padding: .55rem 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.wc-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: #fff;
    text-decoration: none;
    font-weight: 750;
    font-size: 1.25rem;
    letter-spacing: -.015em;
    white-space: nowrap;
    flex: none;
}

    .wc-brand:hover {
        color: #fff;
        text-decoration: none;
    }

.wc-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
    background: var(--wc-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.wc-search {
    flex: 1 1 auto;
    max-width: 42rem;
    margin-left: auto;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 999px;
    overflow: hidden;
    transition: box-shadow .15s ease;
}

    .wc-search:focus-within {
        box-shadow: 0 0 0 3px rgba(43, 179, 163, .6);
    }

.wc-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    margin: 0;
    padding: .62rem 1.1rem;
    background: transparent;
    color: var(--wc-ink);
    font: inherit;
    font-size: 1rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

    .wc-search-input::placeholder {
        color: #7b8691;
    }

.wc-search-button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 0;
    margin: 0;
    padding: 0 1.1rem;
    background: var(--wc-accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}

    .wc-search-button:hover,
    .wc-search-button:focus-visible {
        background: var(--wc-accent-dark);
    }

.wc-menu-toggle {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    margin-left: -.35rem;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

    .wc-menu-toggle:hover,
    .wc-menu-toggle:focus-visible {
        background: rgba(255, 255, 255, .12);
        color: #fff;
    }

.wc-menu-icon,
.wc-menu-icon::before,
.wc-menu-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.wc-menu-icon {
    position: relative;
}

    .wc-menu-icon::before,
    .wc-menu-icon::after {
        position: absolute;
        left: 0;
    }

    .wc-menu-icon::before {
        top: -6px;
    }

    .wc-menu-icon::after {
        top: 6px;
    }

/* ---------- Seitenraster ---------- */

.wc-layout {
    max-width: var(--wc-max-w);
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

/* Hauptinhalt: überschreibt die Timeless-Regeln für #mw-content (Ränder für die alten Seitenleisten) */
.wc-layout #mw-content.wc-main {
    margin: 0;
    float: none;
    clear: none;
    width: auto;
    min-width: 0;
    box-sizing: border-box;
    background: var(--wc-surface);
    border: 0;
    border-radius: var(--wc-radius);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
    padding: 1.75rem 2.25rem 2.75rem;
    overflow: auto;
}

/* ---------- Navigation ---------- */

/* Mobil/Tablet: Schubladen-Menü von links */
.wc-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    width: min(20rem, 86vw);
    box-sizing: border-box;
    background: var(--wc-surface);
    box-shadow: 0 0 40px rgba(0, 0, 0, .25);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s;
}

    .wc-nav:target,
    html.wc-nav-open .wc-nav {
        transform: none;
        visibility: visible;
    }

.wc-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(8, 24, 32, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
}

.wc-nav:target ~ .wc-nav-backdrop,
html.wc-nav-open .wc-nav-backdrop {
    opacity: 1;
    visibility: visible;
}

html.wc-nav-open {
    overflow: hidden;
}

.wc-nav-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem .75rem 1.25rem;
    background: var(--wc-header-bg);
    color: #fff;
}

.wc-nav-title {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 750;
    font-size: 1.1rem;
    letter-spacing: -.01em;
}

    .wc-nav-title .wc-brand-mark {
        width: 1.9rem;
        height: 1.9rem;
        font-size: 1rem;
        border-radius: 9px;
    }

.wc-nav-close {
    display: inline-grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    text-decoration: none;
}

    .wc-nav-close:hover,
    .wc-nav-close:focus-visible {
        background: rgba(255, 255, 255, .12);
        color: #fff;
    }

.wc-nav-inner {
    padding: .5rem .75rem 2rem;
}

/* Inhalt der Navigation kommt als HTML aus den Preferences (LeftSidebarHtml) */
.wc-nav h3 {
    margin: 1.25rem .75rem .35rem;
    padding: 0;
    border: 0;
    color: var(--wc-muted);
    font-family: var(--wc-font);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.wc-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wc-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

    .wc-nav li a,
    #p-empfehlungen a {
        display: block;
        padding: .7rem .75rem;
        border-radius: 9px;
        color: var(--wc-ink);
        text-decoration: none;
        font-size: .97rem;
        line-height: 1.3;
    }

        .wc-nav li a:hover,
        .wc-nav li a:focus-visible,
        #p-empfehlungen a:hover {
            background: var(--wc-accent-soft);
            color: var(--wc-accent-dark);
            text-decoration: none;
        }

/* Desktop: feste Spalte links */
@media (min-width: 1100px) {
    .wc-layout {
        grid-template-columns: var(--wc-nav-w) minmax(0, 1fr);
    }

    .wc-nav {
        position: sticky;
        top: calc(var(--wc-header-h) + 1.25rem);
        bottom: auto;
        z-index: auto;
        width: auto;
        max-height: calc(100vh - var(--wc-header-h) - 2.5rem);
        background: transparent;
        box-shadow: none;
        transform: none;
        visibility: visible;
        transition: none;
    }

    .wc-nav-inner {
        padding: 0 0 1rem;
    }

    .wc-nav h3 {
        margin-top: .5rem;
    }

    .wc-nav li a,
    #p-empfehlungen a {
        padding: .45rem .75rem;
        font-size: .95rem;
    }

    .wc-nav-head,
    .wc-nav-backdrop,
    .wc-menu-toggle {
        display: none;
    }

    html.wc-nav-open {
        overflow: auto;
    }
}

/* ---------- Werbe-Spalte rechts (nur breite Desktops) ---------- */

.wc-aside {
    display: none;
}

@media (min-width: 1350px) {
    .wc-layout.wc-has-aside {
        grid-template-columns: var(--wc-nav-w) minmax(0, 1fr) var(--wc-aside-w);
    }

    .wc-aside {
        display: block;
        min-width: 0;
    }

    .wc-aside-sticky {
        position: sticky;
        top: calc(var(--wc-header-h) + 1.25rem);
    }
}

/* ---------- Typografie im Inhalt ---------- */

.wc-site .mw-body {
    color: var(--wc-ink);
}

    .wc-site .mw-body h1,
    .wc-site .mw-body h2,
    .wc-site .mw-body h3,
    .wc-site .mw-body h4,
    .wc-site .mw-body h5,
    .wc-site .mw-body h6 {
        font-family: var(--wc-font);
        font-weight: 650;
        color: var(--wc-heading);
        line-height: 1.3;
        letter-spacing: -.01em;
    }

        .wc-site .mw-body h1.firstHeading,
        .wc-site .mw-body h1#firstHeading {
            margin: .1rem 0 1.25rem;
            padding: 0;
            border: 0;
            font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem);
            font-weight: 750;
            letter-spacing: -.02em;
            overflow: visible;
        }

            .wc-site .mw-body h1.firstHeading::after {
                content: "";
                display: block;
                width: 3.5rem;
                height: 4px;
                margin-top: .65rem;
                border-radius: 2px;
                background: var(--wc-gradient);
            }

    .wc-site .mw-body h2 {
        margin-top: 2.25rem;
        padding-bottom: .35rem;
        border-bottom: 1px solid var(--wc-line);
        font-size: 1.55rem;
    }

    .wc-site .mw-body h3 {
        font-size: 1.25rem;
    }

    .wc-site .mw-body h4 {
        font-size: 1.08rem;
    }

    .wc-site .mw-body a {
        color: var(--wc-link);
        text-decoration: none;
    }

        .wc-site .mw-body a:hover {
            text-decoration: underline;
            text-underline-offset: .15em;
        }

        .wc-site .mw-body a.new {
            color: #b3372f;
        }

/* ---------- Suche / 404-Vorschläge ---------- */

.wc-site .search-results {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 48rem;
}

    .wc-site .search-results li {
        margin: 0;
        padding: 1rem 0 1.1rem;
        border-bottom: 1px solid var(--wc-line);
        list-style: none;
    }

.wc-site .mw-body .wc-hit-title {
    font-size: 1.15rem;
    font-weight: 650;
    line-height: 1.35;
}

.wc-hit-desc {
    margin-top: .1rem;
    color: var(--wc-muted);
    font-size: .92rem;
}

.wc-site .mw-body .wc-hit-snippet {
    margin: .4rem 0 0;
    color: #36414d;
    font-size: .95rem;
    line-height: 1.55;
}

.wc-hit-snippet mark {
    background: #fff1b8;
    color: inherit;
    padding: 0 .1em;
    border-radius: 3px;
}

.wc-search-message {
    color: var(--wc-muted);
}

/* Suchfeld auf der Suchseite selbst (wenn noch kein Begriff eingegeben wurde) */
.wc-search.wc-search-inline {
    max-width: 36rem;
    margin: 0 0 1rem;
    box-shadow: inset 0 0 0 1px var(--wc-line), 0 1px 3px rgba(16, 24, 40, .06);
}

.wc-pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    max-width: 48rem;
    margin-top: 1.5rem;
}

.wc-site .mw-body .wc-pager a {
    display: inline-block;
    padding: .55rem 1rem;
    border-radius: 999px;
    background: var(--wc-accent-soft);
    color: var(--wc-accent-dark);
    font-weight: 600;
    text-decoration: none;
}

    .wc-site .mw-body .wc-pager a:hover {
        background: #d3ecea;
    }

.wc-pager-next {
    margin-left: auto;
}

/* ---------- Fußzeile ---------- */

.wc-footer {
    background: var(--wc-footer-bg);
    color: #c3d1d8;
    font-size: .9rem;
    line-height: 1.6;
}

.wc-footer-inner {
    max-width: 62rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
    text-align: center;
}

.wc-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 750;
    font-size: 1.1rem;
}

    .wc-footer-brand .wc-brand-mark {
        width: 1.8rem;
        height: 1.8rem;
        font-size: .95rem;
        border-radius: 8px;
    }

.wc-footer p {
    margin: 0 0 .9rem;
}

.wc-footer a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .35);
    text-underline-offset: .15em;
}

    .wc-footer a:hover {
        text-decoration-color: #fff;
    }

.wc-footer-links {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 1099px) {
    .wc-layout {
        padding-top: 1rem;
    }
}

@media (max-width: 700px) {
    /* Kopfzeile scrollt mit, damit mobil mehr Platz für den Inhalt bleibt */
    .wc-header {
        position: static;
    }

    .wc-header-inner {
        flex-wrap: wrap;
        row-gap: .5rem;
        padding: .5rem .75rem .75rem;
    }

    .wc-brand {
        font-size: 1.15rem;
    }

    .wc-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
        margin-left: 0;
    }

    .wc-search-button {
        padding: 0 .95rem;
    }

    .wc-search-button-text {
        display: none;
    }

    .wc-layout {
        padding: 0 0 1.5rem;
        gap: 0;
    }

        .wc-layout #mw-content.wc-main {
            border-radius: 0;
            box-shadow: none;
            padding: 1.1rem 1rem 2rem;
        }

    .wc-site .mw-body h2 {
        font-size: 1.35rem;
    }

    html {
        scroll-padding-top: 1rem;
    }

    /* Bilder und Infoboxen nicht neben den Text floaten (sonst bleibt nur eine
       schmale Textspalte), sondern mittig darüber. !important wegen Inline-Styles
       aus dem Wikipedia-HTML und ExtraCss aus den Preferences. */
    .wc-site .mw-body figure[typeof~="mw:File/Thumb"],
    .wc-site .mw-body figure[typeof~="mw:File/Frame"],
    .wc-site .mw-body .thumb.tright,
    .wc-site .mw-body .thumb.tleft,
    .wc-site .mw-body .float-right,
    .wc-site .mw-body .float-left,
    .wc-site .mw-body .infobox {
        float: none !important;
        clear: both;
        margin: 0 auto 1.25rem !important;
        max-width: 100%;
    }

    .wc-site .mw-body figure img,
    .wc-site .mw-body .thumb img {
        max-width: 100%;
        height: auto;
    }

    /* breite Tabellen seitlich scrollbar statt Seite zu sprengen */
    .wc-site .mw-body table.wikitable {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wc-nav,
    .wc-nav-backdrop {
        transition: none;
    }
}

@media print {
    .wc-header,
    .wc-nav,
    .wc-nav-backdrop,
    .wc-aside,
    .wc-footer,
    .wc-skip-link {
        display: none !important;
    }

    body.wc-site {
        background: #fff;
    }

    .wc-layout {
        display: block;
        padding: 0;
    }

        .wc-layout #mw-content.wc-main {
            box-shadow: none;
            padding: 0;
        }
}
