/**
 * page-know-god.css — the «รู้จักพระเจ้า» (Know God) page
 * CCT District 20 · Church of Christ in Thailand
 *
 * Layout: a five-step faith journey
 * - Full-bleed hero with a floating scripture card
 * - Resource partner strip (real logos, colour on hover)
 * - Sticky step rail with oversized ghost numerals
 * - Prayer card on navy, resource cards fed by external_links
 *
 * Project rule: ZERO !important — everything is resolved by specificity
 * under .kg-page. Colours come from theme-modern.css.
 */

/* ==========================================================
   1. TOKENS & SHELL
========================================================== */
.kg-page {
  --kg-navy: #121634;
  --kg-navy-soft: #1a2258;
  --kg-gold: #d97706;
  --kg-gold-dark: #b45309;
  --kg-gold-bright: #f59e0b;
  --kg-ink: #141a3e;
  --kg-body: #47546e;
  --kg-muted: #6b7891;
  --kg-line: #e3e9f2;
  --kg-paper: #ffffff;
  --kg-canvas: #f7f9fc;
  --kg-radius: 18px;
  background: var(--kg-paper);
  color: var(--kg-body);
  font-family: "Anuphan", "Noto Sans Thai", "Leelawadee UI", sans-serif;
}

.kg-page .kg-section {
  position: relative;
  padding: 84px 0;
}

/* Anchor targets leave room for the sticky header, otherwise the section
   title hides underneath it after using the hero buttons. */
.kg-page #journey,
.kg-page #resources {
  scroll-margin-top: calc(var(--header-total-h) + 12px);
}

.kg-page .kg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kg-gold);
  margin: 0 0 14px;
}

.kg-page .kg-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--kg-gold);
  border-radius: 2px;
  flex: 0 0 auto;
}

.kg-page .kg-kicker-light {
  color: #f7c66a;
}

.kg-page .kg-kicker-light::before {
  background: #f7c66a;
}

.kg-page .kg-title {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--kg-ink);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.kg-page .kg-lead {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--kg-body);
  margin: 0;
  max-width: 58ch;
}

/* ==========================================================
   2. HERO
========================================================== */
.kg-page .kg-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--kg-navy);
  padding: 104px 0 92px;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.kg-page .kg-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.kg-page .kg-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  display: block;
}

.kg-page .kg-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(18, 22, 52, 0.97) 0%, rgba(18, 22, 52, 0.93) 34%, rgba(18, 22, 52, 0.62) 64%, rgba(18, 22, 52, 0.34) 100%),
    linear-gradient(0deg, rgba(18, 22, 52, 0.55) 0%, rgba(18, 22, 52, 0) 45%);
}

.kg-page .kg-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: end;
}

.kg-page .kg-hero-copy {
  max-width: 620px;
}

.kg-page .kg-hero-title {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 20px;
}

.kg-page .kg-hero-title em {
  font-style: normal;
  color: #fbbf24;
  position: relative;
  white-space: nowrap;
}

.kg-page .kg-hero-lead {
  font-size: 1.06rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.84);
  margin: 0 0 32px;
  max-width: 54ch;
}

.kg-page .kg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.kg-page .kg-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.22s ease, background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.kg-page .kg-btn i {
  font-size: 1.05rem;
}

.kg-page .kg-btn-gold {
  background: var(--kg-gold-bright);
  color: #241503;
  border: 1px solid #fbbf24;
}

.kg-page .kg-btn-gold:hover {
  background: #fbbf24;
  color: #241503;
  transform: translateY(-2px);
}

.kg-page .kg-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.kg-page .kg-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateY(-2px);
}

.kg-page .kg-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kg-page .kg-hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.66);
}

.kg-page .kg-hero-meta i {
  color: #fbbf24;
  font-size: 0.95rem;
}

.kg-page .kg-hero-verse {
  position: relative;
  background: rgba(11, 15, 34, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 3px solid var(--kg-gold-bright);
  border-radius: var(--kg-radius);
  padding: 24px 26px 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 380px;
  justify-self: end;
  width: 100%;
}

.kg-page .kg-hero-verse p {
  position: relative;
  margin: 0 0 14px;
  font-size: 1.04rem;
  line-height: 1.85;
  color: #ffffff;
}

.kg-page .kg-hero-verse cite {
  display: block;
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f7c66a;
}

/* ==========================================================
   3. PARTNER BAND
========================================================== */
.kg-page .kg-partners {
  background: #fbfcfe;
  border-bottom: 1px solid var(--kg-line);
  padding: 34px 0 38px;
}

.kg-page .kg-partners-head {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kg-muted);
  margin: 0 0 26px;
}

