/* Casos de éxito — Scroll Stacking Cards */
.ce-stack {
  position: relative;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.ce-stack * {
  box-sizing: border-box;
}

.ce-stack__head {
  text-align: center;
  margin: 0 auto 48px;
  max-width: 720px;
}

.ce-stack__head h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  margin: 0 0 14px;
}

.ce-stack__head p {
  font-size: 18px;
  opacity: .7;
  margin: 0;
}

.ce-stack__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* El item hace sticky y deja solo --ce-gap (32px) entre tarjetas */
.ce-stack__item {
  position: sticky;
  top: var(--ce-offset);
  margin-bottom: var(--ce-gap);
  will-change: transform;
}

.ce-stack__item:last-child {
  margin-bottom: 0;
}

/* La tarjeta es corta (banner) y recibe el escalado 3D */
.ce-stack__card {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  aspect-ratio: 16 / 5;
  border-radius: var(--ce-radius);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .06);
  transform-origin: top center;
  background: #11111a;
  transition: transform .2s ease-out, filter .2s ease-out;
}

.ce-stack__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.001);
  transition: all .6s cubic-bezier(.2, .7, .2, 1);
  opacity: .75;
}

.ce-stack__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .15) 45%, rgba(0, 0, 0, 0) 70%);
}

.ce-stack__card:hover .ce-stack__bg {
  transform: scale(1.05);
  opacity: 1;
}

.ce-stack__overlay {
  position: absolute;
  left: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 3vw, 40px);
  right: auto;
  max-width: min(74%, 440px);
  padding: clamp(18px, 2vw, 26px);
  border-radius: 16px;
  background: rgba(20, 20, 28, .28);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--ce-txt);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ce-stack__label {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ce-accent);
  padding: 5px 12px;
  border-radius: 100px;
}

.ce-stack__title {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
  margin: 0;
  font-weight: 500;
  color: var(--ce-txt);
  font-family: 'Space Grotesk';
}

.ce-stack__excerpt {
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  opacity: .85;
  color: var(--ce-txt);
  font-family: 'Manrope';
  font-weight: 300;
}

a.ce-stack__card {
  margin-top: 24px;
  box-shadow: 0px 20px 20px 4px #00000040;
}

li.ce-stack__item {
  padding: 0;
}

li.ce-stack__item:before {
  display: none;
}

/* ===== MÓVIL: sin sticky, sin 3D, sin hover, sin transiciones ===== */
@media (max-width: 860px) {
  .ce-stack__item {
    position: relative !important;
    top: auto !important;
    margin-bottom: 18px;
    will-change: auto;
  }
  .ce-stack__card {
    aspect-ratio: auto;
    min-height: clamp(320px, 58vh, 520px);
    transform: none !important;   /* anula el scale del JS */
    filter: none !important;      /* anula el brightness del JS */
    transition: none !important;
  }
  .ce-stack__bg,
  .ce-stack__card:hover .ce-stack__bg {
    transform: none !important;   /* sin zoom */
    opacity: 1 !important;        /* imagen a plena opacidad (sin hover en táctil) */
    transition: none !important;
  }
}

/* Usuarios con "reduce motion": también sin animaciones */
@media (prefers-reduced-motion: reduce) {
  .ce-stack__item {
    position: relative !important;
    top: auto !important;
    margin-bottom: 24px !important;
  }
  .ce-stack__card {
    transform: none !important;
    filter: none !important;
  }
  .ce-stack__bg {
    transition: none !important;
    opacity: 1 !important;
  }
}

/* Arreglo del overflow del tema que rompía el sticky */
.body-container {
  overflow: clip !important;
}