/*
 * style.css - Versión VIBRANTE y MODERNA
 * Hoja de estilos principal con enfoque en UX y gamificación.
 */

/* ----------------------------------- */
/* 1. BASE Y TIPOGRAFÍA */
/* ----------------------------------- */

:root {
    /* Paleta de colores Duolingo/Educación */
    --color-primary: #58cc02;      /* Verde (Acción/Éxito) */
    --color-secondary: #1cb0f6;    /* Azul (Header/Navegación) */
    --color-warning: #ffc800;      /* Amarillo (Alerta/Moneda) */
    --color-background: #f0f2f5;   /* Fondo general, muy claro */
    --color-text-dark: #3c3c3c;    /* Texto principal */
    --color-text-light: #ffffff;   /* Texto en fondos oscuros */
    --color-shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Montserrat', sans-serif; /* Usar una fuente más moderna si está disponible */
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text-dark);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3 {
    font-weight: 700;
    color: #2e2e2e;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

/* ----------------------------------- */
/* 2. LAYOUT Y NAVEGACIÓN */
/* ----------------------------------- */

.container {
    width: 95%;
    max-width: 1400px; /* Un poco más amplio para contenido de cursos */
    margin: 0 auto;
    padding: 20px 0;
}

header {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    padding: 15px 0;
    box-shadow: 0 4px 6px var(--color-shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin: 0 12px;
}

nav ul li a {
    color: var(--color-text-light);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ----------------------------------- */
/* 3. FORMULARIOS Y BOTONES (CTA) */
/* ----------------------------------- */

form {
    background-color: var(--color-text-light);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px var(--color-shadow);
    max-width: 450px;
    margin: 60px auto;
    border-top: 5px solid var(--color-primary); /* Toque de color */
}

input[type="text"], 
input[type="email"], 
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 2px rgba(28, 176, 246, 0.2);
    outline: none;
}

button {
    /* Estilo base para todos los botones */
    background-color: var(--color-primary); 
    color: white;
    padding: 12px 20px;
    border: none;
    border-bottom: 4px solid #47a300;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    width: 100%;
    transition: all 0.1s ease;
    box-sizing: border-box;
}

button:hover {
    background-color: #47a300;
    border-bottom: 4px solid #3d8800;
}

button:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* Botón secundario (ej. para cerrar sesión o acciones menos importantes) */
.btn-secondary {
    background-color: #cccccc;
    border-bottom: 4px solid #b3b3b3;
    color: #444;
}

.btn-secondary:hover {
    background-color: #b3b3b3;
}

/* ----------------------------------- */
/* 4. ESTILOS DEL DASHBOARD Y PROGRESO */
/* ----------------------------------- */

.perfil-info {
    background-color: var(--color-text-light);
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.perfil-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--color-text-dark);
}

.stat-item span {
    font-size: 1.5em;
    color: var(--color-primary);
    margin-right: 5px;
}

/* Listado de Cursos */
.cursos-lista {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.curso-card {
    background-color: var(--color-text-light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--color-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--color-secondary); /* Borde de color */
}

.curso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.curso-card h3 {
    margin-top: 0;
    color: var(--color-secondary);
}

progress {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background-color: #e0e0e0;
}

/* Color de progreso (personalizado para navegadores) */
progress::-webkit-progress-value {
    background-color: var(--color-primary);
    border-radius: 5px;
}

progress::-moz-progress-bar {
    background-color: var(--color-primary);
    border-radius: 5px;
}

/* ----------------------------------- */
/* 5. VISTA DE LECCIÓN */
/* ----------------------------------- */

.contenido-leccion {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

#btn-finalizar-leccion {
    background-color: #f7a00f; /* Naranja para finalizar/evaluar */
    border-bottom: 4px solid #cc830c;
    width: 50%; /* Más pequeño que los botones de formulario */
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#btn-finalizar-leccion:hover {
    background-color: #cc830c;
}