/* this card is inspired form this - https://georgefrancis.dev/ */

section#cards {
  width: 100%;
}

div#card-container {
  display: flex;
  justify-content: center; /* Center the items horizontally */
  align-items: center; /* Center the items vertically */
  flex-wrap: wrap;
}

.card {
  --border-radius: 0.75rem;
  --primary-color: #1e567f;
  --secondary-color: #3c3852;
  width: 230px;
  min-width: 210px;
  min-height: 240px;
  font-family: "Arial";
  padding: 1rem;
  cursor: pointer;
  border-radius: var(--border-radius);
  background: #ededf0;
  box-shadow: 0px 8px 16px 0px rgb(0 0 0 / 3%);
  position: relative;
  float: left;
  margin-right: 20px;
  text-align: center;
  margin-bottom: 30px;
  width: calc(20% - 20px); /* 20% of the container width with margin */
}

@media (max-width: 768px) {
  .card {
    width: calc(90% - 20px); /* 50% of the container width with margin */
  }
}

.card > * + * {
  margin-top: 1.1em;
}

.card .card__content {
  color: var(--secondary-color);
  font-size: 0.86rem;
}

.card .card__title {
  padding: 0;
  font-size: 1.3rem;
  font-weight: bold;
  height: 82px;
}

.card .card__date {
  color: #6e6b80;
  font-size: 0.8rem;
}

.card .card__arrow {
  position: absolute;
  background: var(--primary-color);
  padding: 0.4rem;
  border-top-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  bottom: 0;
  right: 0;
  transition: 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card svg {
  transition: 0.2s;
}

/* hover */
.card:hover .card__title {
  color: var(--primary-color);
  text-decoration: underline;
}

.card:hover .card__arrow {
  background: #111;
}

.card:hover .card__arrow svg {
  transform: translateX(3px);
}