.timeline-section {
    padding: 80px 0;
    background: light-dark(linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%), linear-gradient(135deg, #2c2c2c 0%, #3a3a3a 100%));
    position: relative;
    overflow: hidden;
    color: light-dark(#2c2c2c, #e0e0e0);
}

.timeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: light-dark(
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23000" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="%23000" opacity="0.02"/><circle cx="50" cy="10" r="1" fill="%23000" opacity="0.02"/><circle cx="10" cy="90" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23fff" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="%23fff" opacity="0.05"/><circle cx="50" cy="10" r="1" fill="%23fff" opacity="0.05"/><circle cx="10" cy="90" r="1" fill="%23fff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>')
    );
    pointer-events: none;
}

@media (prefers-color-scheme: dark) {
    .timeline-section {
        background: linear-gradient(135deg, #1f1e1e 0%, #3a3a3a 100%);
        color: #e0e0e0;
    }
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.timeline-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: light-dark(#2c3e50, #ecf0f1);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.timeline-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FF8C00);
    border-radius: 2px;
}

.timeline-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: light-dark(#7f8c8d, #bdc3c7);
    margin-bottom: 60px;
    font-weight: 300;
}

@media (prefers-color-scheme: dark) {
    .timeline-title {
        color: #ecf0f1;
    }
    
    .timeline-subtitle {
        color: #bdc3c7;
    }
}

.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #FFD700 0%, #FF8C00 50%, #DC143C 100%);
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

.timeline-item {
    position: relative;
    margin: 60px 0;
    /* REMOVIDO: opacity: 0; transform: translateY(50px); transition */
    opacity: 1;
    transform: translateY(0);
}

/* REMOVIDO: .timeline-item.animate (não é mais necessário) */

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: calc(50% + 40px);
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: calc(50% + 40px);
    margin-right: 0;
    text-align: left;
}

/* Marcadores com cores intercaladas */
.timeline-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 4px solid #FFD700;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
}

.timeline-item:nth-child(3n+1) .timeline-marker {
    border-color: #FFD700;
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
}

.timeline-item:nth-child(3n+2) .timeline-marker {
    border-color: #FF8C00;
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7);
}

.timeline-item:nth-child(3n+3) .timeline-marker {
    border-color: #DC143C;
    box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.7);
}

.timeline-marker:hover {
    transform: translateX(-50%) scale(1.2);
    animation: pulse 2s infinite;
}

.timeline-item:nth-child(3n+1) .timeline-marker:hover {
    border-color: #DAA520;
    animation: pulse-gold 2s infinite;
}

.timeline-item:nth-child(3n+2) .timeline-marker:hover {
    border-color: #FF7F00;
    animation: pulse-orange 2s infinite;
}

.timeline-item:nth-child(3n+3) .timeline-marker:hover {
    border-color: #B22234;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 140, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0);
    }
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 20, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.timeline-content {
    background: light-dark(#fff, #2c3e50);
    padding: 30px;
    border-radius: 15px;
    box-shadow: light-dark(
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.3)
    );
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid light-dark(#e9ecef, #34495e);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: light-dark(
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 20px 40px rgba(0, 0, 0, 0.4)
    );
}

/* Cores das bordas hover intercaladas */
.timeline-item:nth-child(3n+1) .timeline-content:hover {
    border-color: #FFD700;
}

.timeline-item:nth-child(3n+2) .timeline-content:hover {
    border-color: #FF8C00;
}

