.mi-event-section {
  width: 100%;
}

.mi-event-section__title {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: center;
}

.mi-event-section__title::before {
  content: "";
  width: 12px;
  height: 26px;
  background: #ff4b4b;
  flex: 0 0 auto;
}

.mi-event-section__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
}

.mi-event-card {
  width: min(100%, 340px);
  background: #fff;
  border: 1px solid #ff4b4b;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.06), 0 24px 48px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.mi-event-card.is-hidden {
  display: none !important;
}

.mi-event-card__image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4f4f4;
}

.mi-event-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mi-event-card__body {
  padding: 22px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.mi-event-card__title {
  margin: 0 0 12px;
  min-height: 2.6em;
}

.mi-event-card__date {
  font-weight: 700;
  margin-bottom: 14px;
  min-height: 4.5em;
}

.mi-event-card__text {
  margin-bottom: 18px;
  flex: 1 1 auto;
}

.mi-event-card__footer {
  margin-top: auto;
  padding-top: 8px;
}

.mi-event-card__button {
  display: inline-block;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

@media (max-width: 767px) {
  .mi-event-card {
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.03), 0 12px 20px rgba(0, 0, 0, 0.015);
  }

  .mi-event-section__title {
    font-size: 1.5rem;
    gap: 10px;
  }

  .mi-event-section__title::before {
    width: 10px;
    height: 22px;
  }

  .mi-event-section__grid {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 16px;
    padding: 0 16px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .mi-event-section__grid::-webkit-scrollbar {
    display: none;
  }

  .mi-event-card {
    flex: 0 0 calc(100% - 56px);
    width: calc(100% - 56px);
    scroll-snap-align: start;
  }
}

@media (min-width: 1200px) {
  .mi-event-section__grid {
    flex-wrap: nowrap;
    gap: 20px;
  }

  .mi-event-card {
    width: calc((100% - 60px) / 4);
    min-width: 0;
  }
}
