/* Viscom Slider — widget de Creative Elements
 * Los valores de este archivo son los del mockup v5 (base). Todo lo que se
 * cambie desde el editor de Creative Elements tiene prioridad sobre ellos.
 * La tipografía se hereda del kit de CE (Poppins); pesos máximos 700.
 */

.vcs {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #0b0c0e;
  color: #fff;
  --vcs-justify: flex-start;
}

.vcs *,
.vcs *::before,
.vcs *::after { box-sizing: border-box; }

/* Pila de diapositivas: todas en la misma celda de la rejilla, así la altura
   la marca la diapositiva más alta y el texto nunca se corta en móvil. */
.vcs-track { display: grid; }

.vcs-slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 630px;
  background-color: inherit;
  opacity: 0;
  visibility: hidden;
  z-index: 0;
}

.vcs-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Fundido */
.vcs--fade .vcs-slide {
  transition: opacity var(--vcs-speed, 600ms) ease, visibility 0s linear var(--vcs-speed, 600ms);
}
.vcs--fade .vcs-slide.is-active {
  transition: opacity var(--vcs-speed, 600ms) ease, visibility 0s;
}

/* Deslizar (el JS coloca las diapositivas que entran y salen) */
.vcs--slide .vcs-slide { opacity: 1; }
.vcs--slide .vcs-slide.is-moving {
  visibility: visible;
  transition: transform var(--vcs-speed, 600ms) cubic-bezier(.65, 0, .35, 1);
}

/* Imagen */
.vcs-media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}
.vcs .vcs-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

/* Superposición: degradado de 3 paradas controlado con variables */
.vcs-overlay {
  --vcs-ov-angle: 90deg;
  --vcs-ov-a: rgba(0, 0, 0, .96);
  --vcs-ov-b: rgba(0, 0, 0, .56);
  --vcs-ov-b-pos: 43%;
  --vcs-ov-c: rgba(0, 0, 0, .04);
  --vcs-ov-c-pos: 78%;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: linear-gradient(var(--vcs-ov-angle), var(--vcs-ov-a) 0%, var(--vcs-ov-b) var(--vcs-ov-b-pos), var(--vcs-ov-c) var(--vcs-ov-c-pos));
}
.vcs--no-overlay .vcs-overlay { display: none; }

/* Contenedor alineado con la rejilla de la web */
.vcs-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 96px 48px 80px;
}

.vcs-content {
  max-width: 650px;
  margin-right: auto;
  text-align: left;
}

