@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 10px 10px;
    }

    nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 5px;
        padding: 5px 10px;
        margin-top: 10px;
    }

    nav li {
        flex: 1 1 30%; /* Hace que los items se distribuyan bien en 2 o 3 columnas */
        min-width: 80px;
        text-align: center;
    }

    nav a {
        font-size: 14px;
        padding: 6px 8px;
        white-space: nowrap;
    }

    .logo {
        max-height: 28px;
    }

    .logo-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    /* Texto general responsive */
    .text-content h1 {
        font-size: 2rem;
        word-wrap: break-word;
        text-align: center;
    }

    .text-content h3 {
        font-size: 1rem;
        line-height: 1.4;
        text-align: justify;
        padding: 0 15px;
    }

    .image-content {
        max-width: 90%;
        margin: 0 auto;
    }
}


nav {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 10px 15px;
    z-index: 100; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
}

nav a:hover:not(.logo-container),
nav a:hover:not(.logo-container) img {
    background-color: #c9d3f9; 
    color: black;
}

.logo-container:hover {
    background-color: transparent !important;
}

nav ul {
    list-style: none; 
    margin: 0;
    padding: 0;
    display: flex; 
    justify-content: center;   /* Centra todo el nav */
    align-items: center;
    gap: 20px; /* Espacio uniforme entre elementos */
}

.logo {
    max-height: 40px; 
    margin-right: 10px;
}

nav li {
    margin: 0 5px;
}

nav a {
    display: block; 
    padding: 5px 10px; /* Reducir padding interno */
    color: rgb(0, 0, 0);
    text-decoration: none; 
    border-radius: 5px; 
    transition: background-color 0.3s ease; 
}

nav a:hover {
    background-color: #c9d3f9; 
    color: black;
}
