/* =================================================================
   ARQUIVO: css/timeline.css (NOVO DESIGN RESPONSIVO)
   ================================================================= */

/* HERO DA PÁGINA DE TIMELINE */
.timeline-hero {
    padding: 6rem 5%;
    text-align: center;
    background: var(--card-bg);
    color: var(--white);
}

.timeline-hero h1 {
    color: var(--white);
    font-size: 2.8rem;
}

.timeline-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 1rem auto 0 auto;
    opacity: 0.9;
}

/* CONTAINER PRINCIPAL DA LINHA DO TEMPO */
#timeline-section {
    background-color: var(--light-gray);
    padding: 5rem 5%;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* A LINHA CENTRAL */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #e2e8f0; /* Cor mais suave para a linha */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

/* CADA EVENTO NA LINHA DO TEMPO */
.timeline-event {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    margin: 20px 0;
}

/* PONTO NA LINHA DO TEMPO */
.event-point {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--light-gray);
    border: 4px solid var(--accent-color);
    top: 32px; /* Alinhado com o ícone */
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition);
}

/* POSICIONAMENTO DOS EVENTOS (ESQUERDA/DIREITA) */
.timeline-event:nth-child(odd) {
    left: 0;
}

.timeline-event:nth-child(even) {
    left: 50%;
}

/* Ponto na linha para eventos da esquerda */
.timeline-event:nth-child(odd) .event-point {
    right: -10px;
}

/* Ponto na linha para eventos da direita */
.timeline-event:nth-child(even) .event-point {
    left: -10px;
}

/* CARD DO EVENTO */
.event-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.timeline-event:hover .event-card {
    transform: translateY(-5px) scale(1.02);
    border-left-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.timeline-event:hover .event-point {
    transform: scale(1.2);
    background-color: var(--accent-color);
}

.event-year {
    position: absolute;
    top: -20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}
.timeline-event:nth-child(odd) .event-year { right: 24px; }
.timeline-event:nth-child(even) .event-year { left: 24px; }


.event-icon {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-top: 5px;
    background-color: var(--light-gray);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-details {
    flex-grow: 1;
}

.event-card h3 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
}

.event-card p {
    margin: 0;
    line-height: 1.6;
    color: var(--dark-gray);
}


/* RESPONSIVIDADE (VERSÃO CORRIGIDA E MELHORADA) */
@media (max-width: 900px) {
    .hero-content{
        grid-template-columns: 1fr;
    }


    /* A linha do tempo passa para a esquerda */
    .timeline-container::after {
        left: 31px;
    }
    
    /* Todos os eventos ocupam 100% da largura e ficam à direita da linha */
    .timeline-event,
    .timeline-event:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    /* O ponto fica fixo na linha para todos os eventos */
    .event-point,
    .timeline-event:nth-child(odd) .event-point,
    .timeline-event:nth-child(even) .event-point {
        left: 21px;
    }

    /* O ano fica sempre na mesma posição dentro do card */
    .event-year {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin-bottom: 1rem;
        align-self: flex-start; /* Garante que fique no início */
        display: inline-block;
    }
    .event-card {
        flex-direction: column; /* Empilha os elementos do card */
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .timeline-hero h1 { font-size: 2.2rem; }
    .timeline-hero p { font-size: 1rem; }
    .timeline-container::after { left: 21px; }
    .timeline-event { padding-left: 55px; padding-right: 10px; }
    .event-point { left: 11px; }
}