/* ================================================= */
/* ESTILOS ESPECÍFICOS PARA RUTAS - VERSIÓN MEJORADA */
/* ================================================= */

/* --- Estilos Base y Tipografía (Asumiendo Inter en index.css) --- */
body {
    background-color: #f8f9fa; /* Fondo muy claro */
    line-height: 1.6;
    color: #343a40; /* Texto oscuro general */
}
.container {
    max-width: 1100px; /* Un poco más de ancho para la cuadrícula */
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Sombra más suave */
    border-radius: 15px;
}
header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 4px solid #17a2b8; /* Nuevo color principal: Cyan/Turquesa */
    margin-bottom: 30px;
}
header h1 {
    color: #17a2b8;
    margin-bottom: 8px;
    font-size: 2.8em;
    font-weight: 700;
}
header p {
    color: #6c757d;
    font-size: 1.15em;
}

/* --- Advertencia de Tiempo (Aviso importante) --- */
.warning-box {
    background-color: #f8d7da; /* Fondo rojo claro */
    color: #721c24; /* Texto rojo oscuro */
    padding: 18px;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    margin-bottom: 35px;
    text-align: center;
    font-size: 1.15em;
    font-weight: 600;
}

/* --- Barra de Progreso General --- */
.general-progress {
    margin: 25px 0;
    padding: 20px;
    background-color: #e9ecef; /* Gris claro */
    border-radius: 10px;
}
.general-progress h3 {
    margin-top: 0;
    color: #343a40;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3em;
}
.general-progress .progress-bar {
    height: 30px; /* Más alto */
    background-color: #dee2e6;
    border-radius: 15px;
    margin-top: 15px;
    overflow: hidden;
}
.general-progress .progress-bar-fill {
    height: 100%;
    background-color: #20c997; /* Verde menta para el progreso general */
    border-radius: 15px 0 0 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: white;
    font-weight: bold;
    padding-right: 12px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Transición suave */
    min-width: 30px; 
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.2);
}

/* ================================================= */
/* --- Estilos de Fases y Acordeón (Accordion) --- */
/* ================================================= */

.phase-header {
    background-color: #495057; /* Gris oscuro */
    color: white;
    padding: 18px 25px;
    margin-top: 25px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s, border-radius 0.3s;
    font-weight: 600;
    border: 1px solid #343a40;
}
.phase-header:hover {
    background-color: #343a40;
}
.phase-header h2 {
    margin: 0;
    font-size: 1.6em;
}
.phase-header .icon {
    font-size: 1.5em;
    transition: transform 0.3s;
}

.phase-content {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, padding 0.7s ease-in-out;
    background-color: #ffffff;
    border-radius: 0 0 10px 10px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-top: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.phase-content.active {
    max-height: 4000px; 
    padding: 25px;
}
.phase-header.active {
    border-radius: 10px 10px 0 0;
    background-color: #17a2b8; /* Color principal de la ruta al estar activo */
    border-color: #17a2b8;
}
.phase-header.active .icon {
    transform: rotate(180deg);
}

/* --- Detalles de la Fase --- */
.phase-details {
    padding: 20px;
    margin-bottom: 25px;
    border-left: 6px solid #17a2b8;
    background-color: #eaf8fa;
    border-radius: 6px;
    font-style: italic;
}
.phase-details strong {
    font-weight: 700;
    color: #495057;
}

/* ================================================= */
/* --- Estilos de Tarjetas de Paso (Steps Grid) --- */
/* ================================================= */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Mínimo 320px */
    gap: 30px;
    margin-top: 20px;
}

.step-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6; /* Borde más sutil */
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.step-card h3 {
    margin-top: 0;
    color: #17a2b8;
    font-size: 1.4em;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 15px;
}
.step-card strong {
    display: block;
    margin: 10px 0 5px 0;
    color: #495057;
    font-weight: 600;
}
.step-card ul {
    margin: 5px 0 15px 0;
    padding-left: 20px;
    color: #6c757d;
}
.step-card .description {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 20px;
    background-color: #f7f9fb;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #dee2e6;
}

/* --- Indicador de Estado --- */
.step-status {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #adb5bd; /* Gris neutro */
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1em;
    min-width: 60px;
    text-align: center;
}

/* --- Estilos de Progreso Individual --- */
.progress-bar-step {
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}
.progress-bar-fill-step {
    height: 100%;
    background-color: #17a2b8;
    transition: width 0.6s ease;
}
.hours-completed {
    display: block;
    text-align: right;
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 8px;
    font-weight: 500;
}

/* --- Controles de Botones --- */
.progress-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}
.control-buttons button {
    background-color: #20c997; /* Verde para aumentar */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}
.control-buttons button:hover {
    background-color: #1aa67e;
    transform: translateY(-1px);
}
.control-buttons button:first-child {
    background-color: #dc3545; /* Rojo para disminuir */
    margin-right: 10px;
}
.control-buttons button:first-child:hover {
    background-color: #c82333;
}


/* ================================================= */
/* --- ESTADOS Y COLORES DE LAS TARJETAS --- */
/* ================================================= */

/* Completado (Completed) */
.step-card.completed {
    border-color: #28a745; 
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.2);
}
.step-card.completed h3 {
    color: #28a745;
}
.step-card.completed .step-status {
    background-color: #28a745;
    color: white;
}
.step-card.completed .progress-bar-fill-step {
    background-color: #28a745;
}
.step-card.completed .hours-completed {
    color: #28a745;
    font-weight: 700;
}

/* En Progreso (In-Progress) */
.step-card.in-progress {
    border-color: #ffc107; 
}
.step-card.in-progress h3 {
    color: #ffc107;
}
.step-card.in-progress .step-status {
    background-color: #ffc107;
    color: #343a40;
}
.step-card.in-progress .progress-bar-fill-step {
    background-color: #ffc107;
}

/* Complementario (Habilidades de Nicho) */
.step-card.complementary {
    background-color: #f7f7f7; 
    border-style: solid;
    border-color: #6c757d;
}
.step-card.complementary h3 {
    color: #6c757d;
}
.step-card.complementary .step-status {
    background-color: #6c757d;
    color: white;
}
.step-card.complementary .progress-bar-fill-step {
    background-color: #6c757d;
}
.step-card.complementary .control-buttons button {
    background-color: #6c757d;
}
.step-card.complementary .control-buttons button:hover {
    background-color: #5a6268;
}

/* ================================================= */
/* --- RESPONSIVIDAD ESPECÍFICA DE RUTAS --- */
/* ================================================= */
@media (max-width: 992px) {
    .container {
        padding: 20px;
    }
    .steps-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.2em;
    }
    .container {
        margin: 20px auto;
        padding: 15px;
    }
    .steps-grid {
        grid-template-columns: 1fr;
    }
    .phase-header h2 {
        font-size: 1.4em;
    }
    .phase-content {
        padding: 0 15px;
    }
    .phase-content.active {
        padding: 15px;
    }
    .step-card {
        padding: 20px;
    }
}

/* ================================================= */
/* FIN DE ESTILOS RUTAS MEJORADOS */
/* ================================================= */