/*
Theme Name: St. Lucas
Theme URI: https://www.stlucaslcms.org
Author: Barrett Taylor
Author URI: https://www.stlucaslcms.org
Description: Custom block theme for St. Lucas Evangelical Lutheran Church — a warm, welcoming design built to help first-time visitors plan a visit and show up on Sunday. Navy + gold palette, Fraunces + Source Sans 3 typography.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.7.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: st-lucas
*/

/* Block themes are styled primarily through theme.json. This file carries a
   few refinements that are awkward to express there. */

/* Smooth in-page scrolling for the "Plan Your Visit" anchor links */
html {
  scroll-behavior: smooth;
}

/* Sticky header */
.wp-site-blocks > header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--wp--preset--color--white);
  box-shadow: 0 1px 0 rgba(31, 58, 95, 0.10), 0 6px 24px rgba(31, 58, 95, 0.06);
}

/* Gold underline animation on nav links */
.wp-block-navigation .wp-block-navigation-item a {
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.wp-block-navigation .wp-block-navigation-item a:hover {
  border-bottom-color: var(--wp--preset--color--gold);
}

/* Hero overlay helper: a deep-blue gradient scrim over a cover image */
.is-style-hero-scrim .wp-block-cover__background {
  background: linear-gradient(
    105deg,
    rgba(11, 29, 46, 0.90) 0%,
    rgba(21, 50, 79, 0.72) 40%,
    rgba(21, 50, 79, 0.22) 72%,
    rgba(21, 50, 79, 0.04) 100%
  ) !important;
}
/* 2026-12-03 (pastor: "more pizazz"): a brighter photo and a lighter scrim; this soft shadow
   keeps the headline and paragraph readable where the photo now shows through. */
.is-style-hero-scrim .wp-block-cover__inner-container :is(h1, h2, p):not(.wp-block-button) {
  text-shadow: 0 1px 14px rgba(11, 29, 46, 0.55);
}
@media (max-width: 700px) {
  /* on a phone the text runs the full width, so the scrim stays heavier to the right edge */
  .is-style-hero-scrim .wp-block-cover__background {
    background: linear-gradient(
      105deg,
      rgba(11, 29, 46, 0.88) 0%,
      rgba(21, 50, 79, 0.72) 55%,
      rgba(21, 50, 79, 0.42) 100%
    ) !important;
  }
}

/* Card lift on hover for ministry / event cards */
.is-style-card {
  border: 1px solid #e6ebf1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(15, 29, 46, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.is-style-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(15, 29, 46, 0.12);
}

/* Service-times cards: gold top accent */
.is-style-service-card {
  border-top: 4px solid var(--wp--preset--color--gold);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(15, 29, 46, 0.10);
}

/* Buttons: subtle lift */
.wp-block-button__link {
  transition: transform 0.12s ease, background 0.15s ease;
}
.wp-block-button__link:hover {
  transform: translateY(-1px);
}

/* ---------- Contact Form 7 styling (match the design) ---------- */
.wpcf7-form label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wp--preset--color--navy);
  margin: 0.7rem 0 0.3rem;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #d5dde6;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--wp--preset--color--ink);
  background: #fff;
  margin-top: 0.15rem;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  outline: none;
  border-color: var(--wp--preset--color--gold);
  box-shadow: 0 0 0 3px rgba(239, 90, 60, 0.15);
}
.wpcf7-form .wpcf7-submit {
  margin-top: 1.2rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--wp--preset--color--gold);
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.05rem;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.wpcf7-form .wpcf7-submit:hover {
  background: var(--wp--preset--color--gold-bright);
  transform: translateY(-1px);
}
/* Contact page form (not in a card) shouldn't force full-width submit */
.st-lucas-form-embed .wpcf7-form .wpcf7-submit { width: auto; }
.form-microcopy {
  text-align: center;
  font-size: 0.8rem;
  color: var(--wp--preset--color--ink-soft);
  margin-top: 0.7rem;
}
.wpcf7 .wpcf7-response-output {
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

/* ---------- Responsive video embeds (Watch hub) ---------- */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #1f4266 0%, #0b1d2e 100%);
}
.video-embed--featured {
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(11, 29, 46, 0.25);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-embed__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 1.5rem;
}
.video-embed__play {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--wp--preset--color--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
.video-embed__play::after {
  content: "";
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
  margin-left: 5px;
}
.video-embed:hover .video-embed__play {
  transform: scale(1.06);
  background: var(--wp--preset--color--gold-bright);
}
.video-embed--featured .video-embed__play { width: 92px; height: 92px; }
.video-embed--featured .video-embed__play::after { border-width: 15px 0 15px 25px; }
.video-embed__label {
  color: #c8d3e0;
  font-size: 0.82rem;
  max-width: 30rem;
  line-height: 1.5;
}

/* "Returning soon" worship-online badge */
.worship-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.worship-online-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--wp--preset--color--gold-bright);
}

