/*! © 2026 Kerb3r0ps · www.kerb3r0ps.com */
/* Videoteca: lo propio de /videoteca. Reutiliza tokens y utilidades de certificaciones.css + osint.css
   (cabecera, chips, buscador y notas); aquí van las tarjetas, los grupos por área, la barra de filtros y los desplegables. */

/* color por área (prefijo vc- para no pisar las categorías de Atlas OSINT, que también cargan osint.css) */
.vc-malware { --c: var(--atk); } .vc-redteam { --c: #FF8A3D; } .vc-pentesting { --c: #A47BFF; }
.vc-movil { --c: #2BC4C4; } .vc-redes { --c: #3DDC97; } .vc-forense { --c: var(--def); }
.vc-fundamentos { --c: var(--int); } .vc-sistemas { --c: #6FB1FF; } .vc-hardware { --c: #E0B486; }
.vc-programacion { --c: #CFCBC2; }
/* color de los grupos cuando se agrupa por otra cosa que el área: el nivel va de verde a rojo; tipo e idioma, neutros */
.vg-neutro { --c: var(--bone); } .vg-inicio { --c: #3DDC97; } .vg-medio { --c: var(--int); } .vg-avanzado { --c: var(--atk); }

/* filtros: el número de vídeos de cada área, discreto dentro del chip */
.filtros .chip small { font-size: .78em; opacity: .65; font-variant-numeric: tabular-nums; }
.vt-sel { display: flex; gap: .6rem; flex: 0 1 auto; min-width: 0; }

/* desplegables propios: botón con la forma del buscador y lista con el mismo lenguaje que el menú «Herramientas»
   (los <select> nativos abren la lista con los colores del sistema, que en Windows y Android son claros) */
.vt-dd { position: relative; flex: 0 0 auto; width: 14rem; min-width: 0; }
.vt-dd-btn { display: flex; align-items: center; gap: .5rem; width: 100%; min-width: 0; cursor: pointer; text-align: left;
  font: 400 .95rem var(--body); color: var(--bone); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .55rem 1rem .55rem 1.1rem; transition: border-color .15s, background .15s; }
.vt-dd-btn:hover { border-color: var(--ash); }
.vt-dd-btn[aria-expanded="true"] { border-color: var(--bone); background: var(--panel-2); }
.vt-dd-val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.vt-dd-btn svg { flex: none; width: .65rem; height: .65rem; color: var(--ash); transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.vt-dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.vt-dd-list { position: absolute; z-index: 30; top: calc(100% + .45rem); left: 0; min-width: 100%; width: max-content; max-width: min(20rem, calc(100vw - 2rem));
  max-height: min(19rem, 60vh); overflow-y: auto; list-style: none; margin: 0; padding: .35rem;
  background: rgba(16, 16, 18, .96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9);
  animation: sn-drop .35s cubic-bezier(.16, 1, .3, 1); }
.vt-dd-list[hidden] { display: none; }
.vt-dd-list [role="option"] { position: relative; display: flex; align-items: center; gap: .6rem; padding: .62rem .9rem .62rem 1.15rem; border-radius: 11px;
  color: var(--ash); font: 500 .9rem var(--body); cursor: pointer; white-space: nowrap; outline: none; transition: background .15s, color .15s; }
.vt-dd-list [role="option"]::before { content: ""; position: absolute; left: .45rem; top: .7rem; bottom: .7rem; width: 2px; border-radius: 2px; background: var(--bone); opacity: 0; transition: opacity .15s; }
.vt-dd-list [role="option"]:hover, .vt-dd-list [role="option"]:focus-visible { color: var(--bone); background: rgba(242, 240, 235, .07); }
.vt-dd-list [role="option"]:focus-visible { box-shadow: inset 0 0 0 1px rgba(242, 240, 235, .35); }
.vt-dd-list [role="option"][aria-selected="true"] { color: var(--bone); background: rgba(242, 240, 235, .06); }
.vt-dd-list [role="option"][aria-selected="true"]::before { opacity: 1; }
.vt-dd-list [role="option"][aria-selected="true"]::after { content: ""; margin-left: auto; width: .7rem; height: .4rem; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
.vt-flags { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .8rem; }
.vt-sep { width: 1px; height: 1.4rem; background: var(--line); margin-inline: .2rem; }
.vt-flags .chip[aria-pressed="true"]::after { content: "×"; margin-left: .1rem; font-size: 1.05em; line-height: 1; }
.vt-quitar { cursor: pointer; font: 600 .85rem var(--body); color: var(--bone); background: none; border: 0; border-bottom: 1px solid currentColor; padding: 0; margin-left: .2rem; }

/* catálogo agrupado por área */
.vt-grid { display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3rem); margin-top: 1.6rem; }
.vt-cat-t { display: flex; align-items: center; gap: .65rem; font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.45rem); letter-spacing: -.02em; padding-bottom: .7rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.vt-cat-t::before { content: ""; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.vt-cat-t span { font-family: var(--body); font-weight: 500; font-size: .85rem; color: var(--ash); }
.vt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 1rem; }

/* tarjeta: el borde izquierdo y el degradado llevan el color del área, como en Atlas OSINT */
.vt-card { display: flex; flex-direction: column; gap: .55rem; min-width: 0; padding: 1.1rem 1.2rem 1.05rem; color: var(--bone);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, var(--panel)), var(--panel) 70%);
  border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 1rem; transition: border-color .15s, transform .15s; }
.vt-card:hover, .vt-card:focus-within { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); transform: translateY(-2px); }
.vt-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.vt-tipo { font: 700 .64rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 50%, var(--line)); color: var(--c); white-space: nowrap; }
.vt-meta { font-size: .76rem; color: var(--ash); letter-spacing: .02em; white-space: nowrap; }
.vt-area { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c); }
.vt-tit { font: 600 1.02rem/1.28 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; hyphens: auto; }
.vt-sub { color: var(--ash); font-size: .86rem; line-height: 1.4; }
.vt-sub b { color: var(--bone); font-weight: 600; }
.vt-etqs { display: flex; flex-wrap: wrap; gap: .35rem; }
.vt-etqs { align-items: center; }
.vt-fuente { font-size: .76rem; color: var(--ash); min-width: 0; overflow-wrap: anywhere; }

/* acciones: ver el vídeo en su publicación oficial (principal) y el canal */
.vt-acc { margin-top: auto; padding-top: .55rem; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.vt-ver { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem .45rem .8rem; border-radius: 999px; background: var(--bone); color: var(--bg); border: 1px solid var(--bone); font: 600 .86rem var(--body); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.vt-ver svg { width: .7rem; height: .7rem; flex: none; }
.vt-ver:hover { background: transparent; color: var(--bone); }
.vt-acc .mini { text-decoration: none; display: inline-flex; align-items: center; }

.vt-vacio { padding: 2.2rem 1.5rem; border: 1px dashed var(--line); border-radius: 1rem; color: var(--ash); text-align: center; }

/* «Cómo está hecha»: osint.css no le da relleno vertical, así que el título quedaba pegado a la línea de arriba y las
   notas al pie. Mismo arreglo que en ADPath y ConfluXION: aire arriba y abajo, y notas más holgadas */
.osint-legal { margin-top: clamp(1.5rem, 4vw, 2.5rem); padding-block: clamp(2rem, 5vw, 3rem); }
.osint-notas { gap: 1.2rem; margin-top: 1.3rem; }
.osint-nota { min-width: 0; padding: 1.4rem 1.5rem; }
.osint-nota h3 { margin-bottom: .55rem; }
.osint-nota p { line-height: 1.6; }

/* tablet y móvil: el buscador ocupa su fila y los dos desplegables se reparten la siguiente */
@media (max-width: 900px) {
  .vt-sel { flex: 1 1 100%; }
  .vt-dd { flex: 1 1 0; width: auto; }
  input.campo { max-width: none; }
}
/* móvil: chips de área y filtros rápidos en una fila con scroll y una tarjeta por fila. Las filas de chips se quedan
   dentro de los márgenes de la página (sin llegar al borde de la pantalla como en las otras herramientas) y se
   desvanecen al final para indicar que siguen; el relleno final deja que el último chip salga del todo del degradado */
@media (max-width: 560px) {
  .filtros, .vt-flags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: 0; padding: 0 1.75rem .4rem 0;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 1.75rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 1.75rem), transparent); }
  .vt-flags::-webkit-scrollbar { display: none; }
  .vt-sep { flex: none; }
  .vt-card { padding: 1rem 1rem .95rem; }
  .vt-tit { font-size: .98rem; }
  .vt-acc .vt-ver { flex: 1 1 auto; justify-content: center; }
  .vt-dd-btn { padding-inline: .9rem .75rem; font-size: .9rem; gap: .4rem; }
  /* la lista del segundo desplegable se abre hacia la izquierda para no salirse de la pantalla */
  .vt-dd + .vt-dd .vt-dd-list { left: auto; right: 0; }
}
/* móvil en horizontal: hay poca altura, así que la cabecera va en dos columnas, las áreas y los filtros rápidos
   en una fila con scroll lateral (como en vertical) y el buscador comparte fila con los desplegables */
