@import 'https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap';

@font-face {
    font-family: NHU;
    src: url('https://db.onlinewebfonts.com/t/31267e36af6f8dac65a56e78345e945e.eot');
    src:
        url('https://db.onlinewebfonts.com/t/31267e36af6f8dac65a56e78345e945e.eot?#iefix')
            format('embedded-opentype'),
        url('https://db.onlinewebfonts.com/t/31267e36af6f8dac65a56e78345e945e.woff2')
            format('woff2'),
        url('https://db.onlinewebfonts.com/t/31267e36af6f8dac65a56e78345e945e.woff')
            format('woff'),
        url('https://db.onlinewebfonts.com/t/31267e36af6f8dac65a56e78345e945e.ttf')
            format('truetype'),
        url('https://db.onlinewebfonts.com/t/31267e36af6f8dac65a56e78345e945e.svg#Neue Haas Unica W1G')
            format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: NHU;
    src: url('https://db.onlinewebfonts.com/t/4e47c36ade89eee875ea3862898f3068.eot');
    src:
        url('https://db.onlinewebfonts.com/t/4e47c36ade89eee875ea3862898f3068.eot?#iefix')
            format('embedded-opentype'),
        url('https://db.onlinewebfonts.com/t/4e47c36ade89eee875ea3862898f3068.woff2')
            format('woff2'),
        url('https://db.onlinewebfonts.com/t/4e47c36ade89eee875ea3862898f3068.woff')
            format('woff'),
        url('https://db.onlinewebfonts.com/t/4e47c36ade89eee875ea3862898f3068.ttf')
            format('truetype'),
        url('https://db.onlinewebfonts.com/t/4e47c36ade89eee875ea3862898f3068.svg#Neue Haas Unica W1G Thin')
            format('svg');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: NHU;
    src: url('https://db.onlinewebfonts.com/t/bb87c8dd3cc47b366f6bb7738fee180c.eot');
    src:
        url('https://db.onlinewebfonts.com/t/bb87c8dd3cc47b366f6bb7738fee180c.eot?#iefix')
            format('embedded-opentype'),
        url('https://db.onlinewebfonts.com/t/bb87c8dd3cc47b366f6bb7738fee180c.woff2')
            format('woff2'),
        url('https://db.onlinewebfonts.com/t/bb87c8dd3cc47b366f6bb7738fee180c.woff')
            format('woff'),
        url('https://db.onlinewebfonts.com/t/bb87c8dd3cc47b366f6bb7738fee180c.ttf')
            format('truetype'),
        url('https://db.onlinewebfonts.com/t/bb87c8dd3cc47b366f6bb7738fee180c.svg#Neue Haas Unica W06 Bold')
            format('svg');
    font-weight: 700;
    font-style: normal;
}

.timeline-container {
    --breakpoint-desktop: 1440px;
    --breakpoint-tablet: 1024px;
    --breakpoint-mobile: 768px;

    /* Layout-Variablen */
    --overlay-width: 50vw;
    --timeline-width: 14vw;
}

.timeline-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.timeline-container {
    font-family: NHU, sans-serif;
    background: #000;
    color: #fff;

    /* WICHTIG: overflow-x: clip statt hidden - hidden bricht sticky! */
    overflow: clip visible;
    min-height: 100vh;
}

.timeline-container #particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.timeline-container #svgOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 80vh;
    height: 80vw;
    z-index: 1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: invert(1);
    opacity: 0;
}

.timeline-container #laserSvgBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.timeline-container #laserSvgBackground svg {
    width: 100%;
    height: 100%;
}

.timeline-container .laser-path {
    fill: none;
    stroke: #e70038;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 16px rgb(231 0 56 / 80%));
    animation: laser-draw 2.2s ease-out forwards;
}

@keyframes laser-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.timeline-container .background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    mask-image: linear-gradient(to right, transparent 0%, black 20%);
}

@media (width <= 768px) {
    .timeline-container .background-layer {
        mask-image: none;
    }
}

.timeline-container #backgroundImageContainer1 {
    z-index: 0;
}

