* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

:root {
    --secciones: rgb(130, 130, 130);
    --enlace: rgb(245, 248, 255);
    --fondo: rgb(212, 212, 212);
    --links: rgb(28, 28, 28);
    --fondoimagen: rgb(130, 130, 130);
    --nivel: rgb(242, 240, 239);
    --nivelAdquirido: rgb(130, 130, 130);
    --main: rgb(242, 240, 239);
    --fondito: rgb(245, 248, 255);
    --h2: rgb(67, 70, 86);
}

body {
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--fondo);
}

/* --- CONTENEDORES PRINCIPALES --- */
.divMain {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1000px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--fondoimagen);
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    padding: 32px;
    width: 35%;
}

header p {
    color: white;
    margin-bottom: 0;
}

main {
    width: 65%;
    padding: 32px;
    background-color: var(--fondito);
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

h1 {
    color: white;
    margin-bottom: 0;
}

/* --- TEXTOS Y SECCIONES --- */
h2 {
    color: var(--h2);
    font-weight: 600;
    margin-top: 32px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 19px;
    border-left: 4px solid var(--h2);
    padding-left: 8px;
    margin-bottom: 16px;
}

section:first-child h2 {
    margin-top: 0;
}

p {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
    margin-bottom: 8px;
}

#cuerpoFlotante {
    text-align: center;
    margin-bottom: 24px;
}

img {
    width: 200px;
    max-width: 100%;
    border-radius: 50%;
    margin-bottom: 16px;
    border-radius: 50%;
    border: 6px solid var(--fondito);
}

/* --- ENLACES Y NAVEGACIÓN (Generales) --- */
nav {
    width: 100%;
}

ul {
    display: flex;
    flex-direction: column;
    width: 100%;
    list-style: none;
    gap: 8px;
}

a {
    color: var(--links);
    text-decoration: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enlace {
    border: 1px solid var(--links);
    background-color: var(--enlace);
    border-radius: 10px;
    height: 40px;
    width: 100%;
    transition: background-color 0.3s;

}

.enlace:hover {
    background-color: #ddd;
}

/* --- ESTRUCTURA DE COLUMNAS --- */
.columnas {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 16px;
}

.secciones {
    flex: 1;
    padding: 16px;
    border: 1px solid var(--links);
    background-color: var(--secciones);
    text-align: center;
    border-radius: 10px;
    transition: transform 0.3s ease; 
}

.secciones:hover {
    transform: translateY(-0.5rem) scale(1.10);
}

.secciones p {
    color: white;
    margin-bottom: 0;
}

section {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

/* --- BARRAS DE NIVEL --- */
.nivel {
    background-color: var(--nivel);
    margin: 8px 0 16px 0;
    height: 12px;
    border: 1px solid var(--links);
    border-radius: 5px;
    /*poner el border radius en ek mismo color q el fondo de nivel*/
    overflow: hidden;
}

.nivel div {
    background-color: var(--nivelAdquirido);
    height: 100%;
}

#nivel1,
#nivel2,
#nivel4,
#nivel5 {
    width: 90%;
}

#nivel3,
#nivel6 {
    width: 50%;
}

/* =========================================================
   FOOTER MEJORADO Y UNIFICADO
   ========================================================= */
.divFooter {
    display: flex;
    width: 100%;
    max-width: 1000px;
}

footer {
    width: 100%;
    background-color: var(--fondoimagen);
    /* El cajón ahora es del gris oscuro del título */
    padding: 24px 32px;
    margin-top: 24px;
    border-radius: 15px;
    /* Mismos bordes redondeados que el cajón de arriba */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 16px;
}

/* Forzar que el texto del footer sea blanco para que se lea bien sobre el gris oscuro */
.footer-content p {
    color: white;
    margin-bottom: 0;
}

/* Forzar que la lista de enlaces en el footer vaya en horizontal (una fila) */
.footer-content nav ul {
    flex-direction: row;
    justify-content: center;
    width: auto;
}

/* Ajustes específicos para que los enlaces del footer NO parezcan bloques gigantes */
.footer-content .enlace {
    width: auto;
    /* Dejan de ocupar todo el ancho */
    padding: 0 16px;
    background-color: transparent;
    /* Quitamos su color de fondo por defecto */
    border: 1px solid white;
    /* Ponemos un borde blanco */
}

/* Los textos de los enlaces del footer también en blanco */
.footer-content .enlace a {
    color: white;
}

/* Pequeño efecto al pasar el ratón en el footer */
.footer-content .enlace:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* =========================================================
   MEDIA QUERIES PARA PANTALLAS PEQUEÑAS
   ========================================================= */

@media (max-width: 768px) {
    .divMain {
        flex-direction: column;
    }

    header {
        width: 100%;
        border-radius: 15px 15px 0 0;
    }

    main {
        width: 100%;
        border-radius: 0 0 15px 15px;
    }

    .columnas {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* En móvil los botones del footer se centran pero siguen siendo horizontales si caben */
    .footer-content nav ul {
        flex-wrap: wrap;
    }
}