@media (max-height: 500px) and (orientation: landscape) {
  .intro .wrap { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 1rem 2rem; padding-block: 1.4rem 1.2rem; }
  h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
  .lead { margin-top: .5rem; font-size: .95rem; }
  .stats div { padding: .7rem .8rem; } .stats span { font-size: .8rem; }
  .filtros, .vt-flags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: 0; padding: 0 1.75rem .4rem 0;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 1.75rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 1.75rem), transparent); }
  .filtros::-webkit-scrollbar, .vt-flags::-webkit-scrollbar { display: none; }
  .filtros .chip, .vt-flags .chip { flex: none; white-space: nowrap; }
  .vt-sep { flex: none; }
  .barra { flex-wrap: nowrap; }
  input.campo { flex: 1 1 12rem; }
  .vt-sel { flex: 1 1 22rem; }
}
@media (pointer: coarse) {
  .vt-ver, .vt-acc .mini, .vt-dd-btn { min-height: 40px; }
  .vt-dd-list [role="option"] { padding-block: .8rem; }
  .vt-quitar { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .vt-card { transition: none; } .vt-card:hover, .vt-card:focus-within { transform: none; } .vt-dd-list { animation: none; } .vt-dd-btn svg { transition: none; } }
@media print { .vt-flags, .vt-sel, .vt-acc { display: none !important; } .vt-card { break-inside: avoid; } }
