:root {
    --muy-oscuro: #0c2a44;
    --oscuro: #134169;
    --claro: #325579;
    --pea: #214f76;
    --letra: #EDF0DE;
    --gris-claro: #F5F6EE;
    --fuente-principal: 'Hanken Grotesk', sans-serif;
    --fuente-secundaria: 'Questrial', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Inter", sans-serif;
}

/* ENCABEZADO */

header {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 150px;
    background-color: var(--claro);
    padding: 0 50px 20px 50px;
}

/* ORGANIZACION DEL ENCABEZADO */

.logo_untdf, .logo_index, .iconos {
    display: flex;
    justify-content: center;
}

.iconos {
    width: 30%;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.logo_index {
    width: 45%;
}

.logo_untdf {
    width: 25%;
}

/* TAMAÑO DE LOS LOGOS */

/* Asegura que las imágenes no desborden su contenedor */
.logo_untdf img, .logo_index img, .iconos img {
    max-height: 100%; 
    max-width: 100%;
    object-fit: contain;
}

.logo_untdf img {
    height: 50px;
    width: auto;
}

.logo_index img {
    height: 100px;
    width: auto;
}

.iconos img {
    height: 50px;
    margin: 0;
    padding: 0;
}

/* BORDE DEL LOGO PRINCIPAL*/

#borde {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--oscuro);
    border-radius: 100%;
    width: 120px;
    height: 120px;
}

/* MENU DE NAVEGACION */

nav {
    position: absolute;
    left: 10%;
    top: 145px;
    width: 80%;
    font-size: 1.5rem;
    z-index: 2;
}

.desplegar {
    display: none;
}

/* ORGANIZACIÓN DEL MENU PRINCIPAL */

.menu {
    margin: 0;
    padding: 0;
    list-style-type: none;
    background-color: var(--oscuro);
    border-radius: 40px;
    display: flex;
    align-items: center;
    height: 3rem;
}

.menu-item {
    position: relative;
    height: 2em;
    flex-grow: 1;
}

.menu-item > a {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100%;
}

.menu-item > a:hover {
    background-color: var(--claro);
}

.menu a {
    position: relative;
    padding: 0;
    margin: 0;
    color: var(--letra);
    text-decoration: none;
    text-align: center;
    font-weight: bold;
}

/* ORGANIZACION DE LOS SUBMENUS */

.submenu {
    display: none;
    position: absolute;
    margin: 0;
    padding: 0;
    min-width: 100%;
    border-radius: 0 0 10px 10px;
    list-style-type: none;
    background-color: var(--claro);
    top: 100%;
    left: 0;
}

.submenu-item {
    display: flex;
}

.submenu-item a {
    flex-grow: 1;
    padding: 5px 10px;
    white-space: nowrap;
    color: var(--letra);
    text-decoration: none;
    text-align: left;
}

.submenu-item > a:hover {
    background-color: var(--oscuro);
}

.menu-item:hover .submenu {
    display: flex;
    flex-direction: column;
}

/* DECORACIONES EXTRA */

.flecha {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 5px 0 5px;
    border-color: white transparent transparent transparent;
}

.borde {
    background-color: white;
    height: 80%;
    width: 3px;
    border-radius: 10px;
}

/* Redondear bordes extremos*/

.menu-item:last-child a:hover {
    border-top-right-radius: 40px;
    border-bottom-right-radius: 40px;
}

.submenu-item:last-child a:hover {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.menu-item:first-child > a:hover {
    border-top-left-radius: 40px;
    border-bottom-left-radius: 40px;
}

.menu-item:first-child .submenu {
    margin-left: 20px;
}

/* FOOTER */

footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 50px;
    color: #134169;
    background-color: var(--gris-claro);
}

/* INSTITUTOS */

.institutos {
    display: flex;
    flex-direction: column;
}

.institutos img {
    width: auto;
    height: 80px;
}

.links-institutos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* MEDIA QUERY PARA PANTALLAS PEQUEÑAS */
@media (max-width: 768px) {
    header {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-content: space-between;
        height: 200px;
        width: 100%;
        padding: 20px 0;
        margin: 0;
    }

    .iconos {
        margin-top: 20px;
        width: 100%;
        justify-content: center;
    }

    .logo_untdf {
        width: 150px;
    }

    .logo_index {
        width: 150px;
    }

    nav {
        position: static;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .menu, .borde, .flecha {
        display: none;
    }

    .menu {
        height: auto;
        border-radius: 0;
        flex-direction: column;
    }

    .menu-item {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 50px;
        height: auto;
        border-top: solid 3px white;
    }

    .menu-item a {
        min-height: 50px;
        padding-top: 5px;
    }

    .menu-item:hover {
        background-color: var(--claro);
    }

    .menu-item:last-child a:hover, .submenu-item:last-child a:hover,
    .menu-item:first-child > a:hover {
        border-radius: 0;
    }

    .menu-item:first-child .submenu {
        margin-left: 0;
    }

    .submenu {
        position: static;
    }

    .menu-item:hover {
        background-color: var(--oscuro);
    }

    .menu-item a:hover {
        background-color: var(--oscuro);
    }
    
    .submenu a {
        min-height: 0;
        text-align: center;
        border-top: #EDF0DE solid 2px;
        padding: 10px 0;
    }

    .desplegar {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding-left: 50px;
        width: 100%;
        border: none;
        background-color: var(--oscuro);
        color: white;
        font-weight: bold;
        font-family: sans-serif;
        font-size: 1rem;
    }
    
    .menu-item:hover .submenu {
        display: none;
        flex-direction: column;
    }

    .decoracion-desplegar {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 3rem;
        width: 2rem;
        margin-right: 40px;
    }

    .decoracion-desplegar div {
        margin: 3px 0;
        height: 3px;
        width: 90%;
        border-radius: 10px;
        background-color: white;
    }

    .texto-desplegar {
        color: var(--letra);
        font-size: 1.4rem;
    }

    footer {
        flex-direction: column;
    }
}

/* MEDIA QUERY PARA PANTALLAS MEDIANAS */
@media (min-width: 769px) and (max-width: 1150px) {
    /* Hacer que el logo SIU ocupe el 100% del ancho disponible */
    .logo_siu {
        width: 100%;
        height: auto;
    }
    .flecha {
        display: none;
    }
}

/* COMPONENTES */

.componente-fondo {
    position: absolute;
    z-index: 0;
    background-color: var(--pea);
    border-radius: 50%;
}

.componente-parrafo {
    position: relative;
    z-index: 1;
    color: var(--letra);
    font-size: 1.2em;
}