/* src/components/Main Page/cards.module.css */
.container {
  background-color: #151515;
  height: 100%;
  width: 100%;
  padding: 1rem 0;
  display: grid;
  place-content: center;
}

.cards {
  margin-top: 17%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  pointer-events: none;
}

.card {
  max-width: 15rem;
  margin-right: 2%;
  padding: 1.5rem;
  color: #ffffffda;
  background-color: #202022;
  pointer-events: auto;
  transform: scale(1);
  opacity: 1;
  transition: all 150ms ease-in-out;
  display: flex;
  flex-direction: column;
}

.cardTitle {
  position: relative;
  color: #FFFFFF;
  font-size: 1.8rem;
}

.card-title::before {
  content: "";
  height: 1rem;
  width: 1rem;
  border-radius: 50%;
  box-shadow: inset 0 0 3px #bb86fc;
  background-color: transparent;
  position: absolute;
  right: 0;
}

.date {
  color: #bb86fc;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.description {
  font-size: 0.9rem;
  color: #FFFFFF;
}

.card:nth-child(even) {
  transform: translateY(8px);
}

.card:nth-child(n) {
  transform: rotate(-5deg);
}

.cards:hover > .card:hover {
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.cards:hover > .card:not(:hover) {
  opacity: 0.5;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
  .cards {
    margin-top: 10%;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .card {
    max-width: 100%;
    margin-right: 0;
    padding: 1rem;
    font-size: 0.8rem;
  }

  .cardTitle {
    font-size: 1.2rem;
  }

  .date {
    font-size: 0.75rem;
    margin-bottom: 1rem;
  }

  .description {
    font-size: 0.8rem;
  }

  .cards:hover > .card:hover {
    transform: scale(1.1);
  }
}

@media (max-width: 480px) {
  .cards {
    margin-top: 5%;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .card {
    max-width: 70%;
    height: 190px;
    margin-right: 0;
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  .cardTitle {
    font-size: 1rem;
  }

  .date {
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
  }

  .description {
    font-size: 0.75rem;
  }

  .cards:hover > .card:hover {
    transform: scale(1.05);
  }
}
