/* ==========================================================================
   508 Ministry Free-Guide Stack Layout (/assets/m508-guide-posts.css)
   Card styling lives strictly in the ONE shared stylesheet:
   /assets/social-post-card/social-post-card.css (.post-card--guide).
   This file provides only the #benefits wrapper layout so all free-guide
   social posts sit true edge-to-edge (390px full width) on mobile and
   cleanly framed at 768px and 1440px, in both light and dark modes.
   ========================================================================== */

#benefits {
  overflow-x: clip;
}

.m508-gp-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
}

.m508-gp-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.m508-gp-row > * {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.m508-gp-row .post-card--guide .spc-guide-cta-bar {
  margin-top: auto;
}

@media (max-width: 900px) {
  .m508-gp-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

/* Mobile 390px primary design target: true edge-to-edge full-width social posts */
@media (max-width: 640px) {
  #benefits.bx {
    padding: 40px 0 36px !important;
  }
  #benefits.bx .bx-wrap {
    gap: 20px !important;
  }
  #benefits.bx .bx-left {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }
  #benefits.bx .bx-left-intro {
    padding: 0 16px !important;
  }
  #benefits.bx .bx-right {
    margin: 0 12px !important;
    width: calc(100% - 24px) !important;
    box-sizing: border-box !important;
  }
  #benefits.bx .m508-gp-stack,
  #benefits.bx .m508-gp-row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 20px !important;
  }
}

