/* Keep homepage featured event cards visually uniform while preserving full event text. */
.featured-event-intro {
  min-width: 0;
}

.featured-event-intro > div {
  min-width: 0;
}

@media (min-width: 701px) {
  .featured-event-intro {
    height: 320px;
  }

  .featured-event-intro > div {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .featured-event-description {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    margin-bottom: 0;
  }
}

/* Fade the text itself instead of painting a background-coloured overlay.
   This keeps the event card's existing background perfectly uniform. */
.featured-event-description.is-overflowing {
  position: relative;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - 5.5rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - 5.5rem),
    transparent 100%
  );
}

.featured-event-details-link {
  display: inline-block;
  align-self: flex-start;
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest-dark);
  font: 700 .82rem Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.featured-event-details-link:hover,
.featured-event-details-link:focus-visible {
  color: var(--forest);
}

.featured-event-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(78vh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.featured-event-dialog::backdrop {
  background: rgba(6, 61, 49, .38);
}

.featured-event-dialog-inner {
  padding: clamp(22px, 4vw, 34px);
}

.featured-event-dialog h2 {
  margin: 0 0 14px;
  color: var(--forest-dark);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.08;
}

.featured-event-dialog-description {
  white-space: pre-line;
  line-height: 1.6;
}

.featured-event-dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

@media (max-width: 700px) {
  .featured-event-intro > div {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .featured-event-description {
    position: relative;
    max-height: 13rem;
    overflow: hidden;
    margin-bottom: 0;
  }
}
