#masthead {
  position: sticky;
  top: 0;
  z-index: 9999;
}

.content-area,
.entry-content-wrap,
.content-wrap,
#inner-wrap {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.site-title {
  display: none !important;
}

.kadence-credit { display: none !important; }

.header-navigation a {
  color: #4d8345 !important;
  font-weight: 700 !important;
}

.header-navigation .current-menu-item > a,
.header-navigation .current-page-ancestor > a {
  color: #111111 !important;
  font-weight: 700 !important;
}

.header-navigation .sub-menu .current-menu-item > a {
  color: #ffffff !important;
}

@media (max-width: 767px) {
  html body .wp-block-columns,
  html body .wp-block-columns.is-not-stacked-on-mobile {
    flex-wrap: wrap !important;
    display: flex !important;
  }
  html body .wp-block-columns > .wp-block-column,
  html body .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column {
    flex-basis: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  html body .wp-block-heading,
  html body .wp-block-paragraph,
  html body h1, html body h2, html body h3, html body h4 {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  html body .wp-block-cover {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  .mobile-navigation a,
  .drawer-navigation a {
    color: #4d8345 !important;
    font-weight: 700 !important;
  }
  .mobile-navigation .current-menu-item > a,
  .drawer-navigation .current-menu-item > a,
  .mobile-navigation .current-page-ancestor > a,
  .drawer-navigation .current-page-ancestor > a {
    color: #ffffff !important;
  }
  .leadership-wrap {
    min-height: auto !important;
  }
  .leadership-layout {
    display: block !important;
  }
  .leadership-photo {
    display: block !important;
    width: 75% !important;
    margin: 2rem auto 0 !important;
    flex: none !important;
  }
  .leadership-text {
    display: block !important;
    width: 100% !important;
    padding: 2rem 1.5rem 3rem !important;
    box-sizing: border-box !important;
  }
}

/* ── Custom footer ─────────────────────────────── */
#colophon { display: none !important; }

#cp-footer {
  background: #0a1a0e;
  border-top: 4px solid #4d8345;
  color: #aaaaaa;
  font-family: inherit;
}
.cp-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.cp-footer-brand { flex: 0 0 200px; }
.cp-footer-logo {
  filter: brightness(0) invert(1);
  width: 170px;
  height: auto;
  display: block;
  margin-bottom: 1rem;
}
.cp-footer-tagline {
  color: #4d8345;
  font-size: 0.88rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}
.cp-footer-cols {
  flex: 1;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.cp-footer-col { flex: 1; min-width: 130px; }
.cp-footer-col h4 {
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(77,131,69,0.35);
}
.cp-footer-col ul { list-style: none; padding: 0; margin: 0; }
.cp-footer-col li { margin-bottom: 0.55rem; }
.cp-footer-col a {
  color: #999999;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.7;
  transition: color 0.2s ease;
}
.cp-footer-col a:hover { color: #4d8345; }
.cp-footer-col p {
  color: #999999;
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 0 0 0.25rem;
}
.cp-footer-social-link {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem !important;
}
.cp-footer-social-link svg { flex-shrink: 0; }
.cp-footer-cta-link {
  display: inline-block !important;
  margin-top: 0.5rem;
  color: #4d8345 !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.03em;
}
.cp-footer-cta-link:hover { color: #6ab560 !important; }
.cp-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  text-align: center;
  padding: 1.25rem 2rem;
}
.cp-footer-bottom p {
  color: #555555;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin: 0;
}
.cp-footer-mobile-info { display: none; }
.cp-footer-copy-mobile { display: none; }
@media (max-width: 767px) {
  .cp-footer-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
    padding: 2.5rem 1.25rem 2rem;
    align-items: flex-start;
  }
  .cp-footer-brand { flex: 0 0 48%; }
  .cp-footer-logo { width: 130px !important; }
  .cp-footer-cols { display: none; }
  .cp-footer-mobile-info {
    display: block;
    flex: 0 0 48%;
    padding-top: 0.25rem;
  }
  .cp-footer-mobile-info p {
    color: #999999;
    font-size: 0.85rem;
    line-height: 1.7;
    margin: 0 0 0.5rem;
  }
  .cp-footer-copy-full { display: none !important; }
  .cp-footer-copy-mobile { display: block !important; }
}

/* ── Visual polish ─────────────────────────────── */

html { scroll-behavior: smooth; }

#masthead::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #2d5229 0%, #4d8345 40%, #6ab560 60%, #4d8345 80%, #2d5229 100%);
}

.wp-block-group h2.wp-block-heading::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: #4d8345;
  border-radius: 2px;
  margin: 0.75rem auto 0;
}
.wp-block-group h2.wp-block-heading:not(.has-text-align-center)::after {
  margin-left: 0;
}

.wp-block-cover.alignfull { position: relative; }
.wp-block-cover.alignfull::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.45));
  pointer-events: none;
  z-index: 1;
}

