/* ==========================================================================
   CSS Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   Base Styles & Lenis
   ========================================================================== */
html.lenis, html.lenis body {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis.lenis-stopped {
    overflow: hidden;
}
.lenis.lenis-smooth iframe {
    pointer-events: none;
}

body {
    background-color: #f4f2ee;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    padding: 0 2rem;
    background-color: #f4f2ee; /* Matches background */
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
}

.nav-menu a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Layout & Sections
   ========================================================================== */
main {
    width: 100%;
}

section:not(#hero):not(#video-section):not(#slogan):not(#aktuelles):not(#rueckblick):not(#geschichte-teaser):not(#galerie), footer:not(.site-footer) {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    padding: 4rem 2rem;
    background-color: #ffffff;
    border-radius: 8px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
#hero {
    /* Startbildschirm über die volle Fensterhöhe; unter die (gleichfarbige)
       Menüleiste gezogen, damit das Logo optisch genau in der Mitte sitzt */
    min-height: 100vh;
    min-height: 100svh;
    margin-top: -72px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f4f2ee;
    padding: 2rem;
    position: relative;
}

#notes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.hero-logo {
    width: 48vw;
    max-width: 780px;
    /* Farbe #1a1a1a, dazu ein realistischer Schatten in zwei Lagen (Licht von
       oben links): eng und etwas kräftiger direkt am Logo, weit und sehr weich
       darunter – leicht warm getönt passend zum Hintergrund */
    filter: brightness(0) invert(10%)
        drop-shadow(2px 4px 3px rgba(60, 45, 25, 0.16))
        drop-shadow(10px 26px 26px rgba(60, 45, 25, 0.13));
    position: relative;
    z-index: 2;
}

.note {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
    will-change: transform, opacity;
    user-select: none;
}

.note.visible {
    opacity: 1;
}

/* ==========================================================================
   Full-Bleed Video Section
   ========================================================================== */
#video-section {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f4f2ee;
    overflow: hidden;
}

.video-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.hero-video {
    width: 100%;
    height: auto;
    aspect-ratio: 3840 / 1608; /* Anamorphic 2.39:1 widescreen */
    object-fit: cover;
    display: block;
    background-color: #1a1a1a;
}

/* ==========================================================================
   Slogan Section
   ========================================================================== */
#slogan {
    min-height: 40vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #f4f2ee;
    padding: calc(10vh - 2.5rem) 2rem 2rem 2rem;
}

.slogan-content {
    max-width: 800px;
    text-align: left;
    padding: 2.5rem 0;
}

.slogan-line {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    margin: 0;
}

/* ==========================================================================
   Aktuelles Section
   ========================================================================== */
#aktuelles {
    background-color: #f4f2ee;
    padding: 6rem 2rem;
}

.aktuelles-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.aktuelles-image-col {
    display: flex;
    justify-content: center;
}

.aktuelles-flyer {
    width: 100%;
    max-width: 450px;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.aktuelles-text-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.aktuelles-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.aktuelles-meta {
    font-size: 1.125rem;
    font-weight: 500;
    color: #555555;
    margin-bottom: 1.5rem;
}

.aktuelles-text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 2rem;
    max-width: 500px;
}

.apple-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 30px;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.apple-button:hover {
    background-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Typography & Elements
   ========================================================================== */
h1, h2 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Rückblick Section
   ========================================================================== */
#rueckblick {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    text-align: center;
}

.rueckblick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.rueckblick-card {
    display: flex;
    flex-direction: column;
}

.rueckblick-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rueckblick-card:hover .rueckblick-img {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.rueckblick-caption {
    font-size: 0.9rem;
    color: #555555;
    text-align: center;
    font-weight: 500;
}

/* ==========================================================================
   Geschichte Teaser Section
   ========================================================================== */
#geschichte-teaser {
    padding: 8rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.teaser-text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 2.5rem;
}

/* ==========================================================================
   Footer (Etappe 7)
   ========================================================================== */
