/* Makes sure the image container actually has height (do not override desktop sizing) */
.hero-img-slider .w-slide,
.hero-img-slide-core {
  height: 100%;
}

/* Keep Webflow's desktop sizing; only force cover behavior */
.hero-img-slide-core .hero-slide-img {
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

/* Fix oversized images in articles */
.f-blog-thumbnail-full {
    text-align: center;
}
.oc-article-thumbnail > img {
    max-height: 650px;
    width: auto;
}

/* Fix container padding */
/* .container-semi-extended, 
.container-extended, 
.w-container {
    padding-top: 25px;
} */

/* Fix blog sidebar */
/* .f-blog-wrapper-bg {
    height: 100%;
} */

/* Fix Author Info @ Mobile */

.f-blog-avatar-wrapper-small {
    height: auto;
    margin-bottom: 10px;
}

/* Arrow animation – premium ease */
.article-link-arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* Hover state */
.homepage-article-link:hover .article-link-arrow {
  transform: translateX(6px);
}

/* Share Section */
.article-share {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
}

.share-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  color: #666;
}

.share-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.share-icon {
  color: #444;
  font-size: 16px;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  background: none;
  border: none;
  cursor: pointer;
}

.share-icon:hover {
  transform: translateY(-2px);
  color: var(--sda-blue);
}

/* copy feedback animation */
.copy-link-btn i{
  display:inline-block;
  transition: transform .25s cubic-bezier(.22,1,.36,1), color .25s ease;
}
.copy-link-btn.is-copied i{
  color:#28a745;
  transform: scale(1.12);
}

/* even spacing across row */
.share-icons{
  flex: 1;
  display:flex;
  align-items:center;
  justify-content: space-evenly;
}

/* OC tweak: sidebar title spacing */
.category---header---homepage-sidebar{
  line-height: 1.2em;
}

/* Featured lead article — crop from the top, like the sidebar thumbs.

   The hero is the one article image with a real crop happening in CSS: its
   wrapper is a forced 4:3 window (padding-top:75%, overflow:hidden) and the img
   is object-fit:cover, declared twice — inline in
   template-parts/homepage/featured-article.php:3-16 for the homepage, and in
   news-articles.css:13-27 for /ocn/. Neither sets object-position, so a portrait
   poster was being cropped down the middle: heads out of the top, feet out of
   the bottom.

   50% 0 reproduces what .oc-thumb-wrap does in the sidebar. Under cover a
   portrait source is width-limited, so all its overflow is vertical and the `0`
   pins the top edge; a landscape source is height-limited, so its overflow is
   horizontal and the `50%` centres it. Each half matters for exactly one
   orientation and neither interferes with the other.

   Written against the wrapper (0,2,1) rather than .blog-card-image.featured-v6
   because the Webflow sheet sets object-position:80% 50% on that selector at
   (0,2,0) inside @media (max-width:479px) — a bare (0,1,0) rule would look
   fixed on desktop and leave phones cropping off-centre. */
.blog-card-image-wrapper.featured-v6 img {
  object-position: 50% 0;
}

/* Department badge on the article and event cards.

   .badge-primary carries text-align:center from the Webflow export. The badge
   is inline-block, so on one line it shrinks to exactly its text and the
   centring has no slack to show — which is why this only ever looked wrong once
   a label wrapped: the first line fills the box and the last, shorter line sits
   centred under it. A multi-department article ("Communications / Family
   Ministries / Prayer Ministries") wraps from 1200px down; below 479px most
   labels wrap.

   The .start wrapper already declares the intent, but justify-content places
   the flex *item*, not the text inside it, and text-align inherits past it into
   the label. Scoped to .start so single-line pills elsewhere stay centred. */
.badge-primary .flex-horizontal.start {
  text-align: left;
}

/* OC sidebar thumbnails:
   - keep native proportions (height:auto)
   - crop ONLY if rendered height exceeds 4:3 (via wrapper max-height)
   - crop aligns from TOP down (overflow hidden) */
.oc-thumb-wrap{
  flex: 0 0 100px;
  max-width: 100px;
  max-height: 75px; /* 4:3 of 100px width */
  overflow: hidden;
  border-radius: 4px;
}
.oc-thumb-wrap img.side-article-list-image{
  width: 100%;
  height: auto !important;
  display: block;
}


/* Subscribe UI states */
.ocn-subscribe-form .subscribe-message,
.ocn-subscribe-form .w-form-fail,
.ocn-subscribe-form .w-form-done {
  display: none !important; /* prevents “flash” */
}

/* Only show when JS sets a state */
.ocn-subscribe-form.is-error .subscribe-message,
.ocn-subscribe-form.is-error .w-form-fail {
  display: block !important;
}

