/*
Theme Name: St. Josef Berlinghausen
Theme URI: https://st-josef-berlinghausen.de
Author: St. Josef-Schützenbruderschaft Berlinghausen 1920 e.V.
Description: Modernes, traditionsbewusstes Theme für die St. Josef-Schützenbruderschaft Berlinghausen 1920 e.V. Klare Struktur, dezente Animationen, Vereinsfarben Grün und Weiß mit Goldakzent.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: st-josef
Tags: custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
    --color-primary: #006400;
    --color-primary-dark: #004d00;
    --color-primary-light: #2d8a2d;
    --color-primary-50: #e8f3e8;
    --color-gold: #c9a961;
    --color-gold-dark: #a88a47;
    --color-white: #ffffff;
    --color-bg: #fafaf7;
    --color-bg-alt: #f3f4ee;
    --color-text: #1a1d1a;
    --color-text-muted: #5a5e58;
    --color-border: #e6e7e1;
    --color-shadow: rgba(0, 30, 0, 0.06);

    --font-display: "Playfair Display", "Times New Roman", Georgia, serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    --container: 1200px;
    --container-narrow: 880px;
    --space-section: clamp(4rem, 8vw, 7rem);

    --transition-base: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-fast: 0.2s ease;
}

/* ==========================================================================
   Reset / Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-gold-dark); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0 0 0.6em;
    color: var(--color-text);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; }

::selection { background: var(--color-primary); color: var(--color-white); }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: 1440px; }

.section { padding: var(--space-section) 0; }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-primary-dark); color: var(--color-white); }
.section--dark h2,
.section--dark h3 { color: var(--color-white); }

.section-header { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-header__eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    position: relative;
}
.section-header__eyebrow::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    width: 32px; height: 2px;
    background: var(--color-gold);
}
.section-header p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.8rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    line-height: 1;
}
.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}
.btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 70, 0, 0.18);
}
.btn--ghost {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.5);
}
.btn--ghost:hover {
    background: var(--color-white);
    color: var(--color-primary-dark);
    border-color: var(--color-white);
}
.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}
.btn--gold {
    background: var(--color-gold);
    color: var(--color-primary-dark);
    border-color: var(--color-gold);
}
.btn--gold:hover {
    background: var(--color-gold-dark);
    border-color: var(--color-gold-dark);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(160, 130, 60, 0.28);
}
.btn--white {
    background: var(--color-white);
    color: var(--color-primary-dark);
    border-color: var(--color-white);
}
.btn--white:hover {
    background: var(--color-bg);
    border-color: var(--color-bg);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
.btn__arrow {
    display: inline-block;
    transition: transform var(--transition-base);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ==========================================================================
   Site Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.7rem 0;
    transition: background var(--transition-base), box-shadow var(--transition-base), padding var(--transition-base);
}
.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    box-shadow: 0 2px 18px var(--color-shadow);
    padding: 1.1rem 0;
}
.site-brand__title { font-size: 1.15rem; }
.site-brand__crest { width: 50px; height: 50px; }
.primary-nav a { font-size: 1rem; }
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}
.site-brand__crest {
    width: 44px; height: 44px;
    flex-shrink: 0;
    color: var(--color-gold);
}
.site-brand__crest img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.site-brand__title,
.site-brand__sub {
    color: var(--color-white);
    transition: color var(--transition-base);
}
.site-header.is-scrolled .site-brand__title,
.site-header.is-scrolled .site-brand__sub {
    color: var(--color-text);
}
.site-brand__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.01em;
}
.site-brand__sub {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Primary nav */
.primary-nav { display: flex; align-items: center; }
.primary-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 2.2rem;
}
.primary-nav a {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-white);
    padding: 0.4rem 0;
}
.site-header.is-scrolled .primary-nav a { color: var(--color-text); }
.primary-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 2px;
    background: var(--color-gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-base);
}
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after {
    transform: scaleX(1);
    transform-origin: left;
}
.primary-nav a:hover {
    color: var(--color-white);
}
.site-header.is-scrolled .primary-nav a:hover { color: var(--color-primary); }

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex: none;
    background: transparent;
    border: 0;
    width: 40px; height: 40px;
    cursor: pointer;
    color: var(--color-white);
    padding: 8px;
}
.site-header.is-scrolled .nav-toggle { color: var(--color-text); }
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: currentColor;
    margin: 5px auto;
    transition: transform var(--transition-base), opacity var(--transition-base);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .primary-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--color-white);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        box-shadow: 0 12px 30px var(--color-shadow);
    }
    .primary-nav.is-open { max-height: 70vh; }
    .primary-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 1.5rem 2rem;
    }
    .primary-nav a {
        color: var(--color-text);
        padding: 1rem 0;
        border-bottom: 1px solid var(--color-border);
        display: block;
    }
    .primary-nav li:last-child a { border-bottom: 0; }
}

