/* =============================
   Global Styles (shared across all themes)
   ============================= */
:root {
    /* -- Liturgische Palette -- */
    --color_purple: #600194;
    --color_gold: #ffbc49;
    --color_green: #138537;
    --color_rose: #ffa1cf;
    --color_red: #cd0a16;
    /* -- Flächen -- */
    --bg-page: #f7f6fa;
    --bg-surface: #fff;
    --bg-header: color-mix(in srgb, var(--accent-start) 15%, var(--bg-surface));
    --bg-header-overlay: color-mix(in srgb, var(--accent-start) 4%, var(--bg-surface));
    --bg-aside: color-mix(in srgb, var(--color_gold) 75%, var(--bg-surface));
    --bg-elevated: rgba(255, 255, 255, 0.875);
    --bg-footer: color-mix(in srgb, var(--color_green) 10%, var(--bg-surface));
    /* -- Text -- */
    --text-primary: #211e28;
    --text-secondary: var(--color_green);
    --text-tertiary: color-mix(in srgb, var(--color_purple) 40%, #000);
    --text-footer: var(--text-primary);
    /* -- Akzent -- */
    --accent-start: var(--color_purple);
    --accent-end: color-mix(in srgb, var(--color_purple) 10%, var(--bg-surface));
    --gradient-accent: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    /* -- Rahmen & Schatten -- */
    --radius: 0.5rem;
    --radius-sm: calc(var(--radius) * 0.75);
    --border-width: 0;
    --border-style: solid;
    --border-color: rgba(127, 127, 127, 0.5);
    --border: var(--border-width) var(--border-style) var(--border-color);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    /* -- Typography -- */
    --font-family-copy: -apple-system, Adwaita Sans, Cantarell, Ubuntu, roboto, helvetica, arial, sans-serif;
    --font-family-accent: Georgia, "Times New Roman", serif;
    --font-size-base: 16px;
    --line-height-body: 1.7;
    /* -- Layout & spacing -- */
    --layout-display: grid;
    --layout-cols: 1fr 18.75rem;
    --layout-align: start;
    --max-width: 64rem;
    --gap: 2rem;
    /* Breakpoint values are set in the media queries below; rules stay static */
    --header-height: 4rem;
    --logo-font-size: 1.25rem;
    --main-padding-y: 2.5rem;
    --main-padding-x: 0rem;
    --article-padding-y: 2rem;
    --article-padding-x: 1.5rem;
    --footer-padding-y: 1.25rem;
    --footer-padding-x: 1.25rem;
}
/* Reset */
*,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* Base */
html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: var(--font-family-copy);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: var(--line-height-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
img,
svg {
    display: block;
    max-width: 100%;
}
/* Header */
header {
    background: var(--bg-header);
    border-bottom: var(--border);
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}
header .logo {
    font-size: var(--logo-font-size);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
}
/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: auto;
    background: none;
    border: var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.3rem;
}
.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition:
        transform 0.25s,
        opacity 0.25s;
}
.hamburger:hover span {
    background: var(--accent-start);
}
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
/* Menu overlay */
.menu-overlay,
.menu-panels,
.menu-section {
    overscroll-behavior: none;
}
.menu-overlay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--header-height);
    background: var(--bg-header-overlay);
    z-index: 300;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}
.menu-overlay.open {
    display: flex;
}
/* Two-panel layout inside overlay */
.menu-panels {
    display: grid;
    grid-template-columns: 1fr auto;
}
/* Menu sections */
.menu-section {
    padding: 1.5rem;
}
/* Section scrollable */
.menu-years {
    overflow-y: scroll;
    max-height: 70vh;
    max-height: calc(100vh - var(--header-height));
}
.menu-themes {
    overflow-y: scroll;
    max-width: 30vw;
    max-height: 70vh;
    max-height: calc(100vh - var(--header-height));
}
.menu-section h2 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}
/* Theme options in menu */
.menu-themes .theme-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    margin-bottom: 0.25rem;
    background: none;
    border: var(--border-width) var(--border-style) transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-family-copy);
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition:
        background 0.15s,
        color 0.15s;
}
.menu-themes .theme-option:hover {
    background: var(--bg-elevated);
}
.menu-themes .theme-option.active {
    font-weight: 700;
    color: var(--accent-start);
}
.menu-themes .theme-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 1px 1px var(--border-color);
}
/* Year search */
.menu-years #year-search {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--bg-surface);
    border: var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family-copy);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}
