/* Project 400 v3.3.20 — Youth page: image first, concise overlay headline,
   introductory content BELOW photograph. Only the canonical Youth native Page.
   Leaves Darcis global headline, footer, cards, gallery and content source intact. */
.p400m-page.p400m--youth-ministry .p400y17-hero {
  --y20-gutter:max(22px,calc((100% - 1170px)/2));
  --y20-photo-height:clamp(420px,41vw,615px);
  background:#faf7f1!important;
  padding:0!important;
  color:#4e1111!important;
  overflow:hidden;
  border-bottom:1px solid #e7d9c9!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero>.p400m-inner {
  max-width:none!important;width:100%!important;margin:0!important;padding:0!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:var(--y20-photo-height) auto auto!important;
  align-items:stretch!important;
  position:relative!important;
  gap:0!important;
  padding:0!important;
  margin:0!important;
  width:100%!important;
  max-width:none!important;
  min-height:0!important;
  background:linear-gradient(115deg,#3b1014,#6b3030) left top/100% var(--y20-photo-height) no-repeat;
}
/* The earlier dark wash affected the entire photograph. This veil exists only
   behind the bottom-left heading, with the remainder of the photo unobscured. */
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols::before {
  content:""!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  height:var(--y20-photo-height)!important;
  z-index:1!important;
  pointer-events:none!important;
  background:radial-gradient(ellipse 830px 295px at 24% 100%,
    rgba(31,7,11,.87) 0%,rgba(35,8,11,.57) 43%,rgba(35,8,11,.17) 70%,transparent 93%)!important;
}
/* Keep the existing native editable heading, paragraph, shortcode and image blocks.
   display:contents moves ONLY their on-screen placement in the public theme. */
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols>.wp-block-column:first-child,
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-copy {
  display:contents!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols>.wp-block-column:last-child:has(.p400m-photo-frame) {
  display:block!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  width:100%!important;
  height:var(--y20-photo-height)!important;
  max-width:none!important;
  margin:0!important;
  z-index:0!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols>.wp-block-column:last-child:not(:has(.p400m-photo-frame)) {
  display:none!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero :is(.p400y17-photo-wrap,.p400m-photo-frame) {
  display:block!important;position:relative!important;width:100%!important;
  height:100%!important;overflow:hidden!important;
  padding:0!important;margin:0!important;max-width:none!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400m-photo-frame img {
  display:block!important;width:100%!important;height:100%!important;
  max-width:none!important;object-fit:cover!important;object-position:center 45%!important;
  border-radius:0!important;filter:none;transform:scale(1);
  transition:transform .55s ease,filter .55s ease!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero:hover .p400m-photo-frame img {
  transform:scale(1.018);filter:brightness(1.055) saturate(1.035);
}
/* The image title occupies the place previously used by the action/motto row. */
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-kicker,
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-motto {display:none!important}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols h2.p400y17-heading {
  display:block!important;grid-column:1!important;grid-row:1!important;
  align-self:end!important;justify-self:start!important;position:relative!important;
  z-index:3!important;margin:0 20px 40px var(--y20-gutter)!important;
  padding:0!important;width:auto!important;max-width:min(720px,69%)!important;
  font-size:clamp(2.7rem,4.65vw,4.55rem)!important;line-height:1.045!important;
  color:#fff!important;text-align:left!important;
  text-shadow:0 2px 15px rgba(17,0,2,.42);
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols h2.p400y17-heading em{
  color:#f1c878!important;
}
/* Parish discovery is on the photograph (top right), separated from the title. */
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-actions {
  display:flex!important;grid-column:1!important;grid-row:1!important;
  justify-self:end!important;align-self:start!important;position:relative!important;
  z-index:4!important;justify-content:flex-end!important;
  width:auto!important;margin:25px var(--y20-gutter) 0 14px!important;
  padding:0!important;gap:0!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-actions .p400m-link,
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-actions .p400m-link:visited {
  background:#f3c66b!important;border:1px solid #f3c66b!important;
  color:#4e1111!important;font-weight:800!important;padding:11px 17px!important;
  border-radius:7px!important;white-space:nowrap;
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-actions .p400m-link:is(:hover,:focus-visible){
  background:#fff!important;border-color:#fff!important;color:#4e1111!important;
}
/* These are ordinary Page paragraphs below the IMAGE, not text over the image. */
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols p.p400y17-deck {
  display:block!important;grid-column:1!important;grid-row:2!important;
  color:#4e1111!important;text-shadow:none!important;
  font-weight:600!important;font-size:clamp(1rem,1.45vw,1.18rem)!important;
  line-height:1.55!important;margin:0!important;
  max-width:none!important;padding:27px var(--y20-gutter) 7px!important;
  text-align:left!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols .p400y17-hero-copy>p:not(.p400y17-deck):not(.p400y17-kicker):not(.p400y17-motto) {
  display:block!important;grid-column:1!important;grid-row:auto!important;
  color:#584b44!important;text-shadow:none!important;
  font-size:1rem!important;line-height:1.65!important;
  margin:0!important;max-width:none!important;
  padding:0 var(--y20-gutter) 10px!important;
  text-align:left!important;
}
.p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols .p400y17-hero-copy>p:not(.p400y17-deck):last-of-type {
  padding-bottom:31px!important;
}
/* The user's report/source note is editorial metadata, never a public paragraph.
   A separate backed-up migration removes it from saved WordPress content. */
.p400m-page.p400m--youth-ministry .p400y17-footnote{display:none!important}
@media(max-width:740px){
  .p400m-page.p400m--youth-ministry .p400y17-hero{
    --y20-gutter:20px;--y20-photo-height:clamp(315px,80vw,450px);
  }
  .p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols{
    grid-template-rows:var(--y20-photo-height) auto auto!important;
    padding:0!important;min-height:0!important;align-items:stretch!important;
  }
  .p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols::before{
    background:radial-gradient(ellipse 540px 255px at 23% 100%,rgba(30,6,8,.92) 0%,rgba(30,6,8,.49) 52%,transparent 96%)!important;
  }
  .p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols h2.p400y17-heading{
    font-size:clamp(2.0rem,8.7vw,3.15rem)!important;
    max-width:calc(100% - 36px)!important;
    margin:0 18px 27px 20px!important;
  }
  .p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-actions{
    margin:15px 20px 0 10px!important;
  }
  .p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-actions .p400m-link{
    padding:9px 12px!important;font-size:.8rem!important;
  }
  .p400m-page.p400m--youth-ministry .p400y17-hero .p400y17-hero-cols p.p400y17-deck{
    padding-top:22px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  .p400m-page.p400m--youth-ministry .p400y17-hero .p400m-photo-frame img{
    transition:none!important;transform:none!important;
  }
}