/* Schmale Handys: Wappen, Vereinsname und Menü-Button müssen nebeneinander passen (ab 320 px) */
@media (max-width: 480px) {
    .site-header__inner { gap: 1rem; }
    .site-brand { gap: 0.6rem; }
    .site-brand__crest { width: 38px; height: 38px; }
    .site-brand__title { font-size: 0.98rem; }
    .site-brand__sub { font-size: 0.64rem; letter-spacing: 0.12em; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: min(92vh, 880px);
    display: flex;
    align-items: center;
    color: var(--color-white);
    overflow: hidden;
    isolation: isolate;
}
.hero__media {
    position: absolute; inset: 0;
    z-index: -2;
    background:
        linear-gradient(135deg, #003d00 0%, #006400 55%, #2d8a2d 100%);
}
.hero__media::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(201, 169, 97, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 45%);
}
.hero__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.4;
    mix-blend-mode: luminosity;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(0, 30, 0, 0.7) 0%, rgba(0, 50, 0, 0.55) 40%, rgba(0, 30, 0, 0.85) 100%);
}
.hero__inner {
    width: 100%;
    padding: 8rem 0 5rem;
}
.hero--has-countdown .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: clamp(2rem, 4vw, 4rem);
}
@media (max-width: 900px) {
    .hero--has-countdown .hero__inner {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
}
.hero__eyebrow::before {
    content: "";
    width: 32px; height: 1px;
    background: var(--color-gold);
}
.hero__title {
    color: var(--color-white);
    margin-bottom: 1.4rem;
    hyphens: manual;
    overflow-wrap: normal;
    word-break: normal;
    font-size: clamp(1.9rem, 4.4vw, 3.6rem);
}
.hero__motto {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: rgba(255, 255, 255, 0.92);
    max-width: 42ch;
    margin-bottom: 2.4rem;
    line-height: 1.5;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.hero__scroll {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
}
.hero__scroll::after {
    content: "";
    display: block;
    width: 1px; height: 36px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0.7rem auto 0;
    animation: scrollPulse 2.4s ease-in-out infinite;
    transform-origin: top;
}
@keyframes scrollPulse {
    0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Hero-Countdown (Schützenfest) — rechts neben Motto/Buttons
   Horizontale Karte: Label links (2 Zeilen), große Zahlen rechts.
   -------------------------------------------------------------------------- */
.hero__countdown {
    background: var(--color-white);
    color: var(--color-primary);
    border-radius: var(--radius-lg);
    border-top: 3px solid var(--color-gold);
    box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.45);
    padding: 1.2rem clamp(1.2rem, 2vw, 1.8rem);
    width: min(580px, 100%);
    align-self: end;
    margin-bottom: 0.4rem;

    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.4vw, 1.8rem);
}
.hero__countdown-intro {
    flex: 0 0 auto;
    max-width: 11ch;
}
.hero__countdown-eyebrow {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    line-height: 1.25;
}
.hero__countdown-eyebrow span {
    display: block;
}
.hero__countdown-sub {
    margin: 0.5rem 0 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.82rem;
    color: var(--color-primary);
    line-height: 1.3;
}
.hero__countdown-values {
    /* Grid mit 4 gleichbreiten Spalten — die Zellen ändern dadurch ihre
       Größe NICHT, auch wenn z. B. „9" zu „10" wechselt. */
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.4rem, 1vw, 0.7rem);
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}
.hero__countdown-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    background: var(--color-primary-50);
    border: 1px solid rgba(0, 100, 0, 0.18);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.4rem 0.45rem;
}
.hero__countdown-num {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 600;
    line-height: 1;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}
.hero__countdown-label {
    margin-top: 0.35rem;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-primary-dark);
}
@media (max-width: 900px) {
    .hero__countdown {
        width: 100%;
        max-width: 100%;
        margin-top: 1.5rem;
    }
}
@media (max-width: 560px) {
    .hero__countdown {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }
    .hero__countdown-intro {
        max-width: none;
        text-align: center;
    }
    .hero__countdown-eyebrow span {
        display: inline;
    }
    .hero__countdown-eyebrow span + span::before { content: " "; }
}

/* --------------------------------------------------------------------------
   Hero-Live-Banner — während des Schützenfests an Stelle des Countdowns,
   weißer Hintergrund + grüne Schrift, mit Konfetti-Animation.
   -------------------------------------------------------------------------- */
