/* Timeline Styles for OCDE Peru Portal */

.timeline-container {
    position: relative;
    padding: 60px 0;
    overflow: hidden;
}

/* Línea base del timeline */
.timeline-base-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
    z-index: 1;
}

/* Línea de progreso */
.timeline-progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    background: #C8102E;
    transform: translateY(-50%);
    transition: width 0.5s ease;
    z-index: 2;
    width: 0%;
}

/* Timeline Swiper Container */
.timelineSwiper {
    padding: 20px 0 80px;
    overflow: visible !important;
    height: 400px;
    width: 100%;
}

.timelineSwiper .swiper-wrapper {
    align-items: center;
}

/* Timeline items */
.timeline-item {
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0.6;
    transform: scale(0.9);
    padding: 0 10px;
}

.timeline-item.active {
    opacity: 1;
    transform: scale(1);
}

.timeline-item.completed {
    opacity: 1;
}

/* Año */
.timeline-year {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.timeline-item.active .timeline-year {
    color: #C8102E;
    font-size: 1.5rem;
}

/* Punto/círculo del timeline */
.timeline-dot {
    width: 48px;
    height: 48px;
    background: #fff;
    border: 3px solid #e5e7eb;
    border-radius: 50%;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.timeline-dot.completed {
    background: #C8102E;
    border-color: #C8102E;
    color: white;
}

.timeline-dot.completed::after {
    content: '✓';
    color: white;
    font-weight: bold;
}

.timeline-dot.active {
    background: #fff;
    border-color: #C8102E;
    border-width: 4px;
    width: 56px;
    height: 56px;
    animation: pulse 2s infinite;
}

.timeline-dot.active::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #C8102E;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(200, 16, 46, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(200, 16, 46, 0);
    }
}

/* Título del hito */
.timeline-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item.active .timeline-title {
    color: #C8102E;
    font-size: 1.125rem;
}

/* Contenido/descripción */
.timeline-content {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    max-width: 200px;
    margin: 0 auto;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.timeline-item.active .timeline-content {
    opacity: 1;
    max-height: 200px;
    margin-top: 0.5rem;
}

/* Navigation arrows */
.timeline-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #e5e7eb;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.timeline-nav:not(.opacity-50):hover {
    background: #C8102E;
    border-color: #C8102E;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.timeline-nav.opacity-50 {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
}

.timeline-nav.opacity-50:hover {
    transform: translateY(-50%);
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: inherit;
}

.timeline-nav.prev {
    left: 20px;
}

.timeline-nav.next {
    right: 20px;
}

.timeline-nav svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-container {
        padding: 40px 0;
    }

    .timeline-item {
        padding: 0 5px;
    }

    .timeline-year {
        font-size: 1rem;
    }

    .timeline-item.active .timeline-year {
        font-size: 1.125rem;
    }

    .timeline-dot {
        width: 40px;
        height: 40px;
    }

    .timeline-dot.active {
        width: 48px;
        height: 48px;
    }

    .timeline-title {
        font-size: 0.875rem;
        min-height: 40px;
    }

    .timeline-content {
        font-size: 0.75rem;
        max-width: 150px;
    }

    .timeline-nav {
        width: 40px;
        height: 40px;
    }

    .timeline-nav.prev {
        left: 10px;
    }

    .timeline-nav.next {
        right: 10px;
    }
}

/* Swiper pagination bullets */
.timeline-pagination {
    bottom: 20px !important;
}

.timeline-pagination .swiper-pagination-bullet {
    background: #e5e7eb;
    opacity: 1;
    width: 8px;
    height: 8px;
    margin: 0 4px !important;
}

.timeline-pagination .swiper-pagination-bullet-active {
    background: #C8102E;
    width: 24px;
    border-radius: 4px;
}

/* Section title */
.timeline-section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.timeline-section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.timeline-section-title p {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}