/* =============================================
   Heimatverein Großhansdorf — Stylesheet
   Mobile-First, Custom Properties
   ============================================= */

/* --- Schriften (lokal gehostet, Variable Font 200–900) --- */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-latin-wght-italic.woff2') format('woff2-variations');
}

/* --- Custom Properties --- */
:root {
    /* Farben aus dem Vereinslogo */
    --color-primary: #00923F;
    --color-primary-dark: #007832;
    --color-primary-light: #e8f5ee;
    --color-accent: #007CC3;
    --color-accent-light: #e6f2fa;
    --color-highlight: #FFF500;
    --color-dark: #1F1A17;
    --color-text: #2d2d2d;
    --color-text-light: #5a5a5a;
    --color-bg: #ffffff;
    --color-bg-alt: #f7f8f9;
    --color-border: #e0e0e0;
    --color-error: #c0392b;
    --color-success: #27ae60;

    /* Typografie */
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 1.125rem;  /* 18px */
    --line-height: 1.65;
    --font-size-sm: 0.9375rem;
    --font-size-lg: 1.25rem;

    /* Abstände */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 72px;
    --border-radius: 6px;

    /* Schatten */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* --- Reset & Basis --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover, a:focus {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Telefonnummern und E-Mail-Adressen nie umbrechen — auch nicht an
   Leerzeichen oder Bindestrichen innerhalb der Nummer/Adresse. */
a[href^="tel:"],
.js-email {
    white-space: nowrap;
}

/* Kleine Inline-Icons in CMS-Inhalten (z. B. Social-Links auf der
   Kontaktseite): an der Textzeile ausrichten statt als Blockbild. */
.content img[src^="/assets/images/icons/"] {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.25em;
    margin: 0 0.15em 0 0;
    border-radius: 0;
}

a:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Barrierefreiheit --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    z-index: 1000;
    padding: 0.6rem 1rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* --- Typografie --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.25;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-bottom: var(--space-xs); }
h4 { font-size: 1.1rem; margin-bottom: var(--space-xs); }

p { margin-bottom: var(--space-sm); }
p:last-child { margin-bottom: 0; }

ul, ol { margin-bottom: var(--space-sm); padding-left: 1.5em; }
li { margin-bottom: 0.25em; }

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* --- Header --- */
.site-header {
    background: var(--color-bg);
    border-bottom: 3px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    gap: var(--space-sm);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    color: var(--color-dark);
    flex-shrink: 0;
}

.site-logo img {
    height: 48px;
    width: auto;
}

.site-logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    display: block;
}

/* --- Navigation --- */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    width: 48px;
    height: 48px;
    cursor: pointer;
    color: var(--color-dark);
    font-size: 1.5rem;
}

.nav-toggle:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Menü-/Schließen-Icon je nach Zustand */
.nav-toggle .nav-icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-close { display: inline-block; }

.main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: var(--shadow-md);
    padding: var(--space-sm) 0;
    /* Lange Menüliste: im Viewport halten und selbst scrollen lassen */
    max-height: calc(100vh - var(--nav-height));
    max-height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.main-nav.is-open {
    display: block;
}

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

.main-nav a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: var(--font-size-lg);
    min-height: 48px;
    display: flex;
    align-items: center;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

/* --- Submenu (Mobil: eingerückt, Desktop: Dropdown) --- */
.submenu {
    padding-left: 1rem;
}

.submenu a {
    font-size: var(--font-size-base);
    font-weight: 400;
    padding: 0.5rem var(--space-md) 0.5rem calc(var(--space-md) + 1rem);
}

/* --- Main --- */
main {
    flex: 1;
}

.page-section {
    padding: var(--space-lg) 0;
}

.page-section:nth-child(even) {
    background: var(--color-bg-alt);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--color-primary-dark);
}

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: var(--space-xl) 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: clamp(1.75rem, 5vw, 3rem);
    margin-bottom: var(--space-xs);
}

.hero p {
    font-size: var(--font-size-lg);
    opacity: 0.92;
    max-width: 640px;
    margin: 0 auto var(--space-md);
}

.hero-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero mit Hintergrundbild */
.hero--image {
    position: relative;
    overflow: hidden;
}

.hero--image .container {
    position: relative;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Grün-transparentes Overlay für Lesbarkeit des Textes */
.hero--image::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(0, 87, 45, 0.82), rgba(0, 60, 32, 0.78));
}

/* Einheitlicher Seitenkopf (alle Seiten außer Startseite) */
.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
}

.page-header-inner {
    padding: var(--space-lg) 0;
}

.page-header h1 {
    color: #fff;
    margin: 0;
}