/* ---------- Hero motion (subtle Ken-Burns zoom) ---------- */
@keyframes st-lucas-kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.09); }
}
.is-style-hero-scrim .wp-block-cover__image-background {
  animation: st-lucas-kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}

/* ---------- Scroll reveal (progressive enhancement) ----------
   The .reveal class is added by interactions.js, so with no JS the content
   is always visible. .is-visible is toggled on when the section scrolls in. */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Sticky "Plan a Visit" CTA (Watch button removed 2026-09-14) ---------- */
.sticky-cta {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  display: flex;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.sticky-cta.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.sticky-cta__btn {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: 100px;
  box-shadow: 0 8px 26px rgba(11, 29, 46, 0.28);
  transition: transform 0.12s ease, background 0.15s ease;
}
.sticky-cta__btn--primary {
  background: var(--wp--preset--color--gold);
  color: #fff;
}
.sticky-cta__btn--primary:hover {
  background: var(--wp--preset--color--gold-bright);
  transform: translateY(-1px);
}
.sticky-cta__btn--ghost {
  background: #fff;
  color: var(--wp--preset--color--navy);
  border: 1.5px solid rgba(11, 29, 46, 0.12);
}
.sticky-cta__btn--ghost:hover {
  transform: translateY(-1px);
}
@media (max-width: 600px) {
  .sticky-cta {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    justify-content: center;
  }
  .sticky-cta__btn {
    flex: 1;
    text-align: center;
    padding: 0.85rem 1rem;
  }
}

/* ---------- Audit fixes (July 2026) ---------- */

/* The hero cover is a positioned element, so without a stacking context of
   their own the overlapping service cards get painted UNDER it. */
.service-strip { position: relative; z-index: 2; }

/* WCAG AA: brand coral (#ef5a3c) is only 3.4:1 on white — fine for big
   buttons, too low for small text. Darken TEXT-sized coral site-wide;
   backgrounds and buttons keep the bright brand coral. */
.has-gold-color.has-text-color { color: #c03c1d !important; }

/* ---------- Polish pass ---------- */

/* Top bar: drop the address/phone line on phones — service times matter most,
   and four lines of micro-text before the logo reads as clutter. */
@media (max-width: 700px) {
  .topbar-contact { display: none; }
  .topbar-services { text-align: center; width: 100%; }
}

/* Navigation: gold underline persists on the page you're on */
.wp-block-navigation .wp-block-navigation-item a[aria-current="page"] {
  border-bottom-color: var(--wp--preset--color--gold);
}

/* Watch cards: let the card's own rounding clip the embed — kills the
   double-radius sliver at the top corners. */
.is-style-card .video-embed { border-radius: 0; }

/* The Events Calendar: inherit the theme's type + coral accent instead of
   the plugin's default Helvetica look. */
.tribe-common {
  --tec-font-family-sans-serif: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tec-color-accent-primary: #ef5a3c;
  --tec-color-text-events-title: #15324f;
  --tec-color-link-accent: #ef5a3c;
}
.tribe-common .tribe-common-h1,
.tribe-common .tribe-common-h2,
.tribe-common .tribe-common-h3 {
  font-family: Oswald, 'Arial Narrow', sans-serif;
  color: var(--wp--preset--color--navy);
}

/* ---------- Pastor's punch list, 2026-09-14 ---------- */

/* Staff headshots on the About page: round, uniform, and not tied to the
   source photo's aspect ratio. */
.staff-photo { margin: 0 0 1rem; }
.staff-photo img {
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(15, 29, 46, 0.14);
}

/* Prayer Request form: checkbox groups need normal-case labels — the generic
   CF7 label rule above is built for single-field captions. */
.wpcf7-form .field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wp--preset--color--navy);
  margin: 1.3rem 0 0.3rem;
}
.wpcf7-form .field-hint {
  font-size: 0.85rem;
  color: var(--wp--preset--color--ink-soft);
  margin: 0.4rem 0 0;
}
.wpcf7-form .wpcf7-list-item { display: block; margin: 0.2rem 0; }
.wpcf7-form .wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.98rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--wp--preset--color--ink);
}
.wpcf7-form input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--wp--preset--color--gold);
}
.st-lucas-form-embed--prayer .wpcf7-form .wpcf7-submit { margin-top: 1.6rem; }