/* The partner strip adapts to the NUMBER of sources: adding one in the
   console re-flows the row without touching CSS. Flex rather than grid,
   because a fixed 3-column grid leaves a hole when the count is not a
   multiple of three. The vertical dividers are gone: once the row wraps,
   the divider on the first item of row two floats at the left edge. */
.kg-page .kg-partners-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}

.kg-page .kg-partner {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  max-width: 420px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px 24px;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.kg-page .kg-partner:hover {
  transform: translateY(-2px);
}

/* Five sources or more (class added by PHP): three per row instead of
   cramming them into one — at 5–6 items every name wraps to 2–3 lines. */
.kg-page .kg-partners-row.is-dense .kg-partner {
  flex: 0 0 33.3333%;
}

.kg-page .kg-partner-logo {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--kg-line);
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.kg-page .kg-partner-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kg-page .kg-partner-logo svg {
  width: 30px;
  height: 30px;
  display: block;
}

.kg-page .kg-partner:hover .kg-partner-logo {
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: 0 10px 22px -16px rgba(20, 26, 62, 0.6);
}

.kg-page .kg-partner-text {
  min-width: 0;
}

/* The "opens externally" arrow is only used by the mobile card list.
   The desktop row does not need it — the platform label sits below. */
.kg-page .kg-partner-arrow {
  display: none;
}

.kg-page .kg-partner-name {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--kg-ink);
  line-height: 1.35;
}

.kg-page .kg-partner-role {
  display: block;
  font-size: 0.79rem;
  color: var(--kg-muted);
  line-height: 1.5;
  margin-top: 2px;
}

/* ==========================================================
   4. JOURNEY
========================================================== */
.kg-page .kg-journey {
  background: var(--kg-canvas);
  border-bottom: 1px solid var(--kg-line);
}

.kg-page .kg-journey-grid {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-top: 46px;
}

.kg-page .kg-rail {
  position: sticky;
  top: calc(var(--header-total-h) + 32px);
}

.kg-page .kg-rail-list {
  position: relative;
  margin: 0;
  padding: 4px 0 4px 26px;
  list-style: none;
}

.kg-page .kg-rail-list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--kg-line);
}

.kg-page .kg-rail-item {
  position: relative;
  font-size: 0.86rem;
  line-height: 1.45;
}

.kg-page .kg-rail-link {
  display: block;
  padding: 9px 0;
  color: var(--kg-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.kg-page .kg-rail-link:hover,
.kg-page .kg-rail-link:focus-visible {
  color: var(--kg-ink);
}

.kg-page .kg-rail-link:focus-visible {
  outline: 2px solid rgba(217, 119, 6, 0.55);
  outline-offset: 3px;
  border-radius: 4px;
}

.kg-page .kg-rail-dot {
  position: absolute;
  left: -26px;
  top: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.kg-page .kg-rail-item.is-active .kg-rail-link {
  color: var(--kg-ink);
  font-weight: 600;
}

.kg-page .kg-rail-item.is-active .kg-rail-dot {
  background: var(--kg-gold);
  border-color: var(--kg-gold);
  transform: scale(1.25);
}

.kg-page .kg-rail-item.is-active .kg-rail-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(217, 119, 6, 0.32);
}

.kg-page .kg-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kg-page .kg-step {
  position: relative;
  padding: 0 0 46px 0;
  border-bottom: 1px solid var(--kg-line);
  margin-bottom: 46px;
  /* Rail click: keep the step title from sliding under the sticky header */
  scroll-margin-top: calc(var(--header-total-h) + 28px);
}

.kg-page .kg-step:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.kg-page .kg-step-num {
  position: absolute;
  top: -26px;
  right: -6px;
  font-size: clamp(4rem, 7vw, 6.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(217, 119, 6, 0.09);
  pointer-events: none;
  user-select: none;
}

.kg-page .kg-step-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kg-gold);
  margin-bottom: 10px;
}

.kg-page .kg-step-title {
  position: relative;
  font-size: clamp(1.35rem, 2.1vw, 1.72rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--kg-ink);
  margin: 0 0 16px;
  max-width: 26ch;
}

.kg-page .kg-step-body p {
  font-size: 0.99rem;
  line-height: 1.95;
  color: var(--kg-body);
  margin: 0 0 14px;
  max-width: 64ch;
}

.kg-page .kg-step-body p:last-of-type {
  margin-bottom: 0;
}

.kg-page .kg-verse {
  position: relative;
  margin: 24px 0 0;
  padding: 18px 22px 18px 24px;
  background: #fffdf6;
  border: 1px solid #f3e6c9;
  border-left: 3px solid var(--kg-gold);
  border-radius: 0 12px 12px 0;
  max-width: 64ch;
}

.kg-page .kg-verse p {
  margin: 0 0 8px;
  font-size: 0.97rem;
  line-height: 1.9;
  color: #3d3320;
}

.kg-page .kg-verse cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kg-gold);
}

