/* =========================================================
   CARD-STACK SCROLL SECTION
   ---------------------------------------------------------
   Wide, fully-opaque cards. Image left / details right.
   As the section is scrolled each card rises up from below
   into the front slot; the card it replaces is pushed back
   (up + a touch smaller) so its top edge keeps peeking.

   Classes are namespaced .cs-* so they never collide with
   Bootstrap's .card. Safe-by-default: with no JS (or on a
   phone) the cards render as a normal vertical list. The
   ".is-pinned" class that switches on the absolute/overlay
   behaviour is only added by card-stack.js.
========================================================= */

/* this section runs wider than the standard content column */
.cs-section { padding-top: 3rem; padding-bottom: 3.5rem; }
.cs-section .pp3-section__inner { max-width: 1500px; }
.cs-section .pp3-section__head { margin-bottom: 1.75rem; }

.cs-stack {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cs-card {
  background-color: #fff;                 /* fully opaque */
  border: 1px solid var(--border-2, #d7e3f5);
  border-radius: var(--r-lg, 26px);
  box-shadow:
    0 -12px 30px rgba(11, 34, 68, .05),   /* lifts the peeking top edge */
    0 26px 60px rgba(11, 34, 68, .13);
  overflow: hidden;
}

.cs-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.9rem 1.6rem;
}

/* LEFT — media */
.cs-card__media {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-card__media img {
  width: 100%;
  max-width: 460px;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  will-change: transform;
}

/* RIGHT — details */
.cs-card__body { width: 100%; text-align: center; }
.cs-card__eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue, #1677ff);
  margin-bottom: .6rem;
}
.cs-card__body h3 {
  margin: 0 0 .7rem;
  font-weight: 700;
  line-height: 1.18;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem);
  color: var(--ink-2, #0f2a5f);
}
.cs-card__body p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted, #5b6b83);
}

@media (min-width: 860px) {
  .cs-card__inner {
    flex-direction: row;
    gap: 4rem;
    padding: 2.6rem 4rem;
    min-height: 300px;
  }
  .cs-card__media { flex: 0 0 46%; align-self: center; }
  .cs-card__media img { max-width: 100%; max-height: 320px; }
  .cs-card__body { flex: 1; text-align: left; }
}

/* ---------------------------------------------------------
   JS-enhanced pinned mode  (desktop, added by card-stack.js)
   Cards are anchored near the top of a compact pinned area
   and sized to fill it, so there is no large empty band
   above or below the stack.
--------------------------------------------------------- */
.cs-stack.is-pinned {
  display: block;
  height: 74vh;
  min-height: 440px;
  max-height: 680px;
  overflow: hidden;               /* cards rise up from below this edge */
}
.cs-stack.is-pinned .cs-card {
  position: absolute;
  left: 0;
  right: 0;
  top: 56px;                      /* headroom for the peeking cards */
  bottom: 0;
  margin: 0;
  display: flex;
  will-change: transform;
  backface-visibility: hidden;
}
.cs-stack.is-pinned .cs-card__inner {
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: center;
  justify-content: center;
}
.cs-stack.is-pinned .cs-card__media img { max-height: 44vh; }

@media (prefers-reduced-motion: reduce) {
  .cs-card__media img { will-change: auto; }
}