.timeline-item:nth-child(3n+3) .timeline-content:hover {
    border-color: #DC143C;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -30px;
    border-left-color: light-dark(#fff, #2c3e50);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -30px;
    border-right-color: light-dark(#fff, #2c3e50);
}

@media (prefers-color-scheme: dark) {
    .timeline-content {
        background: #2c3e50;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border-color: #34495e;
    }
    
    .timeline-content:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before {
        border-left-color: #2c3e50;
    }
    
    .timeline-item:nth-child(even) .timeline-content::before {
        border-right-color: #2c3e50;
    }
}

/* Anos com cores intercaladas */
.timeline-item:nth-child(3n+1) .timeline-year {
    color: #FFD700;
}

.timeline-item:nth-child(3n+2) .timeline-year {
    color: #FF8C00;
}

.timeline-item:nth-child(3n+3) .timeline-year {
    color: #DC143C;
}

/* Garantir que o ano seja sempre visível */
.timeline-year {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 1 !important;
    visibility: visible !important;
}

.timeline-year::before {
    content: '';
    width: 30px;
    height: 3px;
    border-radius: 2px;
}

.timeline-item:nth-child(3n+1) .timeline-year::before {
    background: #FFD700;
}

.timeline-item:nth-child(3n+2) .timeline-year::before {
    background: #FF8C00;
}

.timeline-item:nth-child(3n+3) .timeline-year::before {
    background: #DC143C;
}

.timeline-item:nth-child(odd) .timeline-year {
    justify-content: flex-end;
}

.timeline-item:nth-child(odd) .timeline-year::before {
    order: 2;
}

.timeline-title-event {
    font-size: 1.4rem;
    font-weight: 600;
    color: light-dark(#2c3e50, #ecf0f1);
    margin-bottom: 15px;
    line-height: 1.3;
}

.timeline-description {
    color: light-dark(#7f8c8d, #bdc3c7);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    color: light-dark(#5a6c7d, #95a5a6);
    font-size: 0.95rem;
    line-height: 1.6;
}

.timeline-details.expanded {
    max-height: 500px;
    padding-top: 15px;
    border-top: 1px solid light-dark(#e9ecef, #34495e);
}

@media (prefers-color-scheme: dark) {
    .timeline-title-event {
        color: #ecf0f1;
    }
    
    .timeline-description {
        color: #bdc3c7;
    }
    
    .timeline-details {
        color: #95a5a6;
    }
    
    .timeline-details.expanded {
        border-top-color: #34495e;
    }
}

.timeline-image {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: light-dark(
        0 5px 15px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.3)
    );
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-image:hover {
    transform: scale(1.05);
    box-shadow: light-dark(
        0 10px 25px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.4)
    );
}

@media (prefers-color-scheme: dark) {
    .timeline-image {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    .timeline-image:hover {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    }
}

.expand-btn {
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Botões com cores intercaladas */
.timeline-item:nth-child(3n+1) .expand-btn {
    background: linear-gradient(135deg, #FFD700, #DAA520);
}

.timeline-item:nth-child(3n+2) .expand-btn {
    background: linear-gradient(135deg, #FF8C00, #FF7F00);
}

.timeline-item:nth-child(3n+3) .expand-btn {
    background: linear-gradient(135deg, #DC143C, #B22234);
}

.timeline-item:nth-child(3n+1) .expand-btn:hover {
    background: linear-gradient(135deg, #DAA520, #B8860B);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.timeline-item:nth-child(3n+2) .expand-btn:hover {
    background: linear-gradient(135deg, #FF7F00, #FF6347);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

.timeline-item:nth-child(3n+3) .expand-btn:hover {
    background: linear-gradient(135deg, #B22234, #8B0000);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 20, 60, 0.3);
}

.expand-btn i {
    transition: transform 0.3s ease;
}

.expand-btn.expanded i {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .timeline-section {
        padding: 60px 0;
    }
    
    .timeline::before {
        left: 20px;
        width: 3px;
    }
    
    .timeline-item {
        margin: 40px 0;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 50px;
        margin-right: 0;
        text-align: left;
        padding: 20px;
    }
    
    .timeline-marker {
        left: 20px;
        width: 16px;
        height: 16px;
        top: 15px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -15px;
        right: auto;
        border-right-color: light-dark(#fff, #2c3e50);
        border-left-color: transparent;
        border-width: 10px;
        top: 15px;
    }
    
    .timeline-item:nth-child(odd) .timeline-year {
        justify-content: flex-start;
    }
    
    .timeline-item:nth-child(odd) .timeline-year::before {
        order: 1;
    }
    
    .timeline-title {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    
    .timeline-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
        padding: 0 10px;
    }
    
    .timeline-container {
        padding: 0 15px;
    }
    
    .timeline-year {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .timeline-year::before {
        width: 20px;
        height: 2px;
    }
    
    .timeline-title-event {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .timeline-description {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .timeline-image {
        max-width: 100%;
        height: 150px;
        margin: 10px 0;
    }
    
    @media (prefers-color-scheme: dark) {
        .timeline-item:nth-child(odd) .timeline-content::before,
        .timeline-item:nth-child(even) .timeline-content::before {
            border-right-color: #2c3e50;
        }
    }
}

@media (max-width: 480px) {
    .timeline-section {
        padding: 60px 0;
    }
    
    .timeline-title {
        font-size: 1.8rem;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-year {
        font-size: 1.6rem;
    }
    
    .timeline-title-event {
        font-size: 1.2rem;
    }
}