nav {
    background-color: var(--color-gris-nube);
    display: flex;
    padding: 0rem 0.5rem 0rem 0rem;
    gap: 0.5rem;
}

.navbar-start {
  display: flex;
  flex-wrap: nowrap; /* Todos en una sola fila */
  flex: 1;           /* Ocupa todo el espacio posible */
}

.navbar-start .navbar-item {
  flex: 1 1 auto;       /* Crecen y se encogen igual */
  text-align: center;   /* Texto centrado */
  white-space: normal;  /* ✅ Permite que el texto se parta */
  word-break: break-word; /* Evita que se salga del contenedor */
  line-height: 1.2;     /* Un poco más compacto si se parte */
}

nav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav .navbar-brand .navbar-item {
    text-decoration: none;
    color: black;
    padding: 0.5rem;
}

nav .navbar-brand .navbar-item img {
    max-height: 40px;
}

nav .navbar-brand .navbar-item.titulo {
    font-size: large;
    font-weight: bold;
}

nav .navbar-brand .navbar-item.no-desktop {
    display: none;
}

nav .navbar-burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0.5rem;
    font-size: 1.5rem;
}

nav .navbar-burger span {
    display: block;
    height: 2px;
    background-color: #333;
    width: 20px;
}

nav .navbar-menu {
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
}

nav .navbar-menu .navbar-start {
    display: flex;
    align-items: center;
}

nav .navbar-menu .navbar-start .navbar-item {
    align-content: center;
    height: 100%;
    padding: 0.2rem;
    color: rgb(47, 46, 46);
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

nav .navbar-menu .navbar-start .navbar-item.is-active {
    font-weight: bold;
    color: var(--color-rojo);
}

nav .navbar-menu .navbar-start .navbar-item:hover {
    background-color: var(--color-rojo);
    color: var(--color-gris-nube);
}

nav .navbar-menu .navbar-end {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav .navbar-menu .navbar-end .navbar-item.botones-sesion {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

nav .navbar-menu .navbar-end .navbar-item.botones-sesion .button {
    padding: 0.1rem 0.4rem;
}

nav .navbar-menu .navbar-end .navbar-item {
    height: 100%;
    align-content: center;
    color: #4a4a4a;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}


.contenedor {
    position: relative;
    width: 100%;
    height: auto;
}

.pajaro {
    width: 100%;
    display: block;
}

.numero {
    position: absolute;
    bottom: 0rem;
    right: 0.6rem;
    font-size: 1rem;
    color: white;
    font-weight: bold;
    pointer-events: none;
}

.navbar-brand > a.navbar-item.no-desktop[href="/"] {
    padding-left: 24px !important; /* margen interior */
}

/* Último elemento del navbar */
.navbar-end .navbar-item:last-child {
    padding-right: 24px;
}

.navbar-brand > a.navbar-item.no-desktop[href="/"],
.navbar-brand > a.navbar-item.no-mobile[href="/"] {
    padding-left: 24px; /* o margin-left según prefieras */
}

/* Responsive */
@media (max-width: 1160px) {

    nav {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    nav .navbar-brand {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }

    nav .navbar-brand .navbar-item.no-desktop {
        display: flex;
    }

    nav .navbar-menu {
        padding: 0.5rem;
        flex-direction: column;
        display: none;
    }

    nav .navbar-menu.is-active {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        min-height: calc(100vh - 60px);  /* ✅ ocupa pantalla menos la barra */
        background-color: var(--color-gris-nube);
        overflow-y: auto;                 /* ✅ scroll si hay overflow */
    }

    nav .navbar-menu .navbar-start {
        flex-direction: column;
        gap: 0.5rem;
        flex: 1;  /* ✅ ocupa el espacio disponible */
    }

    nav .navbar-menu .navbar-start .navbar-item {
        padding: 0.5rem;
        width: 100%;
        text-align: left;
        border-radius: 0.5rem;

        /* ✅ estilos de texto mobile */
        color: #000;
        font-family: 'Inter', sans-serif;
        font-size: 29.605px;
        font-style: normal;
        font-weight: 500;
        line-height: normal;
    }

    nav .navbar-menu .navbar-start .navbar-item.is-active {
        /* ✅ estilo activo mobile */
        color: var(--Primario-400, #A42D1D);
        font-family: 'Inter', sans-serif;
        font-size: 37.35px;
        font-style: normal;
        font-weight: 500;
        line-height: normal;
    }

    nav .navbar-menu .navbar-end {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: auto;  /* ✅ botones siempre visibles al final */
    }

    nav .navbar-menu .navbar-end .navbar-item {
        gap: 0.5rem;
        flex: 1;
    }

    nav .navbar-menu .navbar-end .navbar-item.botones-sesion {
        display: flex;
        flex-direction: row;
    }

    nav .navbar-menu .navbar-end .navbar-item button {
        width: 100%;
        justify-content: center;
    }

    nav .no-desktop {
        display: inherit;
    }

    nav .no-mobile {
        display: none;
    }

    nav .navbar-burger {
        display: flex;
    }
    
    .navbar-brand > a.navbar-item.no-desktop[href="/"] {
      margin-left: 24px;
    }
    
    nav .navbar-menu .navbar-start .navbar-item.is-active:hover {
        color: #fff; /* ✅ texto blanco en hover */
        background-color: var(--Primario-400, #A42D1D); /* mantiene el fondo */
    }
}