/* Textos */
.vcs .vcs-kicker {
  margin: 0 0 18px;
  color: #ffc400;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.vcs .vcs-title {
  margin: 0 0 23px;
  color: #fff;
  font-size: clamp(44px, 5.5vw, 78px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.01em;
  text-transform: none;
}
.vcs .vcs-title span { color: #ffc400; }

.vcs .vcs-desc {
  max-width: 590px;
  margin: 0;
  color: #e6e7e8;
  font-size: 17px;
  line-height: 1.55;
}

/* Con alineación centrada o a la derecha, los bloques con ancho máximo
   se colocan igual que el texto (variables que pone el control Alineación). */
.vcs .vcs-kicker,
.vcs .vcs-title,
.vcs .vcs-desc {
  margin-left: var(--vcs-mx-l, 0);
  margin-right: var(--vcs-mx-r, 0);
}

/* Botones */
.vcs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 29px;
  justify-content: var(--vcs-justify, flex-start);
}

.vcs .vcs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.vcs-lift-yes .vcs .vcs-btn:hover { transform: translateY(-2px); }
.vcs .vcs-btn:focus-visible { outline: 2px solid #ffc400; outline-offset: 3px; }

.vcs .vcs-btn--primary { background-color: #e30613; border-color: #e30613; color: #fff; }
.vcs .vcs-btn--primary:hover,
.vcs .vcs-btn--primary:focus-visible { background-color: #c00510; border-color: #c00510; color: #fff; }

.vcs .vcs-btn--secondary { background-color: #ffc400; border-color: #ffc400; color: #111; }
.vcs .vcs-btn--secondary:hover,
.vcs .vcs-btn--secondary:focus-visible { background-color: #ffd23f; border-color: #ffd23f; color: #111; }

.vcs .vcs-btn--outline { background-color: transparent; border-color: currentColor; color: #fff; }
.vcs .vcs-btn--outline:hover,
.vcs .vcs-btn--outline:focus-visible { background-color: #fff; border-color: #fff; color: #111; }

.vcs .vcs-btn--light { background-color: #fff; border-color: #fff; color: #111; }
.vcs .vcs-btn--light:hover,
.vcs .vcs-btn--light:focus-visible { background-color: #f4f5f6; border-color: #f4f5f6; color: #111; }

/* Animación del texto al entrar */
.vcs--anim .vcs-content > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.vcs--anim .vcs-slide.is-active .vcs-content > * { opacity: 1; transform: none; }
.vcs--anim .vcs-slide.is-active .vcs-content > :nth-child(1) { transition-delay: .15s; }
.vcs--anim .vcs-slide.is-active .vcs-content > :nth-child(2) { transition-delay: .25s; }
.vcs--anim .vcs-slide.is-active .vcs-content > :nth-child(3) { transition-delay: .35s; }
.vcs--anim .vcs-slide.is-active .vcs-content > :nth-child(4) { transition-delay: .45s; }

/* Indicadores (barras) */
.vcs-nav {
  --vcs-dots-offset: 30px;
  position: absolute;
  top: var(--vcs-dots-offset);
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
}
.vcs-dots-bottom .vcs-nav { top: auto; bottom: var(--vcs-dots-offset); }
.vcs-nav .vcs-inner { padding-top: 0; padding-bottom: 0; }

.vcs-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.vcs .vcs-dot {
  position: relative;
  width: 32px;
  height: 3px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: #999;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color .25s ease;
}
/* Zona táctil más grande sin cambiar el dibujo */
.vcs .vcs-dot::before { content: ""; position: absolute; inset: -12px 0; }
.vcs .vcs-dot.is-active,
.vcs .vcs-dot:hover { background-color: #e30613; }
.vcs .vcs-dot:focus-visible { outline: 2px solid #ffc400; outline-offset: 4px; }

/* Flechas */
.vcs .vcs-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 0;
  background-color: rgba(0, 0, 0, .45);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.vcs .vcs-arrow:hover { background-color: #e30613; border-color: #e30613; color: #fff; }
.vcs .vcs-arrow:focus-visible { outline: 2px solid #ffc400; outline-offset: 2px; }
.vcs-arrow--prev { left: 16px; }
.vcs-arrow--next { right: 16px; }

.vcs.is-dragging { cursor: grabbing; user-select: none; }

/* Tablet */
@media (max-width: 1024px) {
  .vcs-slide { min-height: 560px; }
  .vcs-inner { padding: 88px 32px 64px; }
  .vcs .vcs-title { font-size: clamp(40px, 6vw, 60px); }
}

/* Móvil */
@media (max-width: 767px) {
  .vcs-slide { min-height: 560px; align-items: flex-end; }
  .vcs-inner { padding: 72px 24px 40px; }
  .vcs-content { max-width: none; }
  .vcs-overlay {
    --vcs-ov-angle: 0deg;
    --vcs-ov-a: rgba(0, 0, 0, .97);
    --vcs-ov-b: rgba(0, 0, 0, .62);
    --vcs-ov-b-pos: 45%;
    --vcs-ov-c: rgba(0, 0, 0, .25);
    --vcs-ov-c-pos: 90%;
  }
  .vcs .vcs-kicker { margin-bottom: 14px; font-size: 12px; }
  .vcs .vcs-title { font-size: 40px; line-height: 1; margin-bottom: 16px; }
  .vcs .vcs-desc { font-size: 15px; }
  .vcs-actions { margin-top: 22px; }
  .vcs-nav { --vcs-dots-offset: 24px; }
  .vcs .vcs-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vcs .vcs-slide,
  .vcs--anim .vcs-content > *,
  .vcs .vcs-btn { transition: none !important; }
}

/* ------------------------------------------------------------------
 * Vídeo de fondo (v1.1)
 * La imagen de la diapositiva queda debajo como portada y se ve hasta
 * que el vídeo empieza a reproducirse de verdad.
 * ------------------------------------------------------------------ */
.vcs-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  container-type: size;
  transition: opacity .8s ease;
}
.vcs-video.is-playing { opacity: 1; }

/* iframe (YouTube, Vimeo, otros): recorte tipo "cover" según la proporción */
.vcs-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  width: max(100cqw, calc(100cqh * var(--vcs-ar, 1.7778)));
  height: max(100cqh, calc(100cqw / var(--vcs-ar, 1.7778)));
  max-width: none;
  border: 0;
  transform: translate(-50%, -50%) scale(var(--vcs-zoom, 1));
}

/* Archivo .mp4/.webm */
.vcs .vcs-video video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

@media (max-width: 767px) {
  .vcs-video--no-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vcs-video { display: none; }
}