.hero__live {
    position: relative;
    background: var(--color-white);
    color: var(--color-primary);
    border-radius: var(--radius-lg);
    border-top: 3px solid var(--color-gold);
    box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.45);
    padding: 1.4rem clamp(1.4rem, 2.4vw, 2rem);
    width: min(580px, 100%);
    align-self: end;
    margin-bottom: 0.4rem;
    overflow: hidden;
    isolation: isolate;
}
.hero__live-body {
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero__live-pulse {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-right: 0.6rem;
    vertical-align: middle;
    animation: heroLivePulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(0, 100, 0, 0.55);
}
@keyframes heroLivePulse {
    0%   { box-shadow: 0 0 0 0   rgba(0, 100, 0, 0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(0, 100, 0, 0); }
    100% { box-shadow: 0 0 0 0   rgba(0, 100, 0, 0); }
}
.hero__live-title {
    display: inline;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    color: var(--color-primary);
    line-height: 1.15;
    letter-spacing: 0.01em;
}
.hero__live-sub {
    margin: 0.6rem 0 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--color-primary-dark);
}

/* Konfetti — kleine bunte Schnipsel, die innerhalb der Karte herabfallen. */
.hero__live-confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.hero__live-confetti-piece {
    position: absolute;
    top: -14px;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0.85;
    animation-name: heroConfettiFall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
@keyframes heroConfettiFall {
    0%   { transform: translate3d(0, -20px, 0) rotate(0deg);   opacity: 0; }
    8%   { opacity: 0.95; }
    100% { transform: translate3d(8px, 220px, 0) rotate(720deg); opacity: 0.4; }
}
/* Farb-Varianten — Vereinsfarben + dezente Akzente. */
.hero__live-confetti-piece--1 { background: var(--color-primary); }
.hero__live-confetti-piece--2 { background: var(--color-gold); }
.hero__live-confetti-piece--3 { background: var(--color-primary-light); }
.hero__live-confetti-piece--4 { background: #c9a961; }
.hero__live-confetti-piece--5 { background: var(--color-primary-dark); }

/* Streuung — verschiedene Startpositionen, Geschwindigkeiten und Verzögerungen,
   damit das Konfetti nicht synchron fällt. nth-child-Selektoren positionieren
   die 22 Stücke (siehe front-page.php Schleife). */
.hero__live-confetti-piece:nth-child(1)  { left:  3%; animation-duration: 4.2s; animation-delay: 0s;    }
.hero__live-confetti-piece:nth-child(2)  { left:  9%; animation-duration: 5.1s; animation-delay: 0.6s;  }
.hero__live-confetti-piece:nth-child(3)  { left: 15%; animation-duration: 3.8s; animation-delay: 1.4s;  }
.hero__live-confetti-piece:nth-child(4)  { left: 21%; animation-duration: 4.7s; animation-delay: 0.2s;  }
.hero__live-confetti-piece:nth-child(5)  { left: 27%; animation-duration: 5.5s; animation-delay: 2.1s;  }
.hero__live-confetti-piece:nth-child(6)  { left: 33%; animation-duration: 4.1s; animation-delay: 0.9s;  }
.hero__live-confetti-piece:nth-child(7)  { left: 39%; animation-duration: 4.9s; animation-delay: 1.7s;  }
.hero__live-confetti-piece:nth-child(8)  { left: 45%; animation-duration: 3.6s; animation-delay: 0.4s;  }
.hero__live-confetti-piece:nth-child(9)  { left: 51%; animation-duration: 5.2s; animation-delay: 2.6s;  }
.hero__live-confetti-piece:nth-child(10) { left: 57%; animation-duration: 4.4s; animation-delay: 1.1s;  }
.hero__live-confetti-piece:nth-child(11) { left: 63%; animation-duration: 4.8s; animation-delay: 0.7s;  }
.hero__live-confetti-piece:nth-child(12) { left: 69%; animation-duration: 5.0s; animation-delay: 2.3s;  }
.hero__live-confetti-piece:nth-child(13) { left: 75%; animation-duration: 3.9s; animation-delay: 1.3s;  }
.hero__live-confetti-piece:nth-child(14) { left: 81%; animation-duration: 5.4s; animation-delay: 0.3s;  }
.hero__live-confetti-piece:nth-child(15) { left: 87%; animation-duration: 4.3s; animation-delay: 1.9s;  }
.hero__live-confetti-piece:nth-child(16) { left: 93%; animation-duration: 4.6s; animation-delay: 0.5s;  }
.hero__live-confetti-piece:nth-child(17) { left:  6%; animation-duration: 5.3s; animation-delay: 2.8s;  }
.hero__live-confetti-piece:nth-child(18) { left: 24%; animation-duration: 4.0s; animation-delay: 3.2s;  }
.hero__live-confetti-piece:nth-child(19) { left: 42%; animation-duration: 4.7s; animation-delay: 3.6s;  }
.hero__live-confetti-piece:nth-child(20) { left: 60%; animation-duration: 5.1s; animation-delay: 2.4s;  }
.hero__live-confetti-piece:nth-child(21) { left: 78%; animation-duration: 3.8s; animation-delay: 3.0s;  }
.hero__live-confetti-piece:nth-child(22) { left: 96%; animation-duration: 4.5s; animation-delay: 1.6s;  }

/* Bei prefers-reduced-motion: Konfetti deaktivieren — bleibt statisch.  */
@media (prefers-reduced-motion: reduce) {
    .hero__live-confetti-piece,
    .hero__live-pulse {
        animation: none;
    }
    .hero__live-confetti { display: none; }
}

@media (max-width: 900px) {
    .hero__live {
        width: 100%;
        max-width: 100%;
        margin-top: 1.5rem;
    }
}

/* ==========================================================================
   Next Event highlight
   ========================================================================== */
.next-event {
    position: relative;
    padding: var(--space-section) 0 0;
}
.next-event__card {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px -20px rgba(0, 50, 0, 0.18);
    padding: clamp(1.6rem, 3vw, 2.4rem);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: center;
    border-top: 4px solid var(--color-gold);
}
.next-event__date {
    text-align: center;
    padding: 1rem 1.4rem;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-md);
    min-width: 120px;
}
.next-event__date-day {
    display: block;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1;
}
.next-event__date-month {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-top: 0.4rem;
    color: var(--color-gold);
}
.next-event__body { min-width: 0; }
.next-event__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    margin-bottom: 0.4rem;
}
.next-event__title {
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    margin: 0 0 0.4rem;
}
.next-event__meta {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}
.next-event__meta span + span::before {
    content: "·";
    margin: 0 0.6rem;
    color: var(--color-gold);
}

@media (max-width: 720px) {
    .next-event__card {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .next-event__date { justify-self: start; }
}

/* ==========================================================================
   News Grid
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.news-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px -18px rgba(0, 50, 0, 0.18);
    border-color: transparent;
}
.news-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.news-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.news-card:hover .news-card__media img { transform: scale(1.05); }
.news-card__placeholder {
    width: 100%; height: 100%;
    background:
        linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
}
.news-card__body {
    padding: 1.6rem 1.6rem 1.8rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.news-card__date {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    margin-bottom: 0.6rem;
}
.news-card__title {
    font-size: 1.25rem;
    margin: 0 0 0.7rem;
    line-height: 1.3;
}
.news-card__title a { color: inherit; }
.news-card__title a:hover { color: var(--color-primary); }
.news-card__excerpt {
    color: var(--color-text-muted);
    font-size: 0.97rem;
    margin: 0 0 1.2rem;
    flex: 1;
}
.news-card__more {
    font-weight: 500;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.news-card__more::after {
    content: "→";
    transition: transform var(--transition-fast);
}
.news-card__more:hover::after { transform: translateX(4px); }

/* ==========================================================================
   About / Verein
   ========================================================================== */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
@media (max-width: 860px) {
    .about { grid-template-columns: 1fr; }
}
.about__media {
    position: relative;
}
.about__media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: transparent;
}

.about__body p { font-size: 1.05rem; }
.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.about__stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.about__stat span {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Gallery preview
   ========================================================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}
.gallery__item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    cursor: pointer;
}
.gallery__item:nth-child(1),
.gallery__item:nth-child(6) {
    grid-row: span 2;
    aspect-ratio: 1 / 2.05;
}
.gallery__item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gallery__item::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 50, 0, 0.55) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}
.gallery__item:hover::after { opacity: 1; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item-placeholder {
    width: 100%; height: 100%;
    background:
        linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}
.gallery__cta { text-align: center; }

@media (max-width: 720px) {
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .gallery__item:nth-child(1),
    .gallery__item:nth-child(6) {
        grid-row: auto;
        aspect-ratio: 1;
    }
}

/* ==========================================================================
   Membership CTA
   ========================================================================== */
.membership {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.membership::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 80% 30%, rgba(201, 169, 97, 0.18) 0%, transparent 50%),
        linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}
.membership__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}
@media (max-width: 860px) {
    .membership__inner { grid-template-columns: 1fr; }
}
.membership h2 { color: var(--color-white); }
.membership p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}
.membership__list {
    list-style: none;
    margin: 1.6rem 0 2rem;
    padding: 0;
}
.membership__list li {
    padding: 0.6rem 0 0.6rem 1.8rem;
    position: relative;
    color: rgba(255, 255, 255, 0.92);
}
.membership__list li::before {
    content: "";
    position: absolute;
    left: 0; top: 1.1rem;
    width: 12px; height: 2px;
    background: var(--color-gold);
}
.membership__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.membership__panel {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 2rem;
    color: var(--color-white);
}
.membership__panel h3 { color: var(--color-white); font-size: 1.2rem; margin-bottom: 1rem; }
.membership__panel-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.membership__panel-row:last-child { border-bottom: 0; }
.membership__panel-row span:last-child { color: var(--color-gold); font-weight: 500; }

/* ==========================================================================
   Schützenfest-Banner (Countdown / Live)
   ========================================================================== */
