/* GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Roboto, sans-serif;
    background: #edeeef;
}

/* NAVBAR */
.navbar {
    width: 100%;
    background: steelblue;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 2000; /* Aumentado */
    box-shadow: 0 4px 20px rgba(255, 252, 252, 0.1);
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #f2f3f5;
    font-family: Arial, Helvetica, sans-serif;
}

/* LINKS - DESKTOP */
.nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
}

.nav-links li a {
    text-decoration: none;
    color: #f0f2f5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1.1em;
    transition: 0.3s;
}

.nav-links li a:hover {
    color: #007bff;
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: #0b062f;
    transition: .3s;
    border-radius: 3px;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {

    /* Esconde los links horizontales */
    .nav-links {
        position: fixed; /* Antes absolute: ahora funciona mejor */
        top: 0;
        right: -260px; /* fuera de pantalla */
        width: 250px;
        height: 100vh;
        background: rgb(70, 131, 180);
        padding-top: 100px;  /* espacio superior */
        flex-direction: column;
        gap: 25px;
        align-items: center;
        transition: .3s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        z-index: 3000; /* por encima del nav */
    }

    .nav-links.active {
        right: 0; /* menú visible */
    }

    .hamburger {
        display: flex;
        z-index: 4000; /* asegura que se pueda clickear */
    }
}

/* ANIMACIÓN MENU */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}