.kg-page .kg-step-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--kg-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 119, 6, 0.3);
  padding-bottom: 2px;
  transition: gap 0.22s ease, border-color 0.22s ease;
}

.kg-page .kg-step-link:hover {
  gap: 12px;
  border-color: var(--kg-gold);
  color: #b45309;
}

/* ==========================================================
   5. PRAYER
========================================================== */
.kg-page .kg-prayer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--kg-navy);
  padding: 88px 0;
  text-align: center;
}

.kg-page .kg-prayer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Motif declared directly: --hp-motif-* only exists when page-home.css is loaded */
  background-image: url("/assets/img/motifs/hoavan-03.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 560px;
  opacity: 0.06;
}

.kg-page .kg-prayer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.kg-page .kg-prayer-text {
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  line-height: 2.05;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 22px;
}

.kg-page .kg-prayer-amen {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 22px;
}

.kg-page .kg-prayer-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}

/* ==========================================================
   6. FAQ
========================================================== */
.kg-page .kg-faq {
  background: var(--kg-paper);
  border-bottom: 1px solid var(--kg-line);
}

.kg-page .kg-faq-list {
  max-width: 880px;
  margin: 34px 0 0;
  border-top: 1px solid var(--kg-line);
}

.kg-page .kg-faq-item {
  border-bottom: 1px solid var(--kg-line);
}

.kg-page .kg-faq-q {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 4px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--kg-ink);
  cursor: pointer;
  list-style: none;
}

.kg-page .kg-faq-q::-webkit-details-marker {
  display: none;
}

.kg-page .kg-faq-num {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--kg-gold);
  padding-top: 4px;
  letter-spacing: 0.04em;
}

.kg-page .kg-faq-icon {
  margin-left: auto;
  flex: 0 0 auto;
  color: #9aa8c0;
  font-size: 1rem;
  padding-top: 3px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.kg-page .kg-faq-item[open] .kg-faq-icon {
  transform: rotate(45deg);
  color: var(--kg-gold);
}

.kg-page .kg-faq-item[open] .kg-faq-q {
  color: var(--kg-gold-dark);
}

.kg-page .kg-faq-a {
  padding: 0 44px 22px 38px;
  font-size: 0.95rem;
  line-height: 1.95;
  color: var(--kg-body);
  max-width: 68ch;
}

.kg-page .kg-faq-a a {
  color: var(--kg-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================
   7. RESOURCES
========================================================== */
.kg-page .kg-resources {
  background: var(--kg-paper);
}

.kg-page .kg-res-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 34px;
}

.kg-page .kg-res-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* An odd count leaves one empty cell in the last row — let the last card
   span two columns so the row closes. Only matches the 3n-1 case. */
.kg-page .kg-res-grid > li:last-child:nth-child(3n - 1) {
  grid-column: span 2;
}

.kg-page .kg-res-grid > li:last-child:nth-child(3n - 1) .kg-res-desc {
  max-width: 46ch;
}

/* Wide card: centre the content vertically so the leftover space is split
   above and below instead of piling up at the bottom. */
.kg-page .kg-res-grid > li:last-child:nth-child(3n - 1) .kg-res-card {
  justify-content: center;
}

.kg-page .kg-res-grid > li:last-child:nth-child(3n - 1) .kg-res-badge {
  margin-top: 0;
}

.kg-page .kg-res-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 22px 22px 20px;
  background: #ffffff;
  border: 1px solid var(--kg-line);
  border-radius: var(--kg-radius);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.kg-page .kg-res-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 119, 6, 0.42);
  box-shadow: 0 18px 34px -22px rgba(20, 26, 62, 0.45);
}

.kg-page .kg-res-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kg-page .kg-res-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--kg-line);
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.kg-page .kg-res-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kg-page .kg-res-logo svg {
  width: 24px;
  height: 24px;
  display: block;
}

.kg-page .kg-res-arrow {
  color: #b8c4d8;
  font-size: 1.05rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.kg-page .kg-res-card:hover .kg-res-arrow {
  color: var(--kg-gold);
  transform: translate(2px, -2px);
}

.kg-page .kg-res-name {
  display: block;
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--kg-ink);
  margin-bottom: 5px;
}

.kg-page .kg-res-desc {
  display: block;
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--kg-muted);
}

.kg-page .kg-res-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #0f6e56;
  background: #eaf6f1;
  border-radius: 999px;
  padding: 4px 11px;
  margin-top: auto;
}

/* ==========================================================
   7. CLOSING CTA
========================================================== */
.kg-page .kg-cta {
  background: var(--kg-navy-soft);
  padding: 66px 0;
}

