/* ACK Tena — public inner-page design system (homepage-matched).
   Runs after all legacy and template-specific page CSS. No content rewrites.
   Opt-out: homepage contains a direct child .academy-hero. */
:root{
 --inner-paper:linear-gradient(116deg,#f2f9fd 0%,#f8fbfe 57%,#eaf5fa 100%);
 --inner-blue:#087CB8;
 --inner-blue-dark:#065A88;
 --inner-ink:#080B10;
 --inner-muted:#526879;
 --inner-line:linear-gradient(90deg,transparent 0%,rgba(8,124,184,.28) 14%,#087CB8 34%,#087CB8 66%,rgba(8,124,184,.28) 86%,transparent 100%);
}
#main-content:not(:has(> .academy-hero)){
 color:var(--inner-ink)!important;
 background:var(--inner-paper)!important;
}
/* All public inner sections use the same pale canvas. Never flatten cards,
   buttons, input surfaces, maps, videos, or actual photos. */
#main-content:not(:has(> .academy-hero)) > section:not(.section-dark),
#main-content:not(:has(> .academy-hero)) > main > section:not(.section-dark){
 background:transparent!important;
 background-image:none!important;
}
#main-content:not(:has(> .academy-hero)) > section{
 position:relative;
 isolation:isolate;
 min-width:0;
}
/* Section separators: exactly one 1px centered blue-to-white line.
   Exclude the first section; avoid duplicating older ::before lines. */
#main-content:not(:has(> .academy-hero)) > section ~ section{
 border-top:1px solid transparent!important;
 border-image-source:var(--inner-line)!important;
 border-image-slice:1!important;
 border-image-width:1 0 0 0!important;
 border-image-outset:0!important;
}
#main-content:not(:has(> .academy-hero)) > :is(section,article):first-child{
 border-top:0!important;
 border-image:none!important;
}
#main-content:not(:has(> .academy-hero)) > section > :is(.container,.section-container){
 position:relative;
 z-index:1;
}
#main-content:not(:has(> .academy-hero)) :is(.container,.section-container,
 .story-hero-content,.services-hero-content,.contact-hero-content,
 .events-hero-content,.dept-hero-content,.strategic-hero-content,
 .fellowship-hero-content){
 max-width:min(100% - 40px,1180px);
 margin-inline:auto;
}
/* Page heroes inherit the homepage's spacious editorial balance rather than
   the former deep-navy photo overlays. Use the real background photos subtly. */
#main-content:not(:has(> .academy-hero)) > :is(
 .services-hero,.contact-hero,.events-hero,.dept-hero,.strategic-hero,
 .fellowship-hero,.story-hero,.history-hero,.ministries-hero,
 .event-hero,.page-hero,.giving-header-section,.media-header-section){
 background:transparent!important;
 background-image:none!important;
 color:var(--inner-ink)!important;
 min-height:0!important;
 height:auto!important;
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 padding:clamp(65px,8vw,112px) 0 clamp(55px,7vw,95px)!important;
}
/* Overlay belongs behind real content, and photographs remain present
   as restrained accent imagery rather than disappearing entirely. */