.site-footer {
    width: 100%;
    background-color: #1a1a1a;
    color: #f4f2ee;
    padding: 5rem 2rem 3rem 2rem;
    margin: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    margin-bottom: 3rem;
}

.footer-brand a {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.footer-brand a:hover {
    opacity: 0.8;
}

.footer-logo {
    height: 34px;
    width: auto;
    display: block;
    /* Render dark SVG logo in warm-light tone on dark anthracite background */
    filter: brightness(0) invert(95%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3.5rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid rgba(244, 242, 238, 0.12);
}

.footer-heading {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(244, 242, 238, 0.6);
    margin-bottom: 0.9rem;
}

.footer-text {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(244, 242, 238, 0.88);
    max-width: 420px;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-link {
    color: rgba(244, 242, 238, 0.88);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-channel-hint {
    display: inline-block;
    font-size: 1rem;
    color: rgba(244, 242, 238, 0.75);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 0.875rem;
    color: rgba(244, 242, 238, 0.55);
}

.footer-copyright {
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: 1.75rem;
}

.footer-legal-link {
    color: rgba(244, 242, 238, 0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal-link:hover {
    color: #f4f2ee;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ==========================================================================
   Geschichte – Horizontale Timeline & Lightbox (Etappe 8)
   ========================================================================== */
.timeline-section {
    width: 100%;
    height: calc(100vh - 72px);
    min-height: 580px;
    background-color: #f4f2ee;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem 0 1.5rem 0;
    overflow: hidden;
    position: relative;
}

/* Kopfbereich über den Stationen */
.timeline-header {
    width: 100%;
    padding: 0 5vw;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-shrink: 0;
}

.timeline-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-back-link {
    margin-bottom: 0.15rem;
    font-size: 0.875rem;
    color: rgba(26, 26, 26, 0.6);
    transition: color 0.2s ease, transform 0.2s ease;
}

.timeline-back-link:hover {
    color: #1a1a1a;
    text-decoration: none;
    transform: translateX(-3px);
}

.timeline-page-title {
    font-size: clamp(1.75rem, 2.8vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: #1a1a1a;
    margin: 0;
}

.timeline-page-subtitle {
    font-size: 0.95rem;
    color: rgba(26, 26, 26, 0.58);
    font-weight: 500;
    margin-top: 0.2rem;
}

/* Dezenter Scroll-Hinweis (verschwindet beim Scrollen) */
.scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: rgba(26, 26, 26, 0.06);
    color: rgba(26, 26, 26, 0.72);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: opacity 0.4s ease, transform 0.4s ease;
    user-select: none;
}

.scroll-hint.is-hidden {
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

.scroll-hint-arrow {
    display: inline-block;
    animation: scrollArrowNudge 1.8s ease-in-out infinite;
}

@keyframes scrollArrowNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Timeline-Viewport & Track (Fallback ohne JS: horizontal scrollbar) */
.timeline-viewport {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.timeline-viewport::-webkit-scrollbar {
    display: none;
}

.timeline-section.is-pinned-ready .timeline-viewport {
    overflow: visible;
}

.timeline-track {
    display: flex;
    align-items: flex-start;
    gap: clamp(3rem, 5vw, 5.5rem);
    padding: 0.5rem 8vw 0.5rem 5vw;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

/* Einzelne Jahrgangs-Station */
.timeline-station {
    width: clamp(340px, 33vw, 480px);
    flex-shrink: 0;
    cursor: pointer;
    outline: none;
    position: relative;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

/* Zeitstrahl-Linie & Knotenpunkt zwischen den Stationen */
.station-axis {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    position: relative;
}

.station-axis-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: rgba(26, 26, 26, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.station-axis-year {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(26, 26, 26, 0.45);
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.station-axis-line {
    flex: 1;
    height: 1px;
    background: rgba(26, 26, 26, 0.16);
    margin-right: calc(-1 * clamp(3rem, 5vw, 5.5rem));
}

.timeline-station:last-child .station-axis-line {
    margin-right: 0;
    background: linear-gradient(90deg, rgba(26, 26, 26, 0.16) 0%, transparent 100%);
}

.timeline-station:hover .station-axis-dot,
.timeline-station:focus-visible .station-axis-dot {
    background-color: #1a1a1a;
    transform: scale(1.4);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1);
}

.timeline-station:hover .station-axis-year,
.timeline-station:focus-visible .station-axis-year {
    color: #1a1a1a;
}

/* Stations-Karte mit Titelbild & Typografie */
.station-card {
    display: flex;
    flex-direction: column;
}

.station-image-wrap {
    position: relative;
    width: 100%;
    height: clamp(200px, 34vh, 330px);
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    overflow: hidden;
    background-color: #e4e1db;
    box-shadow: 0 18px 40px rgba(26, 26, 26, 0.09);
    contain: layout paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-station:hover .station-image-wrap,
.timeline-station:focus-visible .station-image-wrap {
    transform: translate3d(0, -6px, 0);
}

.timeline-station:focus-visible .station-image-wrap {
    outline: 2px solid #1a1a1a;
    outline-offset: 4px;
}

.station-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.station-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.45) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 1rem 1.15rem;
    pointer-events: none;
}

.station-gallery-badge {
    background-color: rgba(26, 26, 26, 0.86);
    color: #f4f2ee;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.timeline-station:hover .station-gallery-badge {
    background-color: #1a1a1a;
    transform: scale(1.04);
}

.station-info {
    padding-top: 1rem;
}

.station-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.station-year-large {
    font-size: clamp(1.55rem, 2.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: rgba(26, 26, 26, 0.26);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.timeline-station:hover .station-year-large {
    color: rgba(26, 26, 26, 0.48);
}

.station-title {
    font-size: clamp(1.35rem, 1.85vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    line-height: 1.15;
    margin: 0;
}

.station-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(26, 26, 26, 0.68);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 44ch;
}

/* Untere Fortschrittsleiste der Timeline */
.timeline-footer-bar {
    width: 100%;
    padding: 0 5vw;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.timeline-bound-year {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(26, 26, 26, 0.45);
    font-variant-numeric: tabular-nums;
}

.timeline-progress-track {
    flex: 1;
    height: 2px;
    background-color: rgba(26, 26, 26, 0.12);
    border-radius: 2px;
    overflow: hidden;
}

.timeline-progress-fill {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    transform-origin: left center;
    transform: scaleX(0);
}

/* ==========================================================================
   Lightbox Overlay (Etappe 8)
   ========================================================================== */
body.lightbox-open {
    overflow: hidden;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3vh 3vw;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s;
}

.lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(14, 14, 14, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.lightbox-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1320px;
    height: 90vh;
    background-color: #1a1a1a;
    color: #f4f2ee;
    border-radius: 22px;
    border: 1px solid rgba(244, 242, 238, 0.1);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(14px);
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-overlay.is-open .lightbox-dialog {
    transform: scale(1) translateY(0);
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(244, 242, 238, 0.1);
    flex-shrink: 0;
}

.lightbox-title-line {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.lightbox-year-badge {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(244, 242, 238, 0.45);
    letter-spacing: -0.02em;
}

.lightbox-title {
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 700;
    color: #f4f2ee;
    margin: 0;
    letter-spacing: -0.02em;
}

.lightbox-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(244, 242, 238, 0.55);
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background-color: rgba(244, 242, 238, 0.08);
}

.lightbox-desc {
    font-size: 0.92rem;
    color: rgba(244, 242, 238, 0.68);
    margin-top: 0.3rem;
}

.lightbox-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.lightbox-back-btn {
    background-color: rgba(244, 242, 238, 0.1);
    color: #f4f2ee;
    border: 1px solid rgba(244, 242, 238, 0.16);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lightbox-back-btn:hover {
    background-color: rgba(244, 242, 238, 0.2);
}

.lightbox-close-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background-color: rgba(244, 242, 238, 0.1);
    color: #f4f2ee;
    font-size: 1.65rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-close-btn:hover {
    background-color: rgba(244, 242, 238, 0.22);
    transform: scale(1.06);
}

.lightbox-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.75rem 2rem 2.25rem 2rem;
}

/* Grid aller Bilder des Jahres */
.lightbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.lightbox-grid[hidden] {
    display: none !important;
}

.lightbox-thumb-btn {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: none;
    border-radius: 14px;
    overflow: hidden;
    background-color: #262626;
    cursor: zoom-in;
    padding: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.lightbox-thumb-btn:hover,
.lightbox-thumb-btn:focus-visible {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
}

.lightbox-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.lightbox-thumb-btn:hover .lightbox-thumb-img {
    transform: scale(1.05);
}

/* Vollbild-Einzelansicht (Stage) innerhalb der Lightbox */
.lightbox-stage {
    height: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.lightbox-stage[hidden] {
    display: none !important;
}

.lightbox-figure {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.lightbox-stage-img {
    max-width: 100%;
    max-height: calc(90vh - 180px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-stage-caption {
    margin-top: 0.85rem;
    font-size: 0.85rem;
    color: rgba(244, 242, 238, 0.6);
    text-align: center;
}

.lightbox-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(244, 242, 238, 0.14);
    background-color: rgba(244, 242, 238, 0.08);
    color: #f4f2ee;
    font-size: 1.8rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-nav-btn:hover {
    background-color: rgba(244, 242, 238, 0.2);
    transform: scale(1.06);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .aktuelles-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .aktuelles-text-col {
        align-items: center;
    }
    .aktuelles-text {
        margin-left: auto;
        margin-right: auto;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    /* Einfacher, sauberer Fallback für schmale Screens (vertikal gestapelt) */
    .timeline-section {
        height: auto;
        min-height: 0;
        padding: 2rem 1.5rem 3rem 1.5rem;
        overflow: visible;
    }
    .timeline-header {
        padding: 0;
        margin-bottom: 2rem;
    }
    .scroll-hint,
    .timeline-footer-bar {
        display: none;
    }
    .timeline-viewport {
        overflow: visible;
    }
    .timeline-track {
        flex-direction: column;
        gap: 2.5rem;
        padding: 0;
        width: 100%;
    }
    .timeline-station {
        width: 100%;
    }
    .station-axis-line {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .rueckblick-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .navbar {
        padding: 0 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    main {
        padding: 0;
    }
    
    /* Nur für allgemeine Abschnitte – Startseite & Geschichte haben eigene Abstände (siehe Mobile-Optimierung) */
    section:not(#hero):not(#video-section):not(#aktuelles):not(#rueckblick):not(#geschichte-teaser):not(#galerie), footer:not(.site-footer) {
        padding: 2rem 1rem;
    }

    #video-section {
        padding: 0;
    }

    .site-footer {
        padding: 3.5rem 1.5rem 2.5rem 1.5rem;
    }

    .footer-brand {
        margin-bottom: 2.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding-top: 1.5rem;
    }

    .lightbox-overlay {
        padding: 0;
    }

    .lightbox-dialog {
        height: 100vh;
        border-radius: 0;
    }

    .lightbox-header {
        padding: 1.25rem;
    }

    .lightbox-body {
        padding: 1.25rem;
    }
}


/* ==========================================================================
   Footer: WhatsApp-Kanal (Knopf + QR-Code am Computer)
   ========================================================================== */
.footer-wa {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.footer-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    background: #f4f2ee;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.footer-wa-btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.footer-wa-btn svg {
    width: 1.2em;
    height: 1.2em;
    flex: 0 0 auto;
}

.footer-wa-sub {
    font-size: 0.875rem;
    color: rgba(244, 242, 238, 0.6);
}

/* ==========================================================================
   Impressum & Datenschutz
   ========================================================================== */
.rechtliches-main {
    max-width: 780px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

.rechtliches-main h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.rechtliches-lead {
    color: #555555;
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

.rechtliches-main h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 2.75rem 0 0.75rem;
}

.rechtliches-main h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.75rem 0 0.5rem;
}

.rechtliches-main p,
.rechtliches-main li {
    font-size: 1rem;
    line-height: 1.7;
    color: #333333;
}

.rechtliches-main p + p {
    margin-top: 0.75rem;
}

.rechtliches-main ul {
    margin: 0.5rem 0 0.75rem 1.25rem;
}

.rechtliches-main a {
    color: #1a1a1a;
    text-underline-offset: 3px;
}

.rechtliches-card {
    margin: 1rem 0 0;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.rechtliches-card p {
    margin: 0;
}

.rechtliches-stand {
    margin-top: 3.5rem;
    font-size: 0.9rem !important;
    color: #777777 !important;
}

/* ==========================================================================
   WhatsApp-Kanal: Abschnitt am Ende der Startseite
   ========================================================================== */
.wa-cta {
    padding: 2rem 2rem 8rem;
    background-color: #f4f2ee;
}

.wa-cta-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4rem;
    padding: clamp(2.5rem, 5vw, 4.5rem);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}

.wa-cta-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin: 0 0 1.25rem;
}

.wa-cta-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #444444;
    max-width: 560px;
    margin-bottom: 2rem;
}

.wa-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.wa-cta-btn svg {
    width: 1.2em;
    height: 1.2em;
}

.wa-cta-qr {
    margin: 0;
    text-align: center;
}

.wa-cta-qr img {
    display: block;
    width: 200px;
    height: 200px;
    border-radius: 16px;
}

.wa-cta-qr figcaption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #777777;
}

@media (max-width: 900px) {
    .wa-cta {
        padding: 1rem 1.25rem 5rem;
    }
    .wa-cta-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0;
    }
    .wa-cta-lead {
        margin-left: auto;
        margin-right: auto;
    }
    /* Am Handy ist Scannen sinnlos – der Knopf reicht */
    .wa-cta-qr {
        display: none;
    }
}

/* ==========================================================================
   MOBILE-OPTIMIERUNG (Handy & kleines Tablet)
   ========================================================================== */
.nav-toggle {
    display: none;
}

/* ---- Menü: Burger oben rechts ------------------------------------------- */
@media (max-width: 768px) {
    .navbar {
        height: 64px;
        padding: 0 1.25rem;
    }

    .nav-logo {
        position: relative;
        z-index: 102;
    }

    .nav-logo img {
        height: 34px;
    }

    .nav-toggle {
        position: relative;
        z-index: 102;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 44px;
        height: 44px;
        margin-right: -10px;
        padding: 0;
        border: 0;
        background: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-toggle-line {
        display: block;
        width: 24px;
        height: 2px;
        border-radius: 2px;
        background: #1a1a1a;
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    body.nav-open .nav-toggle-line:first-child {
        transform: translateY(4.5px) rotate(45deg);
    }

    body.nav-open .nav-toggle-line:last-child {
        transform: translateY(-4.5px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        inset: 0;
        z-index: 101;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 6rem 2rem 3rem;
        background: #f4f2ee;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s;
    }

    body.nav-open .nav-menu {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }

    body.nav-open .nav-menu li {
        opacity: 1;
        transform: none;
    }

    body.nav-open .nav-menu li:nth-child(2) { transition-delay: 0.05s; }
    body.nav-open .nav-menu li:nth-child(3) { transition-delay: 0.1s; }
    body.nav-open .nav-menu li:nth-child(4) { transition-delay: 0.15s; }

    .nav-menu a {
        display: block;
        padding: 0.25rem 0;
        font-size: clamp(2.1rem, 10vw, 2.8rem);
        font-weight: 700;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }

    .nav-menu a:hover {
        text-decoration: none;
    }

    .nav-menu a[aria-current="page"] {
        color: #9a9a9a;
    }

    /* Logo im offenen Menü immer sichtbar (auf der Startseite blendet es sonst erst beim Scrollen ein) */
    body.nav-open .nav-logo {
        opacity: 1 !important;
    }

    body.nav-open {
        overflow: hidden;
    }
}

/* ---- Startseite --------------------------------------------------------- */
@media (max-width: 768px) {
    /* Startbildschirm: Logo groß und mittig, Höhe ohne Menüleiste */
    #hero {
        min-height: 100vh;
        min-height: 100svh;
        margin-top: -64px;
        padding: 1.5rem;
    }

    .hero-logo {
        width: 78vw;
        max-width: 440px;
        filter: brightness(0) invert(10%)
            drop-shadow(1px 3px 2px rgba(60, 45, 25, 0.16))
            drop-shadow(6px 16px 16px rgba(60, 45, 25, 0.13));
    }

    /* Video im 4:3-Format (eigene Handy-Fassung folgt, bis dahin wird das breite Video mittig zugeschnitten) */
    .hero-video {
        aspect-ratio: 4 / 3;
    }

    #rueckblick {
        padding: 4.5rem 1.25rem;
    }

    #rueckblick .section-title,
    #geschichte-teaser .section-title {
        margin-bottom: 1.75rem;
    }

    .rueckblick-grid {
        gap: 2rem;
    }

    #geschichte-teaser {
        padding: 4.5rem 1.5rem 5rem;
    }
}

/* Nächster Auftritt am Handy in sinnvoller Reihenfolge:
   Überschrift → Eventname → Flyer → Datum/Ort → Text → Countdown → Knöpfe */
@media (max-width: 900px) {
    #aktuelles {
        padding: 4.5rem 1.25rem;
    }

    .aktuelles-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .aktuelles-text-col {
        display: contents;
    }

    .aktuelles-title { order: 1; margin-bottom: 0.25rem; }
    .pcl-event-name { order: 2; margin-bottom: 1.75rem; }
    .aktuelles-image-col { order: 3; width: 100%; margin-bottom: 2rem; }
    .aktuelles-meta { order: 4; }
    .aktuelles-text { order: 5; }
    .pcl-countdown { order: 6; }
    .pcl-actions { order: 7; }

    .aktuelles-flyer,
    .pcl-flyer-btn,
    .pcl-pdf {
        max-width: min(420px, 100%);
        margin: 0 auto;
    }
}

/* ---- Geschichte: senkrechte Zeitleiste ---------------------------------- */
@media (max-width: 900px) {
    .timeline-section {
        padding: 1.5rem 1.25rem 4.5rem;
    }

    .timeline-page-title {
        font-size: clamp(2.3rem, 10vw, 3.2rem);
    }

    .timeline-track {
        position: relative;
        gap: 3.25rem;
        padding-left: 1.75rem;
    }

    /* durchgehende Linie links */
    .timeline-track::before {
        content: "";
        position: absolute;
        left: 4px;
        top: 0.4rem;
        bottom: 0;
        width: 1px;
        background: linear-gradient(180deg, rgba(26, 26, 26, 0.2) 0%, rgba(26, 26, 26, 0.2) 92%, rgba(26, 26, 26, 0) 100%);
    }

    .station-axis {
        position: absolute;
        left: -1.75rem;
        top: 0.4rem;
        margin: 0;
    }

    .station-axis-year,
    .station-axis-line {
        display: none;
    }

    .station-axis-dot {
        width: 9px;
        height: 9px;
        background-color: #1a1a1a;
        box-shadow: 0 0 0 4px #f4f2ee;
    }

    .station-image-wrap {
        height: auto;
        aspect-ratio: 16 / 10;
        border-radius: 16px;
    }

    .station-year-large {
        font-size: 1.7rem;
    }

    .station-title {
        font-size: 1.4rem;
    }

    /* Text am Handy vollständig zeigen */
    .station-text {
        display: block;
        -webkit-line-clamp: unset;
        max-width: none;
        overflow: visible;
        font-size: 0.98rem;
    }
}

/* ---- Galerie (Geschichte) am Handy: Vollbild ---------------------------- */
@media (max-width: 768px) {
    .lightbox-overlay {
        padding: 0;
    }

    .lightbox-dialog {
        max-width: none;
        height: 100vh;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .lightbox-header {
        position: relative;
        display: block;
        padding: 1rem 1.1rem;
    }

    /* Knöpfe oben rechts, Titel bekommt Platz daneben */
    .lightbox-header-actions {
        position: absolute;
        top: 0.8rem;
        right: 0.8rem;
        gap: 0.5rem;
    }

    .lightbox-header-info {
        padding-right: 3.25rem;
    }

    .lightbox-header:has(.lightbox-back-btn:not([hidden])) .lightbox-header-info {
        padding-right: 9.5rem;
    }

    .lightbox-header:has(.lightbox-back-btn:not([hidden])) .lightbox-desc {
        display: none;
    }

    .lightbox-title-line {
        gap: 0.5rem;
    }

    .lightbox-year-badge {
        font-size: 1.15rem;
    }

    .lightbox-title {
        font-size: 1.2rem;
    }

    .lightbox-count {
        font-size: 0.78rem;
    }

    .lightbox-desc {
        font-size: 0.85rem;
    }

    .lightbox-back-btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.8rem;
    }

    .lightbox-body {
        padding: 0.75rem;
    }

    .lightbox-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .lightbox-thumb-btn {
        border-radius: 10px;
    }

    .lightbox-stage {
        position: relative;
        min-height: 0;
    }

    .lightbox-stage-img {
        max-height: calc(100dvh - 190px);
        border-radius: 8px;
    }

    /* Pfeile über dem Bild statt daneben */
    .lightbox-nav-btn {
        position: absolute;
        top: 50%;
        z-index: 2;
        width: 42px;
        height: 42px;
        margin-top: -21px;
        background-color: rgba(26, 26, 26, 0.65);
    }

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

/* Tablet hochkant: Logo auf dem Startbildschirm größer */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-logo {
        width: 62vw;
    }
}

/* ==========================================================================
   Mitsingen: Karte über „Unsere Geschichte“ (gleicher Stil wie WhatsApp-Karte)
   ========================================================================== */
.sing-cta {
    padding: clamp(5rem, 8vw, 7rem) 2rem 0;
}

.sing-cta .wa-cta-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    text-align: center;
}

.sing-text .wa-cta-lead {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.sing-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.sing-actions .apple-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    line-height: 1.2;
}

.sing-actions svg {
    width: 1.15em;
    height: 1.15em;
}

.sing-btn-outline {
    background-color: transparent;
    color: #1a1a1a;
    box-shadow: inset 0 0 0 1.5px #1a1a1a;
}

.sing-btn-outline:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

@media (max-width: 900px) {
    .sing-cta {
        padding: 4.5rem 1.25rem 0;
    }

    .sing-text .wa-cta-lead {
        margin-bottom: 1.75rem;
    }
}

@media (max-width: 420px) {
    .sing-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .sing-actions .apple-button {
        justify-content: center;
    }
}

/* ==========================================================================
   Hinweis „weiter scrollen“ unten auf dem Startbildschirm
   ========================================================================== */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: max(1.75rem, env(safe-area-inset-bottom));
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    color: #1a1a1a;
    text-decoration: none;
    transform: translateX(-50%);
    opacity: 0;
    animation: scroll-cue-in 0.8s ease 1.6s forwards;
    -webkit-tap-highlight-color: transparent;
}

.scroll-cue-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #777777;
}

.scroll-cue svg {
    width: 26px;
    height: 26px;
    animation: scroll-cue-bounce 2.2s cubic-bezier(0.45, 0, 0.55, 1) 2.4s infinite;
}

/* Am Handy „Wischen“, am Computer „Scrollen“ */
.scroll-cue-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
    .scroll-cue-touch { display: inline; }
    .scroll-cue-mouse { display: none; }
}

@keyframes scroll-cue-in {
    to { opacity: 1; }
}

@keyframes scroll-cue-bounce {
    0%, 55%, 100% { transform: translateY(0); }
    25% { transform: translateY(7px); }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-cue { animation: none; opacity: 1; }
    .scroll-cue svg { animation: none; }
}
