/* Sala de historias. La foto abre, como el degradado del inicio; después blanco y gris. */
body:has(.sala),
body:has(.ficha) {
  background: #fff;
}

.sala,
.ficha {
  background: #fff;
  color: #331d40;
  font-family: Roboto, system-ui, sans-serif;
}

.sala-vacia {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 24px 96px;
}

.sala-vacia h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.sala-vacia p {
  margin: 0 0 24px;
  max-width: 34rem;
  font-size: 17px;
  line-height: 1.5;
}

.sala-vacia a {
  color: #fff;
  background: #ff3364;
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 500;
}

.sala-stage,
.ficha-hero {
  position: relative;
  height: min(78vh, 820px);
  min-height: 460px;
  overflow: hidden;
  background: #07040c;
}

.sala-still,
.ficha-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sala-still {
  position: absolute;
  inset: 0;
}

.sala-still-in {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.sala-stage.is-cross .sala-still-in {
  opacity: 1;
}

.sala-shade,
.ficha-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 4, 12, 0.08) 20%, rgba(7, 4, 12, 0.2) 48%, rgba(7, 4, 12, 0.92) 100%);
  pointer-events: none;
}

.sala-copy,
.ficha-copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 28px;
  z-index: 1;
}

.sala-copy {
  transition: opacity 0.45s ease;
}

.sala-stage.is-cross .sala-copy {
  opacity: 0;
  transition-duration: 0.3s;
}

.sala-kicker,
.ficha-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fbfbfa;
}

.sala-title,
.ficha-copy h1 {
  margin: 0;
  max-width: 14ch;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fff;
}

.sala-line {
  margin: 10px 0 0;
  max-width: 36ch;
  font-size: 16px;
  line-height: 1.35;
  color: #e7e4ea;
}

.sala-media {
  margin: 8px 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #fbfbfa;
}

.sala-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.sala-play b,
.ficha-play {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #ff3364;
  display: inline-grid;
  place-items: center;
  flex: none;
}

.sala-play svg,
.ficha-play svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
  fill: #fff;
}

.sala-strip {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 20px 4px;
  scroll-padding-inline: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.sala-strip::-webkit-scrollbar,
.reel-row::-webkit-scrollbar {
  display: none;
}

.sala-thumb {
  flex: 0 0 108px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #f4f6f9;
  opacity: 1;
  cursor: pointer;
}

.sala-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sala-thumb.is-on {
  box-shadow: 0 0 0 2px #ff3364;
}

.reel {
  padding-top: 36px;
  padding-bottom: 28px;
}

.reel h2 {
  margin: 0 0 16px;
  padding: 0 20px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: none;
  color: #331d40;
}

.reel#casos,
.sala-muestra {
  background: #f9fafb;
}

.reel-row {
  display: flex;
  gap: 12px;
  padding: 0 20px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.reel-card {
  position: relative;
  flex: 0 0 86%;
  scroll-snap-align: start;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: #120a18;
}

.reel-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.reel-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(7, 4, 12, 0.92));
}

.reel-card strong {
  display: block;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.reel-card em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 13px;
  color: #d5d2d8;
}

.sala-muestra {
  margin: 0;
  padding: 28px 20px 48px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b6474;
}

.ficha-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(251, 251, 250, 0.7);
  border-radius: 999px;
  color: #fbfbfa;
  font-size: 13px;
  text-decoration: none;
  background: rgba(7, 4, 12, 0.35);
}

.ficha-copy {
  bottom: 28px;
}

.ficha-body {
  max-width: none;
  padding: 36px 20px 44px;
  text-align: center;
}

.ficha-body p {
  margin: 0 auto;
  max-width: 46rem;
  font-size: clamp(17px, 0.98rem + 0.3vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  color: #331d40;
}

.ficha-body .ficha-count {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: #6b6474;
}

.ficha-block {
  padding: 4px 20px 8px;
}

.ficha-block h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #331d40;
}

.ficha-block--fotos {
  background: #f9fafb;
  padding-top: 28px;
  padding-bottom: 28px;
}

.ficha-videos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 20px;
}

.ficha-video {
  width: min(100%, 720px);
  margin: 0;
}

.ficha-player {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #120a18;
  aspect-ratio: 16 / 9;
}

.ficha-player video,
.ficha-player iframe,
.ficha-player .ficha-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
  background: #120a18;
}

.ficha-player.is-playing .ficha-poster {
  display: none;
}

.ficha-player .ficha-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: 0;
  cursor: pointer;
}

