/* ===========================
   Timeline Container
   =========================== */
.timeline-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 110px;    
}

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

.timeline-nav:hover {        
}

.timeline-nav:disabled {    
    cursor: not-allowed;
    opacity: 0.5;
}

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

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

/* ===========================
   Timeline Wrapper & Cards
   =========================== */
.timeline-wrapper {
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow cards to grow upward */
    margin-bottom: 80px; /* Space for dots and dates */
    position: relative;
    /*display: flex;*/
    align-items: flex-end; /* Align all items to bottom */
    min-height: 480px; /* Ensure space for growing cards */    
}

.timeline-cards {
    display: flex;
    transition: transform 0.5s ease;
    gap: 75px;
    padding: 35px 0;
    align-items: flex-end; /* Cards align to bottom */
}

.timeline-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Push content to bottom */
    
}

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

/* Tablet: 2 items visible */
@media (min-width: 576px) and (max-width: 991px) {
    .timeline-item {
        width: calc((100% - 75px) / 2);
    }
}

/* Mobile: 1 item visible */
@media (max-width: 575px) {
    .timeline-item {
        width: 100%;
    }
    
    .timeline-container {
        padding: 0 50px;
    }
}

/* ===========================
   Timeline Card Styling
   =========================== */
.timeline-card {
    background: white;    
    padding: 35px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    position:relative;
    
}
.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; /* adjust for border width */
    z-index:1000;    
    background:transparent;
}

/* Desktop: Outer cards have fixed height */
@media (min-width: 992px) {
    .timeline-card {
        height: 310px;       
    }
    .timeline-text {
        max-height:182px;
        overflow: hidden;
        hyphens: auto
        
    }
    
    /* Featured/middle card grows to fit content */
    .timeline-card-featured {
        height: auto;
        min-height: 310px;
    }
    
    .timeline-card-featured .timeline-text {
       max-height:unset;
    }
}

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

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

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

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

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

.timeline-item[data-index="0"] .timeline-dot,
.timeline-item[data-index="1"] .timeline-dot,
.timeline-item[data-index="2"] .timeline-dot {
    /* Make first 3 dots visible initially */
}

.timeline-dot:hover {    
}

.timeline-inner-dot {
    width:20px;
    height:20px;
    border:0 none;
    border-radius:50%;
    background-color:#adddf3;    
    margin:7px;
    
}

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

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

/* ===========================
   Timeline Line (connects visible dots)
   =========================== */
.timeline-line-container {
    position: absolute;
    bottom: 145px; /* Position at dot level */
    left: 0;
    right: 0;
    height: 5px; /* Match dot height */
    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 svg {
        width: 30px;
        height: 30px;
    }
    
    .timeline-card {
        padding: 20px;
        height: auto !important;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .timeline-text {
        font-size: 0.9rem;
    }
    
    .timeline-wrapper {
        min-height: 250px; /* Smaller min-height for mobile */
    }
}

/* ===========================
   Additional Utility Classes
   =========================== */
.timeline-card-featured {
    
}

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