.sf-banner {
    margin-top: -2rem;
    position: relative;
    z-index: 6;
}
.sf-banner__inner {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    padding: 1.6rem clamp(1.4rem, 3vw, 2.4rem);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 50px -22px rgba(0, 50, 0, 0.35);
    border-top: 3px solid var(--color-gold);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.sf-banner__inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(201,169,97,0.18), transparent 60%);
    pointer-events: none;
}
.sf-banner__eyebrow {
    margin: 0 0 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
}
.sf-banner__title {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
}
.sf-banner__sub {
    margin: 0.6rem 0 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.sf-countdown__values {
    display: flex;
    justify-content: center;
    gap: clamp(0.8rem, 2vw, 1.6rem);
    margin: 0.4rem 0 0.4rem;
}
.sf-countdown__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.6rem 0.5rem;
    backdrop-filter: blur(4px);
}
.sf-countdown__num {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 600;
    line-height: 1;
    color: var(--color-white);
    font-variant-numeric: tabular-nums;
}
.sf-countdown__label {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gold);
}

/* "Es ist Schützenfest!" — Live-Pulse */
.sf-banner--live .sf-banner__inner {
    background: linear-gradient(135deg, #4a8a2a 0%, var(--color-primary) 100%);
}
.sf-banner__pulse {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--color-gold);
    margin-right: 0.7rem;
    vertical-align: middle;
    animation: sfPulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.6);
}
@keyframes sfPulse {
    0%   { box-shadow: 0 0 0 0   rgba(201, 169, 97, 0.6); }
    70%  { box-shadow: 0 0 0 16px rgba(201, 169, 97, 0); }
    100% { box-shadow: 0 0 0 0   rgba(201, 169, 97, 0); }
}

/* Auf der Frontpage: Banner zwischen Hero und Next-Event — bleibt zentral
   in seiner eigenen Section; die Next-Event-Section nutzt regulären Section-Abstand. */

@media (max-width: 520px) {
    .sf-countdown__cell { min-width: 56px; padding: 0.6rem 0.4rem; }
}

/* ==========================================================================
   Termin-Liste (Seite /termine)
   ========================================================================== */
.termine-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
}
.termine-month {
    margin: 2.6rem 0 1.4rem;
    font-size: clamp(1.4rem, 2.4vw, 1.7rem);
    color: var(--color-primary-dark);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.6rem;
}
.termine-month:first-child { margin-top: 0; }
.termine-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}
.termin-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
    padding: 1.4rem 1.6rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.termin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -16px rgba(0, 50, 0, 0.18);
    border-color: transparent;
}
.termin-card__date {
    text-align: center;
    padding: 0.7rem 0.4rem;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    border-top: 3px solid var(--color-gold);
    line-height: 1.1;
}
.termin-card__weekday {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.3rem;
}
.termin-card__day {
    display: block;
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
}
.termin-card__month {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 0.2rem;
    opacity: 0.85;
}
.termin-card__title {
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
}
.termin-card__meta {
    color: var(--color-text-muted);
    font-size: 0.93rem;
    margin: 0 0 0.6rem;
}
.termin-card__meta span + span::before {
    content: "·";
    margin: 0 0.5rem;
    color: var(--color-gold);
}
.termin-card__desc {
    color: var(--color-text);
    font-size: 0.97rem;
    margin: 0;
}
.termin-card__body {
    overflow-wrap: break-word;
    hyphens: auto;
}
.termine-admin-hint {
    margin-top: 3rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
@media (max-width: 520px) {
    .termin-card { grid-template-columns: 76px minmax(0, 1fr); padding: 1.1rem 1.2rem; gap: 1rem; }
    .termin-card__day { font-size: 1.6rem; }
}

/* ==========================================================================
   Vereinsseite
   ========================================================================== */
.verein-intro p {
    font-size: 1.08rem;
    line-height: 1.8;
}
.verein-intro p + p { margin-top: 1rem; }

/* Majestäten */
.majestaet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}
.majestaet-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-gold);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.majestaet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -16px rgba(0, 50, 0, 0.18);
}
.majestaet-card__media {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.majestaet-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.majestaet-card__placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    color: rgba(201, 169, 97, 0.55);
}
.majestaet-card__body {
    padding: 1.4rem 1.5rem 1.6rem;
}
.majestaet-card__type {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    margin-bottom: 0.5rem;
}
.majestaet-card__title {
    font-size: 1.25rem;
    margin: 0 0 0.4rem;
    line-height: 1.3;
}
.majestaet-card__sub {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Majestäten-Verzeichnis: Listen pro Typ ---------------------------------- */
.majestaet-liste {
    margin: 0 0 3rem;
}
.majestaet-liste:last-child {
    margin-bottom: 0;
}
.majestaet-liste__title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    color: var(--color-primary-dark);
    margin: 0 0 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-gold);
}
.majestaet-liste__items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.majestaet-liste__item {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1.2rem;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.02rem;
}
.majestaet-liste__item:last-child {
    border-bottom: none;
}
.majestaet-liste__year {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.majestaet-liste__names {
    color: var(--color-text);
}
@media (max-width: 560px) {
    .majestaet-liste__item {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.85rem 0;
    }
    .majestaet-liste__year {
        font-size: 0.85rem;
        letter-spacing: 0.1em;
        color: var(--color-primary-dark);
    }
}

/* Majestäten: Gliederung nach Jahrzehnten (aufklappbar) */
.majestaet-dekade {
    border-bottom: 1px solid var(--color-border);
}
.majestaet-dekade__summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0.25rem;
    cursor: pointer;
    list-style: none;
}
.majestaet-dekade__summary::-webkit-details-marker {
    display: none;
}
.majestaet-dekade__label {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    transition: color 0.2s ease;
}
.majestaet-dekade__summary:hover .majestaet-dekade__label {
    color: var(--color-primary);
}
.majestaet-dekade__count {
    margin-left: auto;
    font-size: 0.88rem;
    color: var(--color-text-muted);
}
.majestaet-dekade__summary::after {
    content: "";
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    margin: 0 0.35rem 0.25rem 0;
    border-right: 2px solid var(--color-gold-dark);
    border-bottom: 2px solid var(--color-gold-dark);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.majestaet-dekade[open] > .majestaet-dekade__summary::after {
    margin-bottom: -0.2rem;
    transform: rotate(-135deg);
}
.majestaet-dekade__summary:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 2px;
    border-radius: 2px;
}
.majestaet-dekade > .majestaet-liste__items {
    margin: 0 0 1rem 0.25rem;
    padding-left: 1rem;
    border-left: 2px solid var(--color-gold);
}
@media (prefers-reduced-motion: reduce) {
    .majestaet-dekade__label,
    .majestaet-dekade__summary::after {
        transition: none;
    }
}

