/* ===============================================
   TIMELINE ITINERARIO
   Línea temporal interactiva y didáctica
   =============================================== */

/* ===== TIMELINE CONTAINER ===== */
.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
}

.timeline {
    position: relative;
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

/* Línea central de la timeline */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        rgba(108, 23, 57, 0.3) 0%, 
        rgba(108, 23, 57, 0.8) 50%, 
        rgba(108, 23, 57, 0.3) 100%);
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 1;
    display: none;
}

/* ===== TIMELINE ITEMS ===== */
.timeline-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
    flex-direction: row;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===== TIMELINE MARKER ===== */
.timeline-marker {
    position: relative;
    z-index: 10;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6C1739, #8a1f4a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(108, 23, 57, 0.3);
    border: 4px solid #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-right: 20px;
    flex-shrink: 0;
}

.timeline-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(108, 23, 57, 0.4);
}

.marker-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 20px;
    z-index: 2;
}

.marker-number {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 25px;
    height: 25px;
    background: #fff;
    border: 2px solid #6C1739;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6C1739;
    font-size: 12px;
    z-index: 3;
}

/* ===== TIMELINE CONTENT ===== */
.timeline-content {
    flex: 1;
    max-width: none;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 0;
    position: relative;
    transition: all 0.3s ease;
    border-left: 4px solid #6C1739;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(108, 23, 57, 0.15);
}

.timeline-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(108, 23, 57, 0.1);
}

.timeline-header h3 {
    color: #6C1739;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    font-family: var(--font-secondary);
}

.timeline-header h4 {
    color: #2c2c2c;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    font-family: var(--font-primary);
}

.timeline-body p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ===== TIMELINE FEATURES ===== */
.timeline-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature {
    background: rgba(108, 23, 57, 0.1);
    color: #6C1739;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(108, 23, 57, 0.2);
    transform: translateY(-2px);
}

.feature i {
    font-size: 12px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 768px) {
    .timeline {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    
    .timeline::before {
        display: block;
        left: 30px;
        width: 3px;
    }
    
    .timeline-container {
        padding: 40px 15px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        margin-bottom: 60px;
    }
    
    .timeline-marker {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        margin-right: 0;
    }
    
    .marker-icon {
        font-size: 20px;
    }
    
    .marker-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
        bottom: -6px;
        right: -6px;
    }
    
    .timeline-content {
        margin-left: 30px;
        margin-right: 0;
        max-width: none;
        padding: 25px;
        height: auto;
    }
    
    .timeline-header h3 {
        font-size: 16px;
    }
    
    .timeline-header h4 {
        font-size: 20px;
    }
    
    .timeline-body p {
        font-size: 15px;
    }
    
    .feature {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .timeline {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    
    .timeline::before {
        display: block;
        left: 25px;
        width: 2px;
    }
    
    .timeline-container {
        padding: 30px 10px;
    }
    
    .timeline-item {
        margin-bottom: 50px;
    }
    
    .timeline-marker {
        width: 50px;
        height: 50px;
        margin-right: 0;
    }
    
    .marker-icon {
        font-size: 18px;
    }
    
    .marker-number {
        width: 22px;
        height: 22px;
        font-size: 11px;
        bottom: -5px;
        right: -5px;
    }
    
    .timeline-content {
        margin-left: 25px;
        padding: 20px;
        height: auto;
    }
    
    .timeline-header h3 {
        font-size: 14px;
    }
    
    .timeline-header h4 {
        font-size: 18px;
    }
    
    .timeline-body p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .timeline-features {
        gap: 8px;
    }
    
    .feature {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .feature i {
        font-size: 10px;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes timelineFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item.animate {
    animation: timelineFadeIn 0.6s ease-out forwards;
}

/* ===== ESTADOS INTERACTIVOS ===== */
.timeline-item.active .timeline-marker {
    background: linear-gradient(135deg, #8a1f4a, #6C1739);
    transform: scale(1.15);
}

.timeline-item.active .timeline-content {
    border-left-color: #8a1f4a;
    box-shadow: 0 20px 50px rgba(108, 23, 57, 0.2);
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    .timeline-item {
        transition: none;
    }
    
    .timeline-marker {
        transition: none;
    }
    
    .timeline-content {
        transition: none;
    }
    
    .feature {
        transition: none;
    }
}

/* ===== FOCUS STATES ===== */
.timeline-marker:focus {
    outline: 3px solid rgba(108, 23, 57, 0.5);
    outline-offset: 2px;
}

.timeline-content:focus {
    outline: 2px solid rgba(108, 23, 57, 0.3);
    outline-offset: 2px;
}
