/* ==========================================================================
   SajordGames · Catálogo de juegos (sección nueva)
   Inspirado en el catálogo antiguo, pero con el estilo de la portada:
   píldora dorada con punto, título con degradado, Inter, tarjetas grandes.
   Prefijo "sjc-": no choca con el catálogo antiguo ("sj-").
   ========================================================================== */

body.sjg-catalog-page { overflow-x: hidden; }

.sjc, .sjc * { box-sizing: border-box; }
.sjc {
  --gold: #D6A243; --gold2: #f0be5d; --glow: rgba(214, 162, 67, .4);
  --bg: #0a0c10; --card: rgba(22, 27, 34, .85); --line: rgba(48, 54, 61, .8);
  --bright: #fff; --dim: #9ca3af;
  width: 100%;
  min-height: 70vh;
  background: radial-gradient(circle at 50% 0%, #161b22 0%, #0a0c10 55%, #000 100%);
  box-shadow: 0 0 0 100vmax var(--bg);   /* fondo a todo el ancho sin scroll horizontal */
  clip-path: inset(0 -100vmax);
  color: var(--dim);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.sjc-inner { max-width: 1240px; margin: 0 auto; padding: clamp(30px, 5vw, 60px) clamp(14px, 3vw, 30px) clamp(40px, 6vw, 80px); }

/* --- Cabecera ----------------------------------------------------------- */
.sjc-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; margin-bottom: 26px; animation: sjcIn .6s ease both; }
.sjc-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 16px; border: 1px solid var(--gold); border-radius: 50px;
  background: rgba(214, 162, 67, .12); color: var(--gold);
  font-size: .72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  box-shadow: 0 0 12px rgba(214, 162, 67, .25);
}
.sjc-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; animation: sjcPulse 1.5s infinite; }
.sjc-title {
  margin: 0; color: var(--bright);
  font-family: inherit; font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900;
  line-height: 1.05; letter-spacing: -1px; text-transform: uppercase;
}
.sjc-title span {
  background: linear-gradient(135deg, #ffffff 10%, #D6A243 70%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px var(--glow));
}
.sjc-sub { max-width: 60ch; margin: 0; font-size: 1rem; line-height: 1.7; }

/* --- Banner (debajo del título) ---------------------------------------- */
.sjc-ad { display: flex; justify-content: center; max-width: 100%; min-height: 90px; margin: 0 0 28px; overflow-x: auto; }

/* --- Filtros + contador -------------------------------------------------- */
.sjc-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.sjc-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.sjc-chip {
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 50px;
  background: rgba(255, 255, 255, .03); color: var(--bright) !important;
  font-size: .75rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; text-decoration: none !important;
  transition: all .25s cubic-bezier(.16, 1, .3, 1);
}
.sjc-chip:hover { border-color: var(--gold); color: var(--gold) !important; }
.sjc-chip.is-on { background: linear-gradient(135deg, #D6A243 0%, #f0be5d 100%); border-color: transparent; color: #000 !important; }
.sjc-count { margin: 0 0 0 auto; font-size: .78rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* --- Tarjetas -------------------------------------------------------------- */
.sjc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.sjc-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px; background: var(--card);
  color: inherit; text-decoration: none !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), border-color .35s, box-shadow .35s;
}
.sjc-card:hover, .sjc-card:focus-visible {
  transform: translateY(-6px); border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 26px rgba(214, 162, 67, .22);
  outline: none;
}
.sjc-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #161b22; }
.sjc-media img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; transition: transform .6s ease; }
.sjc-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10, 12, 16, .85)); opacity: .7; transition: opacity .35s; }
.sjc-card:hover .sjc-media img { transform: scale(1.07); }
.sjc-card:hover .sjc-media::after { opacity: 1; }
.sjc-none {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: #9c8a67; font-size: .68rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
}
.sjc-none span { color: var(--gold); font-size: 2.2rem; font-weight: 900; line-height: 1; }
.sjc-tag {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 4px 10px; border-radius: 50px; background: rgba(10, 12, 16, .75); border: 1px solid rgba(214, 162, 67, .5);
  color: var(--gold); font-size: .65rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sjc-play {
  position: absolute; right: 12px; bottom: 12px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #D6A243 0%, #f0be5d 100%); color: #000;
  font-size: .72rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  box-shadow: 0 6px 16px var(--glow);
  opacity: 0; transform: translateY(8px); transition: all .35s cubic-bezier(.16, 1, .3, 1);
}
.sjc-play svg { width: 13px; height: 13px; fill: currentColor; }
.sjc-card:hover .sjc-play, .sjc-card:focus-visible .sjc-play { opacity: 1; transform: none; }
.sjc-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.sjc-name { margin: 0; color: var(--bright); font-family: inherit; font-size: 1rem; font-weight: 800; line-height: 1.3; letter-spacing: 0; text-transform: none; transition: color .25s; }
.sjc-card:hover .sjc-name { color: var(--gold); }
.sjc-desc { display: -webkit-box; overflow: hidden; margin: 0; font-size: .84rem; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* --- Paginación -------------------------------------------------------- */
.sjc-pages { margin-top: 36px; }
.sjc-pages ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sjc-pages li { margin: 0; }
.sjc-pages a, .sjc-pages span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03);
  color: var(--bright); font-weight: 800; text-decoration: none; transition: all .25s;
}
.sjc-pages a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.sjc-pages .current { background: linear-gradient(135deg, #D6A243 0%, #f0be5d 100%); border-color: transparent; color: #000; }
.sjc-pages .dots { border-color: transparent; background: transparent; }
.sjc-empty { padding: 40px 0; text-align: center; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1000px) { .sjc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 560px) {
  .sjc-grid { grid-template-columns: 1fr; }
  .sjc-bar { flex-direction: column; align-items: flex-start; }
  .sjc-count { margin-left: 0; }
  .sjc-filters { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
  .sjc-chip { flex: none; }
  .sjc-play { opacity: 1; transform: none; }   /* en móvil no hay "hover" */
}

@keyframes sjcIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sjcPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .sjc * { animation: none !important; transition: none !important; } }
