/* --- Vertical Timeline Specific Styles (KIC Legacy Timeline) --- */

/* Ensure these variables are defined in your :root and mapped in html.light/dark */
/* Example:
:root {
    --timeline-line-color: var(--primary-color);
    --timeline-dot-border-color: var(--secondary-color);
    --timeline-dot-bg-color: var(--card-bg-color);
    --timeline-icon-color: var(--secondary-color);
}
*/

.vertical-timeline-container { 
    position: relative; 
    padding: 2rem 0; 
    margin-top: 3rem; /* From your about-us.html structure (mt-12 Tailwind) */
}

/* The vertical rule line */
.vertical-timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px; /* Desktop position from the left edge of .vertical-timeline-container */
    width: 3px;
    background-color: var(--timeline-line-color, var(--primary-color)); /* Use defined var or fallback */
    transform: translateX(-50%); /* Centers the 3px line on the 20px mark */
    border-radius: 2px;
    z-index: 0; /* Behind dots and content */
}

.timeline-item-vertical {
    position: relative;
    margin-bottom: 3rem; 
    padding-left: 50px; /* Space for the line and dot (20px line + 30px more) */
}
.timeline-item-vertical:last-child { 
    margin-bottom: 0; 
}

.timeline-dot-vertical {
    content: '';
    position: absolute;
    top: 5px; /* Adjust to align with the top of the content or icon */
    left: 20px; /* Aligns with the ::before line */
    transform: translateX(-50%); /* Centers the dot on the line */
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--timeline-dot-bg-color, var(--card-bg-color)); 
    border: 4px solid var(--timeline-dot-border-color, var(--secondary-color)); 
    z-index: 1; /* Above the line, below content if overlapping */
    transition: transform 0.3s ease;
}
.timeline-item-vertical:hover .timeline-dot-vertical { 
    transform: translateX(-50%) scale(1.2); 
}

.timeline-content-wrapper {
    position: relative; /* For z-index if needed over dot/line */
    z-index: 2;
    padding: 1.5rem;
    background-color: var(--card-bg-color); 
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    border: 1px solid color-mix(in srgb, var(--text-main, #000) 10%, transparent); /* From about-us.html */
    /* text-align: left; /* Default for content */
}
html.dark .timeline-content-wrapper {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Darker shadow for dark mode */
    border-color: color-mix(in srgb, var(--text-main, #fff) 10%, transparent);
}

/* NEW: Styles for the icon inside the timeline item */
.kic-timeline-event-icon {
    font-size: 1.75rem; /* Adjust size as needed */
    color: var(--timeline-icon-color, var(--secondary-color)); /* Use variable or theme color */
    margin-bottom: 0.75rem; 
    /* display: block; /* Or inline-block if you want it next to year */
    /* text-align: left; /* Ensure icon aligns left if wrapper is text-align right */
}

.timeline-year-vertical {
    display: block;
    font-size: 1.25rem; /* From your about-us.html */
    font-weight: 700;
    color: var(--primary); /* From your about-us.html (mapped to --primary-color) */
    margin-bottom: 0.5rem;
}

.timeline-item-vertical h4 { /* Matches h4 in your about-us.html */
    font-size: 1.1rem; 
    font-weight: 600; 
    color: var(--primary); /* From your about-us.html (mapped to --primary-color) */
    margin-top: 0; 
    margin-bottom: 0.5rem; 
}

.timeline-item-vertical p { 
    font-size: 0.9rem; 
    color: var(--text-muted); /* From your about-us.html (mapped to --text-muted) */
    line-height: 1.5; 
    margin-bottom: 0; 
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .vertical-timeline-container::before { 
        left: 20px; /* Keep line near left edge */
        transform: translateX(-50%);
    }
    .timeline-item-vertical {
        padding-left: 40px; /* Adjusted space for line and dot */
        padding-right: 0; /* Content takes full available width */
    }
    .timeline-dot-vertical { 
        left: 20px; 
        transform: translateX(-50%);
        top: 8px; /* Adjust if needed */
        width: 18px;
        height: 18px;
        border-width: 3px;
    }
    .timeline-content-wrapper {
        padding: 1rem;
    }
    .kic-timeline-event-icon {
        font-size: 1.5rem; /* Slightly smaller icon on mobile */
    }
    .timeline-year-vertical {
        font-size: 1.1rem;
    }
    .timeline-item-vertical h4 {
        font-size: 1rem;
    }
    .timeline-item-vertical p {
        font-size: 0.85rem;
    }
}

/* CSS for Scroll Animations (should already be in your global main.css) */
/*
.scroll-animate { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: opacity 0.6s ease-out, transform 0.6s ease-out; 
}
.scroll-animate.is-visible { 
    opacity: 1; 
    transform: translateY(0); 
}
*/