nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    min-height: 10vh;
    padding: 20px 10px;
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    cursor: pointer;
    flex: 1 1 0;
    min-width: 0;
}

.underline-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-end;
    width: 100%;
}

.underline-nav a {
    position: relative;
    color: #000000;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 0;
    transition: .5s ease;
}

.underline-nav a:hover{
    color: #d30808;
}

.underline-nav a::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #d30808;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.underline-nav a:hover::after {
    width: 100%;
    opacity: 1;
}


.titulo {
    position: relative;
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-family: Georgia, 'Times New Roman', Times, serif;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
    color: #000000;
    text-decoration: none;
    transition: .5s ease;
}

.titulo:hover {
    color: #d30808;
}

.titulo::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #d30808;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.titulo:hover::after {
    width: 100%;
    opacity: 1;
}


.logo {
    width: clamp(60px, 15vw, 100px);
    height: auto;
    display: block;
    margin-right: 50px;
}



/* Botón hamburguesa: oculto por defecto, solo se muestra en mobile */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #000000;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación: las 3 barritas se transforman en una X al abrir */
.hamburger.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .underline-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
        background-color: #ffde72;
    }

    .underline-nav.is-open {
        display: flex;
    }

    .underline-nav a {
        width: 100%;
        padding: 12px 10px;
    }
}
