/* Timeline Widget Styles */
.timeline-widget {
    /* padding: 60px 0;
    background-color: #f8f9fa; */
}

.timeline-title {
    text-align: center;
    margin-bottom: 50px;
}

.timeline-container {
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--w3-primary-color);
    transform: translateX(-50%);
    z-index: -1;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-row {
    position: relative;
    z-index: 2;
}

/* Year Styling */
.timeline-year-col {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.timeline-year {
    display: inline-block;
    background: var(--w3-blue);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(78, 84, 200, 0.3);
    min-width: 80px;
    text-align: center;
}

/* Image Styling */
.timeline-image-col {
    padding: 20px;
}

.timeline-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease;
    min-height: 200px;
}

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

.timeline-image img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    display: block;
}

/* Content Styling */
.timeline-content-col {
    padding: 20px;
}

.timeline-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    position: relative;
    transition: transform 0.3s ease;
}

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

.timeline-content::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    transform: rotate(45deg) translateY(-50%);
    transform-origin: top;
    top: 50%;
}

/* Content positioning based on row direction */
.timeline-row:not(.reverse-row) .timeline-content::before {
    left: -10px;
    box-shadow: -5px 5px 10px rgba(0, 0, 0, 0.05);
}

.timeline-row.reverse-row .timeline-content::before {
    right: -10px;
    box-shadow: 5px -5px 10px rgba(0, 0, 0, 0.05);
}

.timeline-item-title {
    margin-top: 0;
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
}

/* No items message */
.no-timeline-items {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.no-timeline-items p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 50%;
    }
    
    .timeline-row {
        flex-direction: column !important;
    }
    
    .timeline-row.reverse-row {
        flex-direction: column !important;
    }
    
    .timeline-year-col {
        order: 1;
        margin: 20px 0;
    }
    
    .timeline-image-col {
        order: 2;
        margin-bottom: 20px;
    }
    
    .timeline-content-col {
        order: 3;
    }
    
    .timeline-year {
        font-size: 1rem;
        padding: 8px 20px;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .timeline-item {
        margin-bottom: 60px;
    }
    
    .timeline-content, .timeline-image {
        text-align: center;
    }
}

/* Animation on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item {
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(even) {
    animation-delay: 0.2s;
}

/* Optional: Add connectors */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -40px;
    width: 20px;
    height: 20px;
    background: var(--w3-blue);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 3;
    box-shadow: 0 0 0 8px rgba(78, 84, 200, 0.1);
}

@media (max-width: 768px) {
    .timeline-item:not(:last-child)::after {
        left: 50%;
    }
}