:root {
    --color-principal: #1e5631;  
    --color-texto: #333;
    --color-fondo: #f4f7f6;
    --color-blanco: #ffffff;
    --borde-radio: 12px;
    --fuente-principal: 'Poppins', sans-serif;
    --azure-blue-start: #0078d4;
    --azure-blue-end: #00bcf2;
    --tech-bg-dark: #0f172a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--fuente-principal);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- HEADER --- */
.cabecera-principal {
    background: var(--color-principal);
    color: white;
    padding: 0.6rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contenido-cabecera {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Personalizado */
.identidad {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-iniciales {
    background-color: #ffffff;
    color: var(--color-principal);
   
    width: 42px;
    height: 42px;
    
    border-radius: 12px 0 12px 0;
    
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.5px;
    
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    
    transition: all 0.3s ease;
}

.cabecera-principal h1 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.curso-badge {
    background: white;
    color: var(--color-principal);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- MAIN --- */
.contenedor-principal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
    width: 100%;
    flex: 1;
}

.titulo-pagina {
    text-align: center;
    font-size: 1.4rem;
    color: #444;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    display: table;
    margin-left: auto;
    margin-right: auto;
}

/* --- SECCIÓN DESTACADA (APP FINAL - ESTILO AZURE) --- */
.seccion-destacada {
    margin-bottom: 2.5rem;
    animation: entradaSuave 0.8s ease-out;
}

.card-destacada.azure-style {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--azure-blue-start) 0%, var(--azure-blue-end) 100%);
    color: white;
    padding: 1.2rem 2rem; /* Un poco más compacto */
    border-radius: var(--borde-radio);
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0, 120, 212, 0.35);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Efecto Hover */
.card-destacada.azure-style:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 12px 30px rgba(0, 120, 212, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- VISUALIZACIÓN DEL DASHBOARD --- */
.dashboard-preview {
    width: 90px;
    height: 65px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    overflow: hidden;
    margin-right: 25px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    position: relative;
}

/* Barra lateral del mini-dashboard */
.preview-sidebar {
    width: 25%;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-item {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}
.sidebar-item.active { background: rgba(255, 255, 255, 0.8); width: 70%; }

/* Contenido principal (Tabla) del mini-dashboard */
.preview-content {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}
.preview-header {
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin-bottom: 2px;
}
.preview-row {
    display: flex;
    gap: 3px;
}
.preview-row span {
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    flex: 1;
}
/* Icono superpuesto */
.overlay-icon {
    position: absolute;
    bottom: 5px;
    right: 7px;
    font-size: 1.2rem;
    color: white;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}


/* Textos */
.texto-destacado {
    flex: 1;
    display: flex;
    align-items: center;
}

.texto-destacado h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Botón CTA (Estilo Azure) */
.boton-cta {
    background-color: rgba(255, 255, 255, 0.15); 
    color: white;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
    margin-left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-destacada.azure-style:hover .boton-cta {
    background-color: white;
    color: var(--azure-blue-start);
    transform: translateX(0);
}


/* Animación de entrada */
@keyframes entradaSuave {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE: Ajuste para móviles */
@media (max-width: 768px) {
    .card-destacada.azure-style {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 15px;
    }

    .dashboard-preview {
        margin-right: 0;
        margin-bottom: 10px;
        transform: scale(1.2); /* Un poco más grande en móvil */
    }
    
    .texto-destacado {
        justify-content: center;
    }

    .texto-destacado h3 {
        font-size: 1.2rem;
    }
    
    .boton-cta {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }
}


/* --- GRID --- */
.rejilla-tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

/* --- TARJETAS INTERACTIVAS --- */
.tarjeta {
    background: var(--color-blanco);
    border-radius: var(--borde-radio);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-decoration: none; 
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    cursor: pointer; 
    position: relative;
    border: 1px solid transparent;
}

.tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--color-principal); 
}

.tarjeta-imagen {
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: white;
}

/* Colores Asignaturas */
.fondo-morado { background-color: #777BB4; }
.fondo-amarillo { background-color: #F7DF1E; color: #333; }
.fondo-naranja { background-color: #E34F26; }
.fondo-azul { background-color: #007ACC; }
.fondo-oscuro { background-color: #2C3E50; }
.fondo-verde { background-color: #27ae60; }
.fondo-hoja { background-color: #4CAF50; } 
.fondo-digital { background-color: #00BCD4; } 

.tarjeta-contenido {
    padding: 1.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.siglas {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-principal);
    margin-bottom: 5px;
}

.nombre {
    font-weight: 700;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.3;
}

/* --- FOOTER DETALLADO --- */
.pie-pagina {
    background-color: #222;
    color: #bbb;
    padding: 1.5rem 0;
    font-size: 0.8rem;
    margin-top: auto;
    border-top: 4px solid var(--color-principal);
}

.contenido-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.texto-legal p {
    margin: 2px 0;
}

.autor {
    color: #888;
    font-style: italic;
}

.iconos-footer a {
    color: white;
    font-size: 1.2rem;
    margin-left: 20px;
    transition: color 0.3s;
}

.iconos-footer a:hover {
    color: var(--color-principal);
}

@media (max-width: 768px) {
    .contenido-footer {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .iconos-footer a {
        margin: 0 10px;
    }
    .titulo-pagina {
        font-size: 1.1rem;
    }
}
/* =========================================
   ESTILOS PARA LA VISTA DE EJERCICIOS INDIVIDUALES
   ========================================= */

.caja-ejercicio {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    max-width: 1000px; 
    margin: 0 auto;    
    font-size: 1rem;
    line-height: 1.8;  
    color: #444;
}
.caja-ejercicio h3 {
    color: var(--color-principal); 
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.caja-ejercicio h3:first-child {
    margin-top: 0; 
}

.caja-ejercicio code {
    background-color: #f4f6f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #d63384;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}