/**
 * Timeline Component
 * Componente de linha do tempo para exibir histórico e eventos
 */

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--gradient-secondary);
    transform: translateX(-50%);
    border-radius: var(--border-radius-full);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    margin-right: 4rem;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 4rem;
    margin-right: auto;
}

.timeline-marker {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background-color: var(--card-background);
    border-radius: var(--border-radius-full);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border: 4px solid var(--secondary);
    transition: all var(--transition-normal);
}

.timeline-item:hover .timeline-marker {
    transform: translateX(-50%) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.timeline-year {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--secondary);
}

.timeline-content {
    width: calc(50% - 4rem);
    background-color: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -15px;
    border-width: 15px 0 15px 15px;
    border-color: transparent transparent transparent var(--border-color);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -15px;
    border-width: 15px 15px 15px 0;
    border-color: transparent var(--border-color) transparent transparent;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.timeline-content h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.timeline-icon {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--secondary);
}

/* Versão vertical para mobile */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
        margin-right: 0;
        text-align: left;
    }

    .timeline-marker {
        left: 30px;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
    }

    .timeline-item:hover .timeline-marker {
        transform: translateX(-50%) scale(1.1);
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -15px;
        right: auto;
        border-width: 15px 15px 15px 0;
        border-color: transparent var(--border-color) transparent transparent;
    }

    .timeline-year {
        font-size: var(--font-size-base);
    }
}

@media (max-width: 576px) {
    .timeline-content {
        padding: 1.5rem;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
    }

    .timeline-year {
        font-size: var(--font-size-sm);
    }

    .timeline-content h3 {
        font-size: var(--font-size-lg);
    }
}

/* Tema escuro */
[data-theme="dark"] .timeline-content {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .timeline-item:nth-child(odd) .timeline-content::before {
    border-color: transparent transparent transparent var(--gray-700);
}

[data-theme="dark"] .timeline-item:nth-child(even) .timeline-content::before {
    border-color: transparent var(--gray-700) transparent transparent;
}

[data-theme="dark"] .timeline-marker {
    background-color: var(--gray-800);
}

[data-theme="dark"] .timeline-content h3 {
    color: var(--light);
}

[data-theme="dark"] .timeline-content p {
    color: var(--gray-300);
}

/* Animações */
.timeline-item.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.timeline-item.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
} 