/**
 * biblioteca.css
 *
 * Estilos de la biblioteca de clases del home (index.html).
 * La tarjeta (.video-card y sus hijos) ya está definida en index.html;
 * aquí va solo lo que falta: filtros, orden, y el marco de la sección.
 */

/* Las clases de Vimeo usan <img> en la miniatura, no <video>: index.html
   solo estiliza el <video>, así que sin esto la imagen no llena el marco. */
.video-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* La miniatura es un <button> (al quitar "Ver" pasó a ser el disparador).
   index.html la estiliza como div, así que hay que anular lo que el navegador
   le pone por ser botón. */
.video-card button.thumb {
  appearance: none;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  display: block;
}
.video-card button.thumb:focus-visible {
  outline: 2px solid #1ee7ff;
  outline-offset: -2px;
}
.video-card button.thumb:disabled {
  cursor: default;
  opacity: .6;
}

/* El logo era lo que empujaba "Salir" a la derecha vía `space-between`; al
   quitarlo el botón se fue a la izquierda.
   Va con el id del contenedor a propósito: css/login-landing.css define
   `.navbar { justify-content: space-between }` y se carga después de esta
   hoja, así que con `.navbar` a secas perdería. El id lo acota además al
   home, sin afectar al login ni a las demás páginas. */
#contenidoPrincipal .navbar {
  justify-content: flex-end;
}

/* Visible solo para lectores de pantalla. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====== MARCO DE LA SECCIÓN ====== */
.biblioteca-section {
  padding: 60px 20px;
}

.biblioteca-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.bib-encabezado {
  margin-bottom: 22px;
}

.bib-titulo {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-wrap: balance;
}

.bib-bajada {
  margin: 6px 0 0;
  font-size: .95rem;
  color: #a0aec0;
  text-wrap: balance;
}

/* ====== FILTROS Y ORDEN ====== */
.vt-barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.vt-filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}

.vt-filtro {
  appearance: none;
  font-family: inherit;
  padding: 9px 17px;
  border-radius: 30px;
  border: 1px solid rgba(30, 231, 255, .25);
  background: rgba(30, 231, 255, .06);
  color: #a0e8f0;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.vt-filtro:hover { background: rgba(30, 231, 255, .15); border-color: rgba(30, 231, 255, .5); }
.vt-filtro:focus-visible { outline: 2px solid #1ee7ff; outline-offset: 2px; }
.vt-filtro[aria-pressed="true"] {
  background: #1ee7ff;
  border-color: #1ee7ff;
  color: #08222a;
}

.vt-orden-campo { display: flex; align-items: center; gap: 8px; }
.vt-orden-campo label { font-size: .82rem; color: #a0aec0; font-weight: 700; }

.vt-orden {
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid rgba(30, 231, 255, .25);
  /* Explícitos: si no, Safari los pinta claros en modo oscuro. */
  background-color: #121416;
  color: #a0e8f0;
  color-scheme: dark;
  cursor: pointer;
}
.vt-orden:focus-visible { outline: 2px solid #1ee7ff; outline-offset: 2px; }

.vt-conteo {
  font-size: .82rem;
  color: #a0aec0;
  margin: 0 0 14px;
  font-variant-numeric: tabular-nums;
}

.vt-vacio {
  text-align: center;
  color: #a0aec0;
  padding: 40px 20px;
  grid-column: 1 / -1;
}
.vt-vacio strong { display: block; color: #fff; margin-bottom: 6px; font-size: 1.05rem; }

.vt-duracion {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 2;
}

.vt-meta {
  font-size: .76rem;
  color: #8a94a0;
  margin: 2px 0 0;
  text-align: center;
}

/* ====== REPRODUCTOR ====== */
.bib-player-wrap {
  background: #121416;
  border: 1px solid rgba(30, 231, 255, .15);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 22px;
}

.bib-player-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.bib-player-titulo {
  margin: 0 0 12px;
  color: #1ee7ff;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
}

.bib-player {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.bib-player iframe,
.bib-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* ====== PIE ====== */
.bib-pie {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .vt-filtro { transition: none; }
}
