/* Shared content gutters; section backgrounds continue to span the viewport. */
#content {
  --content-gutter: 15px;
}
#content .container {
  box-sizing: border-box;
  padding-inline: var(--content-gutter);
}
#content > .alignfull {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}
/* Page covers already provide their own horizontal padding. */
#content .page-cover-content {
  padding-inline: 0;
}

/* Reserve space for list markers inside editable CMS content. */
#content .cms-rich-content ol,
#content .cms-rich-content ul {
  margin-block: 1em;
  margin-inline: 0;
  padding-inline-start: 1.75em;
  list-style-position: outside;
}
#content .cms-rich-content li > ol,
#content .cms-rich-content li > ul {
  margin-block: .5em;
}

@media (max-width: 781px) {
  #content {
    --content-gutter: 20px;
  }
  #site-footer > .container {
    padding-inline: 20px;
  }
  #content .section-pattern,
  #content .cta-section,
  #content .pastoral-section,
  #content .contact-faq-section {
    padding-block: 40px;
  }
  #content h2.section-title,
  #content .pastoral-info-box h2,
  #content .contact-faq-section .section-heading h2 {
    font-size: clamp(1.75rem, 7vw, 2rem) !important;
    line-height: 1.25 !important;
    overflow-wrap: break-word;
  }
  #content .section-heading,
  #content .section-pattern h2,
  #content .section-pattern p,
  #content .cta-section,
  #content .contact-faq-section .section-heading {
    text-align: left !important;
  }
  #content .section-heading {
    margin-bottom: 24px !important;
  }
  #content .section-heading > p,
  #content .cta-section p {
    margin-inline: 0 !important;
  }
  #content .section-pattern p,
  #content .section-pattern blockquote,
  #content .cta-section p,
  #content .entry-content,
  #content .cms-rich-content,
  #content .pastoral-info-box p,
  #content .contact-faq-section .section-heading p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
  #content .interactive-filter-bar.archive-categories {
    justify-content: flex-start;
    margin-bottom: 24px;
  }
  #content .filter-pill {
    max-width: 100%;
  }
  #content .cta-actions,
  #content .cta-section .wp-block-buttons {
    justify-content: flex-start !important;
  }
  #content .blog-card-body,
  #content .activity-card-body {
    padding: 20px;
  }
  #content .blog-card-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
  #content .wp-block-columns {
    margin-bottom: 0;
  }
  #content .wp-block-column {
    min-width: 0;
  }
  /* A zero flex basis collapses clipped cards when columns stack vertically. */
  #content .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: auto !important;
    width: 100%;
  }
  #content .hero-cover-section p,
  #content .page-cover p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
}

/* Desktop sections share a fluid canvas; long-form reading retains its own limit. */
@media (min-width: 1200px) {
  #masthead .header-main-inner > .container,
  #content .container:not(.page-cover-content),
  #site-footer > .container {
    width: calc(100% - 96px);
    max-width: 1440px;
    padding-inline: 0;
    margin-inline: auto;
  }
  #site-footer > .container {
    max-width: 1440px !important;
  }
  #content .pospi-list {
    max-width: none;
  }
  #content .single-post-row {
    width: 100%;
    max-width: 1160px;
    margin-inline: auto;
  }
}
