/* Contenedor Maestro */
.timeline-main-wrapper {
    position: relative;
    width: 100%;
    padding: 48px 0 64px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 55%);
}

/* Scroll Horizontal */
.timeline-h-wrapper {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #9bb3d9 #eaf0fb;
    cursor: grab;
    padding: 0 80px;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 80px;
}

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

.timeline-h-wrapper::-webkit-scrollbar {
    height: 8px;
}

.timeline-h-wrapper::-webkit-scrollbar-thumb {
    background: #9bb3d9;
    border-radius: 10px;
}

.timeline-h-wrapper::-webkit-scrollbar-track {
    background: #eaf0fb;
    border-radius: 10px;
}

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

/* Línea Central de Tiempo */
.timeline-h-line {
    position: absolute;
    top: 176px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #d6e2f6 0%, #7ea0d8 40%, #062d77 100%);
    border-radius: 999px;
    z-index: 1;
}

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

/* Contenido Superior */
.h-top-content {
    background: #f4f8ff;
    padding: 18px;
    text-align: left;
    min-height: 122px;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(6, 45, 119, 0.08);
    border: 1px solid #dce7f8;
}

.h-date {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #062D77;
    margin-bottom: 6px;
    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: #3f5d89;
    line-height: 1.45;
    margin: 0;
    text-transform: capitalize;
}

/* 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: 22px;
    height: 22px;
    background: #062D77;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #9ab4de;
    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.12);
    box-shadow: 0 0 0 5px #062d77, 0 4px 16px rgba(6, 45, 119, 0.38);
}

/* 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 10px 28px rgba(16, 42, 87, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dce7f8;
}

.h-card:hover { 
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(16, 42, 87, 0.16);
}

.h-card-header {
    height: 8px;
    background: linear-gradient(90deg, #062d77 0%, #1e4e9e 55%, #36A415 100%);
}

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

.timeline-main-wrapper .heading-title {
    color: #062d77;
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.timeline-main-wrapper .heading-text {
    color: #455f85;
    line-height: 1.7;
}

.timeline-main-wrapper .heading-text.small {
    font-size: 14px;
}

.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: 190px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 14px;
    border: 1px solid #d7e4f7;
}

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

.nav-btn:hover { 
    background: #003b99;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 24px rgba(9, 52, 134, 0.36);
}

.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 46px;
        scroll-padding-left: 46px;
    }
    
    .timeline-h-item {
        width: 290px;
    }
    
    .timeline-h-container {
        gap: 28px;
    }

    .timeline-h-line {
        top: 166px;
    }
    
    .h-top-content {
        min-height: 112px;
        padding: 14px;
    }

    .timeline-main-wrapper .heading-title {
        font-size: 20px;
    }

    .timeline-main-wrapper .heading-text.small {
        font-size: 13px;
    }
    
    .h-card-img {
        height: 150px;
    }
    
    .nav-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .prev {
        left: 6px;
    }

    .next {
        right: 6px;
    }
}
