:root {
    --color-principal: #1e5631;  
    --color-texto: #333;
    --color-fondo: #f4f7f6;
    --color-blanco: #ffffff;
    --borde-radio: 12px;
    --fuente-principal: 'Poppins', sans-serif;
}
* { 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;
    & #contenedor{
        & #titulo{
            display:grid;
            width:100dvw;
            height:5vh;
            place-content:center;
            font-weight:bolder;
            font-size:1.5rem;
        }
        & h3{
            height:3dvh;
            margin-top:2.5dvh;
            font-size:1.2rem;
            margin-left:35%;
        }
        & h4{
            height:2.5dvh;
            margin-top:2dvh;
            font-size:1.1rem;
            margin-left:37%;
        }
        & .tipo{
            color:darkorange;
        }
        & .valor{
            color:rgb(0,200,0);
        }
        & .variable{
            color:blue;
        }
        & p,& .xdebug-var-dump,& pre{
            margin:0;
            padding:0;
            margin-top:5px;
            margin-left:40%;
        }
        & .TablaPHP{
            width:80dvw;
            border-collapse:collapse;
            border:1px solid black;
            margin-left:10dvw;
            & thead{
                background-color:#777BB4;
                & tr th{
                    color:white;
                    border:1px solid black;
                }
            }
            & tbody{
                & tr td{
                    border:1px solid black;
                    padding-left:2dvw;
                }
                & .centrado{
                    text-align:center;
                }
            }
        }
        & .teatro{
            width:80dvw;
            border-collapse:collapse;
            margin-left:10dvw;
            & tbody{
                & tr td{
                    border:1px solid black;
                    text-align:center;
                    padding:1dvh;
                }
                & .nada{
                    border:0px solid black;
                }
                & .borde{
                    background-color:grey;
                }
            }
        }
        & form{
            display:grid;
            width:80dvw;
            height:20dvw;
            margin-top:10dvw;
            margin-left:10dvw;
            place-content:center;
            & .sinErrores{
                width:30dvw;
                & tr{
                    & td{
                        width:50%;
                    }
                }
            }
            & .conErrores{
                width:60dvw;
                & tr{
                    & td:nth-of-type(1){
                        width:25%;
                    }
                    & td:nth-of-type(2){
                        width:35%;
                    }
                    & td:nth-of-type(3){
                        width:40%;
                    }
                }
            }
            & .formulario{
                border-collapse:collapse;
                & tr{
                    & td{
                        height:10dvh;
                        & label{
                            display:grid;
                            width:100%;
                            height:100%;
                            align-items:center;
                            text-align:right;
                            padding-right:10%;
                        }
                        & span{
                            position:absolute;
                            color:red;
                            top:50%;
                            left:3%;
                            transform:translate(0%,-50%);
                        }
                        & input{
                            font-size:1.2rem;
                        }
                        & .texto{
                            width:100%;
                            height:40%;
                        }
                        & .fecha{
                            width:50%;
                            height:40%;
                            text-align:center;
                        }
                        & #Enviar{
                            position:absolute;
                            width:25%;
                            height:50%;
                            background-color:var(--color-principal);
                            color:white;
                            top:50%;
                            left:50%;
                            transform:translate(-50%,-50%);
                        }
                    }
                    & #Env, & .span{
                        position:relative;
                    }
                }
            }
        }
        .obligatorio{
            background-color:rgb(255,255,150);
        }
        .bloqueado{
            background-color:lightgrey;
        }
    }
    & .contenedor20{
        & pre{
            margin:0 !important;
        }
    }
}
/* --- 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;
}
/* --- 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: 700;
    color: var(--color-principal);
    margin-bottom: 5px;
}
.nombre {
    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;
    & a{
        color:cyan;
        text-decoration:none;
    }
}
.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;
}

