/* 99for1.AI v5.40 — self-contained Next Steps image framing + iOS/Android QA hardening */

/* Base Next Steps layout retained here so recovery installs do not depend on an older stylesheet surviving. */
.next-step-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;background:#0a0908}
.next-step-tile,.next-step-card{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;min-height:300px;padding:26px;color:#fff;background-size:cover!important;background-repeat:no-repeat!important;background-position:center center}
.next-step-tile:before,.next-step-card:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.78));z-index:0}
.next-step-tile>* ,.next-step-card>*{position:relative;z-index:1}
.next-step-tile span,.next-step-card span{font-size:.62rem;letter-spacing:.18em;text-transform:uppercase;color:#dfc59b}
.next-step-tile strong,.next-step-card h2{font:700 2rem/1 "Cormorant Garamond",serif;margin:10px 0 18px}
.next-step-tile em,.next-step-card em{font-style:normal;border:1px solid rgba(255,255,255,.75);padding:9px 11px;width:max-content;font-size:.64rem;text-transform:uppercase;letter-spacing:.14em}
.next-step-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.next-step-card{min-height:360px}
.next-step-card p{position:relative;z-index:1;color:#e0d5c7;max-width:520px}

/* Every Next Steps card now uses a landscape-composed image to avoid portrait cover-cropping. */
.next-step-tile.visit,.next-step-card.visit{
  background-image:linear-gradient(180deg,rgba(0,0,0,.14),rgba(0,0,0,.76)),url('../img/next-steps/first-visit-jesus.webp')!important;
  background-position:68% center!important;
}
.next-step-tile.baptism,.next-step-card.baptism{
  background-image:linear-gradient(180deg,rgba(0,0,0,.06),rgba(0,0,0,.62)),url('../img/next-steps/baptism.webp')!important;
  background-position:62% center!important;
}
.next-step-tile.groups,.next-step-card.groups{
  background-image:linear-gradient(180deg,rgba(0,0,0,.10),rgba(0,0,0,.70)),url('../img/daily/journey-bike-02.webp')!important;
  background-position:center center!important;
}
.next-step-tile.prayer,.next-step-card.prayer{
  background-image:linear-gradient(180deg,rgba(0,0,0,.14),rgba(0,0,0,.80)),url('../img/daily/for-you-03.webp')!important;
  background-position:center center!important;
}
.next-step-tile.serve,.next-step-card.serve{
  background-image:linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.72)),url('../img/serve-with-gifts.webp')!important;
  background-position:center 45%!important;
}

/* Dedicated first-visit page uses the same correctly composed landscape asset. */
.first-visit-hero>div:first-child{
  background:linear-gradient(90deg,rgba(0,0,0,.86) 0%,rgba(0,0,0,.56) 38%,rgba(0,0,0,.18) 72%,rgba(0,0,0,.10) 100%),url('../img/next-steps/first-visit-jesus.webp') 68% center/cover no-repeat!important;
}

/* Tablet */
@media(max-width:1100px){
  .next-step-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .next-step-tile.visit,.next-step-card.visit,.first-visit-hero>div:first-child{background-position:64% center!important}
}

/* Phone baseline: one image card per row, sufficient height, text clear of primary subjects. */
@media(max-width:700px){
  .next-step-strip,.next-step-grid{grid-template-columns:1fr!important}
  .next-step-tile,.next-step-card{min-height:340px!important;padding:22px!important}
  .next-step-tile strong,.next-step-card h2{font-size:2.1rem}
  .next-step-tile.visit,.next-step-card.visit,.first-visit-hero>div:first-child{background-position:60% center!important}
  .next-step-tile.baptism,.next-step-card.baptism{background-position:58% center!important}
  .next-step-tile.groups,.next-step-card.groups{background-position:center center!important}
  .next-step-tile.prayer,.next-step-card.prayer{background-position:54% center!important}
  .next-step-tile.serve,.next-step-card.serve{background-position:58% center!important}
}

/* iPhone / iOS: preserve safe-area behavior and avoid over-tall crop zones in Safari-sized viewports. */
html.device-ios .next-step-tile,html.device-ios .next-step-card{min-width:0}
html.device-ios.device-portrait .next-step-tile,html.device-ios.device-portrait .next-step-card{min-height:350px!important}
html.device-ios.device-portrait .next-step-card.visit,html.device-ios.device-portrait .next-step-tile.visit{background-position:59% center!important}
html.device-ios.device-portrait .next-step-card.prayer,html.device-ios.device-portrait .next-step-tile.prayer{background-position:52% center!important}

/* Android / Chrome: same composition, with slightly more vertical room on common tall screens. */
html.device-android.device-portrait .next-step-tile,html.device-android.device-portrait .next-step-card{min-height:360px!important}
html.device-android.device-portrait .next-step-card.visit,html.device-android.device-portrait .next-step-tile.visit{background-position:60% center!important}
html.device-android.device-portrait .next-step-card.prayer,html.device-android.device-portrait .next-step-tile.prayer{background-position:54% center!important}