#main-content:not(:has(> .academy-hero)) > :is(
 .services-hero,.contact-hero,.events-hero,.dept-hero,.strategic-hero,
 .fellowship-hero,.story-hero,.history-hero,.ministries-hero,.event-hero)
 :is(.services-hero-bg,.contact-hero-bg,.events-hero-bg,.dept-hero-bg,
 .strategic-hero-bg,.fellowship-hero-bg,.story-hero-bg,.history-hero-bg,
 .ministries-hero-bg,.event-hero-bg){
 opacity:.12!important;
 filter:saturate(.8)!important;
 pointer-events:none!important;
 z-index:0!important;
}
#main-content:not(:has(> .academy-hero)) > :is(
 .services-hero,.contact-hero,.events-hero,.dept-hero,.strategic-hero,
 .fellowship-hero,.story-hero,.history-hero,.ministries-hero,.event-hero)
 :is(.services-hero-overlay,.contact-hero-overlay,.events-hero-overlay,
 .dept-hero-overlay,.strategic-hero-overlay,.fellowship-hero-overlay){
 background:transparent!important;
 background-image:none!important;
}
#main-content:not(:has(> .academy-hero)) > :is(
 .services-hero,.contact-hero,.events-hero,.dept-hero,.strategic-hero,
 .fellowship-hero,.story-hero,.history-hero,.ministries-hero,.event-hero)
 :is(.services-hero-content,.contact-hero-content,.events-hero-content,
 .dept-hero-content,.strategic-hero-content,.fellowship-hero-content,
 .story-hero-content,.history-hero-content,.ministries-hero-content,
 .event-hero-content){
 position:relative!important;
 z-index:2!important;
 margin-inline:auto!important;
 max-width:min(100% - 40px,960px)!important;
 padding:0!important;
 text-align:center!important;
}
#main-content:not(:has(> .academy-hero)) > :is(
 .services-hero,.contact-hero,.events-hero,.dept-hero,.strategic-hero,
 .fellowship-hero,.story-hero,.history-hero,.ministries-hero,.event-hero,
 .page-hero)
 :is(h1,.hero-title,.hero-description,.hero-subtitle,.hero-text,
 .services-hero-title,.contact-hero-title,.events-hero-title,.dept-hero-title,
 .strategic-hero-title,.fellowship-hero-title,.event-hero-title,
 .contact-hero-text,.events-hero-subtitle,.services-hero-content p,
 .event-hero-content p,.page-title){
 color:var(--inner-ink)!important;
 -webkit-text-fill-color:var(--inner-ink)!important;
 text-shadow:none!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .hero-label,.hero-badge,.contact-hero-label,.events-hero-label,
 .dept-grid-label,.strategic-hero-label,.fellowship-hero-label,
 .section-subtitle,.events-hero-label,.story-hero .hero-badge){
 color:var(--inner-blue)!important;
 -webkit-text-fill-color:var(--inner-blue)!important;
}
#main-content:not(:has(> .academy-hero)) :is(.hero-title .accent,
 .events-hero-title .accent,.services-hero .accent,.dept-hero-title .accent,
 .strategic-hero-title .accent){
 color:var(--inner-blue)!important;
 -webkit-text-fill-color:var(--inner-blue)!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .hero-label::before,.hero-label::after,.contact-hero-label::before,
 .contact-hero-label::after){
 background:var(--inner-blue)!important;
}
/* Restore legible text in inner page section headers that previously sat
   inside solid navy bands. */