/* Vorstand: Hierarchie-Reihen */
.vorstand-hierarchy {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.vorstand-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.6rem;
    position: relative;
}
.vorstand-row + .vorstand-row {
    padding-top: 2rem;
}
.vorstand-row + .vorstand-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--color-gold);
    opacity: 0.5;
}
.vorstand-card {
    text-align: center;
    background: var(--color-white);
    padding: 1.8rem 1.2rem 1.6rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    flex: 0 0 auto;
    width: 240px;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
@media (max-width: 560px) { .vorstand-card { width: 100%; max-width: 280px; } }
.vorstand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -16px rgba(0, 50, 0, 0.18);
    border-color: transparent;
}
.vorstand-card__media {
    width: 132px; height: 132px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.vorstand-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.vorstand-card__placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.4);
}
.vorstand-card__name {
    font-size: 1.15rem;
    margin: 0 0 0.3rem;
    line-height: 1.3;
}
.vorstand-card__role {
    color: var(--color-gold-dark);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    margin: 0;
}

/* Feature-Card: generische Vorschau-Karte (Vorstand, Korporalschaft, …) */
.feature-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 18px 40px -22px rgba(0, 50, 0, 0.18);
    max-width: 1000px;
    margin: 0 auto;
}
.feature-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}
.feature-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.feature-card__placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(201, 169, 97, 0.6);
}
.feature-card__body {
    padding: clamp(1.6rem, 3vw, 2.4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.feature-card__name {
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    margin: 0 0 0.8rem;
}
.feature-card__text {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1.4rem;
}
@media (max-width: 720px) {
    .feature-card { grid-template-columns: 1fr; }
}

/* Vorstands-Detailseite: 2-Spalten-Layout mit sticky Sidebar */
.vorstand-page {
    display: grid;
    grid-template-columns: minmax(240px, 0.55fr) 3fr;
    gap: clamp(1.6rem, 3vw, 2.4rem);
    align-items: start;
}
@media (max-width: 900px) {
    .vorstand-page {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Linke Spalte bleibt im Viewport "kleben" — die rechte (Hierarchie)
   scrollt mit dem normalen Page-Scroll am Sidebar vorbei. */
.vorstand-page__aside {
    position: sticky;
    top: 6rem;
    align-self: start;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}
.vorstand-page__aside::-webkit-scrollbar { width: 6px; }
.vorstand-page__aside::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}
.vorstand-page__aside::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }

.vorstand-page__aside-inner {
    font-size: 1.02rem;
    line-height: 1.7;
}
.vorstand-page__aside-inner p { margin: 0 0 1rem; }
.vorstand-page__aside-inner h2,
.vorstand-page__aside-inner h3 { margin-top: 1.5rem; }

.vorstand-page__main {
    min-width: 0;
}

@media (max-width: 900px) {
    .vorstand-page__aside {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

/* Hierarchie-Reihen: angenehmer Abstand zwischen den Karten */
.vorstand-page .vorstand-row { gap: 1.2rem; }

/* Klickbare Karten — komfortable Größe, mehrere pro Reihe */
.vorstand-card--clickable {
    border: 1px solid var(--color-border);
    cursor: pointer;
    font: inherit;
    color: inherit;
    width: 220px;
    padding: 1.6rem 1.1rem 1.4rem;
    text-align: center;
}
.vorstand-card--clickable .vorstand-card__media {
    width: 124px; height: 124px;
}
.vorstand-card--clickable .vorstand-card__name {
    font-size: 1.1rem;
    margin: 0 0 0.3rem;
}
.vorstand-card--clickable .vorstand-card__role {
    font-size: 0.8rem;
}
.vorstand-card--clickable:hover {
    transform: translateY(-3px);
    border-color: var(--color-gold);
    box-shadow: 0 16px 32px -16px rgba(160, 130, 60, 0.3);
}
.vorstand-card--clickable:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 4px;
}
@media (max-width: 560px) {
    .vorstand-card--clickable { width: calc(50% - 0.6rem); max-width: 220px; }
    .vorstand-card--clickable .vorstand-card__media { width: 100px; height: 100px; }
}

/* Vorstand-Modal — Backdrop fullscreen (leicht abgedunkelt),
   Panel horizontal über der rechten Spalte */
.vorstand-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.vorstand-modal[hidden] { display: none !important; }
.vorstand-modal.is-open { opacity: 1; pointer-events: auto; }

.vorstand-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 15, 5, 0.32);
    backdrop-filter: blur(1.5px);
}

.vorstand-modal__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.92);
    width: min(520px, 92%);
    max-height: 92%;
    overflow-y: auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    transition: opacity 0.35s, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
}
.vorstand-modal.is-open .vorstand-modal__panel {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.vorstand-modal__close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.vorstand-modal__close:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.05);
}

.vorstand-modal__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.vorstand-modal__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.vorstand-modal__placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.4);
}

.vorstand-modal__body {
    padding: 1.8rem 2rem 2rem;
}
.vorstand-modal__role {
    color: var(--color-gold-dark);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 0.4rem;
}
.vorstand-modal__name {
    font-size: 1.6rem;
    margin: 0 0 1.4rem;
}
.vorstand-modal__details {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}
.vorstand-modal__row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--color-border);
}
.vorstand-modal__row:last-child { padding-bottom: 0; }
.vorstand-modal__row[hidden] { display: none; }
.vorstand-modal__row dt {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0;
}
.vorstand-modal__row dd {
    margin: 0;
    color: var(--color-text);
    font-size: 0.98rem;
}

/* Dokumente (Satzung, Jahresberichte) */
.dokumente-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
}
.doc-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.4rem;
    align-items: center;
    background: var(--color-white);
    padding: 1.6rem 1.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.doc-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-gold);
    box-shadow: 0 16px 32px -18px rgba(160, 130, 60, 0.3);
    color: inherit;
}
.doc-card__icon {
    width: 56px; height: 56px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-50);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
}
.doc-card__title {
    font-size: 1.15rem;
    margin: 0 0 0.3rem;
}
.doc-card__text {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
}
.doc-card__arrow {
    font-size: 1.4rem;
    color: var(--color-gold);
    transition: transform var(--transition-base);
}
.doc-card:hover .doc-card__arrow { transform: translateX(4px); }
.doc-card__title,
.doc-card__text {
    overflow-wrap: break-word;
    hyphens: auto;
}
@media (max-width: 480px) {
    .doc-card { gap: 1rem; padding: 1.2rem 1.25rem; }
    .doc-card__icon { width: 44px; height: 44px; }
}