.wp-block-group[style*="background-color:#1a1a1a"] .wp-block-column:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.15);
}

.wp-block-group[style*="background-color:#f5f5f5"] .wp-block-column[style*="background-color:#ffffff"] {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-top-color 0.25s ease;
  border-top: 3px solid transparent;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  will-change: transform;
}
.wp-block-group[style*="background-color:#f5f5f5"] .wp-block-column[style*="background-color:#ffffff"]:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.13);
  border-top-color: #4d8345;
}
.wp-block-group[style*="background-color:#f5f5f5"] .wp-block-column .wp-block-image img {
  transition: transform 0.4s ease;
  display: block;
}
.wp-block-group[style*="background-color:#f5f5f5"] .wp-block-column:hover .wp-block-image img {
  transform: scale(1.04);
}

.wp-block-button__link {
  letter-spacing: 0.04em;
  font-weight: 700 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.wp-block-button__link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(77,131,69,0.45) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  box-shadow: 0 6px 20px rgba(255,255,255,0.2) !important;
}

.header-navigation a { position: relative; }
.header-navigation > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: #4d8345;
  transition: width 0.25s ease;
}
.header-navigation > ul > li > a:hover::after,
.header-navigation .current-menu-item > a::after { width: 100%; }

.wp-block-cover .hero-logo img {
  filter: brightness(0) invert(1) !important;
  width: 320px !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto -3.5rem !important;
}

.pastor-photo-frame {
  position: relative;
  display: inline-block;
  line-height: 0;
  width: 100%;
}
.pastor-photo-frame::before {
  content: '';
  position: absolute;
  top: -8px; left: -8px; right: -8px; bottom: -8px;
  background:
    repeating-linear-gradient(90deg, #4d8345 0, #4d8345 40px, transparent 40px, transparent 65px) top,
    repeating-linear-gradient(90deg, #4d8345 0, #4d8345 18px, transparent 18px, transparent 50px) bottom,
    repeating-linear-gradient(0deg,  #4d8345 0, #4d8345 28px, transparent 28px, transparent 58px) left;
  background-size: 100% 3px, 100% 3px, 3px 100%;
  background-repeat: no-repeat;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.wp-block-image:not(.wp-block-cover *) img {
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.wp-block-image:not(.wp-block-cover *):hover img {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.16);
}

.wp-block-group.alignfull + .wp-block-group.alignfull {
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.055);
}

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid #4d8345 !important;
  outline-offset: 3px !important;
  border-radius: 3px;
}

/* Scroll animation classes — triggered by WPCode JS */
.cp-animate {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(.22,1,.36,1), transform 0.9s cubic-bezier(.22,1,.36,1);
}
.cp-animate.cp-visible { opacity: 1; transform: translateY(0); }
.cp-animate-d1 { transition-delay: 0.1s; }
.cp-animate-d2 { transition-delay: 0.2s; }
.cp-animate-d3 { transition-delay: 0.3s; }

@media (max-width: 767px) {
  .wp-block-cover.alignfull::after { height: 60px; }
  .wp-block-cover .hero-logo img { width: 220px !important; margin: 0 auto -2.5rem !important; }
  .wp-block-group[style*="background-color:#1a1a1a"] .wp-block-column:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .wp-block-group.alignfull > .wp-block-group__inner-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* Church History timeline — mobile */
@media (max-width: 767px) {
  .timeline-vline { left: 16px !important; transform: none !important; }
  .timeline-item { justify-content: flex-end !important; padding-left: 36px !important; }
  .timeline-card { width: 88% !important; }
  .timeline-card > div[style*="position:absolute"] { display: none !important; }
}

/* Skip to content — visually hidden, keyboard accessible */
.skip-link:not(:focus),
.skip-to-content:not(:focus) {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
}


/* CP mobile gutter normalisation */
@media (max-width: 781px) {
  .entry-content .wp-block-group,
  .entry-content .wp-block-columns,
  html body .entry-content .wp-block-columns > .wp-block-column {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .entry-content > .wp-block-group > .wp-block-group__inner-container {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  .entry-content .wp-block-column .wp-block-group.has-background {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  .entry-content .wp-block-columns > .wp-block-column + .wp-block-column {
    margin-top: 1.25rem;
  }
}