/* ===========================
   Timeline Container
   =========================== */
.timeline-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 70px;   
    max-height: 600px;  
    height: 600px;
    min-height: 600px;
    overflow-y: visible;
}

/* ===========================
   Navigation Arrows
   =========================== */
.timeline-nav {
    position: absolute;
    bottom: 255px;
    transform: translateY(-50%);
    z-index: 10;    
    border: none;    
    width: 25px;
    height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;    
    transition: all 0.3s ease;    
    background: transparent;
}

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

.timeline-nav-prev {
    left: 0;
}

.timeline-nav-next {
    right: 0;
}

/* ===========================
   Timeline Wrapper & Cards
   =========================== */
.timeline-wrapper {
    overflow: hidden;
    position: relative;
    align-items: flex-end;
    height: 600px;
    min-height: 600px;
    max-height: 600px;
}

.timeline-cards {
    display: flex;
    transition: transform 0.5s ease;
    gap: 45px;    
    align-items: flex-end;
    min-height: 600px;
    height: 600px;
    max-height: 600px;
    padding-bottom: 50px;
}

.timeline-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    transition: all 0.5s ease;
}

/* Mobile: 1 item visible */
.timeline-item {
    width: 100%;
}

/* Tablet: 2 items visible */
@media (min-width: 992px) {
    .timeline-item {
        width: calc((100% - 45px) / 2);
    }
}

/* Desktop: 3 items visible */
@media (min-width: 1200px) {
    .timeline-item {
        width: calc((100% - 90px) / 3);
    }
}

/* ===========================
   Timeline Card Styling
   =========================== */
.timeline-card {
    background: white;    
    padding: 30px 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 230px;
    max-height: 230px;
    overflow: hidden;
}

/* Pfeil unter der Karte */
.timeline-card:after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-top-color: #fff;
    top: 100%;
    left: 50%;
    margin-left: -15px;
    z-index: 1000;    
    background: transparent;
}

/* Standard: Kurzer Text sichtbar, langer versteckt */
.timeline-text {
    display: none;
}

.timeline-text-short {
    display: block;
}

/* Aktive Karte: Volle Höhe und langer Text */
.timeline-item.active .timeline-card {
    max-height: 1000px; /* Große Zahl für Transition, praktisch unbegrenzt */
    min-height: 250px;
}

.timeline-item.active .timeline-text {
    display: block;
}

.timeline-item.active .timeline-text-short {
    display: none;
}

/* Desktop: Anpassungen */
@media (min-width: 992px) {
    .timeline-card {
        max-height: 230px;
        min-height: 230px;
    }
    
    .timeline-text-short {
        max-height: 182px;
        overflow: hidden;
    }
    
    /* Aktive/Featured Karte */
    .timeline-item.active .timeline-card {
        max-height: 1000px; /* Große Zahl für Transition */
        min-height: 250px;
    }
    
    .timeline-item.active .timeline-text {
        max-height: none;
    }
}

.timeline-card:hover {
    transform: translateY(-5px);
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-bottom: 15px;
    line-height: 26px;
}

.timeline-text,
.timeline-text-short {
    font-size: 20px;
    color: #000;
    line-height: 26px;
    margin-bottom: 0;
}

.timeline-text p,
.timeline-text-short p {
    margin: 0;
}

/* ===========================
   Timeline Point & Date (below each card)
   =========================== */
.timeline-point-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    position: relative;
}

.timeline-dot {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    border: 3px solid #adddf3;    
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 5;
}

.timeline-dot:hover {
    transform: scale(1.1);
}

.timeline-inner-dot {
    width: 16px;
    height: 16px;
    border: 0 none;
    border-radius: 50%;
    background-color: #adddf3;    
    margin: 5px;
    transition: all 0.3s ease;
}

/* Active dot styling */
.timeline-item.active .timeline-inner-dot {
    background-color: #0061a7;     
}

.timeline-date {
    margin-top: 25px;
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.1;
    text-align: center;
}

/* ===========================
   Timeline Line (connects visible dots)
   =========================== */
.timeline-line-container {
    position: absolute;
    bottom: 126px;
    left: 0;
    right: 0;
    height: 5px;
    pointer-events: none;
}

.timeline-line {
    height: 5px;
    background: #707070;
    position: absolute;        
    top: 0;
    left: 0;
    right: 0;
}

/* ===========================
   Responsive Adjustments
   =========================== */
@media (max-width: 575px) {
    .timeline-nav {
        width: 40px;
        height: 40px;
    }
    
    .timeline-nav img {
        width: 30px;
        height: 30px;
    }
    
    .timeline-card {
        padding: 20px;
        hyphens: auto;
    }
    
    .timeline-title {
        font-size: 1rem;
    }
    
    .timeline-text,
    .timeline-text-short {
        font-size: 1rem;
    }
}

/* ===========================
   Smooth scrolling animation
   =========================== */
.timeline-cards {
    scroll-behavior: smooth;
}