.kg-page .kg-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}

.kg-page .kg-cta-title {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.45;
  color: #ffffff;
  margin: 0 0 10px;
}

.kg-page .kg-cta-text {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.72);
  max-width: 52ch;
}

.kg-page .kg-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================
   8. REVEAL MOTION
========================================================== */
/* Only hide once JS has run (html.kg-anim is set by an inline script in
   know-god.php). With JS off or broken, the content stays visible. */
.kg-anim .kg-page .kg-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.kg-anim .kg-page .kg-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .kg-anim .kg-page .kg-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .kg-page .kg-btn,
  .kg-page .kg-res-card,
  .kg-page .kg-partner {
    transition: none;
  }
}

/* ==========================================================
   9. RESPONSIVE
========================================================== */
@media (max-width: 1199px) {
  .kg-page .kg-journey-grid {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 991px) {
  .kg-page .kg-section {
    padding: 60px 0;
  }

  .kg-page .kg-hero {
    padding: 72px 0 60px;
  }

  .kg-page .kg-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .kg-page .kg-hero-verse {
    max-width: 460px;
  }

  .kg-page .kg-partner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 6px 12px;
  }

  .kg-page .kg-journey-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 30px;
  }

  .kg-page .kg-rail {
    display: none;
  }

  .kg-page .kg-step {
    padding-bottom: 34px;
    margin-bottom: 34px;
  }

  .kg-page .kg-step-num {
    top: -14px;
    font-size: 3.6rem;
  }

  .kg-page .kg-res-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kg-page .kg-res-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .kg-page .kg-cta-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Portrait tablet and mobile: the partner strip becomes a LEFT-ALIGNED card
   list. It used to keep the desktop justify-content:center, and because each
   row has a different text width the logo+text group drifted to the middle —
   logos ended up at 72 / 108 / 100px. Cards plus flex-start line them up. */
@media (max-width: 767px) {
  .kg-page .kg-partners {
    padding: 26px 0 30px;
  }

  .kg-page .kg-partners-head {
    text-align: left;
    margin-bottom: 14px;
    padding-left: 2px;
  }

  .kg-page .kg-partners-row {
    flex-direction: column;
    gap: 8px;
  }

  .kg-page .kg-partner {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border: 1px solid var(--kg-line);
    border-radius: 14px;
    background: #ffffff;
    text-align: left;
    transition: border-color 0.22s ease, background-color 0.22s ease;
  }

  .kg-page .kg-partner:hover {
    transform: none;
    border-color: rgba(217, 119, 6, 0.45);
    background: #fffdf7;
  }

  /* Mobile is always one column — restated here because the .is-dense rule
     above has higher specificity than plain .kg-partner. */
  .kg-page .kg-partners-row.is-dense .kg-partner {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  .kg-page .kg-partner-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .kg-page .kg-partner:hover .kg-partner-logo {
    box-shadow: none;
  }

  .kg-page .kg-partner-text {
    flex: 1 1 auto;
    min-width: 0;
  }

  .kg-page .kg-partner-name {
    font-size: 0.92rem;
  }

  .kg-page .kg-partner-role {
    font-size: 0.78rem;
  }

  .kg-page .kg-partner-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-left: auto;
    color: #b8c4d8;
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .kg-page .kg-hero {
    padding: 56px 0 48px;
  }

  /* The 16:9 photo crops very narrow on mobile — shift the focus right to
     keep the choir and congregation instead of the empty wall on the left. */
  .kg-page .kg-hero-media img {
    object-position: 62% 30%;
  }

  .kg-page .kg-hero-title {
    font-size: 2.15rem;
  }

  .kg-page .kg-hero-lead {
    font-size: 0.97rem;
  }

  .kg-page .kg-hero-actions {
    gap: 9px;
  }

  .kg-page .kg-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 12px 16px;
  }

  .kg-page .kg-hero-meta {
    gap: 6px 16px;
  }

  .kg-page .kg-hero-meta li {
    font-size: 0.78rem;
  }

  .kg-page .kg-step-title {
    font-size: 1.24rem;
    max-width: none;
  }

  .kg-page .kg-step-body p {
    font-size: 0.94rem;
  }

  .kg-page .kg-verse {
    padding: 15px 16px 15px 18px;
  }

  .kg-page .kg-res-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Single column: span 2 would create a hidden second column -> auto */
  .kg-page .kg-res-grid > li:last-child:nth-child(3n - 1) {
    grid-column: auto;
  }

  .kg-page .kg-prayer {
    padding: 60px 0;
  }

  .kg-page .kg-prayer-text {
    font-size: 1rem;
    line-height: 1.95;
  }
}