/* Variante mit Hintergrundbild */
.page-header--image {
    position: relative;
    overflow: hidden;
    background: var(--color-primary);
}

.page-header-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-header--image .page-header-inner {
    position: relative;
    z-index: 1;
    min-height: clamp(180px, 30vw, 340px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 65%);
}

.page-header--image h1 {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    min-height: 48px;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.7);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
    color: white;
}

.btn-accent {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* Zurückhaltender Knopf für helle Flächen. Nicht .btn-outline nehmen: das ist
   weiß auf transparent und nur auf dunklen Hero-Flächen lesbar. */
.btn-secondary {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* Kleinere Ausführung für Karten mit mehreren Knöpfen nebeneinander.
   min-height sinkt auf 44 px statt auf die 36 px der Adminfläche — im
   Frontend bleibt das die übliche Untergrenze für Berührungsziele. */
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: var(--font-size-sm);
    min-height: 44px;
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.card {
    position: relative;
    background: var(--color-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

/* Macht die gesamte Karte über einen einzigen Link klickbar */
.stretched-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Andere Links/Buttons innerhalb einer Karte bleiben klickbar */
.card a:not(.stretched-link),
.card button {
    position: relative;
    z-index: 2;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Kategorie-Icons (SVG statt Emoji) */
.cat-icon {
    width: 1.4rem;
    height: 1.4rem;
    vertical-align: -0.22em;
}

/* Allgemeine UI-Icons (skalieren mit font-size des Containers) */
.ui-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

.event-cat-icon {
    display: inline-flex;
    color: var(--color-primary);
}

.cat-tile {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-tile i {
    font-size: 2rem;
}

/* Nachbetrachtung eines Termins: Bericht prominent, Ankündigung dezent darunter */
.event-announcement-past {
    margin-top: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    border-left: 3px solid var(--color-border);
    color: var(--color-text-light);
}
.event-announcement-past h2 {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
}

.card-body {
    padding: var(--space-sm);
}

.card-body h3 {
    margin-bottom: var(--space-xs);
}

.card-meta {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-xs);
}

.card-badge {
    display: inline-block;
    padding: 0.15em 0.6em;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: 3px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

/* Kategorie-eingefärbtes Badge (Symbol + Farbe der Aktivitäts-Kategorie) */
.card-badge--cat {
    background: color-mix(in srgb, var(--cat-color, var(--color-primary)) 16%, #fff);
    color: var(--cat-color, var(--color-primary-dark));
}

.card-badge--cat .cat-icon {
    margin-right: 0.35em;
}

.card-badge--report {
    background: var(--color-accent-light);
    color: var(--color-accent);
}

/* --- Event-Karten --- */
.event-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.event-list--narrow {
    max-width: 700px;
    margin: 0 auto;
}

.event-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.event-card {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--color-bg);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.event-moved-badge {
    color: #b07d12;
    font-weight: 600;
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.event-cancelled-badge {
    color: var(--color-error);
    font-weight: normal;
    font-size: 0.85em;
}

.event-date {
    flex-shrink: 0;
    text-align: center;
    min-width: 60px;
    padding: var(--space-xs);
    background: var(--color-primary-light);
    border-radius: var(--border-radius);
}

.event-date-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.event-date-month {
    font-size: var(--font-size-sm);
    color: var(--color-primary-dark);
    text-transform: uppercase;
    font-weight: 600;
}

.event-info {
    flex: 1 1 auto;
    min-width: 0;
}

.event-info h3 {
    margin-bottom: 0.25em;
    font-size: 1.05rem;
}

.event-info p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* Vorschaubild in der Terminliste (rechts) */
.event-card-thumb {
    flex-shrink: 0;
    align-self: center;
    width: 88px;
    height: 66px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--color-primary-light);
}

.event-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 480px) {
    .event-card-thumb {
        width: 64px;
        height: 52px;
    }
}

/* --- Zahlen-Banner --- */
.stats-banner {
    background: var(--color-dark);
    color: white;
    padding: var(--space-lg) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    text-align: center;
}

.stat-number {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-highlight);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    opacity: 0.85;
    margin-top: 0.25em;
}

/* --- Footer --- */
.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.8);
    padding: var(--space-lg) 0 var(--space-md);
    font-size: var(--font-size-sm);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.site-footer h4 {
    color: white;
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.site-footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.15s;
}

.site-footer a:hover {
    color: white;
    opacity: 0.75;
}

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

.footer-nav li {
    margin-bottom: 0.5em;
}

/* Social-Links */
.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: background 0.15s;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

.social-links svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: var(--space-sm);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-feedback {
    margin-bottom: var(--space-sm);
}

/* --- Flash-Meldungen --- */
.flash {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    padding: var(--space-sm) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.breadcrumbs a {
    color: var(--color-text-light);
}

.breadcrumbs span {
    margin: 0 0.4em;
}

/* --- Unterseiten-Navigation (untergeordnete Seiten unter dem Inhalt) --- */
.subpages {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.subpages-title {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    margin-bottom: var(--space-xs);
}

.subpages-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.subpages-list li + li {
    border-top: 1px solid var(--color-border);
}

.subpages-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.subpages-list a:hover,
.subpages-list a:focus-visible {
    color: var(--color-primary-dark);
    padding-left: var(--space-xs);
}

.subpages-arrow {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.subpages-list a:hover .subpages-arrow,
.subpages-list a:focus-visible .subpages-arrow {
    transform: translateX(3px);
}

/* --- Content (WYSIWYG-Output) --- */
.content h2 { margin-top: var(--space-lg); }
.content h3 { margin-top: var(--space-md); }
.content img { border-radius: var(--border-radius); margin: var(--space-sm) 0; }
.content table { width: 100%; border-collapse: collapse; margin: var(--space-sm) 0; }
.content th, .content td {
    padding: 0.5em 0.75em;
    border: 1px solid var(--color-border);
    text-align: left;
}
.content th { background: var(--color-bg-alt); font-weight: 600; }

/* --- Timeline (Chronik) --- */

/* Mobil: einfache vertikale Timeline, Linie links */
.timeline {
    position: relative;
    padding-left: var(--space-md);
    border-left: 3px solid var(--color-primary-light);
}

.timeline-entry {
    position: relative;
    margin-bottom: var(--space-lg);
}

/* Punkt auf der Linie */
.timeline-entry::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-md) - 7px);
    top: 0.25em;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid white;
    z-index: 1;
}

/* Datum: eng am Punkt, wenig Abstand zum Text */
.timeline-content h3 {
    color: var(--color-primary-dark);
    font-size: 1.1rem;
    margin: 0 0 0.15em 0;
    line-height: 1.3;
}

.timeline-content h3 time {
    font-style: normal;
}

.timeline-content p {
    margin-bottom: 0.5em;
}

/* Bilder auf Mobil: unter dem Text */
.timeline-image {
    margin: 0.75em 0 0 0;
}

.timeline-image img {
    border-radius: var(--border-radius);
    height: auto;
}

.timeline-image figcaption {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    font-style: italic;
    margin-top: 0.25em;
    text-align: center;
}

.timeline-entry p {
    margin-bottom: 0.5em;
}

/* Figures in timeline */
.timeline-entry figure,
.content figure {
    margin: var(--space-sm) 0;
    max-width: 100%;
}

.timeline-entry figure img,
.content figure img {
    border-radius: var(--border-radius);
    max-width: 100%;
    height: auto;
}

.timeline-entry figcaption,
.content figcaption {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: 0.3em;
    font-style: italic;
}

/* --- Vorstandsliste --- */
.board-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.board-member {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--border-radius);
}

.board-photo {
    flex-shrink: 0;
    margin: 0;
}

.board-photo img {
    border-radius: var(--border-radius);
    width: 120px;
    height: auto;
}

.board-info h3 {
    margin-bottom: 0.2em;
}

.board-role {
    color: var(--color-primary-dark);
    font-weight: 600;
    margin-bottom: 0.5em;
}

.board-info address {
    font-style: normal;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.6;
}

.board-info address a {
    color: var(--color-text-light);
}

/* --- Waldreiter-Impressum (dl) --- */
.waldreiter-impressum {
    margin: 0;
}

.waldreiter-impressum dt {
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-top: var(--space-sm);
}

.waldreiter-impressum dt:first-child {
    margin-top: 0;
}

.waldreiter-impressum dd {
    margin-left: 0;
    margin-bottom: 0.25em;
}

/* --- Lightbox --- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem 1.5rem;
    cursor: pointer;
}

.lightbox-overlay.is-open {
    display: flex;
}

.lightbox-overlay img {
    max-width: 92vw;
    max-height: 72vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    cursor: default;
    flex: 0 1 auto;
}

.lightbox-heading {
    flex: 0 0 auto;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    text-align: center;
    max-width: 90vw;
    padding: 0 3rem;
}

.lightbox-heading:empty {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.lightbox-caption {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--font-size-sm);
    text-align: center;
    max-width: min(90vw, 70ch);
    max-height: 18vh;
    overflow-y: auto;
    cursor: default;
}

.lightbox-caption strong {
    display: block;
}

.lightbox-caption-text {
    margin-top: 0.35em;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.75);
}

/* Button im Lightbox-Fuß: öffnet die Ortskarte als Overlay (kein Platzbedarf) */
.lightbox-map-toggle {
    display: inline-block;
    margin-top: 0.6em;
    padding: 0.35em 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: var(--font-size-sm);
    cursor: pointer;
}

.lightbox-map-toggle:hover,
.lightbox-map-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.22);
}

/* Ortskarte als zentriertes Overlay über der Lightbox */
.lightbox-map {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 680px);
    height: min(78vh, 520px);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #e9edf0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
    z-index: 10;
}

