/* Generations Timeline - Compact Horizontal */
.generations-story {
    margin-top: 35px;
    position: relative;
    padding: 30px 20px;
    height: 400px;
    width: 100vw;
    max-width: 1000px;
    margin-left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

/* Floating Particles Background */
.gen-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gen-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 8s ease-in-out infinite;
}

@keyframes floatParticle {
    0%, 100% { 
        opacity: 0; 
        transform: translateY(100px) scale(0);
    }
    10% { 
        opacity: 0.6; 
        transform: translateY(80px) scale(1);
    }
    90% { 
        opacity: 0.3; 
        transform: translateY(-100px) scale(0.5);
    }
}

/* Timeline Container */
.gen-timeline-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
}

/* Connecting Line */
.gen-connection-line {
    position: absolute;
    top: calc(50% + 20px);
    left: 120px;
    right: 120px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 1;
}

.gen-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.5);
}

/* Generation Items */
.gen-item {
    position: relative;
    width: 280px;
    z-index: 2;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gen-item.inactive {
    opacity: 0.5;
    transform: scale(0.9);
}

.gen-item.active {
    opacity: 1;
    transform: scale(1);
}

.gen-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gen-item-portrait {
    width: 180px;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 45px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gen-item.active .gen-item-portrait {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
}

.gen-item-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gen-item-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.gen-item-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.gen-item-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 280px;
}

/* Mobile Responsive - Single Item Carousel */
@media (max-width: 768px) {
    .generations-story {
        padding: 30px 20px;
        height: auto;
        min-height: 350px;
    }
    
    .gen-timeline-container {
        position: relative;
        justify-content: center;
        padding: 0;
    }
    
    .gen-item {
        position: absolute;
        width: 280px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }
    
    .gen-item.active {
        position: relative;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto;
        transform: scale(1) !important;
    }
    
    .gen-item.inactive {
        opacity: 0 !important;
        visibility: hidden !important;
        transform: scale(0.9);
    }
    
    .gen-item-portrait {
        width: 140px;
        height: 140px;
        margin-bottom: 20px;
    }
    
    .gen-item-year {
        font-size: 14px;
    }
    
    .gen-item-title {
        font-size: 20px;
    }
    
    .gen-item-desc {
        font-size: 14px;
        max-width: 250px;
    }
    
    .gen-connection-line {
        display: none;
    }
}
