* {
	margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
}

html{
    height: 100%;
}

body{
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

main{
    flex-grow: 1;
}

header{
    width: 100%;
    height: 80px;
    background-color: #f2cc8f;
    display: flex;      
    align-items: center;
    font-family: Verdana, Geneva, sans-serif;
}

.barra{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    margin: auto;
}

.logo-titulo {
    display: flex;
    align-items: center;
}

header img{
    height: 65px;
    width: auto;
}

header h2{
    color: #6d4c41;
    margin-left: 25px;
}

.barra, .menu-items {
    max-width: 100%;
}

nav {
    flex-grow: 1;
    text-align: right;
}

.menu-items {
    display: flex;
    justify-content: flex-end;
    flex-grow: 1;
    order: 1;
    flex-direction: row;
    text-align: center;
}

nav a {
    color: #6d4c41;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease; /* Agregar transición de color */
}

nav a:hover {
    color: #e07a5f; /* Cambiar color al pasar el cursor */
}

nav a::before {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #e07a5f; /* Color de la línea de la animación */
    transition: all 0.3s ease; /* Agregar transición de la línea */
    transform: translateX(-50%);
}

nav a:hover::before {
    width: 100%;
}

@media (max-width: 768px) {
    
    header {
        /* Permite que la altura del header crezca si es necesario */
        height: auto;
        padding: 5px 0;
    }

    .barra {
        /* Cambia la dirección del flexbox a columna para apilar los elementos */
        flex-direction: column;
        /* Centra los elementos */
        align-items: center;
    }

    .logo-titulo {
        /* Añade un espacio debajo del logo/título antes del menú */
        margin-bottom: 1px;
    }

    nav {
        /* Asegura que la navegación ocupe todo el ancho */
        width: 100%;
    }
    
    .menu-items{
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    nav a{
        margin: 8px; /* Añade espacio alrededor de los enlaces para facilitar el toque */
        font-size: 15px; /* Aumenta el tamaño de la fuente para mejor legibilidad */
    }
}