/* Casos de éxito en vídeo: escenario con diapositivas animadas, raíl de casos y reproductor en lightbox */

.cs { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; max-width: 1100px; margin: 0 auto; align-items: stretch; }

/* ---------- Escenario ---------- */
.cs-stage { position: relative; min-height: 460px; overflow: hidden; border-radius: 32px; background: #14201f; box-shadow: 0 30px 60px -34px rgba(20, 32, 31, 0.7); isolation: isolate; }
.cs-slide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 34px; color: #fff; }
.cs-slide[hidden] { display: none; }
.cs-js .cs-slide { opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0s linear 0.6s; }
.cs-js .cs-slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; z-index: 1; }
.cs-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04) translate(var(--mx, 0px), var(--my, 0px)); transition: transform 0.4s ease-out; }
.cs-js .cs-slide.is-active .cs-bg { animation: cs-zoom 10s ease-out forwards; }
@keyframes cs-zoom { from { scale: 1; } to { scale: 1.12; } }
.cs-preview { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.cs-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 32, 31, 0.1) 25%, rgba(20, 32, 31, 0.88) 100%), linear-gradient(90deg, var(--c, #0b6f6c) -60%, transparent 60%); mix-blend-mode: normal; }
.cs-info { max-width: 30em; }
.cs-js .cs-slide .cs-info > * { opacity: 0; transform: translateY(18px); }
.cs-js .cs-slide.is-active .cs-info > * { animation: cs-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; animation-delay: calc(0.15s + var(--k, 0) * 0.1s); }
@keyframes cs-up { to { opacity: 1; transform: none; } }
.cs-tag { display: inline-block; margin-bottom: 12px; padding: 5px 13px; border-radius: 999px; background: #51D9D6; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #14201f; }
.cs-title { margin: 0 0 14px; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.12; color: #fff; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cs-chips li { padding: 5px 12px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px); font-size: 0.82rem; font-weight: 700; }

.cs-play { position: absolute; right: 30px; bottom: 30px; z-index: 2; display: grid; place-items: center; width: 76px; height: 76px; border: 0; border-radius: 50%; background: #51D9D6; color: #14201f; cursor: pointer; box-shadow: 0 16px 34px -12px rgba(81, 217, 214, 0.9); transition: transform 0.25s ease; }
.cs-play svg { width: 30px; height: 30px; margin-left: 4px; fill: currentColor; }
.cs-play i { position: absolute; inset: 0; border: 2px solid #51D9D6; border-radius: 50%; opacity: 0; animation: cs-ping 2.6s ease-out infinite; }
.cs-play i:nth-of-type(2) { animation-delay: 1.3s; }
@keyframes cs-ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.9); opacity: 0; } }
.cs-play:hover, .cs-play:focus-visible { transform: scale(1.1); outline: none; }
.cs-play:focus-visible { box-shadow: 0 0 0 4px #fff, 0 16px 34px -12px rgba(81, 217, 214, 0.9); }

.cs-count { position: absolute; left: 34px; top: 28px; z-index: 3; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; }
.cs-count b { font-size: 1.4rem; color: #fff; }

/* ---------- Raíl ---------- */
.cs-rail { display: grid; gap: 12px; align-content: stretch; margin: 0; padding: 0; list-style: none; }
.cs-item { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; height: 100%; padding: 12px; overflow: hidden; border: 1px solid #e3e8ee; border-radius: 22px; background: #fff; text-align: left; font: inherit; color: #202020; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.cs-item:hover { transform: translateX(-4px); border-color: #51D9D6; }
.cs-item:focus-visible { outline: 2px solid #0b6f6c; outline-offset: 2px; }
.cs-item[aria-current="true"] { border-color: #51D9D6; box-shadow: 0 18px 34px -22px #2fb5b2; transform: translateX(-8px); }
.cs-thumb { flex: none; width: 76px; height: 76px; border-radius: 16px; object-fit: cover; filter: grayscale(0.6); transition: filter 0.3s ease; }
.cs-item:hover .cs-thumb, .cs-item[aria-current="true"] .cs-thumb { filter: none; }
.cs-meta { display: block; min-width: 0; }
.cs-sector { display: block; margin-bottom: 2px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #0b6f6c; }
.cs-name { display: block; font-size: 0.98rem; font-weight: 800; line-height: 1.25; }
.cs-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.cs-prog::after { content: ""; display: block; height: 100%; background: linear-gradient(90deg, #51D9D6, #0b6f6c); transform: scaleX(0); transform-origin: left; }
.cs-item[aria-current="true"] .cs-prog::after { transform: scaleX(1); }
.cs-auto .cs-item[aria-current="true"] .cs-prog::after { transform: scaleX(0); animation: cs-progress 8s linear forwards; }
.cs-auto:not(.is-live) .cs-prog::after, .cs-wrap:hover .cs-prog::after, .cs-wrap:focus-within .cs-prog::after, .ld-open .cs-prog::after { animation-play-state: paused !important; }
@keyframes cs-progress { to { transform: scaleX(1); } }

/* ---------- Lightbox ---------- */
.cs-lb { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 16px; }
.cs-lb[hidden] { display: none; }
.cs-lb__backdrop { position: absolute; inset: 0; background: rgba(8, 18, 18, 0.82); backdrop-filter: blur(8px); animation: ld-fade 0.25s ease both; }
.cs-lb__panel { position: relative; width: min(960px, 100%); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 24px; background: #000; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8); animation: ld-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; outline: none; }
.cs-lb__media { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.cs-lb__close { position: absolute; right: 12px; top: 12px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: #202020; font-size: 1.5rem; line-height: 1; cursor: pointer; transition: transform 0.25s ease; }
.cs-lb__close:hover, .cs-lb__close:focus-visible { transform: rotate(90deg); outline: none; }
.cs-lb__soon { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; color: #fff; background: radial-gradient(circle at 30% 20%, #14504e, #0b2423); }
.cs-lb__soon[hidden] { display: none; }
.cs-lb__soon h3 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; color: #fff; }
.cs-lb__soon p { margin: 0; max-width: 30em; color: rgba(255, 255, 255, 0.78); }
.cs-lb__btn { padding: 14px 26px; border: 0; border-radius: 999px; background: #51D9D6; font: inherit; font-weight: 800; color: #14201f; cursor: pointer; transition: transform 0.2s ease; }
.cs-lb__btn:hover, .cs-lb__btn:focus-visible { transform: translateY(-2px); outline: none; }

@media (max-width: 900px) {
  .cs { grid-template-columns: 1fr; }
  .cs-stage { min-height: 420px; }
  .cs-rail { display: flex; gap: 10px; margin: 0 -20px; padding: 4px 20px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cs-rail::-webkit-scrollbar { display: none; }
  .cs-rail > li { flex: none; width: 260px; scroll-snap-align: start; }
  .cs-item:hover, .cs-item[aria-current="true"] { transform: translateY(-3px); }
}
@media (max-width: 560px) {
  .cs-stage { min-height: 400px; border-radius: 26px; }
  .cs-slide { padding: 22px; }
  .cs-count { left: 22px; top: 20px; }
  .cs-play { right: 20px; bottom: 20px; width: 62px; height: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-js .cs-slide .cs-info > * { opacity: 1; transform: none; animation: none !important; }
  .cs-js .cs-slide.is-active .cs-bg, .cs-play i { animation: none; }
  .cs-js .cs-slide, .cs-bg, .cs-item { transition: none; }
}
