/* History Section */
.history-section {
    background-color: #2c2c2c; /* Dark modern background */
    color: #fff;
    padding: 20px 10px;
    text-align: center;
    position: relative;
    overflow: hidden; /* Hide overflow for scrolling effect */
}

.history-title {
    font-size: 2.8rem;
    margin-bottom: 40px;
    color: #d4af37; /* Gold color for a premium look */
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Timeline Container */
.timeline-container {
    position: relative;
    width: 100%;
    height: 350px; /* Fixed height for timeline */
    margin-top: 20px;
    overflow: hidden; /* Hide overflowing items */
}

/* Timeline */
.timeline {
    display: flex;
    flex-wrap: nowrap;
    animation: scroll-timeline 60s linear infinite; /* Increased speed and seamless loop */
    width: max-content; /* Ensure width stretches to fit all items */
}

/* Timeline Item */
.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0; /* Prevent shrinking */
    min-width: 250px; /* Fixed width for items */
    margin-right: 20px; /* Space between items */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.timeline-item:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    opacity: 1;
}

/* Year Styling */
.timeline-year {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d4af37; /* Gold for premium style */
    margin-bottom: 15px;
}

/* Circle Styling */
.timeline-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.timeline-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Ensure the image fits perfectly in the circle */
}

/* Text Styling */
.timeline-text {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.5;
    color: #ddd;
    max-width: 200px;
}

/* Scrolling Animation */
@keyframes scroll-timeline {
    0% {
        transform: translateX(0); /* Start from the leftmost point */
    }
    100% {
        transform: translateX(-100%); /* Move completely off-screen to the left */
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .timeline-container {
        height: 300px; /* Adjust height for medium screens */
    }
    .timeline-item {
        min-width: 200px; /* Smaller items */
    }
    .timeline-circle {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .timeline-container {
        height: 200px; /* Adjust height for small screens */
    }
    .timeline-item {
        min-width: 160px;
        margin-right: 30px;
    }
    .timeline-circle {
        width: 80px;
        height: 80px;
    }
    .timeline-text {
        font-size: 0.85rem;
    }
}
