/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

.header1 {
    height: 55px;
    background-color: #132D60;
    color: #F9F9F9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10%;
}

.welcname {
    position: relative;
    left: -25%; /* Ajusta el porcentaje para moverlo hacia la izquierda o derecha */
    text-align: left; /* Asegura la alineación del texto dentro del elemento */
    font-size: 1.2rem;
    color: #F9F9F9;
}

.welcustype {
    position: relative;
    left: 30%; /* Ajusta el porcentaje para moverlo hacia la izquierda o derecha */
    text-align: right; /* Asegura la alineación del texto dentro del elemento */
    font-size: 1.2rem;
    color: #F9F9F9;
}

.container {
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
}

.menu {
    width: 20%;
    background-color: #040B16;
    color: #F9F9F9;
    padding: 1vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-logo {
    width: 85%;
    margin-bottom: 10vh;
}

.menu a {
    display: flex;
    justify-content: center;
    width: 100%;
}

.content {
    width: 80%;
    background-color: #F9F9F9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2vw;
}

.content-center {
    text-align: center;
}

.content-center img {
    width: 30%;
    /*max-width: 300px;*/
    margin-bottom: 15px;
}

h2 {
    margin-bottom: 1vh;
    font-size: 1.5rem;
    color: #132D60;
    text-align: center;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    width: 100%;
}

li {
    margin: 5px 0;
    cursor: pointer;
    font-size: 20px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}

ul li a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 10px 10px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}

ul li a:hover {
    background-color: #E8B321;
    color: #F9F9F9;
    transform: scale(1.05);
}

.grid {
    display: grid;
    /*border: 2px solid #040B16;*/
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Cada box será uniforme */
    gap: 20px;
    width: 100%; /* Asegúrate de usar el 100% para adaptabilidad */
    height: 100%; /* El alto de la grid será automático */
}

.grid a {
    text-decoration: none; /* Quita la línea debajo del texto */
    color: inherit; /* Mantiene el color del texto del padre (li) */
    display: flex; /* Hace que el contenido dentro esté centrado */
    justify-content: center; /* Centra horizontalmente el contenido */
    align-items: center; /* Centra verticalmente el contenido */
    border-radius: 5px; /* Bordes redondeados */
    height: 150px; /* Define un alto uniforme para los elementos */
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out; /* Animación suave */
}

.grid a:hover {
    background-color: #E8B321;
    color: #F9F9F9;
    transform: scale(1.02);
    border: 2px solid #040B16;
    border-radius: 5px;
}

.box {
    aspect-ratio: 1;
    /*border: 2px solid #040B16;*/
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 10px;
}

.box-top {
    width: 100%;
    height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.box-top img {
    width: 95%;
    height: 95%;
    object-fit: contain;
}

.box-bottom {
    width: 100%;
    height: 30%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    padding: 10px;
}


#enojado {
    display: none; /* Asegura que no sea visible */
    position: fixed;
    bottom: 5px; /* Justo arriba del footer */
    right: 1px; /* Pegado a la parte derecha */
    width: auto;
    padding: 1px;
    text-align: left;
    font-size: 1rem;
    font-weight: bold;
    color: #040B16;
    /*background: rgba(255, 255, 255, 0.8);*/
    /*border-radius: 5px;*/
}

#enojado p {
    margin: 0;
    width: 160px;
    display: inline-block;
    position: fixed;
    bottom: 100px; /* Justo arriba del footer */
    right: 170px; /* Pegado a la parte derecha */
    /*vertical-align: middle;*/
    z-index: 100;
}

#enojado img {
    height: 200px;
    float: right;
    margin-left: 5px;
    animation: jump 0.8s infinite alternate ease-in-out; /* Efecto de salto */
}

/* Animación de salto */
@keyframes jump {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

.footer {
    width: 100%;
    height: 15px;
    background-color: #040B16;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
}

.footer p {
    color: #F9F9F9;
    font-size: 0.7rem;
    line-height: 15px;
    opacity: 0.7;
}

/* --- RESPONSIVE DESIGN --- */

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    
    .menu {
        width: 100%;
        padding: 2vh;
    }
    
    .menu-logo {
        width: 50%;
        margin-bottom: 5vh;
    }
    
    .content {
        width: 100%;
        padding: 5vw;
    }
    
    .content-center img {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .header1 {
        padding: 0 5%;
        font-size: 1rem;
    }
    
    .menu {
        padding: 2vh;
    }
    
    .menu-logo {
        width: 70%;
        margin-bottom: 3vh;
    }
    
    .content-center img {
        width: 70%;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    #enojado {
        bottom: 10px;
        right: 5px;
    }

    #enojado p {
        width: 140px;
        bottom: 90px;
        right: 140px;
        font-size: 0.9rem;
    }

    #enojado img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Reduce el tamaño mínimo */
        gap: 10px; /* Reduce el espacio entre los elementos */
    }

    .grid a {
        height: 120px; /* Reduce la altura de las cajas */
    }

    .menu {
        padding: 1vh;
    }

    .content {
        padding: 3vw;
    }

    #enojado {
        bottom: 15px;
        right: 5px;
    }

    #enojado p {
        width: 120px;
        bottom: 80px;
        right: 120px;
        font-size: 0.8rem;
    }

    #enojado img {
        height: 120px;
    }
}