.ocn-subscribe-form.is-success .subscribe-message,
.ocn-subscribe-form.is-success .w-form-done {
  display: block !important;
}

/* Optional button states */
.ocn-subscribe-form button.is-loading { opacity: .85; }
.ocn-subscribe-form button.is-success { background:#28a745; color:#fff; }
.ocn-subscribe-form button.is-error   { background:#dc3545; color:#fff; }

/* =========================================================
   HERO SLIDER — mobile sizing + nav visibility + timer wheel
   ========================================================= */

/* 1) Fix "portrait phone" oversized hero images:
   Existing CSS enforces min-height:420px on .hero-slide-img and slider wrapper.
   Override on small screens to fit viewport and keep nav dots visible. */
/* Avoid vh on iOS (address bar causes jumps). Use width-driven sizing instead. */

/* Give slider nav dots a safe-area aware bottom offset + higher z-index */
#main-hero-slider-nav.w-slider-nav {
  z-index: 30 !important;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
  height: auto !important;
  padding-top: 0 !important;
  padding-bottom: 6px !important;
  pointer-events: auto;
}

/* 2) Show custom hero prev/next buttons on tablet+desktop,
      but hide on phone landscape and smaller (<=767px) */
@media screen and (min-width: 768px) {
  .hero-slider-nav-div {
    display: flex !important;
  }
}
@media screen and (max-width: 767px) {
  .hero-slider-nav-div {
    display: none !important;
  }
}

/* 3) Safari "next arrow points wrong way":
   Always use the LEFT svg and flip it for the right button */
.slider-icons.slider-icons--right {
  transform: scaleX(-1);
}
.slider-right:hover .slider-icons.slider-icons--right {
  transform: scaleX(-1) translateY(5px);
}

/* 4) Timer wheel control */
.oc-slider-timer {
  --oc-timer-size: 44px;
  --oc-timer-duration: 7500ms; /* JS overwrites this inline */
  position: absolute;
  width: var(--oc-timer-size);
  height: var(--oc-timer-size);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  z-index: 40;
}

.oc-slider-timer__svg{
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}


.oc-slider-timer::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:999px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
}
.oc-slider-timer > *{ position: relative; z-index: 1; }
.oc-slider-timer__track{
  fill: none;
  stroke: rgba(255,255,255,0.35);
  stroke-width: 3.5;
}