/* ==========================================================================
   Aktuelles-Seite
   ========================================================================== */
.aktuelles-loadmore {
    margin-top: 3rem;
    text-align: center;
}
#aktuelles-load-more.is-loading {
    opacity: 0.7;
    cursor: wait;
}
.aktuelles-loadmore__status {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Galerie-Seite
   ========================================================================== */
.album-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 0 0 2.5rem;
    padding: 0.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.album-filter__tab {
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all var(--transition-base);
}
.album-filter__tab:hover {
    color: var(--color-primary);
}
.album-filter__tab.is-active {
    background: var(--color-primary);
    color: var(--color-white);
}
.album-filter__tab.is-active:hover { color: var(--color-white); }

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.6rem;
}
.album-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -16px rgba(0, 50, 0, 0.2);
    border-color: transparent;
}
.album-card__link {
    color: inherit;
    text-decoration: none;
    display: block;
}
.album-card__link:hover { color: inherit; }
.album-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.album-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.album-card:hover .album-card__media img { transform: scale(1.05); }
.album-card__placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.35);
}
.album-card__body {
    padding: 1.4rem 1.5rem 1.6rem;
}
.album-card__date {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    margin: 0 0 0.5rem;
}
.album-card__title {
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
    line-height: 1.3;
}
.album-card__type {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    margin: 0;
}

/* Single-Album */
.album-content { font-size: 1.02rem; line-height: 1.7; }
.album-lead { font-size: 1.15rem; color: var(--color-text-muted); margin: 0 0 2rem; max-width: 720px; }
.album-content .wp-block-gallery,
.album-content figure { margin: 1.5rem 0; }

/* ==========================================================================
   Kontakt-Seite
   ========================================================================== */
.kontakt-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.4rem;
}
.kontakt-grid > .kontakt-card {
    flex: 1 1 240px;
    max-width: 320px;
    min-width: 0;
}
.kontakt-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.8rem 1.6rem;
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.kontakt-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-gold);
    box-shadow: 0 14px 28px -16px rgba(160, 130, 60, 0.25);
}
.kontakt-card__icon {
    width: 56px; height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--color-primary-50);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
}
.kontakt-card__title {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 0.6rem;
}
.kontakt-card__value {
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}
.kontakt-card__value a {
    color: inherit;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.kontakt-card__value a:hover { color: var(--color-primary); }

/* Lange E-Mail-Adressen lesbar halten — kleinere Schrift, damit auch
   eine sehr lange Adresse in eine Karte passt, ohne dass das Card-Layout
   sprengt. */
.kontakt-card--email {
    flex-basis: 280px;
    max-width: 360px;
}
.kontakt-card--email .kontakt-card__value,
.kontakt-card--email .kontakt-card__value a {
    font-size: 0.82rem;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.kontakt-card__nowrap { white-space: nowrap; }
.kontakt-social {
    margin: 3.5rem auto 0;
    max-width: 560px;
    text-align: center;
}
.kontakt-social__title { font-size: 1.5rem; margin: 0 0 0.5rem; }
.kontakt-social p { color: var(--color-text-muted); margin: 0; }

/* ==========================================================================
   Folgt uns (Startseite) · Freunde & Partner (Vereinsseite)
   ========================================================================== */
.social-band__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.4rem;
    max-width: 820px;
    margin: 0 auto;
}
.social-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.2rem;
    align-items: center;
    padding: 1.6rem 1.8rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.social-card:hover,
.social-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--color-gold);
    box-shadow: 0 18px 36px -24px rgba(0, 30, 0, 0.35);
}
.social-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    color: var(--color-white);
}
/* Markenfarben nur als Icon-Hintergrund – der Rest bleibt im Vereinsdesign */
.social-card--facebook .social-card__icon { background: #1877f2; }
.social-card--instagram .social-card__icon { background: linear-gradient(45deg, #f9a825 0%, #e1306c 50%, #833ab4 100%); }
.social-card__body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.social-card__label {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
}
.social-card__handle { color: var(--color-text-muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.social-card__arrow {
    font-size: 1.3rem;
    color: var(--color-gold-dark);
    transition: transform var(--transition-base);
}
.social-card:hover .social-card__arrow { transform: translateX(4px); }

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1.4rem;
}
/* Vier Partner: zwei Reihen zu je zwei. Vier nebeneinander wären für die langen Namen zu schmal, drei plus eine einzelne Karte unruhig. */
@media (min-width: 641px) {
    .partner-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.partner-card {
    display: flex;
    flex-direction: column;
    padding: 1.8rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.partner-card--dgh { border-top-color: var(--color-gold); }
.partner-card:hover,
.partner-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px -24px rgba(0, 30, 0, 0.35);
}
.partner-card__rolle {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
}
.partner-card__name { margin: 0.5rem 0 0.7rem; font-size: 1.25rem; }
.partner-card__text { margin: 0 0 1.4rem; color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.65; }
.partner-card__link {
    margin-top: auto;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-primary);
    overflow-wrap: anywhere;
}
@media (max-width: 480px) {
    .social-card { padding: 1.2rem; gap: 0.9rem; }
    .social-card__icon { width: 50px; height: 50px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .social-card:hover, .social-card:focus-visible,
    .partner-card:hover, .partner-card:focus-visible { transform: none; }
    .social-card:hover .social-card__arrow { transform: none; }
}

/* ==========================================================================
   Jahresberichte-Liste
   ========================================================================== */
.jb-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.jb-row {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 1.4rem;
    align-items: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.5rem;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.jb-row:hover {
    transform: translateY(-2px);
    border-color: var(--color-gold);
    box-shadow: 0 12px 24px -16px rgba(160, 130, 60, 0.25);
}
.jb-row__year {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
    padding-right: 1rem;
    border-right: 1px solid var(--color-border);
    line-height: 1;
}
.jb-row__title {
    font-size: 1.1rem;
    margin: 0 0 0.3rem;
}
.jb-row__meta {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin: 0;
}
@media (max-width: 520px) {
    .jb-row { grid-template-columns: 1fr; gap: 0.6rem; padding: 1.2rem; }
    .jb-row__year { text-align: left; padding: 0; border: 0; font-size: 1.3rem; }
}

/* ==========================================================================
   Josefslied (page-josefslied.php)
   ========================================================================== */
.josefslied__untertitel {
    margin: 0.6rem 0 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.1rem, 2.4vw, 1.35rem);
    color: rgba(255, 255, 255, 0.85);
}
.josefslied__intro {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    max-width: 1040px;
    margin: 0 auto;
}
.josefslied__intro--ohne-bild { grid-template-columns: minmax(0, 1fr); max-width: var(--container-narrow); }
.josefslied__bild { margin: 0; }
.josefslied__bild img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 24px 48px -24px rgba(0, 30, 0, 0.35);
    outline: 1px solid var(--color-border);
    outline-offset: 8px;
}
.josefslied__bild figcaption {
    margin-top: 1.1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
}
.josefslied__info h2 { margin: 0.4rem 0 1rem; }
.josefslied__info p { color: var(--color-text-muted); line-height: 1.75; }
.josefslied__fakten { margin: 1.8rem 0 0; border-top: 1px solid var(--color-border); }
.josefslied__fakten > div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
}
.josefslied__fakten dt {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    padding-top: 0.2rem;
}
.josefslied__fakten dd { margin: 0; }

.liedblatt {
    position: relative;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-gold);
    border-radius: var(--radius-md);
    padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 6vw, 4rem);
    text-align: center;
    box-shadow: 0 30px 60px -40px rgba(0, 30, 0, 0.3);
    counter-reset: strophe;
}
.liedblatt__titel {
    margin: 0 0 2rem;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: var(--color-primary);
}
.liedblatt__titel::after {
    content: "";
    display: block;
    width: 56px;
    height: 2px;
    margin: 1rem auto 0;
    background: var(--color-gold);
}
.liedblatt__text .wp-block-verse,
.liedblatt__text > p {
    counter-increment: strophe;
    margin: 0 0 2.2rem;
    padding: 0;
    background: none;
    border: 0;
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.3vw, 1.2rem);
    line-height: 1.9;
    color: var(--color-text);
    white-space: pre-wrap;
    overflow-wrap: break-word;
}
.liedblatt__text .wp-block-verse:last-child,
.liedblatt__text > p:last-child { margin-bottom: 0; }
.liedblatt__text .wp-block-verse::before,
.liedblatt__text > p::before {
    content: counter(strophe);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0 auto 0.8rem;
    border: 1px solid var(--color-gold);
    border-radius: 50%;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gold-dark);
}
@media (max-width: 760px) {
    .josefslied__intro { grid-template-columns: minmax(0, 1fr); }
    .josefslied__bild { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 480px) {
    .josefslied__fakten > div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
}

/* ==========================================================================
   Hero-Galerie (Coverflow-Slider auf der Startseite)
   ========================================================================== */
.hero-gallery {
    position: relative;
    margin: 0 auto 3rem;
    max-width: 1100px;
    padding: 0 60px;
}
.hero-gallery__stage {
    position: relative;
    width: 100%;
    height: clamp(280px, 42vw, 480px);
    overflow: hidden;
    border-radius: var(--radius-md);
}
.hero-gallery__slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 90%;
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-alt);
    text-decoration: none;
    color: var(--color-white);
    z-index: 1;
}
.hero-gallery__slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Aktiver Slide — groß im Fokus */
.hero-gallery__slide.is-active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
    z-index: 3;
    box-shadow: 0 30px 60px -22px rgba(0, 30, 0, 0.45);
    cursor: pointer;
}

