/* Horizontal Story Timeline - Light Theme */
.story-timeline-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative background elements */
.story-timeline-section::before {
    content: '';
    position: absolute;
    top: 20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.story-timeline-section::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.story-header {
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.story-header .subtitle {
    color: var(--color-primary);
}

.story-title {
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 15px;
}

.story-header p {
    color: #64748b !important;
}

/* Horizontal Timeline Container */
.timeline-horizontal {
    position: relative;
    padding: 60px 0 40px;
}

/* Track (background line) */
.timeline-track {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    z-index: 0;
}

/* Animated progress line */
.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--color-primary), #22d3ee);
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(132, 204, 22, 0.3);
}

.timeline-progress.animated {
    width: 100%;
}

/* Timeline Items Container */
.timeline-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* Individual Node */
.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-node.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Marker (dot on the line) */
.node-marker {
    position: relative;
    width: 24px;
    height: 24px;
    margin-bottom: 16px;
}

.node-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-node:hover .node-dot {
    background: var(--color-primary);
    transform: translate(-50%, -50%) scale(1.2);
}

.node-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0;
}

.timeline-node.visible .node-pulse {
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Year Label */
.node-year {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    background: rgba(132, 204, 22, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* Content Card */
.node-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.node-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

.node-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--color-primary), #22d3ee);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.node-card:hover .node-icon {
    transform: scale(1.1) rotate(5deg);
}

.node-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.node-card p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .timeline-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 24px;
    }

    .timeline-track {
        display: none;
    }

    .timeline-node {
        padding-top: 0;
    }

    .node-marker {
        margin-bottom: 12px;
    }
}

@media screen and (max-width: 640px) {
    .story-timeline-section {
        padding: 60px 0;
    }

    .story-header {
        margin-bottom: 50px;
    }

    .story-title {
        font-size: 2rem;
    }

    .timeline-items {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .timeline-horizontal {
        padding: 20px 0;
    }

    .node-card {
        padding: 20px;
    }

    .node-card h3 {
        font-size: 1.125rem;
    }
}
