/* ═══════════════════════════════════════════════════════
   videos-instructivos.css — Videos STARAPP (comercial)
   Hereda variables de starapp.css (--sta-dark, --sta-purple, --sta-yellow…)
   ═══════════════════════════════════════════════════════ */

/* ── Hero ────────────────────────────────────────────── */
.vi-hero {
  padding: 8.5rem 0 4rem;
  background: var(--sta-dark);
  position: relative;
  overflow: hidden;
}
.vi-hero-inner { position: relative; z-index: 2; text-align: center; }
.vi-hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: .25rem 0 1rem;
}
.vi-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.55);
  line-height: 1.8;
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Filtros ─────────────────────────────────────────── */
.vi-filters {
  position: relative;
  z-index: 2;
  padding: 0 0 3rem;
  background: var(--sta-dark);
}
.vi-filter-scroll {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding: .25rem .25rem .75rem;
  scrollbar-width: thin;
}
.vi-filter-scroll::-webkit-scrollbar { height: 5px; }
.vi-filter-scroll::-webkit-scrollbar-thumb { background: rgba(124,58,237,.4); border-radius: 10px; }

.vi-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255,255,255,.65);
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.28);
  border-radius: 50px;
  padding: .55rem 1.3rem;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.vi-chip:hover { border-color: rgba(255,205,0,.4); color: #fff; }
.vi-chip.active {
  color: var(--sta-dark);
  background: var(--sta-yellow);
  border-color: var(--sta-yellow);
  box-shadow: 0 4px 20px rgba(255,205,0,.3);
}

/* ── Grid de videos ──────────────────────────────────── */
.vi-gallery {
  background: var(--sta-dark2);
  padding: 1rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.vi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.vi-card {
  background: rgba(124,58,237,.06);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s, border-color .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
}
.vi-card:hover {
  transform: translateY(-8px);
  border-color: var(--sta-yellow);
  box-shadow: 0 20px 55px rgba(124,58,237,.25), 0 0 0 1px rgba(255,205,0,.12);
}

.vi-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0022 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"></svg>') center/cover;
  overflow: hidden;
}
.vi-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s, filter .4s;
  filter: saturate(.85) brightness(.82);
}
.vi-card:hover .vi-card-thumb img {
  transform: scale(1.06);
  filter: saturate(1) brightness(.9);
}
.vi-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vi-card-play i {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(10,0,34,.75);
  border: 1px solid rgba(255,205,0,.4);
  color: var(--sta-yellow);
  font-size: 1.3rem;
  backdrop-filter: blur(4px);
  transition: transform .3s, background .3s;
}
.vi-card:hover .vi-card-play i {
  transform: scale(1.1);
  background: var(--sta-yellow);
  color: var(--sta-dark);
}

.vi-card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.vi-card-cat {
  align-self: flex-start;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sta-purple2);
  border: 1px solid rgba(168,85,247,.35);
  border-radius: 50px;
  padding: .22rem .75rem;
}
.vi-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin: 0;
}
.vi-card-desc {
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Skeleton loader ─────────────────────────────────── */
.vi-skeleton { background: rgba(124,58,237,.06); border: 1px solid rgba(124,58,237,.18); border-radius: 18px; overflow: hidden; }
.vi-skeleton-thumb { aspect-ratio: 16/9; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 37%, rgba(255,255,255,.04) 63%); background-size: 400% 100%; animation: viShimmer 1.4s ease infinite; }
.vi-skeleton-line { height: .7rem; margin: 1.25rem 1.35rem; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 37%, rgba(255,255,255,.04) 63%); background-size: 400% 100%; animation: viShimmer 1.4s ease infinite; }
.vi-skeleton-line--sm { width: 55%; }
@keyframes viShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ── Estados vacío / error ───────────────────────────── */
.vi-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1.5rem;
  color: rgba(255,255,255,.55);
}
.vi-state i { font-size: 2.4rem; color: rgba(124,58,237,.6); margin-bottom: 1rem; display: block; }
.vi-state p { margin: 0; font-size: .92rem; }

/* ── Modal reproductor ───────────────────────────────── */
.vi-modal .modal-content {
  background: var(--sta-dark2);
  border: 1px solid rgba(124,58,237,.35);
  border-radius: 18px;
}
.vi-modal .modal-header { border-bottom: 1px solid rgba(124,58,237,.2); }
.vi-modal .modal-title { color: #fff; font-weight: 700; font-size: 1.05rem; }
.vi-modal .btn-close { filter: invert(1); }
.vi-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}
.vi-player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vi-modal-desc { padding: 1rem 1.5rem 1.5rem; color: rgba(255,255,255,.6); font-size: .86rem; line-height: 1.7; }
.vi-modal-cat { color: var(--sta-purple2); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* ── Gate de registro ─────────────────────────────────── */
.vi-gate {
  padding: 2rem 0 6rem;
  background: var(--sta-dark);
  position: relative;
}
.vi-gate-card {
  max-width: 620px;
  margin: 0 auto;
  background: rgba(124,58,237,.06);
  border: 1px solid rgba(124,58,237,.28);
  border-radius: 22px;
  padding: 2.5rem 2.25rem;
  text-align: center;
}
.vi-gate-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,205,0,.1);
  border: 1px solid rgba(255,205,0,.35);
  color: var(--sta-yellow);
  font-size: 1.6rem;
}
.vi-gate-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .5rem;
}
.vi-gate-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}
.vi-gate-form .form-control {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(124,58,237,.3);
  color: #fff;
  font-size: .88rem;
  padding: .65rem .9rem;
}
.vi-gate-form .form-control::placeholder { color: rgba(255,255,255,.4); }
.vi-gate-form .form-control:focus {
  background: rgba(255,255,255,.06);
  border-color: var(--sta-yellow);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255,205,0,.15);
}
.vi-gate-error {
  color: #ff8a8a;
  font-size: .8rem;
  margin-top: 1rem;
  min-height: 1.1rem;
}
.vi-gate-btn {
  width: 100%;
  justify-content: center;
  margin-top: 1.25rem;
}
.vi-gate-toggle {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--sta-purple2);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: underline;
  margin-top: 1.25rem;
  cursor: pointer;
}
.vi-gate-toggle:hover { color: var(--sta-yellow); }
.vi-gate-privacy {
  font-size: .74rem;
  color: rgba(255,255,255,.4);
  margin: 1.5rem 0 0;
}
.vi-gate-privacy a { color: rgba(255,255,255,.6); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 767.98px) {
  .vi-hero { padding: 7rem 0 3rem; }
  .vi-grid { grid-template-columns: 1fr; }
  .vi-gate-card { padding: 2rem 1.35rem; }
}