/* Vorheriger Slide — links, kleiner, transparenter */
.hero-gallery__slide.is-prev {
    transform: translate(calc(-50% - 38%), -50%) scale(0.7);
    opacity: 0.5;
    pointer-events: auto;
    z-index: 2;
    cursor: pointer;
}

/* Nächster Slide — rechts, kleiner, transparenter */
.hero-gallery__slide.is-next {
    transform: translate(calc(-50% + 38%), -50%) scale(0.7);
    opacity: 0.5;
    pointer-events: auto;
    z-index: 2;
    cursor: pointer;
}

.hero-gallery__caption {
    position: absolute;
    left: 1.2rem; right: 1.2rem; bottom: 1rem;
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s, transform 0.4s;
    z-index: 1;
    padding: 0.5rem 0.7rem;
    background: linear-gradient(180deg, transparent, rgba(0, 30, 0, 0.6));
    border-radius: var(--radius-sm);
}
.hero-gallery__slide.is-active .hero-gallery__caption {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.hero-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--color-white);
    color: var(--color-primary);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 30, 0, 0.2);
    transition: transform var(--transition-fast), background var(--transition-fast);
    z-index: 5;
}
.hero-gallery__nav:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.06);
}
.hero-gallery__nav--prev { left: 8px; }
.hero-gallery__nav--next { right: 8px; }

.hero-gallery__dots {
    position: absolute;
    bottom: -1.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}
.hero-gallery__dots button {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 0;
    background: var(--color-border);
    cursor: pointer;
    padding: 0;
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.hero-gallery__dots button:hover { background: var(--color-gold); }
.hero-gallery__dots button.is-active {
    background: var(--color-primary);
    transform: scale(1.3);
}

@media (max-width: 720px) {
    .hero-gallery { padding: 0 40px; }
    .hero-gallery__slide { width: 80%; height: 92%; }
    .hero-gallery__slide.is-prev,
    .hero-gallery__slide.is-next { display: none; }
}

/* ==========================================================================
   Album-Detail (single-album.php)
   ========================================================================== */
.album-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.album-toolbar__count {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}
.album-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.6rem;
}
.album-image {
    position: relative;
    border: 0;
    padding: 0;
    margin: 0;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: zoom-in;
    transition: transform var(--transition-fast);
}
.album-image:hover { transform: scale(0.99); }
.album-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.album-image:hover img { transform: scale(1.06); }
.album-image__caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.8rem;
    background: linear-gradient(180deg, transparent, rgba(0, 30, 0, 0.7));
    color: var(--color-white);
    font-size: 0.85rem;
    text-align: left;
    opacity: 0;
    transition: opacity var(--transition-base);
}
.album-image:hover .album-image__caption { opacity: 1; }

