/* ============================================
   PROGRESS BAR MODERNIZADO - EDUTEKA
   ============================================ */

/* Barra de progreso principal */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-fixed);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress.active {
    transform: translateX(0);
}

/* Barra de scroll moderna */
.scroll-line {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transition: width 0.1s linear;
    z-index: var(--z-fixed);
    box-shadow: 0 2px 8px rgba(68, 40, 132, 0.3);
    border-radius: 0 0 2px 0;
}

/* Variantes de progreso */
.progress-bar {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transition: width 0.6s ease;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Animación shimmer */
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Progreso circular */
.progress-circle {
    position: relative;
    width: 60px;
    height: 60px;
}

.progress-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-circle .progress-circle-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 4;
}

.progress-circle .progress-circle-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 188.5;
    stroke-dashoffset: 188.5;
    transition: stroke-dashoffset 0.6s ease;
}

/* Indicador de carga */
.loading-indicator {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.loading-indicator::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary);
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Progreso paso a paso */
.step-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.step-progress .step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-progress .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: var(--gray-300);
    z-index: 1;
}

.step-progress .step.completed:not(:last-child)::after {
    background: var(--primary);
}

.step-progress .step-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-progress .step.completed .step-indicator {
    background: var(--primary);
}

.step-progress .step.active .step-indicator {
    background: var(--secondary);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(120, 84, 203, 0.2);
}

.step-progress .step-label {
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-600);
    text-align: center;
}

.step-progress .step.completed .step-label {
    color: var(--primary);
    font-weight: 600;
}

/* Barra de progreso con etiqueta */
.progress-with-label {
    position: relative;
    margin-bottom: 1rem;
}

.progress-with-label .progress {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: var(--gray-200);
    overflow: hidden;
}

.progress-with-label .progress-bar {
    height: 100%;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.6s ease;
}

.progress-with-label .progress-label {
    position: absolute;
    top: -24px;
    right: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
}

/* Progreso de subida de archivos */
.upload-progress {
    background: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

.upload-progress .file-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.upload-progress .file-name i {
    margin-right: 8px;
    color: var(--primary);
}

.upload-progress .progress {
    height: 6px;
    background: var(--gray-300);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.upload-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--accent));
    transition: width 0.3s ease;
}

.upload-progress .upload-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-600);
}

/* Estados de progreso */
.progress-success .progress-bar {
    background: linear-gradient(45deg, var(--success), #20c997);
}

.progress-warning .progress-bar {
    background: linear-gradient(45deg, var(--warning), #fd7e14);
}

.progress-danger .progress-bar {
    background: linear-gradient(45deg, var(--danger), #e74c3c);
}

.progress-info .progress-bar {
    background: linear-gradient(45deg, var(--info), #3498db);
}

/* Progreso con puntos */
.dot-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 1rem;
}

.dot-progress .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    animation: dotPulse 1.4s infinite ease-in-out both;
}

.dot-progress .dot:nth-child(1) { animation-delay: -0.32s; }
.dot-progress .dot:nth-child(2) { animation-delay: -0.16s; }
.dot-progress .dot:nth-child(3) { animation-delay: 0; }

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        background: var(--gray-300);
    }
    40% {
        transform: scale(1.2);
        background: var(--primary);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .scroll-line {
        height: 2px;
    }
    
    .step-progress {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-progress .step:not(:last-child)::after {
        display: none;
    }
    
    .step-progress .step {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    
    .step-progress .step-label {
        margin-top: 0;
        margin-left: 1rem;
    }
}

/* Utilidades */
.progress-sm { height: 2px; }
.progress-lg { height: 6px; }
.progress-xl { height: 8px; }

/* Tema oscuro */
@media (prefers-color-scheme: dark) {
    .scroll-line {
        box-shadow: 0 2px 8px rgba(120, 84, 203, 0.5);
    }
    
    .progress-circle .progress-circle-bg {
        stroke: var(--gray-700);
    }
    
    .upload-progress {
        background: var(--gray-800);
    }
}