/* ===== DASHBOARD STYLES - Sin Navbar ===== */

/* Variables CSS COMPLETAS */
:root {
  /* Colores principales */
  --primary-color: #00d4aa;
  --primary-dark: #00b894;
  --primary-light: #00e9c7;
  
  /* Colores de fondo */
  --bg-primary: #0f1419;
  --bg-secondary: #1a1f2e;
  --bg-tertiary: #252b3a;
  --bg-glass: rgba(255, 255, 255, 0.05);
  
  /* Colores de texto */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-muted: rgba(255, 255, 255, 0.6);
  
  /* Colores de estado */
  --success: #00d4aa;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;
  
  /* Colores de métricas */
  --ph-color: #e74c3c;
  --ec-color: #27ae60;
  --temp-color: #f39c12;
  --wifi-color: #9b59b6;
  
  /* ✅ VARIABLES COMPATIBILIDAD NAVBAR */
  --lime: #84cc16;
  --lime-dark: #65a30d;
  --white: #ffffff;
  --dark: #18181b;
  --gray-light: #f4f4f5;
  --gray-medium: #a1a1aa;
  --graphite: #3f3f46;
  
  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(0, 212, 170, 0.3);
  --shadow-neon: 0 0 30px rgba(0, 212, 170, 0.6);
  
  /* Bordes */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  
  /* Transiciones mejoradas */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-float: 4s ease-in-out infinite;
  --transition-shimmer: 2s linear infinite;
  
  /* Espaciado responsivo */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ===== COMPENSACIÓN NAVBAR FIJO ===== */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.container-fluid.px-3.px-lg-4.main-content {
    margin-top: 80px;
    padding-top: 2rem;
}

/* ===== NAVEGACIÓN CORREGIDA ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    z-index: 10000;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    position: relative;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo-text {
    color: var(--white);
}

.logo-grow {
    color: var(--lime);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--lime);
}

.login-btn {
    background: var(--lime);
    color: var(--dark) !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px;
    margin-left: 1rem;
    transition: all 0.3s ease;
    font-weight: 600 !important;
}

.login-btn:hover {
    background: var(--lime-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(132, 204, 22, 0.3);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}
/* ===== EFECTOS DE PARTÍCULAS DE FONDO ===== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-particle 6s linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

/* ===== UTILIDADES ===== */
.color-aq {
  color: var(--primary-color) !important;
}

.bg-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== SECCIÓN DE BIENVENIDA CON ANIMACIONES ===== */
.welcome-section {
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

/* EFECTO SHIMMER EN BORDES */
/*.welcome-section::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    transparent, 
    var(--primary-color), 
    transparent, 
    var(--primary-light), 
    transparent
  );
  border-radius: var(--border-radius);
  z-index: -1;
  animation: shimmer 3s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}
*/
.welcome-section:hover::before {
  opacity: 1;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.welcome-section h3 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.25rem, 5vw, 2rem);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

/* ===== ESTADO DE CONEXIÓN PARA DEMO ===== */
.connection-status {
  width: clamp(10px, 3vw, 12px);
  height: clamp(10px, 3vw, 12px);
  border-radius: 50%;
  margin-left: var(--spacing-sm);
  position: relative;
  animation: pulse 2s infinite, breathe 4s ease-in-out infinite;
  background: var(--success);
  box-shadow: 0 0 10px var(--success), 0 0 20px var(--success), 0 0 30px var(--success);
}

.connection-status::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: inherit;
  border-radius: 50%;
  opacity: 0.3;
  animation: ripple 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
/* ===== TARJETAS DE MÉTRICAS CON EFECTOS AVANZADOS ===== */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  overflow: hidden;
  position: relative;
  height: 100%;
  min-height: 120px;
  transform-style: preserve-3d;
  animation: float 6s ease-in-out infinite;
}

/* EFECTO FLOAT ESCALONADO */
.card:nth-child(1) { 
  animation: float 6s ease-in-out infinite, fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
}
.card:nth-child(2) { 
  animation: float 6s ease-in-out infinite 0.5s, fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}
.card:nth-child(3) { 
  animation: float 6s ease-in-out infinite 1s, fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}
.card:nth-child(4) { 
  animation: float 6s ease-in-out infinite 1.5s, fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* BORDE SUPERIOR ANIMADO */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--primary-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-bounce);
  background-size: 200% 100%;
  animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* EFECTOS DE BRILLO Y PARTÍCULAS EN HOVER */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
    rgba(0, 212, 170, 0.1) 0%, 
    transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover::after {
  opacity: 1;
}

/* SEGUIMIENTO DEL MOUSE */
.card {
  transition: transform 0.1s ease;
}

.card-body {
  padding: clamp(0.75rem, 3vw, 1.5rem);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 100%;
}

/* ===== ICONOS CON ANIMACIONES AVANZADAS ===== */
.metric-icon {
  font-size: clamp(1.5rem, 6vw, 2.5rem) !important;
  flex-shrink: 0;
  margin-right: clamp(0.5rem, 2vw, 1rem) !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: var(--transition-smooth);
  transform-origin: center;
}

.card:hover .metric-icon {
  transform: rotate(360deg) scale(1.2);
  filter: drop-shadow(0 5px 15px rgba(0, 212, 170, 0.4));
}

/* ICONOS CON EFECTOS ESPECÍFICOS */
.bg-c-red:hover .metric-icon {
  color: var(--ph-color);
  text-shadow: 0 0 20px var(--ph-color);
}

.bg-c-green:hover .metric-icon {
  color: var(--ec-color);
  text-shadow: 0 0 20px var(--ec-color);
}

.bg-c-orange:hover .metric-icon {
  color: var(--temp-color);
  text-shadow: 0 0 20px var(--temp-color);
}

.bg-c-purple:hover .metric-icon {
  color: var(--wifi-color);
  text-shadow: 0 0 20px var(--wifi-color);
}

/* ===== CONTENIDO DE MÉTRICAS ===== */
.metric-content {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  transition: var(--transition-smooth);
}

.card:hover .card-title {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.metric-value {
  font-size: clamp(1.25rem, 5vw, 2rem) !important;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: clamp(0.25rem, 1vw, 0.5rem);
  line-height: 1;
  transition: var(--transition-smooth);
}

.card:hover .metric-value {
  transform: scale(1.05);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.metric-unit {
  font-size: clamp(0.6rem, 2.5vw, 0.8rem);
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
}

/* Colores específicos para cada métrica */
.bg-c-red {
  background: linear-gradient(135deg, 
    rgba(231, 76, 60, 0.1), 
    rgba(231, 76, 60, 0.05)) !important;
  position: relative;
}

.bg-c-red::before {
  background: linear-gradient(90deg, var(--ph-color), #ff6b9d, var(--ph-color));
}

.bg-c-green {
  background: linear-gradient(135deg, 
    rgba(39, 174, 96, 0.1), 
    rgba(39, 174, 96, 0.05)) !important;
}

.bg-c-green::before {
  background: linear-gradient(90deg, var(--ec-color), #00f2c3, var(--ec-color));
}

.bg-c-orange {
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.1), 
    rgba(243, 156, 18, 0.05)) !important;
}

.bg-c-orange::before {
  background: linear-gradient(90deg, var(--temp-color), #ffd93d, var(--temp-color));
}

.bg-c-purple {
  background: linear-gradient(135deg, 
    rgba(155, 89, 182, 0.1), 
    rgba(155, 89, 182, 0.05)) !important;
}

.bg-c-purple::before {
  background: linear-gradient(90deg, var(--wifi-color), #e17bee, var(--wifi-color));
}

/* ===== TARJETAS DE GRÁFICAS CON ANIMACIONES ===== */
.card-custom {
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
  position: relative;
  animation: slideInFromBottom 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transition: var(--transition-smooth);
}

.card-custom:nth-child(1) { animation-delay: 0.5s; animation-fill-mode: backwards; }
.card-custom:nth-child(2) { animation-delay: 0.6s; animation-fill-mode: backwards; }
.card-custom:nth-child(3) { animation-delay: 0.7s; animation-fill-mode: backwards; }

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-custom:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(0, 212, 170, 0.2);
}

.card-custom .card-body {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.card-custom .card-title {
  font-size: clamp(1rem, 3vw, 1.25rem);
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-primary);
}

/* ===== BOTONES CON EFECTOS AVANZADOS ===== */
.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  transform-style: preserve-3d;
}

.btn-outline-light::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: var(--transition-smooth);
}

.btn-outline-light::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: var(--transition-bounce);
  z-index: -1;
}

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

.btn-outline-light:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-outline-light:hover {
  border-color: var(--primary-color);
  color: var(--bg-primary);
  transform: translateY(-3px) rotateX(5deg);
  box-shadow: var(--shadow-glow);
}

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

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Móviles muy pequeños (320px - 480px) */
@media (max-width: 480px) {
  :root {
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
  }
  
  .welcome-section {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }
  
  .card {
    min-height: 100px;
  }
  
  .card-body {
    padding: 0.75rem;
    flex-direction: row;
    align-items: center;
  }
  
  .metric-icon {
    margin-right: 0.5rem !important;
    font-size: 1.75rem !important;
  }
  
  .metric-content {
    text-align: left;
  }
  
  .card-title {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
  }
  
  .metric-value {
    font-size: 1.5rem !important;
  }
  
  .metric-unit {
    font-size: 0.7rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
  }
}

/* Móviles (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .card {
    min-height: 110px;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* Tabletas (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .welcome-section {
    padding: var(--spacing-md);
  }
  
  .card {
    min-height: 130px;
  }
  
  .card-body {
    padding: 1.25rem;
  }
}

/* Escritorio pequeño (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .container-fluid {
    max-width: 1140px;
    margin: 0 auto;
  }
  
  .card {
    min-height: 140px;
  }
}

/* Escritorio grande (1200px+) */
@media (min-width: 1200px) {
  .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .card {
    min-height: 150px;
  }
  
  .card-body {
    padding: var(--spacing-lg);
  }
}

/* ===== MEJORAS DE ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .connection-status {
    animation: none;
  }
  
  .card, .welcome-section {
    animation: none;
  }
}

/* ===== MODO ALTO CONTRASTE ===== */
@media (prefers-contrast: high) {
  :root {
    --bg-glass: rgba(255, 255, 255, 0.15);
  }
  
  .card {
    border: 2px solid rgba(255, 255, 255, 0.3);
  }
}

/* ===== ESTADOS DE HOVER MEJORADOS ===== */
@media (hover: hover) {
  .card:hover .bi {
    transform: scale(1.05);
    transition: var(--transition-fast);
  }
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== UTILIDADES ADICIONALES ===== */
.text-truncate-responsive {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .text-truncate-responsive {
    max-width: 80px;
  }
}

/* ===== EFECTOS DE SEGUIMIENTO DE MOUSE ===== */
.card-mouse-tracker {
  cursor: pointer;
}

/* ===== GRADIENTES DINÁMICOS ===== */
.dynamic-gradient {
  background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
  background-size: 400% 400%;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* ===== NAVBAR RESPONSIVE - AGREGAR ESTO AL FINAL DEL CSS ===== */

/* Tabletas (768px - 991px) */
@media (max-width: 991px) {
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem !important;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .logo-image {
        height: 50px;
    }
}

/* Móviles y Tabletas pequeñas (hasta 767px) - BOTÓN HAMBURGUESA */
@media (max-width: 767px) {
    .mobile-menu {
        display: block !important; /* ✅ FORZAR VISIBILIDAD */
        background: none;
        border: 2px solid var(--white);
        border-radius: 5px;
        color: var(--white);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        width: 44px; /* Tamaño táctil mínimo */
        height: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 10002;
        transition: all 0.3s ease;
    }

    .mobile-menu:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--lime);
    }

    .nav-links {
        display: none !important; /* ✅ OCULTAR POR DEFECTO */
        position: fixed;
        top: 80px; /* Altura del navbar */
        left: 0;
        right: 0;
        background: var(--bg-primary);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        z-index: 9999;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex !important; /* ✅ MOSTRAR CUANDO ESTÁ ACTIVO */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.8rem 0;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 0.8rem !important;
        font-size: 1.1rem;
        width: 100%;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(255, 255, 255, 0.1);
        color: var(--lime);
    }

    .login-btn {
        margin-left: 0 !important;
        margin-top: 0.5rem;
        display: block;
        text-align: center;
        padding: 0.8rem 1.5rem !important;
        width: 100%;
        background: var(--lime);
        color: var(--dark) !important;
        border: none;
        border-radius: 8px;
        font-weight: 600;
    }

    .login-btn:hover {
        background: var(--lime-dark);
        transform: translateY(-2px);
    }

    .logo-image {
        height: 40px;
    }

    .logo {
        font-size: 1.1rem;
        gap: 0.5rem;
    }

    nav {
        padding: 0.8rem 1rem;
    }

    .nav-container {
        padding: 0;
    }
}

/* Móviles muy pequeños (320px - 480px) */
@media (max-width: 480px) {
    .mobile-menu {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .nav-links {
        top: 70px; /* Navbar más compacto */
        padding: 1rem;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.7rem !important;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-image {
        height: 35px;
    }

    nav {
        padding: 0.7rem 0.8rem;
    }
    
    .main-content {
        margin-top: 70px;
        padding: 1rem;
    }
}

/* ===== COMPENSACIÓN MEJORADA PARA NAVBAR FIJO ===== */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: 2rem;
    transition: margin-top 0.3s ease; /* Transición suave */
}

/* Ajuste para cuando el navbar cambia de altura en mobile */
@media (max-width: 767px) {
    .main-content {
        margin-top: 70px;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin-top: 65px;
        padding: 1rem;
    }
}

/* ===== ANIMACIÓN SMOOTH PARA EL MENÚ ===== */
.nav-links {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== OVERLAY PARA FONDO CUANDO MENÚ ESTÁ ABIERTO ===== */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9998;
}

.nav-overlay.active {
    display: block;
}