.event-category-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 1.56rem;
  padding-inline: 1.2rem;
  position: relative;
  font-size: .875rem;
  color: #fff;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .3);
  border-radius: 2rem;
  overflow: hidden;
  aspect-ratio: 0.86;
  isolation: isolate;
  width: 100%;
  container-name: card;
  container-type:inline-size;
  background-color: #000C4F;
}

@media (min-width: 768px) {
  .event-category-card {
    font-size: 1.125rem;
    justify-content: space-between;
    padding: 3rem 2.5rem 4.375rem 2.5rem;
    aspect-ratio: 0.85;
  }
}

.event-category-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  background: #0C0059;
  mix-blend-mode: multiply;
  opacity: .2;
  border-radius: 2rem;
  top: 0;
  left: 0;
}

.event-category-card__link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: inherit;
}

.event-category-card:hover::after {
  opacity: .4;
}

.event-category-card img {
  position: absolute;
  object-fit: cover;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 2rem;
  transition: transform 0.6s ease;
}

.event-category-card:hover img {
  transform: scale(1.2);
  width: 100%;
  height: 100%;
}

.event-category-card:hover .event-category-card::after{
  opacity: .4;
}

.event-category-card__title {
  margin: 0;
  font-size: 1.71em;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .028em;
}

@container (min-width: 20rem) {
  .event-category-card__title {
    font-size: 2.13em;
    line-height: 1.5;
  }
}

.event-category-card__count-n-subtitle {
  margin: 0;
  margin-top: .58em;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .03em;
}

.event-category-card__count {
  font-size: 1.5em;
  font-weight: 300;
  margin-right: .44em;
  line-height: .9;
}

@media (min-width: 1024px) {
  .event-category-card__count {
    font-size: 4em;
    margin-right: .2em;
  }
}

.event-card-grid .events-grid {
  max-width: var(--content-width);
  margin-inline: auto;
}