/**
 * VPS · Video lite: fachada de video (póster + play), reproducción inline y
 * lightbox. CSS de runtime (sin Tailwind) — ver notas de build.
 */

/* ---- Imagen / video dentro del componente noticia-media ---- */
.svps-media__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.svps-media__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: inherit;
}

/* ---- Fachada (póster + play) para embeds remotos ---- */
.svps-media__facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  margin: 0;
  border: 0;
  background: #000;
  overflow: hidden;
  border-radius: inherit;
  cursor: pointer;
}
.svps-media__facade .svps-media__img {
  transition:
    transform 0.4s ease,
    filter 0.3s ease;
}
.svps-media__facade:hover .svps-media__img,
.svps-media__facade:focus-visible .svps-media__img {
  transform: scale(1.04);
  filter: brightness(0.9);
}
.svps-media__facade:focus-visible {
  outline: 3px solid var(--vps-rojo, #a80000);
  outline-offset: 2px;
}

.svps-media__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  pointer-events: none;
}
.svps-media__play :where(svg) {
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s ease;
}
.svps-media__facade:hover .svps-media__play :where(svg) {
  transform: scale(1.1);
}

/* Iframe inyectado al reproducir inline. */
.svps-media__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: inherit;
  overflow: hidden;
}
.svps-media__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Botón de play reutilizable, superpuesto sobre tarjetas ---- */
.svps-media-play {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.6));
}
.svps-media-play :where(svg) {
  transition: transform 0.2s ease;
}
.svps-media-play:hover :where(svg),
.svps-media-play:focus-visible :where(svg) {
  transform: scale(1.12);
}
.svps-media-play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  border-radius: 50%;
}

/* ---- Lightbox ---- */
.svps-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.svps-lightbox[hidden] {
  display: none;
}
.svps-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.86);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.svps-lightbox__dialog {
  position: relative;
  width: min(1100px, 100%);
}
.svps-lightbox__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.7);
}
.svps-lightbox__frame iframe,
.svps-lightbox__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.svps-lightbox__close {
  position: absolute;
  top: -3.25rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.svps-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}
@media (max-width: 600px) {
  .svps-lightbox__close {
    top: -3rem;
  }
}

body.svps-lightbox-open {
  overflow: hidden;
}
