/**
 * Временная шкала по годам - горизонтальный скролл
 */

.timeline-section {
    padding: 60px 0 140px;
    background: var(--bg-primary);
    overflow: hidden;
}

.timeline-section .container {
    max-width: 100%;
    padding: 0 20px;
}

.timeline-scroll-container {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    margin: 40px 0;
    cursor: grab;
    user-select: none;
    
    /* Убираем скроллбар */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.timeline-scroll-container::-webkit-scrollbar {
    display: none;
}

.timeline-scroll-container:active {
    cursor: grabbing;
}

/* Индикатор прокрутки внизу */
.timeline-scroll-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 2px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.timeline-scroll-container:hover::after {
    opacity: 1;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.6);
}

/* Горизонтальная шкала */
.timeline-horizontal {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-width: min-content;
}

/* Карточка года */
.year-card {
    flex: 0 0 auto;
    width: 200px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    user-select: none;
}

.year-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--period-color, var(--border-color));
    transition: height 0.3s ease;
}

.year-card:hover::before {
    height: 8px;
}

.year-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.year-card.has-content {
    border-color: var(--period-color, var(--border-color));
}

.year-card.has-content:hover {
    box-shadow: 
        0 0 30px var(--period-color, var(--accent-primary)),
        0 15px 50px rgba(0, 0, 0, 0.5);
}

.year-card.current-year {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, var(--bg-secondary), rgba(78, 205, 196, 0.1));
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.3);
}

.year-card.birth-year {
    border-color: var(--accent-secondary);
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 107, 107, 0.1));
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

/* Заголовок года */
.year-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.year-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 8px;
    line-height: 1;
}

.year-card.birth-year .year-number {
    color: var(--accent-secondary);
}

.year-card.current-year .year-number {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.year-age {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Период года */
.year-period {
    background: rgba(78, 205, 196, 0.15);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* Статистика года */
.year-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-badge {
    background: var(--bg-tertiary);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.year-card:hover .stat-badge {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.year-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Подсказка */
.timeline-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 25px;
    padding: 18px 25px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 15px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
}

.timeline-hint::before {
    content: '⟷';
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
}

/* Прокрутка с анимацией */
.timeline-horizontal {
    scroll-behavior: smooth;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .timeline-horizontal {
        gap: 18px;
    }
    
    .year-card {
        width: 180px;
        padding: 22px;
    }
}

@media (max-width: 768px) {
    .timeline-section {
        padding: 40px 0 120px;
    }
    
    .timeline-scroll-container {
        padding: 15px 0;
        margin: 30px 0;
    }
    
    .timeline-horizontal {
        gap: 15px;
        padding: 15px 10px;
    }
    
    .year-card {
        width: 140px;
        padding: 18px;
    }
    
    .year-number {
        font-size: 1.8rem;
    }
    
    .year-age {
        font-size: 0.85rem;
    }
    
    .year-period {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .stat-badge {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    
    .timeline-hint {
        font-size: 0.85rem;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .timeline-scroll-container {
        padding: 10px 0;
        margin: 20px 0;
    }
    
    .timeline-horizontal {
        gap: 12px;
        padding: 12px 8px;
    }
    
    .year-card {
        width: 120px;
        padding: 15px;
    }
    
    .year-number {
        font-size: 1.6rem;
    }
    
    .year-age {
        font-size: 0.75rem;
    }
    
    .year-period {
        font-size: 0.7rem;
        padding: 5px 8px;
        margin-bottom: 10px;
    }
    
    .stat-badge {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
    
    .timeline-hint {
        font-size: 0.8rem;
        padding: 10px;
    }
    
    .timeline-hint::before {
        font-size: 1rem;
    }
}

@media (max-width: 320px) {
    .timeline-horizontal {
        gap: 10px;
        padding: 10px 5px;
    }
    
    .year-card {
        width: 100px;
        padding: 12px;
    }
    
    .year-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .year-number {
        font-size: 1.4rem;
    }
    
    .year-age {
        font-size: 0.7rem;
    }
    
    .year-period {
        font-size: 0.65rem;
        padding: 4px 6px;
        margin-bottom: 8px;
    }
    
    .stat-badge {
        font-size: 0.65rem;
        padding: 3px 5px;
        gap: 3px;
    }
    
    .year-empty {
        padding: 15px;
        font-size: 1.2rem;
    }
}

/* Большие экраны */
@media (min-width: 2000px) {
    .timeline-horizontal {
        gap: 30px;
        padding: 30px;
    }
    
    .year-card {
        width: 260px;
        padding: 35px;
    }
    
    .year-number {
        font-size: 3rem;
    }
    
    .year-age {
        font-size: 1.1rem;
    }
    
    .year-period {
        font-size: 1rem;
        padding: 10px 15px;
    }
    
    .stat-badge {
        font-size: 1rem;
        padding: 8px 12px;
    }
    
    .timeline-hint {
        font-size: 1.1rem;
    }
}

@media (min-width: 3000px) {
    .year-card {
        width: 300px;
        padding: 40px;
    }
    
    .year-number {
        font-size: 3.5rem;
    }
}

@media (min-width: 5000px) {
    .year-card {
        width: 350px;
        padding: 50px;
    }
    
    .year-number {
        font-size: 4rem;
    }
    
    .year-age {
        font-size: 1.5rem;
    }
}