.album-card__count {
    position: absolute;
    bottom: 0.7rem; right: 0.7rem;
    background: rgba(0, 30, 0, 0.8);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.album-card__media { position: relative; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    --lightbox-pad: 2rem;
    --lightbox-fade: 0.3s;                          /* Bildwechsel von Hand: kurz */
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(5, 15, 5, 0.94);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox.is-playing { --lightbox-fade: 0.8s; }     /* laufende Diashow: weich überblenden */
.lightbox[hidden] { display: none !important; }
/* Sichtbare Höhe: auf dem Handy ohne die eingeblendeten Browserleisten, wo der Browser das kennt. */
.lightbox { --lightbox-vh: 100vh; }
@supports (height: 100dvh) {
    .lightbox { --lightbox-vh: 100dvh; }
}

/* Zwei deckungsgleiche Ebenen. Beim Bildwechsel blendet die eine aus und die andere ein (main.js);
   jede zentriert ihr Bild für sich, deshalb verschiebt sich auch bei unterschiedlichen Formaten nichts. */
.lightbox__slide {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: var(--lightbox-pad);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity var(--lightbox-fade) ease-in;
    pointer-events: none;                           /* Klick neben das Bild trifft den Hintergrund und schließt */
}
.lightbox__slide.is-active {
    opacity: 1;
    transition-timing-function: ease-out;           /* kommt zügig, das alte Bild geht verzögert: kein dunkles Loch dazwischen */
}
.lightbox__slide.is-active > * { pointer-events: auto; }
.lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
/* Mit Bildunterschrift bleibt das Bild so viel niedriger, dass sie frei über dem Diashow-Knopf steht:
   Bild, 1rem Abstand und Unterschrift sitzen mittig und halten oben wie unten 4.75rem frei.
   --lightbox-caption ist die Höhe der Unterschrift, gemessen in main.js. */
.lightbox__slide.has-caption .lightbox__img {
    max-height: calc(var(--lightbox-vh) - 10.5rem - var(--lightbox-caption, 1.65rem));
}
.lightbox__caption {
    color: var(--color-white);
    text-align: center;
    font-size: 0.95rem;
    max-width: 700px;
    margin: 0;
}

.lightbox__nav,
.lightbox__close,
.lightbox__play {
    position: absolute;
    z-index: 1;                                     /* über den Bild-Ebenen */
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.lightbox__nav:hover,
.lightbox__close:hover,
.lightbox__play:hover { background: rgba(255, 255, 255, 0.25); transform: scale(1.05); }

.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}
.lightbox__nav:hover { transform: translateY(-50%) scale(1.05); }
.lightbox__nav--prev { left: 1.5rem; }
.lightbox__nav--next { right: 1.5rem; }

.lightbox__close {
    top: 1.5rem; right: 1.5rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
}

.lightbox__play {
    bottom: 1.5rem; left: 50%;
    transform: translateX(-50%);
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.lightbox__play:hover { transform: translateX(-50%) scale(1.05); }

.lightbox__counter {
    position: absolute;
    z-index: 1;
    top: 1.5rem; left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

@media (max-width: 600px) {
    .lightbox { --lightbox-pad: 1rem; }
    .lightbox__nav { width: 44px; height: 44px; font-size: 1.6rem; }
    .lightbox__nav--prev { left: 0.5rem; }
    .lightbox__nav--next { right: 0.5rem; }
}

/* ==========================================================================
   Back-to-Top
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 1.6rem; right: 1.6rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 0;
    background: var(--color-primary);
    color: var(--color-white);
    cursor: pointer;
    box-shadow: 0 10px 28px -8px rgba(0, 60, 0, 0.4);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--transition-base), transform var(--transition-base), background var(--transition-fast);
    z-index: 90;
    display: flex; align-items: center; justify-content: center;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--color-primary-dark); transform: translateY(-3px); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #0d1c0d;
    color: rgba(255, 255, 255, 0.78);
    padding: 4rem 0 2rem;
    font-size: 0.95rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.78); }
.site-footer a:hover { color: var(--color-gold); }
.footer-grid {
    display: grid;
    /* Marke · Verein · Aktivitäten · Kontakt (lange E-Mail-Adresse) · Partner.
       minmax(0, …): Spalten dürfen schmaler werden als ihr längstes Wort. */
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.45fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 1.1fr); }
    .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-col--kontakt,
    .footer-col--partner { grid-column: 1 / -1; }
}

/* Social-Media-Icons (Footer, Kontaktseite) */
.social-leiste {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    list-style: none;
    margin: 1.4rem 0 0;
    padding: 0;
}
.social-leiste__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid currentColor;
    color: var(--color-primary);
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}
.social-leiste__link:hover,
.social-leiste__link:focus-visible {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}
.social-leiste--footer .social-leiste__link { color: rgba(255, 255, 255, 0.78); border-color: rgba(255, 255, 255, 0.25); }
.social-leiste--footer .social-leiste__link:hover,
.social-leiste--footer .social-leiste__link:focus-visible {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: #0d1c0d;
}
.social-leiste--center { justify-content: center; }
@media (prefers-reduced-motion: reduce) {
    .social-leiste__link:hover,
    .social-leiste__link:focus-visible { transform: none; }
}
.footer-col a { overflow-wrap: break-word; }
.footer-brand__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-white);
    margin: 0 0 0.6rem;
}
.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.92rem;
    max-width: 32ch;
}
.footer-col h4 {
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 1.2rem;
}
.footer-col ul {
    list-style: none;
    margin: 0; padding: 0;
}
.footer-col li { padding: 0.3rem 0; }
.footer-bottom {
    padding-top: 1.8rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
}

/* ==========================================================================
   Reveal animations (used by IntersectionObserver in main.js)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.08s; }
.reveal--delay-2 { transition-delay: 0.16s; }
.reveal--delay-3 { transition-delay: 0.24s; }
.reveal--delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ==========================================================================
   Standard content (für single posts und pages)
   ========================================================================== */
.entry-header {
    padding: 9rem 0 3rem;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    text-align: center;
}
.entry-header h1 { color: var(--color-white); }
.entry-header__meta {
    color: var(--color-gold);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.entry-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 4rem clamp(1.25rem, 4vw, 2.5rem);
    font-size: 1.07rem;
    line-height: 1.75;
}
.entry-content h2 { margin-top: 2.4rem; }
.entry-content img { border-radius: var(--radius-md); margin: 1.5rem 0; }
.entry-content blockquote {
    border-left: 3px solid var(--color-gold);
    margin: 1.8rem 0;
    padding: 0.4rem 0 0.4rem 1.5rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--color-text);
}
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }
.entry-content li { margin: 0.4rem 0; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
