
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    /* Gradient: darker, reddish-orange toward both ends, brown in the center */
    background: linear-gradient(90deg, #8b1f00 0%, #b33800 18%, #6e2317 50%, #8b2e1a 82%, #8b1f00 100%);
    /* subtle sheen overlay retained */
    background-image: linear-gradient(90deg, #8b1f00 0%, #b33800 18%, #6e2317 50%, #8b2e1a 82%, #8b1f00 100%), linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 40%);
    background-blend-mode: overlay, normal;
    padding: 0.4rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-header);
    color: var(--color-white);
}

/* Reglas con mayor especificidad para asegurar apariencia consistente en todas las páginas */
.pwa-navbar,
.pwa-navbar .nav-items,
.pwa-navbar .nav-item,
.pwa-navbar .nav-link,
.pwa-navbar .nav-center {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.pwa-navbar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.35rem 1rem !important;
}

.pwa-navbar .nav-items {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 980px !important;
    margin: 0 auto !important;
    gap: 20px !important;
}

.pwa-navbar .nav-item { 
    flex: 1 1 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    min-width: 48px !important;
}

.pwa-navbar .nav-center { flex: 0 0 auto !important; }

.pwa-navbar .nav-link { padding: 8px 12px !important; }


.nav-items {
    display: flex;
    align-items: center;
    justify-content: space-between; /* distribuir espacio entre items */
    width: 100%;
    max-width: 980px;
    padding: 0 1rem;
    list-style: none;
    margin: 0;
}

.nav-item { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex: 1 1 0; /* ocupar igual fracción del ancho */
    position: relative; /* permitir posicionar badges respecto al item */
    min-width: 0; /* permitir que el contenido se comprima si es necesario */
}

.nav-center { flex: 0 0 120px; }


.nav-link { text-decoration: none; color: var(--color-white); display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px 12px; border-radius:10px; transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease; }

.nav-icon { font-size: 20px; color: rgba(255,255,255,0.92); transition: color 0.18s ease, transform 0.12s ease; }

.nav-label { font-size: 12px; color: rgba(255,255,255,0.95); }

/* Hover improves contrast; active state keeps original colors */
.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    transform: translateY(-2px);
}

.nav-link:hover .nav-icon {
    color: var(--printext-orange);
    transform: translateY(-2px) scale(1.02);
}

/* Keep selected/active menu items visually stable (no color/background change) */
.nav-link.active {
    background: transparent !important;
    color: inherit !important;
    transform: none !important;
}

.nav-link.active .nav-icon {
    color: rgba(255,255,255,0.92) !important; /* preserve default icon color */
    transform: none !important;
}

/* No accent dot for active items to keep icons visually consistent */

.logo-img { height: 44px; width: 44px; object-fit: cover; border-radius: 999px; }

.nav-center .logo {
    display:flex;
    align-items:center;
    justify-content:center;
    width:64px;
    height:64px;
    background: transparent; /* quitar el círculo de fondo */
    box-shadow: none;
    border: none;
    transform: translateY(-6px); /* menos elevación para mantener alineación */
}
.nav-center .logo .logo-img{ height:44px; width:44px; border-radius:999px; }


.profile-pill {
    /* Match the default nav-link appearance so Perfil behaves like other options */
    position: relative;
    padding: 6px 8px;
    min-width: auto;
    background: transparent;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
    border: none;
    backdrop-filter: none;
}

/* Make the whole right area look like an inset rounded rectangle (as in image) */
.nav-item:last-child { display:flex; justify-content:center; }

.profile-pill .nav-icon { font-size: 18px; }
.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--printext-orange);
    color: #fff;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    border: 2px solid rgba(255,255,255,0.08);
    z-index: 20;
    line-height: 1;
    display: inline-block;
    transform: translateZ(0);
}

@media (max-width: 768px) {
    .nav-label { display:none; }
    .logo-img { height: 40px; }
    .nav-items { max-width: 100%; padding: 0 0.5rem; }
}

/* Reservar espacio para la navbar fija */
body { padding-top: 64px; }

@media (max-width: 768px) {
    body { padding-top: 58px; }
}

/* Mobile: center logo without wrapping items */
@media (max-width: 480px) {
        /* On small screens position badge inside item's top-right corner so it doesn't cover the icon */
        .notif-badge {
            top: 6px;
            right: 6px;
            padding: 1px 5px;
            font-size: 10px;
            border-radius: 9px;
        }
    .navbar { padding: 0.25rem 0.6rem; }
    .nav-items { position: relative; justify-content: space-between; }
    /* Keep logo in the normal flex flow on small screens so items distribute evenly */
    .nav-item { flex: 1 1 0; display:flex; justify-content:center; min-width: 0; }
    .nav-center { 
        position: static;
        transform: none;
        flex: 1 1 0; /* center participates in equal distribution */
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .nav-center .logo { width: 44px; height: 44px; transform: none; background: transparent; box-shadow: none; border: none; }
    .nav-icon { font-size: 18px; }
    .profile-pill { padding: 8px 10px; min-width: 0; }
    .notif-badge { top: 4px; right: 6px; font-size: 10px; padding: 2px 5px; }
    body { padding-top: 64px; }
}
