/* ══════════════════════════════════════════════════════════════
   CONTENEDOR PRINCIPAL - FULL WIDTH (MÉTODO ROBUSTO)
   ══════════════════════════════════════════════════════════════ */
.nexal-metrics-container {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  margin-top: 15px !important;
  margin-bottom: 15px !important;
  padding: 20px 20px !important;
  background-color: #070707 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
}

/* ══════════════════════════════════════════════════════════════
   GRID - 4 COLUMNAS CENTRADO
   ══════════════════════════════════════════════════════════════ */
.nexal-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ══════════════════════════════════════════════════════════════
   TARJETA
   ══════════════════════════════════════════════════════════════ */
.metric-card {
  background: linear-gradient(145deg, #0d2238 0%, #020c18 100%);
  border: 1px solid rgba(0, 224, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  height: 280px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  box-sizing: border-box;
}

.metric-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 224, 255, 0.5);
  box-shadow: 0 15px 35px -5px rgba(0, 224, 255, 0.15);
}

/* ══════════════════════════════════════════════════════════════
   CONTENIDO
   ══════════════════════════════════════════════════════════════ */
.metric-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* --- ZONA SUPERIOR (Icono ↔ Descripción) --- */
.metric-top {
  position: relative;
  height: 120px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.metric-icon svg {
  width: 48px;
  height: 48px;
  color: #4a5e75;
}

.metric-desc {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #8aaabb;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-sizing: border-box;
}

.metric-desc strong {
  color: #00e0ff;
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.metric-card:hover .metric-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

.metric-card:hover .metric-desc {
  opacity: 1;
  transform: translateY(0);
}

/* --- ZONA INFERIOR (Número + Label) --- */
.metric-bottom {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-value {
  font-family: 'Roboto Mono', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  text-align: center;
}

.metric-label {
  color: #8aaabb;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
  transition: color 0.3s ease;
  text-align: center;
}

.metric-card:hover .metric-value {
  color: #00e0ff;
  text-shadow: 0 0 20px rgba(0, 224, 255, 0.5);
}

.metric-card:hover .metric-label {
  color: #00e0ff;
  transform: scale(1.2);
}

/* ══════════════════════════════════════════════════════════════
   EFECTOS VISUALES
   ══════════════════════════════════════════════════════════════ */
.particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.metric-card:hover .particle-canvas {
  opacity: 0;
}

.energy-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #00e0ff;
  box-shadow: 0 0 15px #00e0ff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 3;
}

.metric-card:hover .energy-bar {
  transform: scaleX(1);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nexal-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .nexal-metrics-container {
    padding: 14px 16px !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }

  .nexal-metrics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .metric-card {
    height: 260px;
  }

  .metric-value {
    font-size: 2.2rem;
  }
}