.timeline-container #backgroundImageContainer2 {
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   CONTENT OVERLAY - Expandierendes dunkles Overlay
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container .content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;

    /* Breite über CSS-Variable gesteuert */
    width: var(--overlay-width);

    /* HARTE KANTE statt Gradient */
    background: rgb(0 0 0 / 70%);
    z-index: 10;
    pointer-events: none;
    transition:
        opacity 0.5s ease,
        width 0.3s ease;
}

/* Keine expanded-Klasse mehr nötig - Overlay-Breite über --overlay-width Variable */

.timeline-container .container {
    position: relative;
    z-index: 20;
    margin-left: 0;
    background: rgb(0 0 0 / 0%);
    padding-top: 200px;
    max-width: initial !important;

    /* WICHTIG: Kein overflow hier - das bricht sticky! */
}

/* ═══════════════════════════════════════════════════════════════════
   HERO SECTION - DEAKTIVIERT (direkt mit Timeline starten)
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container .header {
    display: none;

    /* Ausgeblendet - Timeline startet direkt */
}

/* ═══════════════════════════════════════════════════════════════════
   PAGE TITLE - "History" Headline über der Timeline
   ═══════════════════════════════════════════════════════════════════ */
.timeline-container .page-title {
    margin: 0;

    /* Padding links = Timeline-Breite + zusätzlicher Abstand */
    padding: 0 40px 40px calc(var(--timeline-width) + 40px);
    position: relative;
    z-index: 25;
}

.timeline-container .page-title h1 {
    font-size: 55px;
    font-weight: 600;
    color: #fff;
    border-left: 20px solid #e70038;
    padding-left: 20px;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   TIMELINE SECTION
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container .timeline {
    position: relative;

    /* WICHTIG: Kein overflow hier - das bricht sticky! */
    overflow: visible;
}

.timeline-container .milestone {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 40px;
    width: calc(var(--overlay-width) - 200px);

    /* scroll-snap-align: start; - deaktiviert für gallery-variant */
    transition: all 0.2s ease;
}

.timeline-container .milestone:first-child {
    min-height: 0;
    justify-content: flex-start;
}

.timeline-container .milestone.active {
    opacity: 1 !important;
}

/* Meilenstein-Content: Flexbox Layout */
.timeline-container .milestone-content {
    /* Breite passt sich dem verfügbaren Platz an */
    width: 100%;
    max-width: calc(var(--overlay-width) - var(--timeline-width) - 80px);
    display: flex;
    flex-flow: column wrap;
    align-items: flex-start;
    gap: 15px;
}

.timeline-container .milestone-top-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.timeline-container .milestone-content-image {
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: 0;
    flex-shrink: 0;
    box-shadow: 0 10px 40px rgb(0 0 0 / 30%);
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;

    /* Versteckt in V9 - Bilder kommen rechts im Background */
}

.timeline-container .milestone-content-image:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgb(231 0 56 / 30%);
}

.timeline-container .milestone-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1;
}

.timeline-container .milestone-year {
    font-size: 35px;
    font-weight: 300;
    color: rgb(255 255 255 / 90%);
    margin-bottom: 8px;
    letter-spacing: 2px;
    line-height: 1;
    text-align: left;
}

.timeline-container .milestone.active .milestone-year {
    color: rgb(255 255 255 / 95%);
}

.timeline-container .milestone-number {
    display: none;
}

.timeline-container .milestone-title {
    font-size: 35px;
    font-weight: 700;
    line-height: 1.35;

    /* Headline in Rot */
    margin-bottom: 15px;
    padding: 0;
    text-align: left;
}

.timeline-container .milestone-description {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: rgb(255 255 255 / 90%);
}

.timeline-container .milestone-category {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   VERTIKALE ZEITACHSE (LINKS) - ANGEPASST FÜR V9
   ═══════════════════════════════════════════════════════════════════ */

.vertical-timeline-axis {
    position: fixed;
    left: 0;
    top: 96px;
    height: calc(100vh - 96px);
    width: var(--timeline-width);
    max-width: 300px;
    min-width: 200px;
    z-index: 50;
    padding: 0 20px;
    pointer-events: none;
    overflow: hidden;

    /* Mask oben und unten - sanftes Ausblenden an beiden Enden */
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 15%,
        black 80%,
        transparent 100%
    );

    /* Initial versteckt - wird per JS nach Positionierung eingeblendet */
    opacity: 0;
    transition: opacity 1s ease-out;
    transition-delay: 0.2s;
}