.oc-slider-timer__progress{
  fill: none;
  stroke: rgba(255,255,255,0.95);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transform-origin: 50% 50%;
}
/* Pause icon only shows when paused */
.oc-slider-timer__pause {
  width: 14px;
  height: 16px;
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.oc-slider-timer__pause::before,
.oc-slider-timer__pause::after {
  content: "";
  position: absolute;
  top: 0;
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.oc-slider-timer__pause::before { left: 0; }
.oc-slider-timer__pause::after  { right: 0; }

.oc-slider-timer.is-paused .oc-slider-timer__progress {
  /* progress is driven by JS; paused state just freezes current stroke */
}
.oc-slider-timer.is-paused .oc-slider-timer__pause {
  display: block;
}

/* Placement rules:
   - >=768px: beside the prev/next buttons (bottom-left)
   - <=767px: bottom-right corner */
@media screen and (min-width: 768px) {
  /* Put the timer inline with the arrow buttons */
  .oc-slider-timer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    margin-left: 10px;
  }
  .hero-slider-nav-div{
    width: auto;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
  }
  .hero-slider-nav-div a{ display: inline-flex; align-items: center; }
}

@media screen and (max-width: 767px) {
  /* On mobile we relocate timer into the blue block. Style it there. */
  .oc-slider-timer.oc-timer-anchored{
    position: absolute;
    right: 14px;
    left: auto;
    bottom: 10px;
    z-index: 9999;
  }
}


/* Mobile phone sizing + dots anchoring (<=767px) */
@media screen and (max-width: 767px) {

  /* Let hero shrink with viewport */
  .hero-section{
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 40px !important;
  }

  /* Stack sections naturally if Webflow keeps them in a row */
  .hero-section{
    flex-direction: column;
  }

  /* Make right (blue) block full width on phones */
  .hero-right-section{
    position: relative !important; /* anchors dots + timer (prevents iOS jump) */
    width: 100vw !important;
    min-width: 0 !important;
    padding: 24px 20px 52px !important; /* extra bottom room for dots */
    align-items: flex-start !important;
  }

  /* Main slider should scale with viewport WIDTH (not height) */
  .hero-img-slider.w-slider{
    min-height: 0 !important;
    height: clamp(260px, 55vw, 420px) !important;
  }
  .hero-img-slide-core .hero-slide-img{
    width: 100% !important;
    margin-left: 0 !important;
    min-height: 0 !important;
    height: clamp(260px, 55vw, 420px) !important;
  }

  /* Dots relocated into the blue section */
  .w-slider-nav.oc-dots-anchored{
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 10px !important;
    z-index: 9998 !important;
    display: flex !important;
    justify-content: center;
    width: 100%;
    pointer-events: auto;
  }

  /* Ensure dots are visible */
  .w-slider-nav.oc-dots-anchored .w-slider-dot{
    background: rgba(255,255,255,0.55);
  }
  .w-slider-nav.oc-dots-anchored .w-slider-dot.w-active{
    background: rgba(255,255,255,0.95);
  }
}

@media screen and (max-width: 479px) {
  .hero-img-slider.w-slider{
    height: clamp(220px, 70vw, 380px) !important;
  }
  .hero-img-slide-core .hero-slide-img{
    height: clamp(220px, 70vw, 380px) !important;
  }
}

/* Google Doc pages (templates/google-doc-page.php) are styled by the
   template-scoped assets/css/google-doc-page.css — including the .ocgd-faq-*
   rules that used to live here as a card design. They serve three URLs, so
   they do not belong in a sheet every page loads. */

/* =========================================================
   CONTENT TYPOGRAPHY — standardize lists, headings,
   paragraphs inside editor/GDoc content (.w-richtext)
   =========================================================
   The Webflow export ships a stray 14px/1.143 "ol" tag style
   (ul/p/body run 16px/1.75), zero heading top-margins, and
   no hr/table styling. Its own .rich-text fixes never fire
   (site uses .w-richtext). The stray styles live in the
   Webflow project itself, so they return with every export
   swap — keep the fix HERE.
   :where(.w-richtext) keeps all of these at bare-element
   specificity: they beat the export's base tag rules only
   by load order, while classed components inside content
   (.ocgd-faq-question h2, form plugins, .f-* headings)
   still override them.
   Never set padding-left on lists here — the export reduces
   ul/ol padding to 20px at <=479px and must keep winning. */

/* --- Lists ------------------------------------------------ */

/* Ordered lists match paragraph type (16px / 1.75 from body) */
:where(.w-richtext) ol {
  font-size: inherit;
  font-style: inherit;
  line-height: inherit;
}

/* Lists end with the same rhythm as paragraphs (p = 16px;
   the export's 32px doubled the gap after every list) */
:where(.w-richtext) ul,
:where(.w-richtext) ol {
  margin-bottom: 16px;
}

/* Nested lists: 10px top to match the li rhythm, no bottom
   margin (export's 32px left a hole before the next item) */
:where(.w-richtext) li > ul,
:where(.w-richtext) li > ol {
  margin-top: 10px;
  margin-bottom: 0;
}

/* Nested ordered-list markers: 1. -> a. -> i.
   (ul already cycles disc/circle/square via UA defaults) */
:where(.w-richtext) ol ol { list-style-type: lower-alpha; }
:where(.w-richtext) ol ol ol { list-style-type: lower-roman; }

/* --- Headings --------------------------------------------- */

/* Export sets margin-top: 0 on all headings, so mid-article
   headings hug the previous paragraph. Space above > below,
   scaled by level; bottom margins made consistent
   (export had h2:16 / h3:8 / h4-h6:10). */
:where(.w-richtext) h1,
:where(.w-richtext) h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}
:where(.w-richtext) h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}
:where(.w-richtext) h4,
:where(.w-richtext) h5,
:where(.w-richtext) h6 {
  margin-top: 24px;
  margin-bottom: 8px;
}

/* A heading directly under another heading (title + subtitle)
   keeps only the first one's bottom margin */
:where(.w-richtext) :is(h1, h2, h3, h4, h5, h6) + :is(h2, h3, h4, h5, h6) {
  margin-top: 0;
}

/* --- Content flow ------------------------------------------ */

/* No dead space at the top/bottom edges of a content block
   (sections provide their own padding) */
:where(.w-richtext) > :first-child { margin-top: 0; }
:where(.w-richtext) > :last-child { margin-bottom: 0; }

/* --- hr & tables (GDoc importer emits both; theme has no
       styling for either) ---------------------------------- */