#main-content:not(:has(> .academy-hero)) :is(
 .section-header,.events-header,.dept-grid-header,.page-header,
 .hero-content,.intro-content){
 color:var(--inner-ink)!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .section-header h1,.section-header h2,.section-title,
 .events-header h2,.dept-grid-title,.intro-content h2,
 .welcome-text h2,.page-title){
 color:var(--inner-ink)!important;
 -webkit-text-fill-color:var(--inner-ink)!important;
}
/* White editorial surfaces with matched radius, spacing and hover motion. */
#main-content:not(:has(> .academy-hero)) :is(
 .service-card,.ministry-card,.event-card,.announcement-card,.department-card,
 .worker-card,.vicar-card,.sermon-card,.media-card,.mvv-card,.giving-account-card,
 .dept-card,.info-card,.schedule-card,.focus-card,.activity-card,
 .fellowship-card,.value-card,.pillar-card,.contact-card,.content-card,
 .sidebar-card,.testimonial-card,.gallery-card,.story-card){
 background:#fff!important;
 background-image:none!important;
 border:1px solid rgba(8,124,184,.16)!important;
 border-radius:20px!important;
 box-shadow:0 10px 34px rgba(8,57,89,.06)!important;
 min-width:0!important;
 height:100%;
 overflow:hidden;
 transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .service-card,.ministry-card,.event-card,.announcement-card,.department-card,
 .worker-card,.vicar-card,.sermon-card,.media-card,.mvv-card,.giving-account-card,
 .dept-card,.info-card,.schedule-card,.focus-card,.activity-card,
 .fellowship-card,.value-card,.pillar-card,.contact-card,.content-card,
 .sidebar-card):hover{
 transform:translateY(-3px);
 box-shadow:0 16px 42px rgba(8,57,89,.105)!important;
 border-color:rgba(8,124,184,.28)!important;
}
/* Grid children match height; use minmax so longer dynamic CMS text wraps. */
#main-content:not(:has(> .academy-hero)) :is(
 .services-grid,.ministries-grid,.events-grid,.announcements-grid,.departments-grid,
 .workers-grid,.vicars-grid,.sermons-grid,.giving-accounts-grid,.mvv-grid,
 .dept-grid,.info-grid,.schedule-grid,.focus-grid,.activities-grid,
 .fellowship-grid,.values-grid,.pillars-grid,.gallery-grid){
 align-items:stretch!important;
 gap:clamp(18px,2.5vw,28px)!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .services-grid,.ministries-grid,.events-grid,.announcements-grid,.departments-grid,
 .workers-grid,.vicars-grid,.sermons-grid,.giving-accounts-grid,.mvv-grid,
 .dept-grid,.info-grid,.schedule-grid,.focus-grid,.activities-grid,
 .fellowship-grid,.values-grid,.pillars-grid,.gallery-grid) > *{
 min-width:0!important;
}
/* Consistent crop for a card's own image; NEVER swap source images.
   Preserve portrait ratio for people and natural sizes for document graphics. */
#main-content:not(:has(> .academy-hero)) :is(
 .event-card-image,.ministry-card-media,.dept-card-media,
 .fellowship-card-media,.department-image,.worker-image,.vicar-image,
 .sermon-thumbnail,.sermon-image,.media-card-image){
 width:100%!important;
 aspect-ratio:16/10;
 max-height:270px;
 min-height:0!important;
 overflow:hidden!important;
 background:#e5f1f8!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .event-card-image,.ministry-card-media,.dept-card-media,
 .fellowship-card-media,.department-image,.worker-image,.vicar-image,
 .sermon-thumbnail,.sermon-image,.media-card-image) img{
 display:block!important;
 width:100%!important;
 height:100%!important;
 object-fit:cover!important;
 object-position:center!important;
 max-width:none!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .department-image,.worker-image,.vicar-image){
 aspect-ratio:4/5;
 max-height:340px;
}
#main-content:not(:has(> .academy-hero)) :is(
 .department-image,.worker-image,.vicar-image) img{
 object-position:center 18%!important;
}
/* Existing hero/feature images remain in their corresponding sections,
   without distortion or escaping their container. */