/* Timeline sichtbar nach korrekter Positionierung - nur Opacity-Übergang */
.vertical-timeline-axis.visible {
    opacity: 1;
}

.timeline-container .timeline-content {
    position: absolute;
    left: 0;
    width: 100%;
    transition: transform 0.1s linear;
    padding: 0 20px;
}

.timeline-container .timeline-line {
    position: fixed;
    left: 5em;

    /* top wird per JavaScript dynamisch gesetzt (nach erster Dekade) */
    top: 200px;
    bottom: 0;
    width: 1px;
    background: rgb(255 255 255 / 20%);
    z-index: -1;
    margin-bottom: 50vh;
}

.timeline-container .timeline-items {
    position: relative;

    /* Padding-top wird per JavaScript dynamisch gesetzt (alignTimelineWithMilestone) */
    padding: 0 0 50vh;
}

/* Jahrzehnt-Überschrift */
.timeline-container .timeline-decade {
    font-size: 32px;
    font-weight: 300;
    color: rgb(255 255 255 / 100%);
    line-height: 1;
    text-align: left;
    white-space: nowrap;
    margin-bottom: 40px;
    pointer-events: none;
    width: 100%;
}

/* Timeline Item */
.timeline-container .timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 40px;
    pointer-events: auto;
}

/* Jahreszahl - WEISS (Standard) */
.timeline-container .timeline-year {
    font-size: 14px;
    font-weight: 700;
    color: rgb(255 255 255 / 70%);

    /* Weiß mit leichter Transparenz */
    white-space: nowrap;
    min-width: 40px;
    text-align: right;
    line-height: 18px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

@media (width <= 1024px) {
    .timeline-container {
        /* Overlay über volle Breite, Timeline bleibt sichtbar */
        --overlay-width: 100vw;
        --timeline-width: 200px;
    }

    /* Page Title auf Tablet */
    .timeline-container .page-title {
        font-size: 36px;
        padding: 110px 30px 30px calc(var(--timeline-width) + 30px);
    }

    /* Milestone auf volle Breite (abzüglich Timeline und Padding) */
    .timeline-container .milestone {
        width: calc(100vw - var(--timeline-width) - 80px);
        padding: 60px 40px;
    }

    /* Content auf volle Breite */
    .timeline-container .milestone-content {
        max-width: calc(100vw - var(--timeline-width) - 120px);
    }

    /* Gallery-Variant auf Tablet */
    .timeline-container .milestone.gallery-variant .milestone-content {
        width: calc(100vw - var(--timeline-width) - 120px);
        max-width: calc(100vw - var(--timeline-width) - 120px);
    }

    /* Fullscreen-Variant auf Tablet */
    .timeline-container .milestone.fullscreen-image-variant .milestone-content {
        width: calc(100vw - var(--timeline-width) - 120px);
        max-width: calc(100vw - var(--timeline-width) - 120px);
    }
}

/* Marker (Punkt mit Ring) - WEISS (Standard) */
.timeline-container .timeline-dot {
    position: relative;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    margin-top: 3px;
}

.timeline-container .timeline-dot-outer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgb(255 255 255 / 50%);

    /* Weiß statt Rot */
    transition: all 0.3s ease;
}

.timeline-container .timeline-dot-inner {
    position: absolute;
    inset: 35%;
    border-radius: 50%;
    background: rgb(255 255 255 / 70%);

    /* Weiß statt Rot */
    transition: all 0.3s ease;
}