:where(.w-richtext) hr {
  border: none;
  border-top: 1px solid var(--neutral--300);
  margin: 32px 0;
}
:where(.w-richtext) table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
:where(.w-richtext) th,
:where(.w-richtext) td {
  border: 1px solid var(--neutral--300);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

/* Tighter heading lead-ins on small screens, matching the
   export's own mobile reductions elsewhere */
@media screen and (max-width: 767px) {
  :where(.w-richtext) h1,
  :where(.w-richtext) h2 { margin-top: 36px; }
  :where(.w-richtext) h3 { margin-top: 28px; }
  :where(.w-richtext) h4,
  :where(.w-richtext) h5,
  :where(.w-richtext) h6 { margin-top: 20px; }
}

/* --- Footer decorative images --------------------------------
   These carry width/height attributes so browsers keep their
   aspect ratio even when lazy-load "sizes=auto" size containment
   applies (WP 6.7+ / Optimization Detective rewrite the sizes
   attribute; without a known ratio the images collapse to the
   300x150 fallback and render squished). The Webflow CSS sets
   only width, so height must stay auto or the height attribute
   becomes a fixed pixel height. */
.footer-canada-map-image,
.footer-canada-footer-symbol-image {
  height: auto;
}

/* --- WP-managed nav dropdown cells ---------------------------
   The old Webflow export gave the Departments dropdown's
   "Ministry Departments" grid cell a #w-node-... id rule so it
   spans two columns on tablet. The WP-menu renderer
   (inc/oc-nav-menus.php) emits no Webflow node ids, so the same
   rule lives here; applied via the oc-cell-wide control class on
   the menu item. */
@media screen and (max-width: 991px) {
  .oc-dropdown-cell-wide {
    grid-column: span 2 / span 2;
    justify-self: start;
  }
}
@media screen and (max-width: 479px) {
  .oc-dropdown-cell-wide {
    grid-column: span 1 / span 1;
  }
}

/* --- Mega-menu watermark must not swallow clicks ----------------
   .menu-side-text-wrapper is the decorative blue rail on the right
   of each open dropdown: the rotated section word plus the faint
   8%-opacity logo. Its child .page-header-logo-secondary is
   position:absolute, 600px wide with margin-left:-194px, so it is
   painted ~194px further left than the rail itself and, being
   positioned with z-index:auto, it stacks above the statically
   positioned link columns. It therefore intercepted clicks on the
   right-hand end of every link that ran under it -- the first ~94px
   of the link worked and the rest was dead. Only visible above
   991px, where the rail is display:none (see the Webflow
   breakpoint), which is why it only ever showed up on desktop.

   Nothing in the rail is interactive (the word is aria-hidden, the
   SVG is decorative), so it can opt out of hit-testing entirely.
   Note the later Webflow revision of this widget,
   .page-header-logo-secondary-v2, solves the same problem with
   z-index:-1; that is not usable here because .dropdown-pd paints a
   background, which would hide the watermark completely. */
.menu-side-text-wrapper {
  pointer-events: none;
}

/* Accessible skip link. Rendered as the first element inside <body>
   (header.php); hidden off-screen until keyboard focus lands on it.
   z-index sits above the nav wrappers (9998/9999). */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}
.skip-link:focus {
  background-color: var(--sda-blue);
  clip: auto;
  clip-path: none;
  color: #fff;
  display: block;
  font-size: 16px;
  height: auto;
  left: 8px;
  line-height: normal;
  padding: 12px 20px;
  text-decoration: underline;
  top: 8px;
  width: auto;
  z-index: 10001;
}

/* --- Heading-retag compensation ------------------------------------
   Spurious h1/footer elements in sitewide chrome were retagged for
   accessibility. The Webflow CSS sized some of them only via the bare
   h1 element selector, so those font rules are replicated onto the
   classes here (values copied from the Webflow h1 rules). */

/* Mega-menu watermark: was <h1 class="menu-side-text">, now a <div>.
   Its wrapper is display:none below 992px, so only the desktop h1
   sizing needs replicating. */