.lightbox-map-canvas {
    width: 100%;
    height: 100%;
}

.lightbox-map-close {
    position: absolute;
    top: 8px;
    right: 8px;
    /* über dem Consent-Overlay (z-index 1100) und den Leaflet-Controls, damit
       die Karte auch ohne „Karte laden" wieder geschlossen werden kann. */
    z-index: 1200;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    background: #fff;
    color: #222;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.lightbox-map-close:hover,
.lightbox-map-close:focus-visible {
    background: #f0f0f0;
}

.lightbox-map-close svg {
    width: 1.1rem;
    height: 1.1rem;
}

.lightbox-map .map-consent-overlay {
    font-size: var(--font-size-sm);
}

/* Der Straße/Satellit-Umschalter (Leaflet-Control oben rechts) darf nicht unter
   dem Schließen-× liegen – daher hier nach unten versetzen. */
.lightbox-map .leaflet-top.leaflet-right {
    margin-top: 48px;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 1rem;
    user-select: none;
}

.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

.lightbox-prev[hidden],
.lightbox-next[hidden] {
    display: none;
}

/* --- Öffentliche Galerie (Album mit Rubrik-Abschnitten) --- */
.gallery-intro {
    margin-bottom: var(--space-lg);
}

/* --- Galerie-Karte (öffentliche Aufnahmeorte) --- */
.gallery-map-wrap {
    margin: var(--space-lg) 0;
}

.gallery-map-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.gallery-map {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: #e9edf0;
    z-index: 0;
}

/* Consent-Overlay über der (leeren) Karte – geteilt mit dem Backend-Pin-Picker */
.map-consent-overlay {
    position: absolute;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: rgba(233, 237, 240, 0.92);
    text-align: center;
}

.map-consent-box {
    max-width: 32rem;
}

.map-consent-box p {
    margin-bottom: var(--space-sm);
}

/* Pin (divIcon) und Popup */
.map-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 11px;
}