#main-content:not(:has(> .academy-hero)) :is(
 .intro-image,.about-image,.chapter-image,.vision-image,.welcome-image){
 min-width:0!important;max-width:100%!important;
 overflow:hidden!important;border-radius:24px!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .intro-image,.about-image,.chapter-image,.vision-image,.welcome-image) img{
 display:block;max-width:100%;width:100%;
 height:auto;object-fit:cover;object-position:center;
 border-radius:inherit!important;
}
/* Cards that contain CMS content: equal interior padding and natural wrap. */
#main-content:not(:has(> .academy-hero)) :is(
 .event-card-body,.dept-card-body,.ministry-card-body,.fellowship-card-body,
 .department-content,.sermon-content,.worker-content,.vicar-content){
 padding:clamp(18px,2.4vw,26px)!important;
 min-width:0!important;
}
#main-content:not(:has(> .academy-hero)) :is(
 .event-card-link,.department-card a,.ministry-card a,.sermon-card a){
 color:inherit;
 text-decoration:none;
}
#main-content:not(:has(> .academy-hero)) :is(
 input:not([type="checkbox"]):not([type="radio"]),select,textarea){
 max-width:100%;
 border-radius:12px;
 border-color:rgba(8,124,184,.26);
}
#main-content:not(:has(> .academy-hero)) :is(
 input,textarea,select):focus-visible{
 outline:2px solid var(--inner-blue)!important;
 outline-offset:2px;
}
/* Keep action buttons consistently logo blue and darker on hover. */
#main-content:not(:has(> .academy-hero)) :is(
 .btn-primary,.hero-cta-group .btn-primary,.final-cta .btn-primary,
 .btn-view-all,.submit-btn,.contact-btn):hover{
 background:var(--inner-blue-dark)!important;
 border-color:var(--inner-blue-dark)!important;
 color:#fff!important;
}
/* Desktop and mobile adapt grid density rather than squeezing the cards. */
@media(min-width:1025px){
 #main-content:not(:has(> .academy-hero)) :is(
 .services-grid,.ministries-grid,.events-grid,.announcements-grid,
 .departments-grid,.workers-grid,.vicars-grid,.sermons-grid,
 .dept-grid,.fellowship-grid,.values-grid,.pillars-grid){
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
 }
}
@media(max-width:1024px){
 #main-content:not(:has(> .academy-hero)) :is(
 .services-grid,.ministries-grid,.events-grid,.announcements-grid,
 .departments-grid,.workers-grid,.vicars-grid,.sermons-grid,
 .dept-grid,.fellowship-grid,.values-grid,.pillars-grid){
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
 #main-content:not(:has(> .academy-hero)) :is(
 .intro-grid,.about-grid,.vision-grid,.event-details-grid){
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
 }
}
@media(max-width:700px){
 #main-content:not(:has(> .academy-hero)) > section:not(.section-dark){
  padding-left:0!important;
  padding-right:0!important;
 }
 #main-content:not(:has(> .academy-hero)) :is(
 .services-grid,.ministries-grid,.events-grid,.announcements-grid,
 .departments-grid,.workers-grid,.vicars-grid,.sermons-grid,
 .giving-accounts-grid,.mvv-grid,.dept-grid,.fellowship-grid,
 .values-grid,.pillars-grid,.gallery-grid,.info-grid,.schedule-grid,
 .focus-grid,.activities-grid,.intro-grid,.about-grid,.vision-grid,
 .event-details-grid){
  grid-template-columns:minmax(0,1fr)!important;
 }
 #main-content:not(:has(> .academy-hero)) > :is(
 .services-hero,.contact-hero,.events-hero,.dept-hero,.strategic-hero,
 .fellowship-hero,.story-hero,.history-hero,.ministries-hero,
 .event-hero,.page-hero,.giving-header-section,.media-header-section){
  padding:clamp(56px,10vw,82px) 0!important;
 }
 #main-content:not(:has(> .academy-hero)) > section .container{
  width:min(100% - 32px,1180px)!important;max-width:100%!important;
 }
 #main-content:not(:has(> .academy-hero)) :is(
 .services-hero-content,.contact-hero-content,.events-hero-content,
 .dept-hero-content,.strategic-hero-content,.fellowship-hero-content,
 .story-hero-content,.history-hero-content,.ministries-hero-content,
 .event-hero-content){
  max-width:min(100% - 32px,680px)!important;
 }
 #main-content:not(:has(> .academy-hero)) :is(.hero-cta-group,.section-actions){
  flex-wrap:wrap!important;justify-content:center!important;
 }
 #main-content:not(:has(> .academy-hero)) :is(
 .event-card-image,.ministry-card-media,.dept-card-media,.fellowship-card-media){
  max-height:none;
 }
}
@media(prefers-reduced-motion:reduce){
 #main-content:not(:has(> .academy-hero)) :is(.event-card,.department-card,.dept-card,.fellowship-card){
  transition:none!important;
 }
}
