/* ════════════════════════════════════════════════════════════
   KultURSAchen — globale Styles
   ════════════════════════════════════════════════════════════ */

:root {
    /* Markenfarben */
    --color-primary: indigo;            /* #4B0082 */
    --color-primary-rgb: 75, 0, 130;    /* für rgba(var(--color-primary-rgb), <alpha>) */

    --color-peach: #FFBFA6;             /* Header- und Player-Hintergrund */
    --color-peach-bg: #FFEEE3;          /* Body-Hintergrund, Reader-Dialog */

    /* Typografie */
    --font-family-serif: 'Spectral', serif;
    --line-height-base: 1.35;

    /* Layout */
    --content-width: 80vw;
    --content-max-width: 110rem;
    --prose-max-width: 46rem;           /* schmale, gut lesbare Textspalte (Vita etc.) */
    --nav-sticky-offset: 5.2rem;
}

/* ── Reset ────────────────────────────────────────────── */
* {
    box-sizing: border-box;
}
html, body, div {
    margin: 0;
    padding: 0;
}
img, iframe {
    border: 0;
}

/* ── Typografie + Body ────────────────────────────────── */
body {
    font-family: var(--font-family-serif);
    font-weight: 400;
    font-size: 1.2rem;
    line-height: var(--line-height-base);
    display: flex;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    background-color: var(--color-peach-bg);
    text-rendering: optimizeLegibility;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    -webkit-font-feature-settings: "frac" "onum";
    -moz-font-feature-settings: "frac" "onum";
    font-feature-settings: "frac" "onum";
}
h1, h2, h3, h4, h5, h6 {
    text-align: left;
    clear: both;
    font-weight: 600;
    color: var(--color-primary);
}
h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
a {
    color: var(--color-primary);
    text-decoration: none;
    -webkit-transition: all 240ms ease;
    -moz-transition: all 240ms ease;
    -ms-transition: all 240ms ease;
    -o-transition: all 240ms ease;
    transition: all 240ms ease;
}
a:hover, a:active {
    color: black;
    text-decoration: underline;
    -webkit-transition: all 240ms ease;
    -moz-transition: all 240ms ease;
    -ms-transition: all 240ms ease;
    -o-transition: all 240ms ease;
    transition: all 240ms ease;
}
hr {
    color: var(--color-primary);
    border-width: 1px;
    border-style: solid;
}

/* ── Header ───────────────────────────────────────────── */
header {
    background-color: var(--color-peach);
    display: flex;
    flex-direction: column;
}
header .content {
    align-self: center;
}
h1#title {
    color: var(--color-primary);
    text-align: left;
    font-weight: normal;
    text-decoration: none;
}
h1#title b {
    display: inline-block;
    transform-origin: center;
    animation: 1.5s linear 1 forwards rotate-ursa;
}
a.row:hover, a.row:active {
    text-decoration: none;
}
#logo {
    max-height: 15rem;
    margin: 1rem;
}

/* ── Navigation (statischer Teil) ─────────────────────── */
/* Hinweis: flex-Verteilung und Zeilen-Trennlinie werden im Template
   inline berechnet, weil nth-child() keine CSS Custom Properties akzeptiert. */
nav {
    font-size: 1.1rem;
    background-color: var(--color-peach);
    border-top: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}
nav > ul {
    width: 100%;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0;
    padding: 0;
}
nav > ul > li {
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
}
nav > ul > li > a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    color: var(--color-primary);
    padding: 0.45rem 0.5rem;
    border-left: 1px solid var(--color-primary);
    border-right: 1px solid var(--color-primary);
    border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.2);
    min-height: 2.6rem;
    transition: background 0.15s, color 0.15s;
}
nav > ul > li > a:hover,
nav > ul > li.rex-current > a {
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
}

/* Hamburger-Button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 1.1rem;
    cursor: pointer;
    background: none;
    border: none;
    border-right: 1px solid var(--color-primary);
    min-height: 2.6rem;
    transition: background 0.15s;
    flex-shrink: 0;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-primary);
    transition: transform 0.2s, opacity 0.2s, background 0.15s;
}
.nav-hamburger:hover,
.nav-hamburger[aria-expanded="true"] {
    background-color: var(--color-primary);
}
.nav-hamburger:hover span,
.nav-hamburger[aria-expanded="true"] span {
    background: white;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Main / Content ───────────────────────────────────── */