.map-popup {
    width: 180px;
}

.map-popup-thumb {
    display: block;
    margin-bottom: 0.4em;
}

.map-popup-thumb img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.map-popup-rubrik {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin: 0.15em 0 0.4em;
}

.map-popup-link {
    display: inline-block;
    font-weight: 600;
}

.gallery-section {
    margin-top: var(--space-xl);
}

.gallery-section-title {
    border-bottom: 2px solid var(--color-primary-light);
    padding-bottom: 0.25em;
    margin-bottom: var(--space-md);
}

.gallery-section-intro {
    margin-bottom: var(--space-md);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.gallery-card {
    margin: 0;
    background: var(--color-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-card-link {
    display: block;
    cursor: zoom-in;
}

.gallery-card-link img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-card-body {
    padding: var(--space-sm) var(--space-md) var(--space-md);
}

.gallery-card-title {
    font-size: 1.05rem;
    margin-bottom: 0.15em;
}

.gallery-card-date {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: 0.5em;
}

.gallery-card-text {
    font-size: var(--font-size-sm);
}

.gallery-card-text p {
    margin-bottom: 0.5em;
}

.gallery-card-text p:last-child {
    margin-bottom: 0;
}

/* Bilder mit Lightbox-Link: Cursor zeigt Vergrößerung */
a[data-lightbox] img,
.content img[data-lightbox] {
    cursor: zoom-in;
}

/* Abbreviations */
abbr[title] {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
}

/* =============================================
   Responsive: Tablet (640px+)
   ============================================= */
@media (min-width: 640px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .site-logo-text { font-size: 1.1rem; }

    /* Content-Bilder auf Tablet+ */
    .figure-right { float: right; margin: 0 0 var(--space-sm) var(--space-md); max-width: 45%; }
    .content .figure-left { float: left; margin: 0 var(--space-md) var(--space-sm) 0; max-width: 45%; }

    /*
     * Timeline auf Tablet+:
     * Linie + Punkte IMMER auf derselben vertikalen Achse (left: 230px).
     * Text rechts davon.
     * Bilder links davon, absolut positioniert.
     */
    .timeline {
        border-left: none;
        padding-left: 260px;
        min-height: 100px;
    }

    /* Durchgehende vertikale Linie */
    .timeline::before {
        content: '';
        position: absolute;
        left: 235px;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--color-primary-light);
    }

    /* Punkt: immer auf der Linie */
    .timeline-entry::before {
        left: -31px;
    }

    /* Bild: absolut links der Linie positioniert.
       .timeline-entry hat position:relative (wegen Punkt),
       also ist left relativ zum Entry (der bei padding-left:260px beginnt).
       Daher left: -260px um ins Padding-Gebiet des .timeline-Containers zu kommen. */
    .timeline-entry .timeline-image {
        position: absolute;
        left: -260px;
        top: 0;
        width: 210px;
        margin: 0;
    }

    .timeline-entry .timeline-image img {
        width: 100%;
        height: auto;
    }
}

/* =============================================
   Responsive: Desktop (1024px+)
   ============================================= */
@media (min-width: 1024px) {
    .nav-toggle { display: none; }

    .main-nav {
        display: flex;
        position: static;
        border: none;
        box-shadow: none;
        padding: 0;
        /* Mobile Scroll-Begrenzung aufheben, sonst werden Dropdowns abgeschnitten */
        max-height: none;
        overflow-y: visible;
    }

    .main-nav > ul {
        display: flex;
        gap: 0.25rem;
    }

    .main-nav a {
        padding: 0.5rem 0.75rem;
        font-size: var(--font-size-base);
        border-radius: var(--border-radius);
    }

    /* Submenu: Dropdown auf Desktop */
    .has-submenu {
        position: relative;
    }

    .has-submenu .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--color-bg);
        box-shadow: var(--shadow-md);
        border-radius: var(--border-radius);
        padding: 0.5rem 0;
        min-width: 180px;
        z-index: 200;
    }

    .has-submenu .submenu a {
        padding: 0.5rem 1rem;
        white-space: nowrap;
        font-size: var(--font-size-sm);
    }

    .has-submenu:hover .submenu,
    .has-submenu:focus-within .submenu {
        display: block;
    }

    .card-grid { grid-template-columns: repeat(3, 1fr); }
    /* Erste Spalte breiter, damit der Vereinsname auf eine Zeile passt */
    .footer-grid { grid-template-columns: 1.9fr 1fr 1.3fr; }

    .container { padding: 0 var(--space-md); }
}