.ficha-player p {
  position: absolute;
  left: 16px;
  bottom: 14px;
  margin: 0;
  font-size: 14px;
  color: #fff;
}

.ficha-player.is-playing .ficha-play,
.ficha-player.is-playing p {
  display: none;
}

.sala img,
.ficha img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.ficha-video figcaption,
.ficha-notes,
.ficha-lightbox .ficha-pie {
  max-width: 46rem;
  margin: 12px auto 0;
  text-align: center;
  color: #331d40;
  font-size: clamp(16px, 0.95rem + 0.15vw, 18px);
  line-height: 1.45;
}

.ficha-seen {
  margin: 0;
  color: #6b6474;
  font-size: 15px;
}

.ficha-pie {
  margin: 4px 0 0;
}

.ficha-seen[hidden],
.ficha-pie[hidden] {
  display: none;
}

.ficha-car-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.ficha-car-count {
  margin: 0 0 12px;
  font-size: 15px;
  color: #6b6474;
}

.ficha-car,
.ficha-light-stage {
  position: relative;
}

.ficha-car-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #f9fafb;
  cursor: pointer;
}

.ficha-car-open img {
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  object-position: center;
  display: block;
}

.ficha-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #331d40;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(51, 29, 64, 0.2);
}

.ficha-nav svg {
  width: 16px;
  height: 16px;
}

.ficha-nav--prev { left: 12px; }
.ficha-nav--next { right: 12px; }

.ficha-nav:hover,
.ficha-nav:focus-visible {
  background: #ff3364;
  color: #fff;
  outline: none;
}

.ficha-car-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.ficha-car-thumbs::-webkit-scrollbar {
  display: none;
}

.ficha-car-thumb {
  flex: 0 0 96px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  scroll-snap-align: center;
  background: #e7e4ea;
  opacity: 0.72;
  cursor: pointer;
}

.ficha-car-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ficha-car-thumb.is-on {
  opacity: 1;
  box-shadow: 0 0 0 2px #ff3364;
}

.ficha-lightbox {
  width: min(1100px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: #fff;
}

.ficha-lightbox::backdrop {
  background: rgba(51, 29, 64, 0.72);
}

.ficha-light-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ficha-light-bar p {
  margin: 0;
  font-size: 15px;
  color: #331d40;
}

.ficha-light-bar button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #331d40;
  border-radius: 999px;
  background: #fff;
  color: #331d40;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.ficha-light-bar button:hover,
.ficha-light-bar button:focus-visible {
  background: #ff3364;
  border-color: #ff3364;
  color: #fff;
  outline: none;
}

.ficha-lightbox img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(78vh, 860px);
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
  background: #f4f6f9;
}

.ficha-more {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px 20px 48px;
}

.ficha-more a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  position: relative;
}

.ficha-more img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.ficha-more strong {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

@media (min-width: 768px) {
  .sala-copy,
  .ficha-copy {
    left: 48px;
    right: 48px;
    bottom: 48px;
  }

  .sala-title,
  .ficha-copy h1 {
    font-size: 56px;
  }

  .sala-strip {
    justify-content: center;
    padding-left: 48px;
    padding-right: 48px;
    scroll-padding-inline: 48px;
  }

  .sala-thumb {
    flex-basis: 148px;
    height: 84px;
  }

  .reel h2 {
    font-size: 28px;
  }

  .reel h2,
  .reel-row,
  .sala-muestra,
  .ficha-body,
  .ficha-block,
  .ficha-more {
    padding-left: 48px;
    padding-right: 48px;
  }

  .ficha-videos--2 .ficha-video {
    width: min(100%, calc(50% - 10px));
    max-width: 520px;
  }

  .ficha-videos--3 .ficha-video,
  .ficha-videos--n .ficha-video {
    width: min(100%, calc(50% - 10px));
    max-width: 480px;
  }

  .ficha-body {
    padding-top: 48px;
    padding-bottom: 56px;
  }

  .ficha-car-thumbs {
    justify-content: center;
  }

  .reel-card {
    flex-basis: 420px;
  }

  .reel-card img {
    height: 280px;
  }

  .ficha-more {
    grid-template-columns: repeat(3, 220px);
  }

  .ficha-more img {
    height: 140px;
  }
}

@media (min-width: 1100px) {
  .ficha-videos--3 .ficha-video,
  .ficha-videos--n .ficha-video {
    width: min(100%, calc(33.333% - 14px));
    max-width: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sala-still,
  .sala-copy {
    transition: none;
  }
}