/* Headline - WEISS (Standard) */
.timeline-container .timeline-headline {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 18px;
    cursor: pointer;
    pointer-events: auto !important;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.timeline-container .timeline-headline:hover {
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════
   AKTIVER MEILENSTEIN - ROT
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container .timeline-item.active .timeline-year {
    color: #e70038;

    /* Rot bei aktiv */
}

.timeline-container .timeline-item.active .timeline-dot-outer {
    border-color: #e70038;
    border-width: 2px;
    box-shadow:
        0 0 10px rgb(231 0 56 / 50%),
        0 0 20px rgb(231 0 56 / 20%);
    animation: pulse-marker 2s ease-in-out infinite;
}

.timeline-container .timeline-item.active .timeline-dot-inner {
    background: #e70038;
    box-shadow: 0 0 6px rgb(231 0 56 / 80%);
}

.timeline-container .timeline-item.active .timeline-headline {
    color: #e70038;

    /* Rot bei aktiv */
    font-weight: 700;
}

@keyframes pulse-marker {
    0%,
    100% {
        box-shadow:
            0 0 10px rgb(231 0 56 / 50%),
            0 0 20px rgb(231 0 56 / 20%);
    }

    50% {
        box-shadow:
            0 0 15px rgb(231 0 56 / 70%),
            0 0 30px rgb(231 0 56 / 30%);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SCROLL INDICATOR
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container .scroll-indicator {
    display: none;

    /* Ausgeblendet - kein Header mehr vorhanden */
}

@keyframes bounce {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container .main-navigation {
    background: #000;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    position: relative;
    z-index: 100;
}

.timeline-container .nav-logo {
    height: 40px;
    width: auto;
    display: flex;
    align-items: center;
}

.timeline-container .nav-logo svg {
    height: 100%;
    width: auto;
}

.timeline-container .nav-menu {
    display: flex;
    gap: 60px;
    align-items: center;
    list-style: none;
}

.timeline-container .nav-menu a {
    font-size: 16px;
    font-weight: 350;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.timeline-container .nav-menu a:hover {
    color: #e70038;
}

.timeline-container .nav-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.timeline-container .nav-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.timeline-container .nav-icon:hover {
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════
   IMAGE MODAL
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container .image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-container .image-modal.show {
    display: block;
    opacity: 1;
}

.timeline-container .image-modal.hiding {
    opacity: 0;
}

.timeline-container .modal-content-container {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 40px 60px;
    box-sizing: border-box;
    background-color: rgb(0 0 0 / 70%);
}

.timeline-container .image-modal-content {
    width: auto;
    max-width: 90%;
    max-height: 55vh;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 8px 32px rgb(0 0 0 / 50%);
    margin: 30px 0;
}

.timeline-container .image-modal-close {
    position: fixed;
    top: 30px;
    right: 45px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    line-height: 1;
}

.timeline-container .image-modal-close:hover,
.timeline-container .image-modal-close:focus {
    color: #e70038;
    transform: scale(1.1);
}

.timeline-container .image-modal-headline {
    text-align: left;
    color: #fff;
    font-size: 45px;
    font-weight: 700;
    padding: 0 30px;
    max-width: 1200px;
    width: 100%;
    margin: 0;
    line-height: 1.3;
}

.timeline-container .image-modal-caption {
    text-align: left;
    color: #fff;
    padding: 0 30px;
    font-size: 18px;
    line-height: 1.6;
    max-width: 1200px;
    width: 100%;
    margin: 30px 0;
}

/* Secondary Button */
.timeline-container .secondary-button {
    background-color: transparent;
    border: 1px solid rgb(255 255 255 / 50%);
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    position: relative;
    width: fit-content;
    margin: 20px 0;
    transition: all 0.3s ease;
    font-family: NHU, 'Neue Haas Unica W1G', sans-serif;
    font-weight: 400;
    font-size: 14px;
    text-align: center;
    color: #fff;
    white-space: nowrap;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-container .secondary-button:hover {
    border-color: #e70038;
    color: #e70038;
    box-shadow: 0 0 15px rgb(231 0 56 / 30%);
}

.timeline-container .secondary-button:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (width <= 1024px) {
    .timeline-container .header h1 {
        font-size: 10vw;
        letter-spacing: 0.3em;
    }

    .timeline-container .milestone {
        padding-left: 30px;
    }

    .timeline-container .main-navigation {
        padding: 0 30px;
        gap: 30px;
    }

    .timeline-container .nav-menu {
        gap: 30px;
    }
}

@media (width <= 768px) {
    .timeline-container {
        /* Smartphone: Volle Breite, keine Timeline */
        --overlay-width: 100vw;
        --timeline-width: 0;
    }

    /* Page Title auf Smartphone */
    .timeline-container .page-title {
        font-size: 28px;
        letter-spacing: 0.15em;
        padding: 100px 20px 20px;
    }

    .timeline-container .milestone {
        width: 100vw;
        padding: 30px;
    }

    .timeline-container .milestone-content {
        width: 100%;
        max-width: 100vw;

        /* Halbtransparenter Hintergrund für alle Milestones auf Smartphone */
        background: rgb(0 0 0 / 70%);
        padding: 30px;
        border-radius: 0;
    }

    /* Content Overlay auf Smartphone dauerhaft unsichtbar */
    .timeline-container .content-overlay {
        display: none !important;
    }

    .timeline-container .milestone-year {
        font-size: 24px;
    }

    .timeline-container .milestone-title {
        font-size: 24px;
    }

    .timeline-container .vertical-timeline-axis {
        display: none;
    }

    .timeline-container .main-navigation {
        padding: 0 20px;
        flex-wrap: wrap;
    }

    .timeline-container .nav-menu {
        gap: 20px;
        order: 3;
        width: 100%;
        flex-wrap: wrap;
    }

    .timeline-container .nav-menu a {
        font-size: 14px;
    }

    .timeline-container .milestone {
        padding-bottom: 40vh;
    }

    /* Galerie-Variante auf Mobile: Alles in einem Container mit halbtransparentem BG */
    .timeline-container .milestone.gallery-variant {
        flex-direction: column !important;
        padding: 30px !important;

        /* Halbtransparenter Hintergrund für gesamten Milestone */
    }

    .timeline-container .milestone.gallery-variant .milestone-content {
        position: relative !important; /* Kein sticky auf Mobile */
        top: auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: auto !important;

        /* Kein separater Hintergrund - kommt vom Parent */
        padding: 30px !important;
        border-radius: 0 !important;
    }

    /* Galerie innerhalb des gleichen Containers */
    .timeline-container .milestone.gallery-variant .milestone-gallery {
        width: 100% !important;
        min-width: auto !important;
        padding: 0 30px 30px;
        margin-bottom: 40vh;
    }

    .timeline-container .milestone-gallery-section {
        height: auto !important;
        min-height: auto !important;
        padding: 15px 0 !important;
    }

    /* Galerie-Bilder volle Breite */
    .timeline-container .milestone.gallery-variant .milestone-gallery-image {
        max-width: 100% !important;
        width: 100% !important;
        max-height: none !important;
        border-radius: 0 !important;
    }

    .timeline-container .secondary-button {
        margin: 20px auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER - ÜBER OVERLAY
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container toptica-footer {
    position: relative;
    z-index: 60;

    /* Über dem Overlay (z-index: 10) */
}

/* ═══════════════════════════════════════════════════════════════════
   BILD-GALERIE VARIANTE - PINNED SCROLL
   Der Text bleibt links fixiert, Bilder scrollen rechts einzeln durch
   
   WICHTIG für position: sticky:
   1. Parent muss höher sein als der Sticky-Bereich
   2. align-items: flex-start auf dem Flex-Container (NICHT center!)
   3. justify-content: flex-start auf dem Flex-Container
   4. Kein overflow:hidden auf Vorfahren
   5. Kein transform auf dem Sticky-Element
   ═══════════════════════════════════════════════════════════════════ */

/* Galerie-Meilenstein: Flexbox Layout für korrektes Sticky */
.milestone.gallery-variant {
    /* ALLE Eigenschaften von .milestone müssen überschrieben werden! */
    width: 100%;
    display: flex !important;
    flex-direction: row;
    justify-content: flex-start !important; /* WICHTIG: Nicht center! */
    align-items: flex-start !important; /* KRITISCH für sticky in Flexbox! */
    padding: 30px !important;
    opacity: 1 !important;
    min-height: auto !important; /* Keine min-height - die Galerie bestimmt die Höhe */

    /* Kein overflow auf diesem Element! */
}

/* Der Text-Container bleibt fixiert mit sticky */
.milestone.gallery-variant .milestone-content {
    /* Safari Support */
    position: sticky !important;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex-shrink: 0;
    z-index: 20;
    pointer-events: auto;
    align-self: flex-start !important; /* Explizit für Sticky! */

    /* KEIN transform, filter, perspective hier! */
}

/* Galerie-Container: Im normalen Dokumentenfluss */
.timeline-container .milestone-gallery {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 400px;
    z-index: 5;
    pointer-events: none;

    /* Kein position:absolute! Das bricht sticky! */
}

/* Einzelne Galerie-Sektion für jedes Bild - 100vh Höhe */
.timeline-container .milestone-gallery-section {
    height: 100vh;
    min-height: 100vh; /* Explizit */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 80px;
    pointer-events: auto;
    position: relative;
    flex-shrink: 0; /* Jede Sektion behält ihre 100vh Höhe */
}

/* Galerie-Bild */
.timeline-container .milestone-gallery-image {
    max-width: 90%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 10px 40px rgb(0 0 0 / 40%);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* Galerie-Indikator (Punkte) */
.timeline-container .gallery-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.timeline-container .milestone.gallery-variant.active ~ .gallery-indicator,
.timeline-container .gallery-indicator.visible {
    opacity: 1;
    pointer-events: auto;
}

.timeline-container .gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(255 255 255 / 40%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-container .gallery-dot.active,
.timeline-container .gallery-dot:hover {
    background: #e70038;
    transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════════════════
   CONTENT OVERLAY - Initial auch versteckt
   ═══════════════════════════════════════════════════════════════════ */

.timeline-container .content-overlay {
    opacity: 0;
    transition:
        opacity 0.5s ease,
        width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-container .content-overlay.visible {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   FULLSCREEN-IMAGE VARIANTE
   Meilensteine mit großflächigem Hintergrundbild-Reveal-Effekt
   
   Das Hintergrundbild wird per Cross-Fade eingeblendet,
   bleibt dann stehen während Content + Gallery reinscrollen.
   Das Overlay hat eine harte Kante (kein Gradient).
   ═══════════════════════════════════════════════════════════════════ */

/* Fullscreen-Image Meilenstein: Erhöhte Scroll-Höhe */
.milestone.fullscreen-image-variant {
    position: relative;

    /* Padding oben für die "Fullscreen-Pause" bevor Content erscheint */
    padding-top: 100vh !important;
    min-height: 200vh !important;
}

/* Kombinierte Fullscreen + Gallery Variante */
.milestone.fullscreen-image-variant.gallery-variant {
    padding-top: 100vh !important;
    flex-direction: row !important;
    align-items: flex-start !important;
}

/* Content-Bereich für Fullscreen-Variante - scrollt normal, NICHT sticky */
.milestone.fullscreen-image-variant .milestone-content {
    position: relative;
    z-index: 30;

    /* Breite: Overlay minus Timeline minus Padding */
    width: calc(var(--overlay-width) - var(--timeline-width) - 80px);
    max-width: calc(var(--overlay-width) - var(--timeline-width) - 80px);
}

/* Content-Overlay: Auf Timeline-Breite reduzieren während Fullscreen-Phase */
.content-overlay.fullscreen-active {
    /* Overlay nur auf Timeline-Breite reduzieren, damit Timeline noch unterlegt ist */
    width: var(--timeline-width) !important;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE: Fullscreen-Image auf Mobile - BG Image für 100vh sichtbar
   ═══════════════════════════════════════════════════════════════════ */

@media (width <= 768px) {
    /* Fullscreen-Variante: 90vh Padding für vollständiges BG-Image */
    .timeline-container .milestone.fullscreen-image-variant {
        padding-top: 90vh !important;
        min-height: auto !important;
    }

    .timeline-container .milestone.fullscreen-image-variant .milestone-content {
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        max-width: none !important;
    }

    .timeline-container
        .milestone.fullscreen-image-variant.gallery-variant
        .milestone-gallery {
        margin-top: 0;
    }
}
