/* =========================================
   VARIABLES GLOBALES (Colores y Fuentes)
   ========================================= */
:root { 
    --verde-primario: #00CB75; 
    --verde-oscuro: #003F27; 
    --verde-medio: #007B4B; 
    --verde-claro: #E6FFF4; 
    --blanco: #ffffff; 
    --gris-suave: #f8f9fa; 
}

body { 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    background: var(--gris-suave); 
    color: var(--verde-oscuro); 
    line-height: 1.6; 
}

/* =========================================
   PANTALLA DE LOGIN
   ========================================= */
#pantalla-login { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    height: 100vh; 
    background: var(--verde-oscuro); 
    color: white; 
    text-align: center; 
}

#pantalla-login h1 { 
    color: var(--verde-primario); 
    margin-bottom: 10px; 
    font-size: 2.5rem; 
}

#pantalla-login p { 
    margin-bottom: 30px; 
    font-size: 1.1rem; 
    opacity: 0.9; 
}

/* =========================================
   ESTRUCTURA DEL PORTAL Y NAVEGACIÓN
   ========================================= */
#contenido-portal { 
    display: none; /* Se oculta por defecto hasta el login */
}

nav { 
    background: var(--verde-oscuro); 
    padding: 1rem 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

nav a, .btn-logout { 
    color: var(--blanco); 
    text-decoration: none; 
    margin-left: 20px; 
    font-weight: 500; 
    transition: 0.3s; 
    cursor: pointer; 
    background: none; 
    border: none; 
    font-size: 1rem; 
    font-family: inherit; 
}

nav a:hover, .btn-logout:hover { 
    color: var(--verde-primario); 
}

.logo { 
    font-weight: 800; 
    font-size: 1.4rem; 
    color: var(--verde-primario); 
    text-decoration: none; 
}

/* =========================================
   SECCIONES DE CONTENIDO (Hero y Tarjetas)
   ========================================= */
.hero { 
    background: var(--verde-oscuro); 
    color: white; 
    padding: 80px 10%; 
    text-align: center; 
}

.btn-principal { 
    background: var(--verde-primario); 
    color: var(--verde-oscuro); 
    padding: 15px 30px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: bold; 
    display: inline-block; 
    margin-top: 20px; 
    transition: transform 0.2s; 
}

.btn-principal:hover { 
    transform: scale(1.05); 
    background: var(--verde-claro); 
}

.content { 
    padding: 50px 10%; 
}

.card-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-top: 30px; 
}

.card { 
    background: white; 
    padding: 30px; 
    border-radius: 15px; 
    border-bottom: 4px solid var(--verde-primario); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

footer { 
    background: #eee; 
    text-align: center; 
    padding: 20px; 
    margin-top: 50px; 
    font-size: 0.9rem; 
}

/* =========================================
   CHATBOT IA FLOTANTE
   ========================================= */
#btn-abrir-chat { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    background-color: var(--verde-primario); 
    color: var(--verde-oscuro); 
    border: none; 
    border-radius: 50px; 
    padding: 15px 25px; 
    font-size: 1rem; 
    font-weight: bold; 
    cursor: pointer; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    z-index: 10000; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

#chatbot-flotante { 
    position: fixed; 
    bottom: 90px; 
    right: 30px; 
    width: 350px; 
    background: white; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
    display: none; 
    flex-direction: column; 
    overflow: hidden; 
    z-index: 9999; 
    border: 1px solid #ddd; 
}

#chat-header { 
    background-color: var(--verde-primario); 
    color: var(--verde-oscuro); 
    padding: 15px; 
    font-weight: bold; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

#btn-cerrar-chat { 
    background: none; 
    border: none; 
    color: var(--verde-oscuro); 
    font-size: 1.2rem; 
    cursor: pointer; 
}

#caja-mensajes { 
    height: 350px; 
    overflow-y: auto; 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    background-color: #fafafa; 
}

.mensaje { 
    max-width: 80%; 
    padding: 10px 15px; 
    border-radius: 15px; 
    font-size: 0.95rem; 
}

.mensaje-bot { 
    background-color: white; 
    color: var(--verde-oscuro); 
    align-self: flex-start; 
    border: 1px solid #ddd; 
}

.mensaje-usuario { 
    background-color: var(--verde-medio); 
    color: white; 
    align-self: flex-end; 
}

.input-area { 
    display: flex; 
    padding: 10px; 
    background: white; 
    border-top: 1px solid #eee; 
}

#input-mensaje { 
    flex: 1; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 20px; 
    outline: none; 
}

#btn-enviar { 
    background-color: var(--verde-primario); 
    color: var(--verde-oscuro); 
    border: none; 
    padding: 10px 15px; 
    margin-left: 10px; 
    border-radius: 20px; 
    cursor: pointer; 
    font-weight: bold; 
}

/* =========================================
   ESTILOS ESPECÍFICOS DE LAS SUBPÁGINAS
   ========================================= */
.header-seccion { 
    background: var(--verde-medio); 
    color: white; 
    padding: 40px 10%; 
    text-align: center; 
}

.curso-item { 
    background: white; 
    padding: 25px; 
    border-radius: 10px; 
    border-left: 6px solid var(--verde-primario); 
    margin-bottom: 20px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.curso-info h3 { 
    margin: 0 0 10px 0; 
    color: var(--verde-oscuro); 
}

.curso-info p { 
    margin: 0; 
    color: #555; 
}

.btn-curso { 
    background: var(--verde-primario); 
    color: var(--verde-oscuro); 
    text-decoration: none; 
    padding: 10px 20px; 
    border-radius: 5px; 
    font-weight: bold; 
    transition: 0.3s; 
}

.btn-curso:hover { 
    background: var(--verde-oscuro); 
    color: white; 
}

/* =========================================
   ESTILOS DE LOS ARTÍCULOS (Módulos de Cursos)
   ========================================= */
.articulo-curso { 
    max-width: 800px; 
    margin: 40px auto; 
    background: white; 
    padding: 40px; 
    border-radius: 10px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

.articulo-curso h1 { 
    color: var(--verde-oscuro); 
    border-bottom: 2px solid var(--verde-primario); 
    padding-bottom: 10px; 
}

.articulo-curso h2 { 
    color: var(--verde-oscuro); 
    margin-top: 30px; 
}

.volver { 
    display: inline-block; 
    margin-bottom: 20px; 
    color: var(--verde-oscuro); 
    text-decoration: none; 
    font-weight: bold; 
    transition: 0.3s;
}

.volver:hover { 
    color: var(--verde-primario); 
}

/* Diseño de los números y pasos */
.paso { 
    display: flex; 
    margin-top: 20px; 
}

.paso-num { 
    background: var(--verde-primario); 
    color: var(--verde-oscuro); 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-weight: bold; 
    margin-right: 15px; 
    flex-shrink: 0; 
}


/* Caja de notas importantes en los cursos */
.teoria-box { 
    background: var(--gris-suave); 
    padding: 15px; 
    border-left: 4px solid var(--verde-oscuro); 
    margin: 20px 0; 
}

.card-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-top: 30px; 
}

.card { 
    background: white; 
    padding: 30px; 
    border-radius: 15px; 
    border-bottom: 4px solid var(--verde-primario); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}