main {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding-bottom: 3rem;
}
.content {
    width: var(--content-width);
    max-width: var(--content-max-width);
}
main .content p {
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}
main .content ul {
    margin-bottom: 1.2rem;
}
main .content ul li {
    margin-bottom: 1rem;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
    height: 3rem;
    background-color: var(--color-peach);
    border-top: 2px solid var(--color-primary);
    display: flex;
    flex-direction: row;
    justify-content: center;
}

/* ── Mobile-Nav (≤ 768px) ─────────────────────────────── */
@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
    }
    nav {
        flex-direction: column;
        align-items: stretch;
    }
    nav > ul {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    nav > ul.is-open {
        display: flex;
    }
    nav > ul > li {
        flex: none;
        width: 100%;
    }
    nav > ul > li > a {
        border-left: none;
        border-right: none;
        border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.15);
        justify-content: flex-start;
        padding: 0.65rem 1.2rem;
        font-size: 1rem;
    }
}

/* ── Utility-Klassen ──────────────────────────────────── */
.row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.clear      { clear: both; }
.floatright { float: right; }
.floatleft  { float: left; }
.small {
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}
.left   { text-align: left; }
.right  { text-align: right; }
.center { text-align: center; }
.kursiv, i, em { font-style: italic; }
.bold, b, strong, th { font-weight: 600; }
.underlined, ins { text-decoration: underline; }
.red { color: red; }
.invisible, .hide {
    display: none;
    visibility: hidden;
}

/* CKE5-Bild-Klassen */
.image {
    margin: 1rem;
    padding: 0;
    border: 2px solid black;
}
.image img {
    margin: 0;
    padding: 0;
    border: 0;
}
.image-style-align-right {
    float: right;
    clear: both;
    margin: 0;
    margin-left: 1rem;
    margin-bottom: 1rem;
}
.image-style-align-left {
    float: left;
    clear: both;
    margin: 0;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

/* ── Startseite: Slogan zentriert ─────────────────────── */
body.body--startseite main {
    align-items: flex-start;
}
body.body--startseite main blockquote {
    text-align: center;
    border: none;
    padding: 3rem 0;
    margin: 0 auto;
    max-width: var(--prose-max-width);
    hyphens: none;
    -webkit-hyphens: none;
    -moz-hyphens: none;
}
body.body--startseite main blockquote h2 {
    text-align: center; /* überschreibt die globale linksbündige h1–h6-Regel */
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    letter-spacing: 0.01em;
}
body.body--startseite main blockquote h2 em {
    font-style: italic;
}
body.body--startseite main .content > p {
    max-width: var(--prose-max-width);
    margin-left: auto;
    margin-right: auto;
}
body.body--startseite main .content > figure.image {
    border: none;
    margin: 2rem auto;
    max-width: var(--prose-max-width);
}
body.body--startseite main .content > figure.image img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}
body.body--startseite main .content > figure.image figcaption {
    font-size: 0.8rem;
    font-weight: 300;
    padding-top: 0.4rem;
    color: black;
    border: none;
}

/* ── Vita (Artikel 6): schmale Textspalte ───────────────── */
/* Textspalte auf eine gut lesbare Breite begrenzen (wie auf der Startseite).
   Die Bildreihe kommt aus dem gallery-Modul (.entry__gallery--wide) und füllt
   diese Spaltenbreite automatisch. */
body.body--art-6 main .content {
    max-width: var(--prose-max-width);
}
/* Sicherheitsnetz: kein Bild läuft über die Spaltenbreite hinaus.
   Das Lightbox-Overlay-Bild ist ausgenommen — es liegt zwar im DOM unter
   main .content, soll aber als fixed Overlay seine eigene Größe (height:100%
   + object-fit:contain) behalten, sonst wird es oben verankert/abgeschnitten. */
body.body--art-6 main .content img:not(.entry__lightbox-img) {
    max-width: 100%;
    height: auto;
}
/* Kein Rahmen an etwaigen Bildern im Vita-Fließtext. */
body.body--art-6 main .content figure.image {
    border: none;
}

/* ── Animationen ──────────────────────────────────────── */
@keyframes rotate-ursa {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
