/* Vídeos de RRHH Tecnoconia (RRH-113): marco de ventana, fundidos, controles y escaparate. */
.vclip {
  --v-line: #e5b4f73a;
  --v-lavender: #e9bfff;
  --v-lime: #a9e85c;
  --v-muted: #d1c1d8;
  --v-ease: cubic-bezier(.2, .7, .2, 1);
  min-width: 0;
  margin: 0;
}
.vclip-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid #e5b4f752;
  border-radius: 14px;
  background: linear-gradient(180deg, #2c2036, #1a1321);
  box-shadow: inset 0 1px 0 #ffffff17, 0 34px 70px -38px #000000e0;
  transition: opacity 1s var(--v-ease), transform 1s var(--v-ease), box-shadow 1.4s ease;
}
.vclip.is-waiting .vclip-frame { opacity: 0; transform: translateY(30px) scale(.965); }
.vclip.is-in .vclip-frame { box-shadow: inset 0 1px 0 #ffffff17, 0 34px 70px -38px #000000e0, 0 20px 90px -30px #c58ae88c; }
.vclip.is-on .vclip-frame { box-shadow: inset 0 1px 0 #ffffff17, 0 34px 70px -38px #000000e0, 0 20px 100px -28px #c58ae8a8, 0 0 0 1px #e9bfff1f; }
/* Brillo de cristal que cruza el marco una vez al entrar. */
.vclip-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, #ffffff1c 50%, transparent 62%);
  transform: translateX(-130%);
}
.vclip.is-in .vclip-frame::after { animation: vclip-sheen 1.7s .45s ease-out both; }
@keyframes vclip-sheen { to { transform: translateX(130%); } }

.vclip-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding-inline: 14px;
  border-bottom: 1px solid #e5b4f726;
  background: #ffffff07;
  color: var(--v-muted);
  font-size: .78rem;
  font-weight: 700;
}
.vclip-dots { display: flex; flex: none; gap: 6px; }
.vclip-dots i { width: 9px; height: 9px; border-radius: 50%; background: #e5b4f73d; }
.vclip-dots i:last-child { background: #a9e85c66; }
.vclip-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.vclip-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #120d17;
  cursor: pointer;
}
.vclip-screen > video { display: block; width: 100%; height: 100%; object-fit: contain; }
.vclip--stage .vclip-screen > video:not(:first-child) { display: none; }
.vclip-layer { position: absolute; inset: 0; transition: opacity .9s ease; }
.vclip--stage .vclip-layer { opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; }
.vclip--stage .vclip-layer.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }
.vclip-layer video, .vclip-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vclip-cover { pointer-events: none; transition: opacity 1.1s ease, transform 1.6s var(--v-ease); }
.vclip-layer.is-playing .vclip-cover { opacity: 0; transform: scale(1.015); }

.vclip-btn {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff30;
  border-radius: 11px;
  background: #1a1320c4;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s ease, background .2s ease, border-color .2s ease;
}
.vclip-btn svg { width: 20px; height: 20px; fill: currentColor; }
.vclip-btn:hover { background: #4a2f58e0; border-color: var(--v-lavender); }
.vclip-btn:focus-visible { opacity: 1; outline: 2px solid var(--v-lavender); outline-offset: 2px; }
.vclip-toggle { left: 14px; }
.vclip-full { right: 14px; }
.vclip-screen:hover .vclip-btn, .vclip:not(.is-on) .vclip-toggle, .vclip:not(.is-on) .vclip-full { opacity: 1; }
.vclip-big {
  top: 50%;
  left: 50%;
  bottom: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  visibility: hidden;
}
.vclip-big svg { width: 32px; height: 32px; }
.vclip.show-play .vclip-big { opacity: 1; visibility: visible; }
.vclip-progress {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #ffffff14;
  pointer-events: none;
}
.vclip-progress span, .showcase-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--v-lavender, #e9bfff), var(--v-lime, #a9e85c));
  transform: scaleX(0);
  transform-origin: left;
}
.vclip.has-controls .vclip-btn, .vclip.has-controls .vclip-progress { display: none; }
@media (hover: none) {
  .vclip-toggle, .vclip-full { opacity: .72; }
}

