/* CaviLife · vídeos de la portada: miniatura del héroe, bloque de tecnología y visor */

/* ---------- Miniatura flotante en el héroe (abajo a la derecha) ---------- */
.hero__row { position: relative; }
.vcard {
  display: flex; align-items: center; gap: 0.9rem; cursor: pointer; text-align: left;
  font: inherit; color: #fff; padding: 0.55rem 0.9rem 0.55rem 0.55rem;
  background: rgba(6, 31, 56, 0.42); border: 1px solid rgba(255,255,255,0.28); border-radius: 18px;
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,0.6);
  transition: transform 260ms ease, background 260ms ease, border-color 260ms ease;
}
.vcard:hover { background: rgba(6, 31, 56, 0.6); border-color: rgba(255,255,255,0.55); transform: translateY(-3px); }
.vcard:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.vcard__media { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0b3f6d; }
.vcard__media video, .vcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms ease; }
.vcard:hover .vcard__media video { transform: scale(1.06); }
.vcard__txt { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.vcard__txt small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.75); }
.vcard__txt strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; letter-spacing: -0.01em; }

.vplay {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgba(255,255,255,0.94); box-shadow: 0 6px 20px rgba(0,0,0,0.35); transition: transform 220ms ease;
}
.vplay::before {
  content: ""; position: absolute; left: 53%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #0b3f6d;
}
.vplay::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.6);
}
@media (prefers-reduced-motion: no-preference) { .vplay::after { animation: vpulse 2.2s ease-out infinite; } }
@keyframes vpulse { 0% { transform: scale(0.9); opacity: 0.9; } 100% { transform: scale(1.45); opacity: 0; } }
.vcard .vplay { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
.vcard .vplay::before { border-width: 6px 0 6px 10px; }
.vcard:hover .vplay, .tech-video__media:hover .vplay { transform: scale(1.08); }

.vcard { margin-top: 1.4rem; width: fit-content; max-width: 100%; }
@media (min-width: 1100px) {
  /* escritorio: miniatura grande, anclada abajo a la derecha, a la altura de los botones */
  .vcard {
    position: absolute; right: 0; bottom: 0; margin: 0; flex-direction: column; align-items: stretch;
    gap: 0.75rem; width: 300px; padding: 0.6rem 0.6rem 0.85rem;
  }
  .vcard__media { width: 100%; }
  .vcard__txt { padding: 0 0.35rem; }
  .vcard .vplay { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
  .vcard .vplay::before { border-width: 9px 0 9px 15px; }
}

/* ---------- Bloque de vídeo en "La tecnología" ---------- */
.tech-video {
  display: grid; gap: 0; margin-top: clamp(2.5rem, 5vw, 4rem); border-radius: 20px; overflow: hidden;
  background: radial-gradient(700px 360px at 90% 0%, rgba(42,163,219,0.28), transparent 60%), linear-gradient(120deg, #061f38 0%, #0b3f6d 100%);
  color: #fff; box-shadow: 0 30px 60px -36px rgba(6,21,38,0.7);
}
@media (min-width: 960px) { .tech-video { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: stretch; } }
.tech-video__body { padding: clamp(1.8rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.tech-video__body .eyebrow { color: #3ecfea; margin: 0; }
.tech-video__body h3 { margin: 0; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 1.6vw + 1rem, 2.4rem); letter-spacing: -0.025em; line-height: 1.1; }
.tech-video__body p { margin: 0; color: rgba(255,255,255,0.82); max-width: 46ch; }
.tech-video__chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; margin: 0.2rem 0 0.4rem; padding: 0; }
.tech-video__chips li { font-size: 0.78rem; font-weight: 600; border: 1px solid rgba(255,255,255,0.28); border-radius: 999px; padding: 0.32rem 0.7rem; color: rgba(255,255,255,0.9); }
.tech-video__body .btn { align-self: flex-start; background: #fff; color: var(--blue, #0b3f6d); border-color: #fff; }
.tech-video__body .btn:hover { background: #3ecfea; border-color: #3ecfea; color: #061f38; }
.tech-video__media { position: relative; display: block; width: 100%; min-height: 260px; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer; background: #061f38; overflow: hidden; }
.tech-video__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 800ms cubic-bezier(.2,.7,.2,1), opacity 300ms; }
.tech-video__media:hover img { transform: scale(1.04); }
.tech-video__media .vplay { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.tech-video__media .vplay::before { border-width: 13px 0 13px 21px; }
.tech-video__dur { position: absolute; right: 1rem; bottom: 1rem; font: 600 0.8rem/1 var(--font-text); background: rgba(6,21,38,0.7); color: #fff; padding: 0.4rem 0.6rem; border-radius: 6px; }

/* ---------- Visor de vídeo ---------- */
.vmodal { width: min(1200px, calc(100vw - 2rem)); padding: 0; border: 0; background: #000; border-radius: 16px; overflow: visible; box-shadow: 0 40px 100px -30px rgba(0,0,0,0.8); }
.vmodal::backdrop { background: rgba(3, 12, 24, 0.86); backdrop-filter: blur(6px); }
.vmodal video { display: block; width: 100%; height: auto; max-height: calc(100dvh - 6rem); border-radius: 16px; background: #000; }
.vmodal__close {
  position: absolute; top: -3.1rem; right: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.12); color: #fff; font-size: 1.4rem; line-height: 1;
}
.vmodal__close:hover { background: #fff; color: #061f38; }
.vmodal__title { position: absolute; top: -2.7rem; left: 0.2rem; margin: 0; color: #fff; font: 600 1rem/1.2 var(--font-display); }
@media (prefers-reduced-motion: no-preference) { .vmodal[open] { animation: vmIn 320ms cubic-bezier(.2,.7,.2,1); } }
@keyframes vmIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
body.has-vmodal { overflow: hidden; }
