/* ========================================
   📱 NAVBAR MÓVIL MEJORADO - EXITOVOX
   Diseño Marino con Glassmorphism
   ======================================== */

/* Variables CSS para el tema marino */
:root {
    --marine-900: #0d2033; /* fondo */
    --marine-800: #13324e; /* bordes/sombras */
    --marine-grad: linear-gradient(180deg, rgba(19,50,78,.92), rgba(13,32,51,.92));
    --ocean-blue: #1e3c72;
    --ocean-light: #2a5298;
    --accent-blue: #64b5f6;
    --accent-light: #42a5f5;
    --soft-white: #e3f2fd;
    --text-light: #bbdefb;
    --shadow-marine: 0 4px 20px rgba(13, 32, 51, 0.3);
    --shadow-accent: 0 4px 20px rgba(100, 181, 246, 0.4);
}

/* NAVBAR SUPERIOR */
.bg-nav-marine {
    background: var(--marine-grad);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--shadow-marine);
    transition: all 0.3s ease;
}

.bg-nav-marine:hover {
    box-shadow: var(--shadow-accent);
}

.btn-icon {
    padding: .375rem .5rem;
    line-height: 1;
    border-radius: .75rem;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-icon:hover::before {
    left: 100%;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(100, 181, 246, 0.3);
}

.navbar-brand {
    font-weight: 600;
    color: var(--soft-white) !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--accent-light) !important;
    transform: scale(1.02);
}

/* OFFCANVAS MEJORADO */
.offcanvas {
    background: var(--marine-900);
    border-right: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: rgba(100, 181, 246, 0.1);
}

.offcanvas-title {
    color: var(--soft-white);
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.list-group-item {
    border: 0;
    padding: .85rem 1rem;
    color: var(--soft-white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-light));
    transition: width 0.3s ease;
    z-index: 0;
}

.list-group-item:hover::before {
    width: 4px;
}

.list-group-item:hover {
    background: rgba(255,255,255,.05) !important;
    color: var(--accent-light) !important;
    transform: translateX(5px);
    padding-left: 1.5rem;
}

.list-group-item i {
    color: var(--accent-blue);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.list-group-item:hover i {
    color: var(--accent-light);
    transform: scale(1.1);
}

/* MODAL BÚSQUEDA MEJORADO */
.modal-content {
    background: var(--marine-900) !important;
    border: 1px solid rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-marine);
}

.modal-header {
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: rgba(100, 181, 246, 0.1);
}

.modal-title {
    color: var(--soft-white);
    font-weight: 700;
}

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 0.2rem rgba(100, 181, 246, 0.25);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* TAB BAR INFERIOR MEJORADO */
.nav-tabbar {
    position: fixed;
    left: 0; 
    right: 0; 
    bottom: 0;
    height: 56px;
    background: var(--marine-grad);
    display: flex; 
    justify-content: space-around; 
    align-items: center;
    z-index: 1030;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 -4px 20px rgba(13, 32, 51, 0.3);
}

.tab-item {
    flex: 1; 
    text-align: center; 
    text-decoration: none;
    color: #e8f2ff; 
    font-size: .75rem;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: .1rem;
    padding: 0.5rem 0.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 0 2px;
    position: relative;
    overflow: hidden;
}

.tab-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.tab-item i { 
    font-size: 1.15rem; 
    line-height: 1; 
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.tab-item span {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.tab-item.active::before,
.tab-item:focus::before,
.tab-item:hover::before { 
    opacity: 0.1;
}

.tab-item.active, 
.tab-item:focus, 
.tab-item:hover { 
    color: #fff; 
    font-weight: 600; 
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.tab-item.active i {
    color: var(--accent-light);
    transform: scale(1.1);
}

.tab-item.active span {
    color: var(--accent-light);
}

/* BOTÓN FLOTANTE DE CHAT */
.chat-float {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1040;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-light));
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    box-shadow: var(--shadow-accent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chat-float::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--accent-light), var(--accent-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.chat-float:hover::before {
    opacity: 1;
}

.chat-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(100, 181, 246, 0.6);
}

.chat-float i {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.chat-float:hover i {
    transform: scale(1.1);
}

/* ANIMACIONES */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in {
    animation: slideInLeft 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* EFECTOS DE NOTIFICACIÓN */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    animation: pulse 1.5s infinite;
}

/* MEJORAS DE ACCESIBILIDAD */
.btn-icon:focus,
.tab-item:focus,
.chat-float:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .nav-tabbar {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .chat-float {
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 480px) {
    .tab-item {
        font-size: 0.7rem;
        padding: 0.4rem 0.2rem;
    }
    
    .tab-item i {
        font-size: 1rem;
    }
    
    .btn-icon {
        padding: 0.3rem 0.4rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
}

/* ESTADOS DE CARGA */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* EFECTOS DE FONDO */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(100, 181, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 15s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translate(-10px, -10px) scale(1.1);
        opacity: 1;
    }
    50% {
        transform: translate(10px, 5px) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translate(-5px, 10px) scale(1.05);
        opacity: 0.9;
    }
}