.menu-side-text {
  font-size: 54px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Hero slide heading: was <h1 class="hero-slide-h1">, now <h2>.
   font-size is class-controlled at every breakpoint, but line-height
   came from the h1 element rule (1.222em; the h2 rule uses 1.438em). */
.hero-slide-h1 {
  line-height: 1.222em;
}

/* Homepage "Featured Article" heading: was a bare <h1>, now <h2>. It
   carries no class of its own, so mirror the Webflow h1 element sizing,
   scoped to its wrapper (.flex-title.align-end is unique to this spot). */
.flex-title.align-end h2 {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.222em;
  margin-bottom: 16px;
}
@media screen and (max-width: 991px) {
  .flex-title.align-end h2 {
    font-size: 48px;
  }
}
@media screen and (max-width: 767px) {
  .flex-title.align-end h2 {
    font-size: 36px;
    margin-bottom: 10px;
  }
}

/* Single-post header band (main-heading-condensed): the generic label
   ("ARTICLE", "EVENT", "NEWSLETTER", ...) was retagged <h1> -> <div> so
   the real post title can be the page's only h1. Its classes only set
   margin/color; sizing came from the bare h1 element rules, replicated
   here. The div qualifier leaves the h1 uses (404, main-heading,
   facilities) on the original element rules. margin-bottom stays 4px
   from .mg-bottom-4px, which already overrode the h1 rule. */
.section.page-header div.mg-bottom-4px.color-neutral-200 {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.222em;
}
@media screen and (max-width: 991px) {
  .section.page-header div.mg-bottom-4px.color-neutral-200 {
    font-size: 48px;
  }
}
@media screen and (max-width: 767px) {
  .section.page-header div.mg-bottom-4px.color-neutral-200 {
    font-size: 36px;
  }
}

/* =========================================================
   CSS standards pass — accessibility, contrast, resilience
   ========================================================= */

/* Visible keyboard focus everywhere. The Webflow export strips outlines
   on slider arrows and form fields; :focus-visible restores a consistent
   ring for keyboard users without showing it on mouse click. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}
/* Slider arrows sit on imagery — a light ring keeps contrast. */
.w-slider-arrow-left:focus-visible,
.w-slider-arrow-right:focus-visible,
.slider-left:focus-visible,
.slider-right:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Respect prefers-reduced-motion (WCAG 2.3.3): neutralize the export's
   ~60 transitions/animations and smooth scrolling. Near-zero rather than
   'none' so Webflow interactions waiting on transitionend still fire.
   Pairs with the reduced-motion handling in assets/js/slider.js. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* In-content link contrast (WCAG 1.4.3 + 1.4.1). The primary accent
   var(--accent--primary-1) #5178ff is ~3.8:1 on white — acceptable for
   buttons/large UI (needs 3:1) but below 4.5:1 for body-copy links, which
   also differ from body text by color alone. Scope a darker, underlined
   treatment to rich-text body links only; primary buttons keep the accent. */
.w-richtext a:not(.w-button),
.rich-text a:not(.w-button) {
  color: #3a56c4;
  text-decoration: underline;
}
.w-richtext a:not(.w-button):hover,
.rich-text a:not(.w-button):hover {
  color: #1a2b4a;
}

/* Base typography in rem so text scales with the user's browser font-size
   preference (WCAG 1.4.4). Values equal the export's px at the default 16px
   root, so nothing changes at default settings; only user zoom/resize does. */
body { font-size: 1rem; }
h1 { font-size: 3.375rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Preserve image aspect ratio when only one dimension is constrained.
   webflow.css sets img{max-width:100%} but no height:auto, so images that
   receive sizes="auto" (Optimization Detective) or an explicit width can
   stretch. Generalizes the per-component height:auto fixes above. */
img[width][height] {
  height: auto;
}

/* Exception: images explicitly sized to fill their container. The rule above
   is (0,2,1) and loads last, so it would otherwise beat .f-image-cover's
   (0,1,0) height:100% and collapse the staff-card photos once they carry
   width/height attributes. Those attributes are only there to reserve the
   aspect ratio, so the CSS-driven fill must still win. */
img[width][height].f-image-cover {
  height: 100%;
}

/* Department initiative cards: hold the image to 16:9.

   The wrapper carried no height of its own, so the image's height:100% (set in
   the Webflow export) had nothing to resolve against and fell back to the CSS
   default height for a replaced element — 150px. Every card image rendered as a
   150px letterbox at every breakpoint, regardless of the source. Giving the
   wrapper the ratio gives that percentage something to resolve against, and the
   object-fit:cover already on the image crops sources that are not 16:9 (the
   Great Belong logo, used as a card on five departments, is square).

   height:auto is deliberate: it neutralises the export's own
   `.blog-card-image-wrapper.featured-v1{height:100%}` under 991px, which would
   otherwise re-open the same unresolvable chain on mobile. */
.blog-card-image-wrapper.featured-v1 {
  aspect-ratio: 16 / 9;
  height: auto;
}
.blog-card-image-wrapper.featured-v1 > .blog-card-image.featured-v1 {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* z-index scale — documents the layers this file uses so future stacking
   contexts slot in predictably:
     slider dots ....... 30
     slider timer ...... 40
     mobile nav ........ 9998–9999
     skip link ......... 10001
   Keep new layers within this ladder rather than inventing higher values. */

/* ========================================================================
   Header top bar overflow safety valve
   ======================================================================== */

/* .header-nav-menu-list has no flex-wrap, so an item added past the ~944px
   available at the 992px breakpoint would not push the row wider — the <li>s
   would shrink and the label would wrap *inside* its own item, silently
   making the top bar two lines tall. Pin labels to one line and let a surplus
   item drop to a new row instead, which at least reads as deliberate.

   This costs nothing today: the bar measures ~772px (AOTV + Sitemap + Search)
   against 944px at its tightest desktop width. It exists because the bar is
   now editor-editable in Appearance -> Menus, and the next person to add an
   item will not do that arithmetic.

   Scoped to .header-right-side-top because the primary bar below shares the
   .header-nav-menu-list class, and to >=992px because below that the list is
   already flex-direction: column for the hamburger panel. */
@media screen and (min-width: 992px) {
  .header-right-side-top .header-nav-menu-list {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .header-right-side-top .header-nav-link {
    white-space: nowrap;
  }
}

/* ========================================================================
   Article cards — even card rhythm
   ======================================================================== */

/* Applies to the two places the .blog-link-v1 article card appears in a set,
   where cards are read side by side and any difference in row heights reads as
   a fault:

     .article-resource-slide-mask            homepage "Blog Posts, News &
                                             Articles" slider
     .page-template-news-and-articles
       .events---grid                        the OCN / News & Articles grids

   Every row inside the card sized to its own content, so the excerpt and the
   author sat at a different height on every card. Measured live: the
   department pill was 40px, or 54px on a post filed under three departments;
   titles ran 1-4 lines on the homepage and 1-7 in the grid (28px each); and
   the 55-word auto-excerpt ran 6-9 lines on the homepage and 6-13 in the grid
   (16px each). Homepage cards came out 577-693px tall with the author row
   starting anywhere between 481px and 597px down the card; the grid produced
   eight distinct card heights from 639px to 769px in one view.

   .blog-information's `margin-top: auto` only ever half-worked. In the slider
   it does nothing at all, because .w-slide is inline-block and sizes to its
   own content, so no card has free space for an auto margin to absorb. In the
   grid, rows do stretch, so it bottom-aligned the author within a row — but
   left the excerpt starting at a different height on every card, and did
   nothing between rows.

   So each row reserves a fixed height and clamps anything longer, which makes
   every card identical without touching the slider's or the grid's layout
   mode. Each min-height is a line count times that element's own line-height
   rather than a pixel constant, so it follows the type scale.

   The grid selectors carry an extra guard. .events---grid also holds the
   Upcoming Events rail, whose cards reuse .blog-link-v1 but carry no title,
   no date and a much shorter excerpt — reserving six lines and a 52px author
   there would inflate them badly. `.display-4 ~` keeps the excerpt and author
   rules on cards that have a title, and the pill rule uses :has() for the same
   test, since the pill sits *before* the title and no sibling combinator
   reaches backwards. Keep the :has() selectors in their own rule: one
   unsupported selector invalidates a whole selector list, and sharing a list
   with the slider would take the homepage down with it on an old browser. */

/* Department pill: one line, ellipsised. 1.3 rather than the badge's own 1em
   because overflow:hidden (needed for the ellipsis) would otherwise clip the
   descenders in names like "Church Growth / Evangelism". The min-height keeps
   the pill full-size on a post filed under no department. */
.article-resource-slide-mask .badge-primary {
  max-width: 100%;
}

.article-resource-slide-mask .badge-primary .color-accent-5 {
  min-width: 0;
  min-height: 1.3em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-template-news-and-articles .events---grid .blog-content:has(.display-4) .badge-primary {
  max-width: 100%;
}

.page-template-news-and-articles .events---grid .blog-content:has(.display-4) .badge-primary .color-accent-5 {
  min-width: 0;
  min-height: 1.3em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Title: three lines reserved and clamped. Three rather than two because it
   leaves 12 of the homepage's 16 headlines and 18 of the grid's 23 intact,
   where two cut more than half of them - "Downsview Seventh-day Adventist
   Church Leads Anti-Dr..." loses the story. 1.4em is .display-4's own
   line-height. */
.article-resource-slide-mask .blog-content .display-4,
.page-template-news-and-articles .events---grid .blog-content .display-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  min-height: calc(3 * 1.4em);
}

/* Excerpt: six lines reserved and clamped - the shortest excerpt the homepage
   renders, so no card there grows to accommodate it, and the same six lines in
   the grid, where a card is 388px wide at the 3-column breakpoint and so reads
   identically to a homepage card. margin-bottom:auto replaces the old
   margin-top:auto so that where a card does gain free space - a stretched grid
   row - the slack lands below the excerpt and the author stays pinned to the
   bottom, rather than shoving the excerpt down out of alignment. */
.article-resource-slide-mask .blog-information,
.page-template-news-and-articles .events---grid .display-4 ~ .blog-information {
  margin-top: 0;
  margin-bottom: auto;
}

.article-resource-slide-mask .blog-information > div,
.page-template-news-and-articles .events---grid .display-4 ~ .blog-information > div {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  overflow: hidden;
  /* Must equal exactly six lines of .text-200's own 1.143em line-height. Any
     padding here reopens the clip: line-clamp hides the surplus lines by
     clipping the box rather than removing them, so even 3px of padding-bottom
     lets a sliver of the seventh line show under the ellipsis. */
  min-height: calc(6 * 1.143em);
}

/* Author: 52px reserves one name line over two role lines (1.35 line-height),
   held even when a post carries no role text, so the name sits at the same
   height on every card instead of being re-centred against the 50px avatar.
   The grid needs the clamp for more than tidiness: at the 3-column breakpoint
   a two-line role pushed the block to 58-60px and knocked those cards out of
   line with the rest of the row. */
.article-resource-slide-mask .blog-read-wrapper,
.page-template-news-and-articles .events---grid .display-4 ~ .blog-read-wrapper {
  min-height: 52px;
}

.article-resource-slide-mask .blog-read-wrapper > div,
.page-template-news-and-articles .events---grid .display-4 ~ .blog-read-wrapper > div {
  min-width: 0;
  min-height: 52px;
}

.article-resource-slide-mask .blog-read-wrapper .text-200,
.page-template-news-and-articles .events---grid .display-4 ~ .blog-read-wrapper .text-200 {
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-resource-slide-mask .blog-read-wrapper .text-100,
.page-template-news-and-articles .events---grid .display-4 ~ .blog-read-wrapper .text-100 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.35;
  min-height: calc(2 * 1.35em);
}

/* ========================================================================
   Event cards — even card rhythm
   ======================================================================== */

/* The companion to the article-card block above, for the .blog-link-v1 cards
   that carry .events-card---text---heading: the two homepage rails (Upcoming
   Conference Events, Upcoming Local Events), the department-page event rail and
   the Upcoming Events rail on the OCN page. The grid is multi-column at every
   breakpoint (4 above 1440, 3 by default, 2 at 991 and below), so these cards
   are always read side by side.

   Every selector names BOTH containers. The OCN rail became a horizontal
   scroller (.oc-na__evtrack) rather than an .events---grid, and until it was
   listed here none of this applied to it: its pill-to-date gap measured 24-314px
   card to card against the homepage's flat 24px. Any future event rail needs
   adding here too — or it silently gets the raw export rhythm back.

   Measured live across the 21 homepage event cards: card heights ran 437-509px
   in the conference rail, and the date and title rows started up to 109px apart
   card to card. Three things caused it, and each is answered below.

   The rules that need a parent test use :has(), because .events---grid also
   holds article cards on the OCN page and the two card types reserve different
   rows. Kept in their own rule blocks, never sharing a selector list with the
   plain selectors: one unsupported selector invalidates the whole list, and on a
   browser without :has() these should simply not apply rather than take the
   neighbouring rules down with them. */

/* 1. .blog-information carries margin-top:auto from the export, so every card's
      leftover height was inserted directly ABOVE the date — the more room the
      title left, the further down the date started. The title is the last child,
      so packing from the top puts the slack at the foot of the card instead,
      where it is invisible. */
.events---grid .blog-content:has(.events-card---text---heading) .blog-information,
.oc-na__evtrack .blog-content:has(.events-card---text---heading) .blog-information {
  margin-top: 0;
}

/* 2. Ministry label: one line, ellipsised — the same treatment as the article
      pill above, so the two card types read alike. It used to be clamped to two
      lines to keep a multi-department event's full
      "Communications / Family Ministries / Prayer Ministries" visible, but that
      made the pill the tallest, most variable row on the card. 1.3 rather than
      the export's .8em because overflow:hidden would otherwise clip descenders,
      and max-width so a long label ellipsises inside the card instead of
      stretching the pill past it. */
.events---grid .events-card---text---ministry,
.oc-na__evtrack .events-card---text---ministry {
  min-width: 0;
  min-height: 1.3em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.events---grid .blog-content:has(.events-card---text---heading) .badge-primary,
.oc-na__evtrack .blog-content:has(.events-card---text---heading) .badge-primary {
  max-width: 100%;
}

/* 3. No pixel reserve on the pill's row any more. It existed only because the
      pill could be one line or two; at a fixed one line every pill is the same
      height at a given breakpoint on its own, and min-height:1.3em above keeps
      an event with no ministry term holding the same line. Dropping the reserve
      (62/58/45px, sized for two lines) is most of the space that used to sit
      above the date.

      The export's 24px below the pill is halved: with the pill no longer able to
      run tall, that gap reads as a gulf between the label and the date. */
.events---grid .blog-content:has(.events-card---text---heading) > .mg-bottom-24px,
.oc-na__evtrack .blog-content:has(.events-card---text---heading) > .mg-bottom-24px {
  margin-bottom: 12px;
}

/* 4. The date and the time sit side by side in .blog-information, which is a
      wrapping flex row with align-items:center. At 34px type the date is wide
      enough to break — "Aug 3" going to two lines doubled that row from 45px to
      90px on 6 of the 21 cards, and because the row centres its children, the
      date also drifted vertically inside it. It is two words and must never
      wrap. The time block is then reserved at its two-line height so an event
      with an end date cannot grow the row either; where the date is taller (every
      breakpoint above 480px) this reserve is invisible. */
.events---grid .events-card---date,
.oc-na__evtrack .events-card---date {
  white-space: nowrap;
}

.events---grid .events-card---text---time,
.oc-na__evtrack .events-card---text---time {
  min-height: calc(2 * 1.143em);
}

/* 5. Title: three lines reserved and clamped, which leaves 20 of the 21 live
      titles intact. 1.4em is the heading's own line-height. */
.events---grid .events-card---text---heading,
.oc-na__evtrack .events-card---text---heading {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  min-height: calc(3 * 1.4em);
}

/* 6. The export leaves 46px of padding under the card's content, and the title
      is the last thing in it — so a card whose title runs one line ended 54-57px
      of empty card below the words. The title's own three-line reserve already
      keeps the rhythm even, so this padding is doing nothing but adding height.
      Article cards keep the export value: their author block sits in that space. */
.events---grid .blog-content:has(.events-card---text---heading),
.oc-na__evtrack .blog-content:has(.events-card---text---heading) {
  padding-bottom: 24px;
}

@media (max-width: 767px) {
  .events---grid .blog-content:has(.events-card---text---heading),
  .oc-na__evtrack .blog-content:has(.events-card---text---heading) {
    padding-bottom: 20px;
  }
}

@media (max-width: 479px) {
  /* Below 480 the card is too narrow to hold the date and the time on one line,
     and .blog-information wraps — but only for the cards whose time actually
     runs long ("Time: 12:00pm - 4:00pm" wraps, "Ends: Aug 16" does not), so the
     row was 32px on some cards and 67px on others. Give the time its own line
     always: with the two-line time reserve above, the row is then the same
     height on every card whether the event is timed, all-day, or multi-day. */
  .events---grid .blog-content:has(.events-card---text---heading) .blog-read-wrapper,
  .oc-na__evtrack .blog-content:has(.events-card---text---heading) .blog-read-wrapper {
    flex-basis: 100%;
  }

  /* Four lines here: the heading switches to 4.6vw/1.2em, so titles that ran two
     lines on desktop run four or five, and a three-line clamp would cut eight of
     the twenty-one. */
  .events---grid .events-card---text---heading,
  .oc-na__evtrack .events-card---text---heading {
    -webkit-line-clamp: 4;
    line-clamp: 4;
    min-height: calc(4 * 1.2em);
  }

  /* .blog-content.event-card carries 53px from the export at this width. */
  .events---grid .blog-content:has(.events-card---text---heading),
  .oc-na__evtrack .blog-content:has(.events-card---text---heading) {
    padding-bottom: 18px;
  }
}

/* ========================================================================
   Author avatar — a circle, not an oval
   ======================================================================== */

/* .f-blog-avatar is a fixed 48x48 box on the article byline, but it sits in a
   flex row (.f-blog-avatar-wrapper-small) and never opted out of shrinking.
   Between 768 and 991px that row is tight enough to squeeze it: measured 29x48
   live, the height holding while the width collapsed, and border-radius:100%
   turning that into a vertical oval. Below 767px the layout stacks and the
   pressure goes away, which is why it only ever showed on tablet widths.
   Nothing about an avatar should flex. */
.f-blog-avatar {
  flex-shrink: 0;
}

/* The card avatars — the homepage rails and the OCN cards — are square today
   only because two unrelated sheets happen to supply the height the export
   leaves out: news-articles.css on /ocn/, and the inline block in
   template-parts/homepage/featured-article.php. The site-wide rule is
   .image-size-50x50 { max-width: 50px } with no max-height, and .avatar-circle
   sets width:100% with no height at all, so the circle depends on which page
   the card happens to be on.

   Pin both axes so it cannot, and crop with object-fit:cover rather than the
   default `fill`, which stretches a non-square source to fit the box instead of
   cropping it — the same distortion by a different route. Scoped to the 50x50
   variant: .avatar-circle's other size modifiers (._01 … ._08) carry their own
   width/height and must keep them. */
.avatar-circle.image-size-50x50 {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: cover;
}
