/* LINK PUBLIC STORY LAYOUT V5 */

.link-story-hero {
  background: #ffffff;
  border-bottom: 1px solid #e5ebed;
  padding: 46px 0 50px;
}

.link-story-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: clamp(34px, 5vw, 68px);
  align-items: center;
}

.link-story-copy {
  min-width: 0;
}

.link-story-kicker {
  color: #5a9834;
  font: 800 12px/1.2 Montserrat, Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.link-story-copy h1 {
  max-width: 720px;
  margin: 10px 0 17px;
  color: #082f57;
  font: 800 clamp(36px, 5vw, 62px)/1.05 Montserrat, Arial, sans-serif;
  letter-spacing: -.025em;
}

.link-story-copy p {
  max-width: 710px;
  margin: 0;
  color: #4b6477;
  font: 600 clamp(16px, 1.8vw, 19px)/1.62 "Open Sans", Arial, sans-serif;
}

.link-story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.link-story-actions a {
  min-height: 44px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #6fc63d;
  color: #082f57;
  text-decoration: none;
  font: 900 12px/1.2 Montserrat, Arial, sans-serif;
}

.link-story-actions a.secondary {
  background: #fff;
  border: 1px solid #cfdadd;
}

.link-story-visual {
  min-width: 0;
  min-height: 285px;
  max-height: 345px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #dfe7e9;
  border-radius: 16px;
  background: #f6f8f7;
  box-shadow: 0 10px 26px rgba(8,47,87,.06);
}

.link-story-visual img {
  display: block;
  max-width: 100%;
  max-height: 313px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.link-story-visual.photo {
  padding: 0;
}

.link-story-visual.photo img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* Old oversized visual heroes are replaced by the story hero. */
body > main > .link-public-wide-hero,
body > main > .link-assigned-graphic-hero,
body > main > .launch-image-hero,
body > .link-community-impact-hero,
body > main > .link-community-impact-hero {
  display: none !important;
}

/* Do not show a page-specific footer above the standard LINK footer. */
.events-footer:has(+ .link-launch-footer),
.directory-footer:has(+ script + script + script + .link-launch-footer) {
  display: none !important;
}

/* Events now tell the story with their approved flyer or org logo. */
.events-grid {
  gap: 18px !important;
}

.event-card {
  overflow: hidden;
  display: grid !important;
  grid-template-columns: minmax(190px, 250px) 1fr;
  border-radius: 14px !important;
  background: #fff !important;
}

.event-card-media {
  min-height: 210px;
  background: #f2f6f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.event-card-media img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.event-card-media.logo img {
  width: 75%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}

.event-org {
  margin: 0 0 8px;
  color: #4d8f31;
  font: 800 11px/1.35 Montserrat, Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Resource listing images should be unmistakably visible. */
.resource-card {
  overflow: hidden;
}

.resource-image,
.resource-image-placeholder {
  width: 100% !important;
  height: 190px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  object-fit: cover !important;
  background: #f3f7f5 !important;
}

.resource-image-placeholder img {
  width: 92px !important;
  height: 92px !important;
  object-fit: contain !important;
}

@media (max-width: 850px) {
  .link-story-shell {
    grid-template-columns: 1fr;
  }

  .link-story-visual {
    min-height: 220px;
    max-height: 300px;
  }

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

  .event-card-media,
  .event-card-media img {
    min-height: 220px;
    max-height: 300px;
  }
}
