body {
    margin: 0;
    background-color: var(--fondo);
    /*display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 800px;*/
    display: grid;
    min-height: 100dvh;
    grid-template-rows: auto 1fr auto;
}

/* ----------------------------------------------------------------------------
 *  Cabecera y pie (de la web)
 *---------------------------------------------------------------------------*/
body > header,
body > footer {
    font-size: large;
    width: 100%;
}

body > header {
    background-color: var(--fondoEncabezado);
}

#texto_cabecera {
    background-color: var(--fondoEncabezado);
    color: var(--colorTextoEncabezado);
    padding: var(--padding);
}

body > footer {
    background-color: var(--fondoPie);
    color: var(--colorTextoPie);
    padding: var(--padding);
    /*height: 4em;*/
    width: calc(100% - var(--padding));
}

/* ----------------------------------------------------------------------------
 *  Forma de los artículos
 *---------------------------------------------------------------------------*/
article {
    margin: var(--margin);
}
article > header {
    background-color: var(--fondoEncabezado);
    color: var(--colorTextoEncabezado);
    padding: calc(var(--padding) / 2);
    font-size: medium;
    text-decoration: underline 0.2em;
}

article > footer {
    font-style: italic;
    color: var(--fondoPie);
}

/* ----------------------------------------------------------------------------
 *  Bloque central de la web
 *---------------------------------------------------------------------------*/
#pagina {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 95%;
}

aside {
    background-color: var(--fondoBanner);
    margin: 1em auto;
    padding: 1em;
    /*width: 300px;*/
    max-width: 300px;
}

main {
    width: 70%;
    margin: 0 auto;
}

/* ----------------------------------------------------------------------------
 *  Menú de navegación
 *---------------------------------------------------------------------------*/
nav {
    /* Distibución flexible y "responsiva" */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border: 0px;
    margin: 1em;
    height: 2em;
}

nav > div {
    background-color: var(--colorBotones);
    color: var(--textoInvertido);
    padding: 0.5em 2em;
    /* Efecto profundidad */
    box-shadow: 5px 8px 10px var(--corlorSombras);
}

nav > div a {
    text-decoration: none;
    color: var(--textoInvertido);
    font-weight: bold;
}

/* ----------------------------------------------------------------------------
 *  Contenido
 *---------------------------------------------------------------------------*/
#pagina {
    /*margin: 0 auto;/
   /*display: grid;
   place-items: center;*/
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border: 0px;
}
main > header {
    background-color: var(--fondoTitulos);
    color: var(--colorTextoTitulos);
    font-weight: bold;
    font-size: large;
    margin: var(--margin);
}

/* imagenes */
.foto_carnet {
    width: 12dvw;
    min-width: 100px;
}

/* tablas */
thead {
    background-color: #008;
    color: white;
    padding: 2em;
}

thead th {
    padding: 0.5em 1em;
}

td {
    padding-left: 1em;
}

tr:nth-child(2n) {
    background-color: lightgrey;
}


/* formularios */
form {
    display: flex;
    flex-direction: column;
    gap: .3em;
    margin: 1rem auto;
    padding 4em;
    /*! border: 1px solid var(--blue); */
}

form > label {
    font-weight: bold;
}

form > input,
form > textarea {
    width: 100%;
}

form > button {
    background-color: var(--colorBotones);
    color: var(--textoInvertido);
    padding: 0.5em 2em;
    /* Efecto profundidad */
    box-shadow: 5px 8px 10px var(--corlorSombras);
    border: 0;
    margin: 1em auto;
    width: 30%;
    min-width: 100px;
    max-width: 300px;
}
/* ----------------------------------------------------------------------------
 *  Variables globales
 *---------------------------------------------------------------------------*/
:root {
    /* espacios */
    --margin: 1em;
    --padding: 1em;

    /* ubicaciones */
    --fondo: var(--white);
    --colorTexto: var(--dark);
    --fondoTitulos: var(--darkGrey);
    --colorTextoTitulos: var(--white);
    --fondoBanner: var(--resaltado);
    --colorTextoPie: var(--white);
    --fondoPie: var(--darkGrey);
    --fondoEncabezado: var(--lightGrey);
    --colorTextoEncabezado: var(--darkBlue);

    --corlorSombras: var(--grey);
    --colorBotones: var(--darkBlue);
    --textoInvertido: var(--white);

    /* colores */
    --blue: #1e90ff;
    --darkBlue: #4f46e5;
    --white: whitesmoke;
    --lightGrey: #aaa;
    --grey: grey;
    --darkGrey: #444;
    --green: green;
    --resaltado: yellow;
    --dark: #222;
}