/* ---------- Gallery hub (2026-09-18): carousel + tiles + modal galleries ---------- */

.ghub-locked { overflow: hidden; }

/* Carousel: a scroll-snap track; JS adds the buttons and dots. */
.ghub-carousel { position: relative; }
.ghub-carousel__track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 18px;
  background: var(--wp--preset--color--navy-deep);
  box-shadow: 0 18px 50px rgba(11, 29, 46, 0.22);
}
.ghub-carousel__track::-webkit-scrollbar { display: none; }
.ghub-carousel__track > figure,
.ghub-carousel__track > .wp-block-image,
.ghub-carousel__track > .wp-block-video {
  flex: 0 0 100%;
  margin: 0;
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.ghub-carousel__track img,
.ghub-carousel__track video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ghub-carousel__track figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 2.4rem 1.6rem 1.1rem;
  color: #fff;
  font-size: 0.95rem;
  text-align: left;
  background: linear-gradient(to top, rgba(11, 29, 46, 0.78), rgba(11, 29, 46, 0));
}
.ghub-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--wp--preset--color--navy);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(11, 29, 46, 0.25);
  transition: background 0.15s ease, transform 0.12s ease;
}
.ghub-carousel__btn:hover { background: var(--wp--preset--color--gold); color: #fff; }
.ghub-carousel__btn--prev { left: 0.9rem; }
.ghub-carousel__btn--next { right: 0.9rem; }
.ghub-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
}
.ghub-carousel__dot {
  width: 10px; height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cfd7e1;
  cursor: pointer;
}
.ghub-carousel__dot.is-active { background: var(--wp--preset--color--gold); transform: scale(1.25); }
.ghub-carousel:not(.is-ready) .ghub-carousel__track { display: block; }
/* A placeholder slide holds the spot for video until the clips are curated. */
.ghub-carousel__track > .ghub-slide--placeholder .video-embed {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

/* Tiles: one per gallery, built by JS from the gallery groups. */
.ghub-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.2rem 1rem;
  margin-top: 2.6rem;
}
.ghub-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.4rem 0.8rem;
  border: 1px solid #e6ebf1;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 6px 22px rgba(15, 29, 46, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ghub-tile:hover, .ghub-tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(15, 29, 46, 0.12);
  outline: none;
}
.ghub-tile:focus-visible .ghub-tile__thumb { box-shadow: 0 0 0 3px var(--wp--preset--color--gold); }
.ghub-tile__thumb {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--wp--preset--color--sky) center / cover no-repeat;
  border: 4px solid #fff;
  box-shadow: 0 6px 16px rgba(15, 29, 46, 0.18);
}
.ghub-tile__label {
  font-family: Oswald, 'Arial Narrow', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--wp--preset--color--navy);
  line-height: 1.15;
}
.ghub-tile__count { font-size: 0.78rem; color: var(--wp--preset--color--ink-soft); }

