/* ESTILOS PARA LA SECCIÓN "METEORITOS PRÓXIMOS"                  */

/* 
 * Este archivo contiene todos los estilos para mostrar las Cards
 * de meteoritos que se acercan a la Tierra. Incluye:
 * - Diseño de Cards con efecto vidrio
 * - Animaciones suaves al pasar el mouse
 * - Diseño responsive para móviles
 * - Colores de alerta según el nivel de riesgo
 */


/* Hace que el fondo de la sección sea completamente negro con partículas */
#proximos {
  background-color: #000 !important;
  position: relative;
  overflow: hidden;
}

/* Efecto de partículas en el fondo */
#proximos::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(30, 144, 255, 0.3), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(30, 144, 255, 0.2), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(30, 144, 255, 0.4), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(30, 144, 255, 0.2), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(30, 144, 255, 0.3), transparent),
    radial-gradient(1px 1px at 33% 80%, rgba(30, 144, 255, 0.25), transparent);
  background-size: 200px 200px, 150px 150px, 250px 250px, 180px 180px, 220px 220px, 160px 160px;
  background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 180px 50px, 220px 180px;
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
  animation: starFloat 60s linear infinite;
}

@keyframes starFloat {
  0% {
    transform: translateY(0) translateX(0);
  }
  100% {
    transform: translateY(-20px) translateX(10px);
  }
}

/* CONTENEDOR PRINCIPAL DE LAS CARDS */

/* Organiza las Cards una debajo de la otra con espacio entre ellas */
.meteorite-next {
  display: flex;              
  flex-direction: column;     
  gap: 2.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}


/* DISEÑO DE CADA CARD DE METEORITO */

/* Estilo principal de cada Card individual */
.meteorite-card-next {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  background: linear-gradient(135deg, 
    rgba(10, 10, 15, 0.95) 0%,
    rgba(20, 25, 35, 0.9) 50%,
    rgba(10, 10, 15, 0.95) 100%
  );
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, 
    rgba(30, 144, 255, 0.3),
    rgba(100, 200, 255, 0.2),
    rgba(30, 144, 255, 0.3)
  ) 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(30, 144, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 60px rgba(30, 144, 255, 0.1);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 220px;
  position: relative;
}

/* Efecto de brillo en el borde */
.meteorite-card-next::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent,
    rgba(30, 144, 255, 0.15),
    transparent
  );
  transition: left 0.6s ease;
}

.meteorite-card-next:hover::before {
  left: 100%;
}

/* Efecto cuando el usuario pasa el cursor */
.meteorite-card-next:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 12px 48px rgba(30, 144, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 80px rgba(30, 144, 255, 0.2);
  border-image: linear-gradient(135deg, 
    rgba(30, 144, 255, 0.6),
    rgba(100, 200, 255, 0.4),
    rgba(30, 144, 255, 0.6)
  ) 1;
}


/* LADO IZQUIERDO: CONTENEDOR DEL MODELO 3D */

/* Área donde se muestra el modelo 3D del meteorito */
.model-container-next {
  flex: 0 0 40%;
  min-height: 220px;
  width: 100%;
  height: 500px;
  position: relative;
  background: 
    radial-gradient(circle at 30% 40%, rgba(30, 144, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(100, 200, 255, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #05080f 0%, #0a1020 50%, #05080f 100%);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 
    inset 0 0 40px rgba(30, 144, 255, 0.1),
    inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Efecto de resplandor animado */
.model-container-next::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(30, 144, 255, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* El elemento canvas donde se renderiza el modelo 3D */
.model-container-next canvas {
  width: 100% !important;
  height: 120% !important;
  display: block;
  position: relative;
  z-index: 1;
}


/* LADO DERECHO: INFORMACIÓN DEL METEORITO */

/* Área donde se muestra toda la información textual */
.data-container-next {
  flex: 1;
  padding: 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, 
    rgba(10, 15, 25, 0.6) 0%,
    rgba(15, 20, 30, 0.4) 100%
  );
  position: relative;
}

/* Línea decorativa vertical */
.data-container-next::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: linear-gradient(180deg, 
    transparent,
    rgba(30, 144, 255, 0.8),
    transparent
  );
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.6);
}

/* Título del meteorito (ej: "2025 QZ1") */
.data-container-next h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #1e90ff 0%, #00bfff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(30, 144, 255, 0.3);
  font-weight: 700;
  position: relative;
}

/* Línea decorativa bajo el título */
.data-container-next h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(30, 144, 255, 0.8),
    transparent
  );
  box-shadow: 0 0 8px rgba(30, 144, 255, 0.6);
}

/* Párrafos con información del meteorito */
.data-container-next p {
  margin: 0.6rem 0;
  line-height: 1.8;
  font-size: 1.05rem;
  color: #e0e0e0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  position: relative;
  padding-left: 1rem;
}

/* Punto decorativo antes de cada párrafo */
.data-container-next p::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: rgba(30, 144, 255, 0.6);
  font-size: 0.9rem;
}

/* Resaltar valores importantes */
.data-container-next p strong {
  color: #00bfff;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(30, 144, 255, 0.4);
}


/* SISTEMA DE COLORES PARA NIVELES DE RIESGO */

/* Estilos base para todas las etiquetas de alerta */
.alerta-baja,
.alerta-media,
.alerta-alta {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  animation: alertGlow 2s ease-in-out infinite;
}

/* Riesgo bajo */
.alerta-baja {
  color: #00ff7f;
  background: linear-gradient(135deg, rgba(0, 255, 127, 0.1), rgba(0, 255, 127, 0.05));
  border: 1px solid rgba(0, 255, 127, 0.3);
  box-shadow: 
    0 0 15px rgba(0, 255, 127, 0.2),
    inset 0 0 10px rgba(0, 255, 127, 0.1);
  text-shadow: 0 0 10px rgba(0, 255, 127, 0.5);
}

/* Riesgo medio */
.alerta-media {
  color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 
    0 0 15px rgba(255, 215, 0, 0.25),
    inset 0 0 10px rgba(255, 215, 0, 0.1);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Riesgo alto */
.alerta-alta {
  color: #ff4d4d;
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.2), rgba(255, 77, 77, 0.1));
  border: 1px solid rgba(255, 77, 77, 0.5);
  box-shadow: 
    0 0 20px rgba(255, 77, 77, 0.3),
    inset 0 0 10px rgba(255, 77, 77, 0.15);
  text-shadow: 0 0 15px rgba(255, 77, 77, 0.7);
  animation: alertPulse 1.5s ease-in-out infinite;
}

@keyframes alertGlow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

@keyframes alertPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 0 20px rgba(255, 77, 77, 0.3),
      inset 0 0 10px rgba(255, 77, 77, 0.15);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 
      0 0 30px rgba(255, 77, 77, 0.5),
      inset 0 0 15px rgba(255, 77, 77, 0.2);
  }
}