:root {
    --step-active: var(--bs-success);
    --step-done: var(--bs-primary);
    --nav-control-bg: rgba(255, 255, 255, 0.1);
}

.steps-nav-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 50px; /* Espacio para que los botones no tapen las flechas */
    height: 65px;
    background-color: var(--bs-tertiary-bg);
    overflow: hidden;
}

.steps-nav {
    display: flex;
    gap: 4px;
    width: 100%;
    overflow-x: auto; /* IMPORTANTE: permite el scroll interno */
    scrollbar-width: none; /* Oculta la barra en Firefox */
    align-items: center;
    padding: 5px 0;
    scroll-behavior: smooth; /* Hace que el movimiento sea fluido */
}

.steps-nav::-webkit-scrollbar { display: none; }

/* Diseño de Flecha (Chevron) */
.step {
    position: relative;
    flex: 1 0 160px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(92% 0%, 100% 50%, 92% 100%, 0% 100%, 8% 50%, 0% 0%);
    transition: all 0.3s ease;
}

.step-content { text-align: center; }
.step-num { font-size: 0.6rem; font-weight: 800; display: block; text-transform: uppercase; opacity: 0.7; }
.step-name { font-size: 0.8rem; font-weight: 700; display: block; }
.step-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.step.done:hover {
    filter: brightness(1.1);
    cursor: pointer;
}
.step-link, .step-link:hover {
    color: white !important;
}

.step.current { background: var(--step-active) !important; color: white !important; }
.step.done { background: var(--step-done) !important; color: white !important; }

/* --- CONTROLES DE NAVEGACIÓN MEJORADOS --- */
.nav-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(128, 128, 128, 0.3);
    background-color: var(--bs-body-bg); /* Se adapta al modo claro/oscuro */
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
}

.nav-control:hover {
    background-color: var(--bs-primary);
    color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.nav-control i {
    font-size: 1.5rem; /* Icono grande y claro */
    line-height: 0;
}

.nav-control.left { left: 8px; }
.nav-control.right { right: 8px; }

/* Estado deshabilitado: cuando ya no hay desplazamiento posible */
.nav-control:disabled,
.nav-control.is-disabled {
    color: #adb5bd;
    background-color: var(--bs-body-bg);
    border-color: rgba(128, 128, 128, 0.2);
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.nav-control:disabled:hover,
.nav-control.is-disabled:hover {
    background-color: var(--bs-body-bg);
    color: #adb5bd;
    box-shadow: none;
}

/* Ajuste para que el primer y último paso no se peguen a los bordes */
.steps-nav::before, .steps-nav::after {
    content: '';
    flex: 0 0 10px;
}