.history-section {
    padding: 0; /* Spacing controlled by .section-shell */
    background: #f8fbff; /* Continues from About section */
    position: relative;
    overflow: hidden;
}

.centered-title {
    text-align: center;
    color: #6B2C91; /* Purple from design */
    margin-bottom: 60px;
    font-size: 2.5rem;
    font-weight: 800;
}

.timeline-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    gap: 20px;
    padding-bottom: 40px;
}

/* The Horizontal Line */
.timeline-line {
    position: absolute;
    top: 50%; 
    left: 10%;
    width: 80%;
    height: 4px;
    background: #e2e8f0;
    z-index: 0;
    border-radius: 4px;
    transform: translateY(-50%);
}

.timeline-item {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}

.timeline-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 40px; /* Space for the dot */
    transition: transform 0.3s ease;
    border: 1px solid #fff;
    width: 100%;
    box-sizing: border-box;
}

.timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: #f0f0f0;
}

.timeline-img {
    width: 100%;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #eee;
}

.timeline-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.timeline-card:hover .timeline-img img {
    transform: scale(1.05);
}

.timeline-content p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.year-badge {
    display: inline-block;
    color: #4299E1; /* Blue Accent */
    font-weight: 800;
    margin-bottom: 10px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* The Dots */
.timeline-dot {
    width: 24px;
    height: 24px;
    background: white;
    border: 5px solid #4299E1;
    border-radius: 50%;
    position: absolute;
    bottom: 0; /* Aligns dot to the line (roughly) */
    /* Since flex direction is column, bottom 0 is bottom of container */
    /* We need to position it relative to the timeline line */
    top: 50%; 
    margin-top: -12px; /* Half height to center */
    transition: background 0.3s, transform 0.3s;
    box-shadow: 0 0 0 4px #f8fbff; /* Fake spacing from line */
}

/* Adjust layout so dots sit on the line properly */
.timeline-item {
    justify-content: flex-start; /* Cards at top */
    padding-bottom: 60px; /* Space for line */
}

.timeline-dot {
    top: auto;
    bottom: 28px; /* Fine tuned to hit the line */
    margin-top: 0;
}

/* Hover effects */
.timeline-item:hover .timeline-dot {
    background: #4299E1;
    transform: scale(1.2);
}

/* The Red Wavy Loop at bottom */
.fun-separator {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 120px;
    pointer-events: none;
    z-index: 0;
    transform: rotate(-2deg);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .timeline-wrapper {
        flex-direction: column;
        gap: 0;
    }
    
    .timeline-line {
        width: 4px;
        height: 100%;
        left: 20px; /* Align to left side */
        top: 0;
        transform: none;
    }

    .timeline-item {
        flex-direction: row; /* Horizontal card + dot */
        align-items: flex-start;
        text-align: left;
        padding-left: 50px; /* Space for line */
        padding-bottom: 40px;
        margin-bottom: 0;
    }

    .timeline-dot {
        left: 8px; /* Center on line (20px left + 4px width/2) */
        bottom: auto;
        top: 20px; /* Top align with card */
    }

    .timeline-card {
        text-align: left;
        margin-bottom: 0;
    }
    
    .timeline-card:hover {
        transform: translateX(5px);
    }
}