/* Dark mode harmony for #benefits wrapper around dark .post-card--guide cards */
html[data-theme="dark"] #benefits.bx,
body.dark #benefits.bx {
  background: #091326 !important;
  color: #F4EFE4 !important;
}
html[data-theme="dark"] #benefits.bx .bx-left,
html[data-theme="dark"] #benefits.bx .bx-right,
body.dark #benefits.bx .bx-left,
body.dark #benefits.bx .bx-right {
  background: linear-gradient(180deg, #0E1B33 0%, #0B162A 100%) !important;
  border-color: rgba(212, 168, 75, 0.34) !important;
  box-shadow: 0 18px 44px -24px rgba(0, 0, 0, 0.6) !important;
  color: #F4EFE4 !important;
}
html[data-theme="dark"] #benefits.bx .bx-eb,
body.dark #benefits.bx .bx-eb {
  color: #F5D47A !important;
}
html[data-theme="dark"] #benefits.bx .bx-h,
html[data-theme="dark"] #benefits.bx .bx-h1,
html[data-theme="dark"] #benefits.bx .bx-h2,
body.dark #benefits.bx .bx-h,
body.dark #benefits.bx .bx-h1,
body.dark #benefits.bx .bx-h2 {
  color: #FFFDF8 !important;
}
html[data-theme="dark"] #benefits.bx .bx-lead,
body.dark #benefits.bx .bx-lead {
  color: #D2DFEE !important;
}
html[data-theme="dark"] #benefits.bx .bx-note,
body.dark #benefits.bx .bx-note {
  background: #122342 !important;
  border-color: rgba(212, 168, 75, 0.42) !important;
  color: #E8F0FC !important;
}
html[data-theme="dark"] #benefits.bx .bx-note svg,
body.dark #benefits.bx .bx-note svg {
  color: #F5D47A !important;
}
@media (max-width: 640px) {
  html[data-theme="dark"] #benefits.bx .bx-left,
  body.dark #benefits.bx .bx-left {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}
/* Auto OS prefers-color-scheme:dark intentionally disabled on #benefits so homepage stays consistent warm sunlit ivory */


/* === DESKTOP EQUAL-HEIGHT FEATURED GUIDE SPLIT (2026-11-25) === */
@media (min-width: 901px) {
  #benefits.bx .bx-left,
  #benefits.bx .bx-right {
    justify-content: flex-start !important;
    gap: 24px !important;
  }
  #benefits.bx .bx-right .bx-note {
    margin-top: auto !important;
  }
  #benefits.bx .m508-gp-stack {
    margin-top: auto !important;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured {
    display: grid !important;
    grid-template-columns: 270px minmax(0, 1fr);
    grid-template-areas:
      "head head"
      "media copy"
      "cta cta"
      "actions actions";
    align-items: stretch;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .post-head {
    grid-area: head;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .post-media.spc-guide-media--cover {
    grid-area: media;
    padding: 18px 10px 18px 18px !important;
    background: linear-gradient(90deg, #0B1932 0%, #112447 100%) !important;
    border-top: 1px solid rgba(212, 168, 75, 0.28) !important;
    border-bottom: 1px solid rgba(212, 168, 75, 0.28) !important;
    border-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .post-media.spc-guide-media--cover .spc-guide-img {
    width: 100% !important;
    max-width: 242px !important;
    height: auto !important;
    max-height: 316px !important;
    object-fit: contain !important;
    object-position: 50% 15% !important;
    margin: 0 auto !important;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .post-media.spc-guide-media--cover .spc-guide-media-badge {
    display: none !important;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .spc-guide-copy {
    grid-area: copy;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    padding: 20px 22px 20px 12px !important;
    background: linear-gradient(90deg, #112447 0%, #152D54 100%) !important;
    border-top: 1px solid rgba(212, 168, 75, 0.28);
    border-bottom: 1px solid rgba(212, 168, 75, 0.28);
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .spc-guide-copy .spc-guide-eyebrow {
    color: #F5D47A !important;
    margin: 0 0 8px !important;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .spc-guide-copy .spc-guide-title {
    color: #FFFFFF !important;
    font-size: 27px !important;
    line-height: 1.13 !important;
    margin: 0 0 12px !important;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .spc-guide-copy .spc-guide-standfirst {
    color: #DCE6F5 !important;
    font-size: 14.5px !important;
    line-height: 1.56 !important;
    margin: 0 !important;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .spc-guide-cta-bar {
    grid-area: cta;
  }
  #benefits.bx .m508-gp-stack .post-card--guide.post-card--featured > .spc-guide-actions {
    grid-area: actions;
  }
}
/* === END DESKTOP EQUAL-HEIGHT FEATURED GUIDE SPLIT === */

/* Keep #benefits guide cards in crisp sunlit light theme matching the rest of 508ministry.com (ignore OS dark mode unless explicit data-theme="dark") */
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card.post-card--guide {
  background: #FFFFFF !important;
  color: #13223D !important;
  border-color: rgba(212, 168, 75, 0.58) !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card.post-card--guide.post-card--featured {
  border-color: #D4A84B !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .post-head {
  background: linear-gradient(180deg, #FFFDF8 0%, #FFFFFF 100%) !important;
  border-bottom-color: #EEF2F7 !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .post-name {
  color: #0D1E3A !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .post-handle {
  color: #5C6F8C !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .post-sub {
  color: #647692 !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide:not(.post-card--featured) .spc-guide-eyebrow {
  color: #9A6B0E !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide:not(.post-card--featured) .spc-guide-title {
  color: #0D1E3A !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide:not(.post-card--featured) .spc-guide-standfirst {
  color: #2B3D5B !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .spc-guide-cta-bar {
  background: #FAF8F2 !important;
  border-color: #ECE6D8 !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .spc-guide-actions {
  background: #FFFFFF !important;
  border-color: #EEF2F7 !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .act-btn:not(.share-main) {
  background: #F7FAFD !important;
  color: #1D3153 !important;
  border-color: #DCE4F0 !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .act-btn.is-active,
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .act-btn.saved {
  background: #FFF4D4 !important;
  border-color: #D4A84B !important;
  color: #7A5205 !important;
}
@media (max-width: 900px) {
  html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide.post-card--featured .spc-guide-eyebrow {
    color: #9A6B0E !important;
  }
  html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide.post-card--featured .spc-guide-title {
    color: #0D1E3A !important;
  }
  html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide.post-card--featured .spc-guide-standfirst {
    color: #2B3D5B !important;
  }
}

html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .act-btn.share-main {
  background: linear-gradient(135deg, #0D1E3A 0%, #173461 100%) !important;
  color: #F7DF92 !important;
  border-color: #D4A84B !important;
}
html:not([data-theme="dark"]) body:not(.dark) #benefits.bx .post-card--guide .act-btn.share-main:hover {
  background: linear-gradient(135deg, #142B52 0%, #1E427A 100%) !important;
}
