/* Grid container */
.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0; /* Elimina el espacio entre celdas */
  max-width: 100%;
  margin: 0 auto; /* Centra la cuadrícula */
}

.grid-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 150px;
  background-color: transparent;
  color: white;
  font-size: 1.2em;
  border: none;
}

.grid-item h5 {
  margin: 0;
  text-align: center;
  padding-top: 20px;
}

.grid-item p {
  margin: 0;
  font-size: 0.5em;
  text-align: center;
}

/* Estilos para las líneas divisorias */
.grid-item:nth-child(1),
.grid-item:nth-child(2),
.grid-item:nth-child(3),
.grid-item:nth-child(4) {
  border-bottom: 2px solid white;
}

.grid-item:nth-child(2),
.grid-item:nth-child(6),
.grid-item:nth-child(3),
.grid-item:nth-child(7),
.grid-item:nth-child(4),
.grid-item:nth-child(8) {
  border-left: 2px solid white;
}

/* Estilos específicos */
.container-invisible {
  background-color: transparent;
  border: none;
}

.grid-item.div_rojo {
  background: linear-gradient(
    180deg,
    rgba(191, 18, 22, 1) 24%,
    rgba(255, 86, 90, 1) 50%,
    rgba(162, 1, 5, 1) 75%
  );
  background-blend-mode: normal;
}

/* Animación */
@keyframes pulsar {
  0% {
    text-shadow: 0 0 5px rgba(255, 254, 254, 0.4),
                 0 0 10px rgba(255, 254, 254, 0.3),
                 0 0 15px rgba(255, 254, 254, 0.2);
  }
  50% {
    text-shadow: 0 0 15px rgba(255, 254, 254, 0.7),
                 0 0 20px rgba(255, 254, 254, 0.6),
                 0 0 25px rgba(255, 254, 254, 0.5);
                 
  }
  100% {
    text-shadow: 0 0 5px rgba(255, 254, 254, 0.4),
                 0 0 10px rgba(255, 254, 254, 0.3),
                 0 0 15px rgba(255, 254, 254, 0.2);
  }
}

.fa-solid.fa-star.estrella {
  animation: pulsar 1s infinite alternate;
}
/* Animación de estrella fugaz */
.estrella {
  position: relative;
  opacity: 0; /* Invisibles al inicio */
  transform: translateX(1000px); /* Empezarán fuera de la pantalla */
  transition: transform 2s ease-out, opacity 2s ease-out; /* Transiciones suaves */
}

.estrella.movimiento {
  opacity: 1;
  transform: translateX(0); /* Terminan en su posición final */
}

/* Media queries para pantallas pequeñas */
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    max-width: 400px;
  }

  .grid-item {
    height: 120px;
    font-size: 1.2em;
  }

  /* Ajustes de bordes */
  .grid-item.div_rojo {
    border-right: none;
  }

  .grid-item:nth-child(3) {
    border-left: none;
  }

  .grid-item:nth-child(5) {
    border-right: none;
  }

  .grid-item:nth-child(6) {
    border-right: none;
  }

  .grid-item:nth-child(7) {
    border-left: none;
  }

  /* Mantén visibles las líneas horizontales entre las filas */
  .grid-item:nth-child(1),
  .grid-item:nth-child(2),
  .grid-item:nth-child(3),
  .grid-item:nth-child(4),
  .grid-item:nth-child(5),
  .grid-item:nth-child(6) {
    border-bottom: 2px solid white;
  }
}
