/* Mobile-safe wrapping for email-driven parish content only. */
.newsletter-email-content,
.newsletter-card .newsletter-email-content,
.news-article .parish-email-content,
.featured-notices .featured-notice-content {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.newsletter-email-content {
  white-space: pre-wrap !important;
}

.news-article,
.news-article > div,
.news-article details,
.news-article details > *,
.featured-notices,
.featured-notices .notice-row,
.featured-notices .notice-row article,
.featured-notices .notice-row article > div,
.newsletter-featured,
.newsletter-featured > *,
.newsletter-grid,
.newsletter-card,
.newsletter-card > * {
  min-width: 0;
  max-width: 100%;
}

.newsletter-email-content a,
.news-article .parish-email-content a,
.featured-notices .featured-notice-content a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.newsletter-email-content img,
.newsletter-email-content video,
.newsletter-email-content iframe,
.newsletter-email-content table,
.news-article .parish-email-content img,
.news-article .parish-email-content video,
.news-article .parish-email-content iframe,
.news-article .parish-email-content table,
.featured-notices .featured-notice-content img,
.featured-notices .featured-notice-content video,
.featured-notices .featured-notice-content iframe,
.featured-notices .featured-notice-content table {
  max-width: 100% !important;
  height: auto;
}

.newsletter-email-content pre,
.newsletter-email-content code,
.news-article .parish-email-content pre,
.news-article .parish-email-content code,
.featured-notices .featured-notice-content pre,
.featured-notices .featured-notice-content code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 700px) {
  .newsletter-email-content,
  .news-article .parish-email-content,
  .featured-notices .featured-notice-content {
    width: 100%;
    font-size: 1rem;
    line-height: 1.65;
  }

  .newsletter-featured,
  .newsletter-card,
  .news-article,
  .featured-notices .notice-row article {
    overflow: hidden;
  }

  .news-article details,
  .news-article details[open] {
    max-width: 100%;
  }
}

/* Featured Notice homepage excerpt + link */
.featured-notice-content { margin-bottom: .55rem; }
.featured-notice-more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.news-article[id] { scroll-margin-top: 110px; }

/* HARD LIMIT: homepage Featured Notice preview = exactly 4 rendered text lines. */
.featured-notices .featured-notice-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.45;
  max-height: calc(1.45em * 4);
  white-space: normal !important;
}


/* Homepage Featured Notices: always present up to three items as distinct cards. */
.featured-notices .notice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.featured-notices .notice-row article {
  min-width: 0;
}
@media (max-width: 900px) {
  .featured-notices .notice-row { grid-template-columns: 1fr; }
}

/* Homepage Featured Notices: titles are capped to TWO rendered lines on every device.
   Reserve the same title height for every card so the date, excerpt and More link align cleanly. */
.featured-notices .notice-row article h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.25;
  min-height: 2.5em;
  max-height: 2.5em;
  margin-bottom: .35rem;
}

@media (max-width: 600px) {
  .featured-notices .notice-row article h3 {
    line-height: 1.22;
    min-height: 2.44em;
    max-height: 2.44em;
  }
}
