/* css/bottom-nav.css - Navegación inferior mobile (< 150 líneas) */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(255, 255, 255, 0.95) 50%,
        rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: var(--safe-area-bottom);
    z-index: 9999;
    box-shadow: 
        0 -8px 32px rgba(102, 126, 234, 0.12), 
        0 -2px 8px rgba(0, 0, 0, 0.06),
        0 -1px 0 rgba(255, 255, 255, 0.8) inset;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: var(--spacing-sm);
    position: relative;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    border-radius: 12px;
    margin: 4px;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-item.active {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.nav-item:active {
    transform: scale(0.92) translateY(0);
    background: rgba(102, 126, 234, 0.12);
}

.nav-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.nav-item:hover .nav-icon {
    transform: scale(1.15) translateY(-3px);
    filter: drop-shadow(0 6px 12px rgba(102, 126, 234, 0.4));
    stroke: var(--primary);
}

.nav-item.active .nav-icon {
    transform: scale(1.25);
    filter: drop-shadow(0 6px 16px rgba(102, 126, 234, 0.6));
    stroke: url(#iconGradient);
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover .nav-label {
    color: var(--primary);
    transform: scale(1.05);
}

.nav-item.active .nav-label {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Haptic feedback visual */
@keyframes pulse {
    0% { 
        transform: scale(1);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }
    50% { 
        transform: scale(1.15);
        filter: drop-shadow(0 6px 16px rgba(102, 126, 234, 0.4));
    }
    100% { 
        transform: scale(1);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }
}

.nav-item:active .nav-icon {
    animation: pulse 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animación de entrada */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bottom-nav {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ajustes para landscape */
@media (orientation: landscape) {
    .bottom-nav {
        height: 48px;
        padding-top: 2px;
        padding-bottom: 2px;
    }
    
    .nav-item {
        gap: 2px;
        padding: 2px;
        margin: 2px;
    }
    
    .nav-icon {
        width: 22px;
        height: 22px;
    }
    
    .nav-label {
        font-size: 9px;
    }
}

/* Mostrar siempre en modo responsive */
@media (min-width: 768px) {
    .bottom-nav {
        display: grid !important;
    }
}

/* Soporte para notch de iPhone */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: max(var(--spacing-sm), env(safe-area-inset-bottom));
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(30, 41, 59, 0.98);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}
