/* ============================================
   NetxCR – Sección "Qué podés ver hoy" (catálogo estático)
   Archivo aislado. Para revertir: ver cabecera de
   assets/js/tmdb-demo.js
   ============================================ */

.ntx-demo { position: relative; }

.ntx-demo-head { margin-bottom: 16px; }

/* ---- Tabs + link a catálogo completo ---- */
.ntx-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.ntx-tabs::-webkit-scrollbar { display: none; }

.ntx-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ntx-tab:hover { border-color: var(--border-accent); color: var(--text-primary); }
.ntx-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}

/* separador visual: el link no es una pestaña */
.ntx-tab-link {
  margin-left: 6px;
  border-style: dashed;
  border-color: var(--border-hover);
  background: transparent;
}
.ntx-tab-link i { font-size: 0.72rem; }
.ntx-tab-link:hover {
  border-style: solid;
  background: var(--bg-card);
}

/* ---- Carrusel ---- */
.ntx-carousel { position: relative; }
.ntx-rail-wrap { position: relative; }

/* Sin scroll-behavior: smooth a propósito. El deslizamiento lo anima
   tmdb-demo.js paso a paso sobre scrollLeft; si el CSS pidiera "smooth"
   cada paso lanzaría su propia animación y se pelearían entre sí. */
.ntx-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 2px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ntx-rail::-webkit-scrollbar { display: none; }

/* ---- Indicador de páginas ---- */
.ntx-dots {
  display: flex;
  flex-wrap: wrap;          /* en pantallas muy angostas pasan a 2 filas
                               en vez de desbordar */
  justify-content: center;
  align-items: center;
  margin: 2px 0 6px;
}
.ntx-dots[hidden] { display: none; }

/* 24x24 es el mínimo de área táctil que pide WCAG 2.5.8;
   el punto visible es más chico, el botón que lo contiene no. */
.ntx-dot {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ntx-dot span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--border-accent);
  transition: width var(--transition-normal), background var(--transition-fast);
}
.ntx-dot:hover span { background: var(--text-secondary); }
.ntx-dot:focus-visible { outline: 1px solid var(--border-accent); border-radius: 6px; }
.ntx-dot.is-active span {
  width: 20px;
  background: var(--accent-light);
}

/* muchas páginas (móvil): se achica el punto visible, nunca el área de toque */
.ntx-dots.is-compact .ntx-dot span { width: 6px; height: 6px; }
.ntx-dots.is-compact .ntx-dot.is-active span { width: 14px; }

.ntx-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  background: rgba(6, 6, 11, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ntx-arrow:hover { background: var(--bg-elevated); border-color: var(--border-accent); }
.ntx-arrow.prev { left: -8px; }
.ntx-arrow.next { right: -8px; }
@media (min-width: 900px) { .ntx-arrow { display: flex; } }

/* ---- Tarjeta ---- */
.ntx-card {
  position: relative;
  flex: 0 0 auto;
  width: 132px;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  transition: transform var(--transition-normal), border-color var(--transition-fast);
}
.ntx-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}
@media (min-width: 768px) { .ntx-card { width: 152px; } }

.ntx-card-poster { position: relative; }

.ntx-card-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--bg-elevated);
}

.ntx-card-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(6, 6, 11, 0.82);
  border: 1px solid var(--border-hover);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-primary);
}

.ntx-card-score {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(6, 6, 11, 0.82);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ntx-card-score i { color: var(--accent-amber); font-size: 0.6rem; }

.ntx-card-body { padding: 9px 9px 11px; }
.ntx-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Modal ---- */
.ntx-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 3, 6, 0.82);
  backdrop-filter: blur(6px);
}
.ntx-modal.is-open { display: flex; }

.ntx-modal-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.35s ease-out both;
}

.ntx-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  background: rgba(6, 6, 11, 0.8);
  color: var(--text-primary);
  cursor: pointer;
}
.ntx-modal-close:hover { background: var(--bg-elevated); }

.ntx-modal-hero { position: relative; aspect-ratio: 16 / 9; background: var(--bg-elevated); }
.ntx-modal-hero img,
.ntx-modal-hero iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.ntx-modal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-secondary) 2%, transparent 55%);
  pointer-events: none;
}
.ntx-modal-hero.has-video::after { display: none; }

.ntx-modal-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.ntx-modal-play span {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: var(--radius-full);
  background: rgba(6, 6, 11, 0.75);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.ntx-modal-body { padding: 4px 22px 22px; }
.ntx-modal-body h3 {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.25;
}
.ntx-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ntx-chip {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.ntx-chip.score { color: var(--accent-amber); border-color: rgba(245, 158, 11, 0.3); }
.ntx-modal-overview {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.ntx-modal .zp-btn { width: 100%; }

@media (max-width: 480px) {
  .ntx-modal { padding: 0; }
  .ntx-modal-card { max-width: none; max-height: 100vh; border-radius: 0; border: 0; }
  .ntx-modal-body { padding: 4px 18px 24px; }
}

/* ---- Atribución TMDB ---- */
.ntx-attr {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.ntx-attr a { color: var(--text-secondary); text-decoration: none; }
.ntx-attr a:hover { text-decoration: underline; }