/* Modal: the authored gallery group, moved inside a <dialog>. */
.ghub-modal {
  width: min(1120px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--wp--preset--color--ink);
  box-shadow: 0 30px 80px rgba(11, 29, 46, 0.45);
  overflow: auto;
}
.ghub-modal::backdrop { background: rgba(11, 29, 46, 0.72); }
.ghub-modal__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1rem;
  padding: 1.1rem 1.4rem 0.9rem;
  background: #fff;
  border-bottom: 1px solid #e6ebf1;
}
.ghub-modal__title {
  grid-column: 1;
  margin: 0;
  font-size: 1.5rem;
}
.ghub-modal__caption {
  grid-column: 1;
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: var(--wp--preset--color--ink-soft);
}
.ghub-modal__close {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--wp--preset--color--cream);
  color: var(--wp--preset--color--navy);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.ghub-modal__close:hover { background: var(--wp--preset--color--gold); color: #fff; }
.ghub-modal__body { padding: 1.2rem 1.4rem 1.6rem; }
.ghub-modal__body .wp-block-gallery { margin: 0; }
.ghub-zoomable { cursor: zoom-in; }
.ghub-zoomable:focus-visible { outline: 3px solid var(--wp--preset--color--gold); outline-offset: 2px; }
.ghub-modal .wp-block-video video { width: 100%; border-radius: 12px; }

/* Lightbox */
.ghub-lightbox {
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(11, 29, 46, 0.96);
  color: #fff;
}
.ghub-lightbox::backdrop { background: transparent; }
.ghub-lightbox__figure {
  position: absolute;
  inset: 3.5rem 4.5rem 2.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}
.ghub-lightbox__media { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; width: 100%; }
.ghub-lightbox__media img,
.ghub-lightbox__media video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.ghub-lightbox__caption { font-size: 0.95rem; color: #dbe4ee; text-align: center; }
.ghub-lightbox__close,
.ghub-lightbox__nav {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}
.ghub-lightbox__close { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.8rem; }
.ghub-lightbox__nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 2.2rem; }
.ghub-lightbox__nav--prev { left: 0.8rem; }
.ghub-lightbox__nav--next { right: 0.8rem; }
.ghub-lightbox__close:hover, .ghub-lightbox__nav:hover { background: var(--wp--preset--color--gold); }

/* Before JS runs (or without it) the galleries stack under the carousel. */
.ghub-gallery { margin-top: 2.5rem; }
.ghub.is-enhanced > .ghub-gallery { display: none; }

@media (max-width: 700px) {
  .ghub-carousel__btn { width: 38px; height: 38px; font-size: 1.6rem; }
  .ghub-tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.9rem 0.6rem; }
  .ghub-tile__thumb { width: 76px; height: 76px; }
  .ghub-lightbox__figure { inset: 3.2rem 0.6rem 1.6rem; }
}

/* ---------- Pastor's punch list, 2026-09-23 ---------- */

/* Hero focal point. The cover block's focalPoint only travels as a data attribute in
   pattern markup, so the photo was centring on the guitar headstock — on a phone that
   was all you saw ("guitar handle only on mobile"). Desktop keeps the intended 60% 40%;
   phones frame the guitarist on the right. */
.is-style-hero-scrim .wp-block-cover__image-background { object-position: 60% 40%; }
@media (max-width: 700px) {
  .is-style-hero-scrim .wp-block-cover__image-background { object-position: 88% 35%; }
}
/* 2026-10-26: the hero is now the aerial (hero-aerial.jpg, 2.4:1). Desktop shows nearly
   the whole frame; on phones only a ~23%-wide slice fits, so sit it on the tower and the
   crowd below it (both left of centre) rather than the car park on the right. */
.is-style-hero-scrim .wp-block-cover__image-background { object-position: 45% 55%; }
@media (max-width: 700px) {
  .is-style-hero-scrim .wp-block-cover__image-background { object-position: 38% 50%; }
}

/* Inline links inside the coral-to-blue band ("Check us out"): the theme's dark-coral
   link colour disappeared against the gradient. White and underlined instead. */
.has-coral-blue-gradient-background p a:not(.wp-block-button__link) {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}
.has-coral-blue-gradient-background p a:not(.wp-block-button__link):hover,
.has-coral-blue-gradient-background p a:not(.wp-block-button__link):focus-visible {
  color: var(--wp--preset--color--cream);
}

/* Modal galleries: every tile is the same 4:3 frame, so a portrait photo no longer
   stretches its row and crops its neighbours into slivers (the ordination gallery's
   last row). Portrait photos are framed from the top so faces stay in view — the
   is-portrait class comes from gallery-hub.js once the image has loaded. */
.ghub-modal .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image {
  aspect-ratio: 4 / 3;
  flex-grow: 0;
}
.ghub-modal .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ghub-modal .wp-block-gallery.has-nested-images figure.wp-block-image img.is-portrait {
  object-position: 50% 15%;
}

/* A gallery with no photos yet (Haitian Ministry): its tile art is a .ghub-gallery__thumb
   image block that gallery-hub.js reads for the tile and that stays out of the modal;
   the note paragraph shows in the modal instead. */