/* ============================================
   Utility-Klassen (ersetzen wiederkehrende Inline-Styles)
   ============================================ */
.u-text-center { text-align: center; }
.u-measure     { max-width: 700px; }              /* angenehme Lesebreite */
.u-narrow      { max-width: 800px; }              /* schmaler Inhaltscontainer */
.u-mt-sm { margin-top: var(--space-sm); }
.u-mt-md { margin-top: var(--space-md); }
.u-mt-lg { margin-top: var(--space-lg); }
.u-mb-md { margin-bottom: var(--space-md); }
.u-mb-lg { margin-bottom: var(--space-lg); }
.u-muted { color: var(--color-text-light); }
.u-cluster { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.u-stack   { display: flex; flex-direction: column; gap: var(--space-sm); }
.u-empty-state { text-align: center; padding: var(--space-xl) 0; color: var(--color-text-light); }
.container.u-narrow { max-width: 800px; } .container.u-measure { max-width: 700px; }

/* --- Termin-Bildergalerien (Frontend) --- */
.event-gallery-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0;
}
.event-gallery-figure { margin: 0; }
.event-gallery-figure img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.event-gallery-figure figcaption {
    margin-top: 0.4rem;
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-text-light);
    line-height: 1.4;
}

/* --- Waldreiter: Seite einer einzelnen Ausgabe --- */
.issue-detail {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin: var(--space-md) 0 var(--space-lg);
}

.issue-cover {
    flex: 0 0 auto;
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* Kein Scan vorhanden: Platzhalter in der Aspect-Ratio einer Heftseite */
.issue-cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4;
    background: var(--color-bg-alt);
    color: var(--color-primary);
    font-size: 3rem;
}

.issue-meta {
    flex: 1 1 16rem;
}

.issue-meta dt {
    font-weight: 600;
}

.issue-meta dd {
    margin: 0 0 var(--space-sm);
}

.issue-toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 var(--space-md);
}

.issue-toc li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--color-border);
}

.issue-toc-page {
    flex: 0 0 auto;
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.issue-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: space-between;
}
