/* Event list and detail screens only. */
.mg-event-page {
  --event-ink: #173f35;
  --event-copy: #65766f;
  --event-line: #dce6e1;
  --event-soft: #f4f7f6;
  --event-gold: #b38a3f;
  background: #f5f7f6;
}

.mg-event-page .mg-main {
  padding-top: clamp(18px, 2.5vw, 30px);
}

.mg-event-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.mg-event-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 3px 2px 17px;
  border-bottom: 1px solid var(--event-line);
}

.mg-event-heading > div > span {
  display: block;
  margin-bottom: 4px;
  color: var(--event-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.mg-event-heading h1 {
  margin: 0;
  color: var(--event-ink);
  font-size: clamp(24px, 2.3vw, 29px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.mg-event-heading p {
  margin: 5px 0 0;
  color: var(--event-copy);
  font-size: 13px;
}

.mg-event-heading > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 13px;
  color: #34584e;
  font-size: 13px;
  font-weight: 800;
}

.mg-event-heading > a b {
  font-size: 17px;
  font-weight: 500;
}

.mg-event-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  min-height: 270px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
  background: #173f35;
  box-shadow: 0 15px 34px rgba(23, 63, 53, 0.13);
}

.mg-event-featured__copy {
  display: flex;
  padding: clamp(26px, 4vw, 46px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.mg-event-state {
  display: inline-flex;
  min-height: 25px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #26624f;
  background: #eaf6ef;
  font-size: 10px;
  font-weight: 850;
}

.mg-event-state.is-ended {
  color: #75827e;
  background: #edf1ef;
}

.mg-event-featured__copy > small {
  margin-top: 18px;
  color: #d5b778;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.mg-event-featured__copy h2 {
  margin: 7px 0 0;
  color: #fff;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.045em;
}

.mg-event-featured__copy p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.65;
}

.mg-event-featured__copy em {
  margin-top: 19px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 11px;
  font-style: normal;
}

.mg-event-featured__visual {
  position: relative;
  display: grid;
  overflow: hidden;
  place-content: center;
  color: #173f35;
  background: linear-gradient(140deg, #ecd7a9 0%, #d4af68 62%, #b68a3b 100%);
  text-align: center;
}

.mg-event-featured__visual--image {
  display: block;
  background: #173f35;
}

.mg-event-featured__visual--image::before,
.mg-event-featured__visual--image::after {
  display: none;
}

.mg-event-featured__visual--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.mg-event-featured__visual::before,
.mg-event-featured__visual::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  content: "";
}

.mg-event-featured__visual::before {
  width: 260px;
  height: 260px;
  right: -70px;
  top: -80px;
}

.mg-event-featured__visual::after {
  width: 170px;
  height: 170px;
  left: -55px;
  bottom: -80px;
}

.mg-event-featured__visual span,
.mg-event-featured__visual strong,
.mg-event-featured__visual i {
  position: relative;
  z-index: 1;
  display: block;
}

.mg-event-featured__visual span {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.mg-event-featured__visual strong {
  margin-top: 5px;
  font-size: 13px;
  letter-spacing: 0.22em;
}

.mg-event-featured__visual i {
  margin: 18px auto 0;
  padding: 5px 10px;
  border: 1px solid rgba(23, 63, 53, 0.32);
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.mg-event-board {
  margin-top: 34px;
}

.mg-event-board__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 2px 14px;
}

.mg-event-board__head h2 {
  margin: 0;
  color: var(--event-ink);
  font-size: 20px;
}

.mg-event-board__head p {
  margin: 5px 0 0;
  color: var(--event-copy);
  font-size: 12px;
}

.mg-event-board__head > span {
  color: #70817b;
  font-size: 11px;
  font-weight: 750;
}

.mg-event-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.mg-event-filters button {
  min-width: 72px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--event-line);
  border-radius: 11px;
  color: #65766f;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.mg-event-filters button.is-active {
  border-color: var(--event-ink);
  color: #fff;
  background: var(--event-ink);
}

.mg-event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mg-event-card[hidden] {
  display: none !important;
}

.mg-event-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--event-line);
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mg-event-card:hover {
  border-color: #adc5bd;
  box-shadow: 0 12px 26px rgba(23, 63, 53, 0.08);
  transform: translateY(-3px);
}

.mg-event-card > a {
  display: block;
  height: 100%;
  color: inherit;
}

.mg-event-card__thumb {
  position: relative;
  display: flex;
  min-height: 172px;
  padding: 21px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.mg-event-card__thumb::after {
  position: absolute;
  right: -38px;
  top: -38px;
  width: 135px;
  height: 135px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  content: "";
}

.mg-event-card__thumb small,
.mg-event-card__thumb strong,
.mg-event-card__thumb span {
  position: relative;
  z-index: 1;
  display: block;
}

.mg-event-card__thumb small {
  margin-bottom: auto;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.mg-event-card__thumb strong {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.mg-event-card__thumb span {
  margin-top: 7px;
  font-size: 10px;
  opacity: 0.72;
}

.mg-event-card__thumb--green {
  color: #fff;
  background: linear-gradient(135deg, #173f35, #2f6a59);
}

.mg-event-card__thumb--pink {
  color: #563440;
  background: linear-gradient(135deg, #f7d7e2, #f0a9c1);
}

.mg-event-card__thumb--gold {
  color: #4d4028;
  background: linear-gradient(135deg, #f1e2bc, #d7b86f);
}

.mg-event-card__thumb--blue {
  color: #274454;
  background: linear-gradient(135deg, #dcecf2, #9fc8d8);
}

.mg-event-card__thumb--gray {
  color: #5c6965;
  background: linear-gradient(135deg, #e8ecea, #cbd4d0);
}

.mg-event-card__thumb--image {
  display: block;
  min-height: 172px;
  padding: 0;
  background: #173f35;
}

.mg-event-card__thumb--image::after {
  display: none;
}

.mg-event-card__thumb--image img {
  display: block;
  width: 100%;
  height: 172px;
  object-fit: cover;
}

.mg-event-detail-hero-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 28px;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(23, 63, 53, 0.12);
}

.mg-event-card__body {
  padding: 18px 19px 20px;
}

.mg-event-card__body h3 {
  margin: 12px 0 0;
  overflow: hidden;
  color: var(--event-ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mg-event-card__body p {
  display: -webkit-box;
  min-height: 38px;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--event-copy);
  font-size: 11px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mg-event-card__body time {
  display: block;
  margin-top: 14px;
  color: #8a9893;
  font-size: 10px;
}

.mg-event-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 26px;
}

.mg-event-pagination a,
.mg-event-pagination button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--event-line);
  border-radius: 10px;
  color: #65766f;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.mg-event-pagination a.is-active {
  border-color: var(--event-ink);
  color: #fff;
  background: var(--event-ink);
}

.mg-event-pagination button:disabled {
  opacity: 0.5;
}

/* Event detail */
.mg-event-detail {
  width: min(100%, 920px);
  margin: 0 auto;
}

.mg-event-detail__head {
  padding: 10px 2px 24px;
  border-bottom: 1px solid var(--event-line);
}

.mg-event-detail__head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mg-event-detail__head > div small {
  color: #778781;
  font-size: 10px;
}

.mg-event-detail__head h1 {
  margin: 17px 0 0;
  color: var(--event-ink);
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.mg-event-detail__head > p {
  margin: 8px 0 0;
  color: var(--event-copy);
  font-size: 13px;
  line-height: 1.6;
}

.mg-event-detail__head dl {
  display: flex;
  gap: 26px;
  margin: 19px 0 0;
}

.mg-event-detail__head dl > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mg-event-detail__head dt {
  color: #8a9893;
  font-size: 10px;
}

.mg-event-detail__head dd {
  margin: 0;
  color: #3e5d54;
  font-size: 11px;
  font-weight: 750;
}

.mg-event-detail__content {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--event-line);
  border-radius: 16px;
  background: #fff;
}

.mg-event-promo {
  padding: clamp(38px, 7vw, 70px) 24px;
  color: #fff;
  background: linear-gradient(145deg, #173f35 0%, #265c4e 65%, #b38a3f 160%);
  text-align: center;
}

.mg-event-promo > span {
  color: #d5b778;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.mg-event-promo h2 {
  margin: 12px 0 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.045em;
}

.mg-event-promo p {
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.7;
}

.mg-event-promo > strong {
  display: block;
  margin-top: 27px;
  color: #fff;
  font-size: clamp(52px, 8vw, 82px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.mg-event-promo > strong em {
  margin-left: 8px;
  color: #d5b778;
  font-size: 17px;
  font-style: normal;
}

.mg-event-promo > small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.mg-event-detail__section {
  padding: 30px 32px;
  border-top: 1px solid #edf1ef;
}

.mg-event-detail__section h2 {
  margin: 0 0 18px;
  color: var(--event-ink);
  font-size: 18px;
}

.mg-event-detail__section p {
  color: var(--event-copy);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.mg-event-detail-cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  padding: 0 22px;
  border-radius: 12px;
  color: #fff;
  background: var(--event-ink);
  font-size: 13px;
  font-weight: 800;
}

.mg-event-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-event-steps li {
  min-width: 0;
  padding: 18px;
  border-radius: 13px;
  background: var(--event-soft);
}

.mg-event-steps b {
  color: var(--event-gold);
  font-size: 11px;
}

.mg-event-steps strong,
.mg-event-steps span {
  display: block;
}

.mg-event-steps strong {
  margin-top: 13px;
  color: var(--event-ink);
  font-size: 13px;
}

.mg-event-steps span {
  margin-top: 6px;
  color: var(--event-copy);
  font-size: 10px;
  line-height: 1.55;
}

.mg-event-notices {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 17px 18px 17px 34px;
  border-radius: 12px;
  color: #687973;
  background: var(--event-soft);
  font-size: 11px;
  line-height: 1.55;
}

.mg-event-detail__actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.mg-event-detail__actions a {
  display: inline-flex;
  min-width: 122px;
  min-height: 48px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--event-line);
  border-radius: 11px;
  color: var(--event-ink);
  background: #fff;
  font-size: 12px;
  font-weight: 850;
}

.mg-event-detail__actions a.is-primary {
  border-color: var(--event-ink);
  color: #fff;
  background: var(--event-ink);
}

.mg-event-neighbors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 32px;
}

.mg-event-neighbors a {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 78px;
  padding: 16px 18px;
  border: 1px solid var(--event-line);
  border-radius: 12px;
  background: #fff;
}

.mg-event-neighbors span {
  color: #8a9893;
  font-size: 10px;
}

.mg-event-neighbors strong {
  overflow: hidden;
  color: var(--event-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mg-event-page a:focus-visible,
.mg-event-page button:focus-visible {
  outline: 3px solid rgba(246, 111, 155, 0.3);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .mg-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .mg-event-page .mg-main {
    padding-top: 14px;
  }

  .mg-event-heading {
    align-items: flex-end;
    gap: 14px;
    padding-bottom: 14px;
  }

  .mg-event-heading h1 {
    font-size: 23px;
  }

  .mg-event-heading p {
    font-size: 11px;
  }

  .mg-event-featured {
    grid-template-columns: 1fr;
  }

  .mg-event-featured__copy {
    min-height: 230px;
    padding: 26px;
  }

  .mg-event-featured__visual {
    min-height: 160px;
  }

  .mg-event-board {
    margin-top: 28px;
  }

  .mg-event-detail__section {
    padding: 25px 22px;
  }

  .mg-event-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .mg-event-heading > a {
    flex: 0 0 auto;
    font-size: 11px;
  }

  .mg-event-heading > a b {
    display: none;
  }

  .mg-event-featured__copy h2 {
    font-size: 26px;
  }

  .mg-event-grid {
    grid-template-columns: 1fr;
  }

  .mg-event-card__thumb {
    min-height: 160px;
  }

  .mg-event-card__thumb--image img {
    height: 160px;
  }

  .mg-event-detail__head dl {
    display: grid;
    gap: 8px;
  }

  .mg-event-detail__section {
    padding: 23px 17px;
  }

  .mg-event-detail__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mg-event-detail__actions a {
    min-width: 0;
  }

  .mg-event-neighbors {
    grid-template-columns: 1fr;
  }
}