.vclip figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 15px 4px 0;
  color: var(--v-muted);
  line-height: 1.55;
}
.vclip figcaption strong { color: var(--v-lavender); font-size: 1.08rem; }

/* Páginas de módulo */
.video-section .vclips { display: grid; gap: clamp(30px, 4.5vw, 56px); }

/* Escaparate de rrhh.html */
.showcase {
  --v-lavender: #e9bfff;
  --v-lime: #a9e85c;
  padding-block: clamp(40px, 6vw, 77px);
  border-top: 1px solid #e5b4f73a;
}
.showcase-head .gallery-note { max-width: 60ch; }
.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-top: 26px;
}
.showcase-stage { order: -1; min-width: 0; }
.showcase-steps { margin: 0; padding: 0; list-style: none; }
.showcase-step { border-top: 1px solid #e5b4f73a; padding-block: 4px; }
.showcase-step h3 { margin: 0; }
.showcase-pick {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 50px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 700 clamp(1.15rem, 2vw, 1.7rem)/1.12 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: -.035em;
  text-align: left;
  cursor: pointer;
  transition: color .4s ease;
}
.showcase-pick:hover { color: var(--v-lavender); }
.showcase-num { flex: none; color: var(--v-lime); font: 700 .78rem/1 'DM Sans', system-ui, sans-serif; letter-spacing: .08em; }
.showcase-copy { padding: 0 0 14px 34px; }
.showcase-copy p { max-width: 42ch; color: #d1c1d8; line-height: 1.55; }
.showcase-meter { max-width: 240px; height: 2px; margin-top: 14px; overflow: hidden; border-radius: 2px; background: #ffffff17; }
.showcase-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 6px;
  color: var(--v-lavender);
  font-size: .91rem;
  font-weight: 700;
}
.showcase-link:hover { color: #fff; }
.showcase-step.is-active .showcase-pick { color: var(--v-lavender); }
.showcase[data-mode] .showcase-step:not(.is-active) .showcase-meter { visibility: hidden; }

/* Móvil y movimiento reducido: un módulo detrás de otro, se pulsa para cambiar. */
.showcase[data-mode="tabs"] .showcase-step:not(.is-active) .showcase-copy { display: none; }

/* Escritorio: el vídeo queda fijo y los módulos pasan a su lado. */
@media (min-width: 900px) {
  .showcase[data-mode="scroll"] .showcase-grid {
    grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr);
    gap: clamp(28px, 4vw, 60px);
    margin-top: 10px;
  }
  .showcase[data-mode="scroll"] .showcase-stage {
    order: 0;
    position: sticky;
    top: max(20px, calc(50vh - 17vw));
    align-self: start;
    margin-top: 16vh;
  }
  .showcase[data-mode="scroll"] .showcase-steps { padding-block: 10vh 22vh; }
  .showcase[data-mode="scroll"] .showcase-step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 58vh;
    border: 0;
    opacity: .34;
    transition: opacity .6s ease;
  }
  .showcase[data-mode="scroll"] .showcase-step.is-active { opacity: 1; }
  .showcase[data-mode="scroll"] .showcase-copy {
    padding-top: 6px;
    opacity: .5;
    transform: translateY(14px);
    transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  }
  .showcase[data-mode="scroll"] .showcase-step.is-active .showcase-copy { opacity: 1; transform: none; }
}

@media (max-width: 580px) {
  .vclip-frame { border-radius: 11px; }
  .vclip-bar { height: 28px; padding-inline: 11px; font-size: .72rem; }
  .vclip-dots i { width: 7px; height: 7px; }
  .vclip-btn { bottom: 9px; }
  .vclip-toggle { left: 9px; }
  .vclip-full { right: 9px; }
  .vclip-big { width: 60px; height: 60px; }
  .showcase-copy { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .vclip-frame, .vclip-layer, .vclip-cover, .vclip-btn, .showcase-step, .showcase-copy, .showcase-pick {
    transition: none !important;
    animation: none !important;
  }
  .vclip.is-waiting .vclip-frame { opacity: 1; transform: none; }
  .vclip-frame::after { display: none; }
  .vclip-layer.is-playing .vclip-cover { transform: none; }
}
