/* Contenedor Maestro */
.timeline-main-wrapper {
    position: relative;
    width: 100%;
    padding: 60px 0;
    background: #ffffff;
}

/* Scroll Horizontal */
.timeline-h-wrapper {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    cursor: grab;
    padding: 0 80px;
}

.timeline-h-wrapper:active {
    cursor: grabbing;
}

.timeline-h-wrapper::-webkit-scrollbar { 
    display: none; 
}

.timeline-h-container {
    display: flex;
    padding: 40px 20px 60px;
    min-width: max-content;
    position: relative;
    gap: 60px;
}

/* Línea Central de Tiempo */
.timeline-h-line {
    position: absolute;
    top: 210px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #062D77 0%, #062D77 100%, #E0E0E0 33%, #E0E0E0 100%);
    z-index: 1;
}

/* Item Individual */
.timeline-h-item {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Contenido Superior */
.h-top-content {
    background: #FFFFFF;
    padding: 20px;
    text-align: left;
    min-height: 140px;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.h-date {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #062D77;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.h-top-title {
    font-size: 20px;
    font-weight: 700;
    color: #062D77;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.h-top-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Barra de Progreso */
.h-progress-wrapper {
    width: 100%;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    margin-bottom: 15px;
    overflow: hidden;
}

.h-progress-bar {
    height: 100%;
    background: #062D77;;
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* El Punto/Nodo */
.h-dot {
    width: 24px;
    height: 24px;
    background: #062D77;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #062D77;
    margin-bottom: 30px;
    position: relative;
    z-index: 3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-h-item:hover .h-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px #062D77, 0 4px 12px rgba(19, 35, 253, 0.4);
}

/* Estados del Dot según progreso */
.h-dot.completed {
    background: #062D77;
    box-shadow: 0 0 0 3px #062D77;
}

.h-dot.active {
    background: #062D77;
    box-shadow: 0 0 0 3px #062D77, 0 0 20px rgba(23, 19, 253, 0.5);
    animation: pulse 2s infinite;
}

.h-dot.pending {
    background: #E0E0E0;
    border-color: #fff;
    box-shadow: 0 0 0 3px #E0E0E0;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* La Tarjeta Inferior */
.h-card {
    background: #FFFFFF;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.h-card:hover { 
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.h-card-header {
    height: 6px;
    background: #062D77;
}

.h-card-body {
    padding: 25px;
    text-align: left;
}

.h-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #062D77;
    margin: 0 0 12px 0;
}

.h-card-text {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 15px 0;
}

.h-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 15px;
}

/* Botones de Navegación */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #062D77;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(6, 45, 119, 0.3);
    transition: all 0.3s ease;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover { 
    background: #062D77;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(19, 54, 253, 0.4);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.prev { 
    left: 20px; 
}

.next { 
    right: 20px; 
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-h-wrapper {
        padding: 0 60px;
    }
    
    .timeline-h-item {
        width: 320px;
    }
    
    .timeline-h-container {
        gap: 40px;
    }
    
    .h-top-content {
        min-height: 120px;
        padding: 15px;
    }
    
    .h-card-img {
        height: 160px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}