.ghub-modal .ghub-gallery__thumb { display: none; }
.ghub-modal__body > .ghub-gallery > p:not(.ghub-gallery__caption) {
  margin: 0.4rem 0 0;
  color: var(--wp--preset--color--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ---------- Pages carried over from the old site (2026-10-16) ---------- */

/* Scripture references: the old site's hover popups become a title tooltip. */
.verse { border-bottom: 1px dotted var(--wp--preset--color--gold); cursor: help; }

/* The All-In course's row of habit links */
.aid-nav { font-size: 0.95rem; line-height: 2; }
.aid-nav a { font-weight: 700; margin: 0 0.15rem; white-space: nowrap; }
/* 2026-10-26: the old site's definition lists (Study's devotion resources) — the term
   line, then its note indented under it */
.dl-term { margin-bottom: 0.2rem; }
.dl-desc { padding-left: 1.5rem; margin-top: 0; }   /* padding: the constrained layout forces side margins */

/* Floated images inside the carried-over copy */
.entry-content .wp-block-image.alignleft,
.wp-block-post-content .wp-block-image.alignleft { float: left; margin: 0.3rem 1.6rem 1rem 0; max-width: min(300px, 45%); }
.entry-content .wp-block-image.alignright,
.wp-block-post-content .wp-block-image.alignright { float: right; margin: 0.3rem 0 1rem 1.6rem; max-width: min(300px, 45%); }
.wp-block-post-content .wp-block-image.alignleft img,
.wp-block-post-content .wp-block-image.alignright img { border-radius: 10px; }
.wp-block-post-content .wp-block-separator { clear: both; }

/* Google Calendar embeds (Calendar, Master Calendar) */
.gcal-embed { clear: both; }
.gcal-embed iframe { display: block; width: 100%; height: 760px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 8px 28px rgba(11, 29, 46, 0.08); }

/* Carried-over Contact Form 7 forms: a light grid in place of the old Smart Grid plugin. */
.wpcf7 .cf7-row { display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; }
.wpcf7 .cf7-col { flex: 1 1 100%; min-width: 0; }
.wpcf7 .cf7-col-half { flex-basis: calc(50% - 0.6rem); }
.wpcf7 .cf7-col-third { flex-basis: calc(33.333% - 0.8rem); }
.wpcf7 .cf7-col-two-thirds { flex-basis: calc(66.666% - 0.6rem); }
.wpcf7 .field { margin: 0 0 0.9rem; }
.wpcf7 .field > label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--wp--preset--color--navy); }
.wpcf7 .field > label em { color: var(--wp--preset--color--gold); font-style: normal; }
.wpcf7 .field label > .wpcf7-form-control-wrap { display: block; margin-top: 0.25rem; }
.wpcf7 select[multiple] { min-height: 9rem; }
.wpcf7 .wpcf7-list-item { display: inline-block; margin: 0 1rem 0.35rem 0; font-weight: 400; }
.wpcf7 .wpcf7-list-item label { display: inline-flex; align-items: center; gap: 0.4rem; }
.wpcf7 .form-nav-link { display: inline-block; margin: 0.35rem 0.6rem 0.35rem 0; padding: 0.45rem 0.9rem; border: 1px solid var(--wp--preset--color--navy); border-radius: 999px; font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.wpcf7 .form-nav-link:hover { background: var(--wp--preset--color--navy); color: #fff; }
.wpcf7 hr { margin: 1.4rem 0; }

/* Bilingual pages: the switch and its panels */
.lang-switch { gap: 0.5rem; margin-bottom: 1.6rem; }
.lang-btn { padding: 0.5rem 1.1rem; border: 2px solid var(--wp--preset--color--navy); border-radius: 999px; background: #fff; color: var(--wp--preset--color--navy); font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer; }
.lang-btn.is-active { background: var(--wp--preset--color--navy); color: #fff; }
.lang-btn:focus-visible { outline: 3px solid var(--wp--preset--color--gold); outline-offset: 2px; }
.has-lang-js .lang-panel:not(.is-active) { display: none; }
html:not(.has-lang-js) .lang-switch { display: none; }
html:not(.has-lang-js) .lang-panel + .lang-panel { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid #e6ebf1; }

/* Connect drop-down in the header navigation */
.wp-block-navigation .wp-block-navigation__submenu-container { border-radius: 12px; box-shadow: 0 14px 34px rgba(11, 29, 46, 0.14); padding: 0.4rem 0; min-width: 220px; }
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.45rem 1rem; font-size: 0.95rem; }

@media (max-width: 700px) {
  .wpcf7 .cf7-col-half, .wpcf7 .cf7-col-third, .wpcf7 .cf7-col-two-thirds,
  .wpcf7 .cf7-col-quarter, .wpcf7 .cf7-col-sixth, .wpcf7 .cf7-col-five-twelfths { flex-basis: 100%; }
  .wp-block-post-content .wp-block-image.alignleft,
  .wp-block-post-content .wp-block-image.alignright { float: none; margin: 1rem auto; max-width: 100%; }
  .gcal-embed iframe { height: 640px; }
}

/* ---------- Pastor's new punch list, 2026-10-27 ---------- */

/* Sundays (3a): the service-times cards are built to overlap the home hero by 4.5rem;
   on any other page that same pull-up put them over the intro paragraph. */
body:not(.home) .service-strip { margin-top: 1.5rem !important; }

/* Pre-header (4a): Español · Kreyòl Ayisyen in the top bar, next to the address. */
.topbar-lang a {
  color: var(--wp--preset--color--white);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.topbar-lang a:hover,
.topbar-lang a:focus-visible { color: var(--wp--preset--color--gold-bright); border-bottom-color: currentColor; }
@media (max-width: 700px) {
  .topbar-right { width: 100%; justify-content: center; }
}

/* About (2a): "Who is St. Lucas?" as a text box between the Mission and Staff bands;
   the old-church photo floats beside Our Story, and the current church clears it. */
.about-callout { border: 1px solid #e6ebf1; border-left: 4px solid var(--wp--preset--color--gold); }
.about-story-today { clear: both; }
.wp-block-post-content .wp-block-image.about-story-photo { margin-top: 0.3rem; margin-bottom: 0.8rem; }
.wp-block-post-content .wp-block-image.about-story-photo figcaption { text-align: left; }

/* ---------- ECC pages carried over from the old site (2026-11-09) ---------- */

/* Shortcodes Ultimate spoilers became details blocks: a cream bar with a +/− marker;
   spoilers that shared an accordion share a name, so opening one closes the rest. */
.wp-block-details.legacy-spoiler { border: 1px solid #e6ebf1; border-radius: 12px; margin: 1rem 0; background: var(--wp--preset--color--white); overflow: hidden; }
.wp-block-details.legacy-spoiler > summary { list-style: none; cursor: pointer; position: relative; background: var(--wp--preset--color--cream); color: var(--wp--preset--color--navy); font-weight: 700; padding: 0.9rem 3rem 0.9rem 1.2rem; }
.wp-block-details.legacy-spoiler > summary::-webkit-details-marker { display: none; }
.wp-block-details.legacy-spoiler > summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--gold); }
.wp-block-details.legacy-spoiler[open] > summary::after { content: "−"; }
.wp-block-details.legacy-spoiler[open] > summary { border-bottom: 1px solid #e6ebf1; }
.wp-block-details.legacy-spoiler > summary:focus-visible { outline: 3px solid var(--wp--preset--color--gold); outline-offset: -3px; }
.wp-block-details.legacy-spoiler > :not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; }
.wp-block-details.legacy-spoiler > summary + * { margin-top: 1rem; }
.wp-block-details.legacy-spoiler[open] { padding-bottom: 1.2rem; }

/* Data tables carried over (the Child Care fees, tuition and holidays): header row, zebra
   rows, numbers centred; the one-cell "boxes" of the review pages are not tagged. */
.wp-block-post-content .wp-block-table.legacy-table { overflow-x: auto; margin: 1.2rem 0; }
.wp-block-post-content .legacy-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.wp-block-post-content .legacy-table th, .wp-block-post-content .legacy-table td { border: 1px solid #e6ebf1; padding: 0.55rem 0.8rem; text-align: left; vertical-align: top; }
.wp-block-post-content .legacy-table thead th { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); }
.wp-block-post-content .legacy-table thead th strong, .wp-block-post-content .legacy-table thead th em { color: inherit; }
.wp-block-post-content .legacy-table tbody tr:nth-child(even) td { background: var(--wp--preset--color--sky); }
.wp-block-post-content .legacy-table td:not(:first-child) { text-align: center; }

/* The Summer Camp attendance grid: one row per week, a checkbox per day */
.wpcf7 .cf7-week-grid { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.9rem; }
.wpcf7 .cf7-week-grid th, .wpcf7 .cf7-week-grid td { border: 1px solid #e6ebf1; padding: 0.4rem 0.5rem; text-align: center; vertical-align: middle; }
.wpcf7 .cf7-week-grid thead th { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); }
.wpcf7 .cf7-week-grid th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.wpcf7 .cf7-week-grid .wpcf7-list-item { margin: 0; }
.wpcf7 .cf7-week-grid .wpcf7-list-item-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wpcf7 .cf7-week-grid input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0; }

/* The ECC forms use the old 12-column grid's narrower columns too */
.wpcf7 .cf7-col-quarter { flex-basis: calc(25% - 0.9rem); }
.wpcf7 .cf7-col-sixth { flex-basis: calc(16.666% - 1rem); }
.wpcf7 .cf7-col-five-twelfths { flex-basis: calc(41.666% - 0.7rem); }
.wpcf7 h4 { margin: 1.4rem 0 0.4rem; font-size: 1.1rem; color: var(--wp--preset--color--navy); }

/* A Shortcodes Ultimate box (Summer Camp's dates and fees) → a cream callout */
.legacy-box { border-left: 4px solid var(--wp--preset--color--gold); display: flow-root; }
/* 2026-11-10: the same box highlights one line on Prayer Partners (the pastor's review);
   flow-root keeps the box beside a floated photo instead of running under it */
.legacy-box > p:only-child { margin: 0; }
.legacy-box h3 { margin-top: 0; font-size: 1.25rem; }

/* The ECC home's program cards and photo row */
.ecc-cards .wp-block-image { margin: 0 0 0.8rem; }
.ecc-cards .wp-block-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.ecc-cards p a { text-decoration: none; }
.ecc-slider img { border-radius: 10px; }

/* Hispanic Ministry page (the pastors' edits, 2026-11-17): a photo row under the copy,
   and room above the two pastors' cards on About so the sticky header does not cover
   them when the page's bio links jump there */
.ministry-photos { margin-top: 2.2rem; }
.ministry-photos img { border-radius: 10px; }
/* the sticky header is 118 px tall on a wide screen, up to 326 px where the menu wraps,
   and 237 px on a phone */
#pastor-torneire, #pastor-regnier, #enews, #what-we-believe, #lutheran-south { scroll-margin-top: 12rem; }
@media (max-width: 1023px) { #pastor-torneire, #pastor-regnier, #enews, #what-we-believe, #lutheran-south { scroll-margin-top: 21rem; } }
@media (max-width: 480px) { #pastor-torneire, #pastor-regnier, #enews, #what-we-believe, #lutheran-south { scroll-margin-top: 15.5rem; } }

/* The pastor's Penultimate Punchlist, 2026-11-24: a photo of people under a page's opening
   paragraph (About, Children & Youth), and a photo inside a section (the youth outing). */
.page-lead-photo { margin: 2rem 0 0; }
.page-lead-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.page-photo { margin: 1.4rem 0 0.6rem; }
.page-photo img { display: block; width: 100%; height: auto; border-radius: 12px; }
.page-photo figcaption { margin-top: 0.5rem; font-size: 0.88rem; color: var(--wp--preset--color--ink-soft); text-align: center; }
@media (max-width: 700px) {
  /* after the desktop widths above, so they win on phones */
  .wpcf7 .cf7-col-quarter, .wpcf7 .cf7-col-sixth, .wpcf7 .cf7-col-five-twelfths { flex-basis: 100%; }
  .wpcf7 .cf7-week-grid { display: block; overflow-x: auto; }
  .wp-block-details.legacy-spoiler > :not(summary) { margin-left: 0.9rem; margin-right: 0.9rem; }
}

/* ---------- Respect reduced-motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .is-style-hero-scrim .wp-block-cover__image-background { animation: none; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .sticky-cta { transition: opacity 0.001s; }
}

/* Super Bowl Subs order form (rebuilt 2026-12-01): computed cost boxes and the totals line */
.wpcf7 input.sf-calc { background: #f4f6f9; border-style: dashed; text-align: right; width: 100%; box-sizing: border-box; }
.wpcf7 .sf-subs-totals { margin: 0.6rem 0 1rem; text-align: right; color: #c03c1d; font-size: 1.1rem; }
.wpcf7 .sf-subs-totals label { display: inline-block; margin: 0 0.8rem 0 0.3rem; }
.wpcf7 .sf-subs-totals input.sf-calc { width: 6.5rem; }