.menu-years #year-search::placeholder {
    color: var(--text-tertiary);
}
.menu-years #year-search:focus {
    border-color: var(--accent-start);
}
/* Year groups */
.year-decade h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 0.5rem 1rem;
    margin: 0;
}
.year-decade ul {
    list-style: none;
    padding: 0;
}
.year-decade li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition:
        background 0.15s,
        color 0.15s;
}
.year-decade li a:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}
.year-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--color_red);
    font-size: 0.9rem;
}
/* Main layout */
main {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--main-padding-y) var(--main-padding-x);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    flex: 1;
}
/* Article / content card */
article {
    background: var(--bg-surface);
    border: var(--border);
    border-radius: var(--radius);
    padding: var(--article-padding-y) var(--article-padding-x);
    box-shadow: var(--shadow-sm);
}
/* Article typography */
article h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
article h2 {
    text-transform: none;
    letter-spacing: -0.01em;
    margin: 2rem 0 0.5rem 0;
    font-family: var(--font-family-accent);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.45;
}
article h2 a {
    color: inherit;
    text-decoration: none;
}
article h2 a:hover {
    color: var(--accent-start);
}
article h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-tertiary);
    margin: 1.5rem 0 0.5rem;
}
article p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
article strong {
    font-weight: 700;
}
article blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-page);
    border-left: 0.25rem solid var(--accent-start);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: var(--font-family-accent);
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-primary);
    text-align: center;
    box-shadow: #7771 .125em .125em .25em inset;
}
article blockquote p {
    margin: 0;
}
article hr {
    margin: 2.5rem 0;
    height: 0.0625rem;
    background: var(--color_rose);
    opacity: 0.5;
}
article .poster-preview {
    margin: 1.5rem 0 1rem;
}
article .poster-preview a {
    display: block;
    text-decoration: none;
}
article .poster-preview img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
article .poster-preview .morePosters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
article .poster-preview .morePosters a {
    width: clamp(7.5rem, 30%, 13rem);
    max-width: 100%;
}
article .poster-preview .morePosters a:only-child {
    margin-inline: auto;
}
article .poster-preview figcaption {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 0.75rem;
}
article ul {
    list-style: none;
    padding: 0;
}
article ul li {
    position: relative;
    padding: 0.2rem 0 0.2rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
article ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 0.3125rem;
    height: 0.3125rem;
    border-radius: 50%;
    background: var(--accent-start);
}
article ol {
    list-style: decimal;
    padding: 0 0 0 1.25rem;
}
article ol li {
    padding: 0.2rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
/* Aside / sidebar */
aside {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
aside section {
    background: var(--bg-aside);
    border: var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
aside section h2 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-bottom: 0.85rem;
}
aside section h2 a {
    color: inherit;
    text-decoration: none;
}
aside section h2 a:hover {
    color: var(--accent-start);
}
aside ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
aside ul li {
    background: var(--bg-elevated);
    border: var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}
aside ul li h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-start);
    margin-bottom: 0.35rem;
}
aside ul li h3 a {
    color: inherit;
    text-decoration: none;
}
aside ul li p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
}
aside ul li p strong {
    color: var(--text-primary);
    font-weight: 600;
}
aside ul li p a {
    color: inherit;
    text-decoration: none;
}
aside ul li p a:hover strong {
    color: var(--accent-start);
}
aside ul li p small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}
.small {
    font-size: 0.75rem;
}
/* Links */
a {
    color: var(--accent-start);
    text-decoration: underline;
    text-underline-offset: 0.1875rem;
    transition: color 0.15s;
}
a:hover {
    text-decoration: none;
}
.headerSlider {
    margin-bottom: var(--article-padding-y);
}
.headerSlider > img {
    width: 100%;
}
/* Footer */
footer {
    background: var(--bg-footer);
    color: var(--text-footer);
    border-top: var(--border);
    padding: var(--footer-padding-y) var(--footer-padding-x);
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}
footer a {
    color: var(--text-inverted);
    font-size: 0.8rem;
    text-decoration: none;
    letter-spacing: 0.02em;
    font-weight: 500;
    transition: color 0.15s;
}
footer a:hover {
    text-decoration: underline;
}
/* =============================
   Responsive breakpoints
   ============================= */
/* Tablet */
@media (min-width: 600px) {
    :root {
        --main-padding-y: 3rem;
        --article-padding-y: 2.5rem;
        --article-padding-x: 2rem;
        --header-height: 4.5rem;
        --logo-font-size: 1.4rem;
    }
    header {
        padding: 0 2rem;
    }
    article h1 {
        font-size: 2.5rem;
    }
    article > h2 {
        font-size: 1.75rem;
    }
}
/* Desktop */
@media (min-width: 860px) {
    :root {
        --main-padding-y: 2rem;
        --article-padding-y: 3rem;
        --article-padding-x: 2.5rem;
        --footer-padding-y: 1.5rem;
        --footer-padding-x: 2.5rem;
    }
    header {
        padding: 0 2.5rem;
    }
    main {
        display: var(--layout-display);
        grid-template-columns: var(--layout-cols);
        align-items: var(--layout-align);
    }
    .menu-panels {
        grid-template-columns: 1fr 20rem;
    }
    .menu-themes h2 {
        font-size: 0.6rem;
    }
    .menu-themes .theme-option {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }
    .menu-themes .theme-dot {
        width: 0.75rem;
        height: 0.75rem;
    }
}
