/* timeline-new.css */

:root {
    --card-bg: #ffffff;
    --text-color: #333333;
    --accent-color: #800000;
    --gold-color: #D4AF37;
    --card-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.8s;
}

/* Section Styling */
.section-timeline-new {
    position: relative;
    padding: 60px 0;
    /* Reduced from 120px to 60px */
    width: 100%;
    /* Removed min-height: 100vh to reduce excess space if content is shorter */
    transition: background-color var(--transition-speed) ease;
    overflow: hidden;

    /* Film Strip / Cinematic Side Patterns */
    background-image:
        linear-gradient(90deg, transparent 0%, transparent 49%, rgba(0, 0, 0, 0.02) 50%, transparent 51%),
        radial-gradient(circle at 20px 50%, rgba(128, 0, 0, 0.03) 2px, transparent 2.5px),
        radial-gradient(circle at calc(100% - 20px) 50%, rgba(128, 0, 0, 0.03) 2px, transparent 2.5px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-position: center, left top, right top;
    background-repeat: no-repeat, repeat-y, repeat-y;
}

.timeline-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Reinforce horizontal centering */
    justify-content: center;
    text-align: center;
    margin-bottom: 60px;
    /* Reduced from 100px */
    position: relative;
    z-index: 2;
    width: 100%;
}

.timeline-header h2 {
    font-size: 3.5rem;
    font-family: var(--font-serif, 'Lora', serif);
    color: var(--accent-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    text-align: center;
}

/* Decorative line under header */
.timeline-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold-color);
    margin: 15px auto 0;
}

.timeline-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
    text-align: center;
}

/* Stack Container */
.timeline-stack-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 80px;
    /* Reduced padding bottom */
}

/* Central Line */
.timeline-stack-container::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
    /* Adjusted top */
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
            rgba(128, 0, 0, 0.1) 0%,
            rgba(128, 0, 0, 0.3) 20%,
            rgba(128, 0, 0, 0.3) 80%,
            rgba(128, 0, 0, 0.1) 100%);
    z-index: 0;
}

/* Timeline Card */
.timeline-card {
    position: sticky;
    top: 150px;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 80px;
    box-shadow: var(--card-shadow);
    display: flex;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
    opacity: 0;
    transform: translateY(80px) scale(0.9);
    border: 1px solid rgba(0, 0, 0, 0.03);
    z-index: 1;
}

.timeline-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Hover Effect (Matches Publications) */
.timeline-card:hover {
    transform: translateY(-8px) scale(1);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
    /* Slightly stronger for depth */
    border-color: rgba(128, 0, 0, 0.15);
    z-index: 10;
    /* Bring to front on hover if needed */
}

/* Card Strip (Left Accent) */
.timeline-card::before {
    content: '';
    width: 6px;
    background: var(--accent-color);
    flex-shrink: 0;
}

.timeline-card-inner {
    display: flex;
    width: 100%;
    padding: 40px;
    gap: 40px;
    align-items: center;
}

/* Card Content styling */
.card-year {
    font-family: var(--font-primary, 'Outfit', sans-serif);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.06);
    line-height: 1;
    min-width: 160px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Year Overlay text */
.card-year span {
    position: absolute;
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 700;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card-body {
    flex: 1;
    padding-left: 30px;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #222;
    font-family: var(--font-serif);
    transition: color 0.3s ease;
}

.timeline-card:hover .card-title {
    color: var(--accent-color);
}

.card-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .section-timeline-new {
        padding: 20px 0;
    }

    .timeline-header {
        margin-bottom: 30px;
    }

    .timeline-header h2 {
        font-size: 2.5rem;
    }

    .timeline-stack-container::before {
        display: none;
    }

    .timeline-card {
        margin-bottom: 40px;
    }

    .timeline-card-inner {
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        text-align: center;
    }

    .card-body {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding-top: 20px;
    }

    .card-title {
        font-size: 1.5rem;
    }
}