/* ============================================================
   Blog Slider Pro – CSS Premium
   Versión: 1.0.0
   ============================================================ */

/* ── Variables base ── */
.bsp-section {
  --bsp-accent:   #00d4ff;
  --bsp-bg:       #0a0a0f;
  --bsp-card-bg:  #12121a;
  --bsp-text:     #ffffff;
  --bsp-w:        340px;
  --bsp-h:        420px;
  --bsp-gap:      24px;
  --bsp-speed:    40s;
  --bsp-pad:      80px;
  --bsp-radius:   18px;
}

/* ── Contenedor principal ── */
.bsp-section {
  position: relative;
  background: var(--bsp-bg);
  padding: var(--bsp-pad) 0;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  isolation: isolate;
}

/* Fondo animado de puntos */
.bsp-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Orbs de fondo */
.bsp-section::after {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--bsp-accent) 15%, transparent) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: bsp-orb-float 8s ease-in-out infinite alternate;
}

@keyframes bsp-orb-float {
  0%   { transform: translate(0,0)   scale(1); }
  100% { transform: translate(-80px,80px) scale(1.15); }
}

/* ── Partículas ── */
.bsp-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bsp-particle {
  position: absolute;
  left: var(--p-x);
  top: var(--p-y);
  width: var(--p-s);
  height: var(--p-s);
  border-radius: 50%;
  background: var(--bsp-accent);
  opacity: var(--p-o);
  animation: bsp-particle-float var(--p-d) ease-in-out infinite alternate;
  filter: blur(1px);
}

@keyframes bsp-particle-float {
  0%   { transform: translateY(0)   scale(1);    opacity: var(--p-o); }
  100% { transform: translateY(-40px) scale(1.4); opacity: calc(var(--p-o) * .3); }
}

/* ── Header ── */
.bsp-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 0 auto 48px;
  padding: 0 24px;
  max-width: 700px;
}

.bsp-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--bsp-accent);
  border: 1px solid color-mix(in srgb, var(--bsp-accent) 40%, transparent);
  border-radius: 100px;
  padding: 5px 16px;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--bsp-accent) 8%, transparent);
  backdrop-filter: blur(8px);
}

.bsp-title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--bsp-text);
  margin: 0;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--bsp-text) 0%, var(--bsp-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Pista del slider ── */
.bsp-track-wrapper {
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: 100%;
}

.bsp-track {
  display: flex;
  gap: var(--bsp-gap);
  width: max-content;
  animation: bsp-scroll var(--bsp-speed) linear infinite;
  will-change: transform;
}

/* Pausa cuando el widget tiene data-pause="true" y el cursor entra */
.bsp-section[data-pause="true"] .bsp-track:hover,
.bsp-section[data-pause="true"]:hover .bsp-track {
  animation-play-state: paused;
}

@keyframes bsp-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX( calc( (var(--bsp-w) + var(--bsp-gap)) * -1 * var(--bsp-count, 10) ) ); }
}

/* ── Fade de bordes ── */
.bsp-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 160px;
  pointer-events: none;
  z-index: 3;
}

.bsp-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--bsp-bg) 0%, transparent 100%);
}

.bsp-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--bsp-bg) 0%, transparent 100%);
}

/* ── TARJETA BASE ── */
.bsp-card {
  flex-shrink: 0;
  width: var(--bsp-w);
  height: var(--bsp-h);
  border-radius: var(--bsp-radius);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.23,1,.32,1), box-shadow .4s ease;
  background: var(--bsp-card-bg);
}

.bsp-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
}

/* Imagen */
.bsp-card-image {
  position: relative;
  width: 100%;
  height: 55%;
  overflow: hidden;
  flex-shrink: 0;
}

.bsp-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.23,1,.32,1);
  display: block;
}

.bsp-card:hover .bsp-card-image img {
  transform: scale(1.08);
}

/* Overlay imagen */
.bsp-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    color-mix(in srgb, var(--bsp-card-bg) 60%, transparent) 100%
  );
  z-index: 1;
}

/* Badge categoría */
.bsp-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--bsp-bg);
  background: var(--bsp-accent);
  padding: 4px 12px;
  border-radius: 100px;
  box-shadow: 0 0 16px color-mix(in srgb, var(--bsp-accent) 70%, transparent);
}

/* Anillo glow */
.bsp-glow-ring {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid color-mix(in srgb, var(--bsp-accent) 0%, transparent);
  border-radius: inherit;
  transition: border-color .4s ease, box-shadow .4s ease;
  pointer-events: none;
}

.bsp-card:hover .bsp-glow-ring {
  border-color: color-mix(in srgb, var(--bsp-accent) 60%, transparent);
  box-shadow: inset 0 0 30px color-mix(in srgb, var(--bsp-accent) 10%, transparent);
}

/* Cuerpo */
.bsp-card-body {
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  color: var(--bsp-text);
}

.bsp-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--bsp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .3s ease;
}

.bsp-card:hover .bsp-card-title {
  color: var(--bsp-accent);
}

.bsp-card-excerpt {
  font-size: .83rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--bsp-text) 65%, transparent);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer tarjeta */
.bsp-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bsp-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bsp-author {
  font-size: .75rem;
  font-weight: 600;
  color: var(--bsp-accent);
}

.bsp-date {
  font-size: .7rem;
  color: color-mix(in srgb, var(--bsp-text) 45%, transparent);
}

.bsp-read-more {
  font-size: .78rem;
  font-weight: 700;
  color: var(--bsp-accent);
  border: 1px solid color-mix(in srgb, var(--bsp-accent) 40%, transparent);
  border-radius: 100px;
  padding: 5px 14px;
  white-space: nowrap;
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
  background: color-mix(in srgb, var(--bsp-accent) 0%, transparent);
}

.bsp-card:hover .bsp-read-more {
  background: var(--bsp-accent);
  color: var(--bsp-bg);
  box-shadow: 0 0 20px color-mix(in srgb, var(--bsp-accent) 60%, transparent);
}

/* Efecto brillo de luz (shine) */
.bsp-card-shine {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--shine-x, 50%) var(--shine-y, 30%),
    rgba(255,255,255,.08) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity .4s ease;
  border-radius: inherit;
}

.bsp-card:hover .bsp-card-shine {
  opacity: 1;
}

/* ============================================================
   EFECTOS ESPECIALES POR TEMA
   ============================================================ */

/* ── GLOW (estilo Mindvalley) ── */
.bsp-effect-glow .bsp-card {
  box-shadow:
    0 4px 20px rgba(0,0,0,.5),
    0 0 0 1px color-mix(in srgb, var(--bsp-accent) 10%, transparent);
}

.bsp-effect-glow .bsp-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 20px 60px rgba(0,0,0,.6),
    0 0 40px color-mix(in srgb, var(--bsp-accent) 30%, transparent),
    0 0 0 1px color-mix(in srgb, var(--bsp-accent) 50%, transparent);
}

/* ── NEON Cyberpunk ── */
.bsp-effect-neon .bsp-section::after {
  background: radial-gradient(circle,
    rgba(180,0,255,.15) 0%,
    transparent 70%
  );
}

.bsp-effect-neon .bsp-card {
  border: 1px solid color-mix(in srgb, var(--bsp-accent) 20%, transparent);
  box-shadow:
    0 4px 20px rgba(0,0,0,.7),
    inset 0 0 20px rgba(0,0,0,.5);
}

.bsp-effect-neon .bsp-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--bsp-radius) + 1px);
  background: linear-gradient(
    135deg,
    var(--bsp-accent),
    color-mix(in srgb, var(--bsp-accent) 30%, #ff00ff)
  );
  z-index: -1;
  opacity: 0;
  transition: opacity .4s ease;
}

.bsp-effect-neon .bsp-card:hover::before {
  opacity: .7;
}

.bsp-effect-neon .bsp-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow:
    0 0 30px color-mix(in srgb, var(--bsp-accent) 50%, transparent),
    0 0 60px color-mix(in srgb, var(--bsp-accent) 20%, transparent);
}

.bsp-effect-neon .bsp-card-title {
  text-shadow: 0 0 15px color-mix(in srgb, var(--bsp-accent) 0%, transparent);
  transition: text-shadow .3s ease, color .3s ease;
}

.bsp-effect-neon .bsp-card:hover .bsp-card-title {
  text-shadow: 0 0 15px color-mix(in srgb, var(--bsp-accent) 80%, transparent);
}

/* Líneas de escaneo neon */
.bsp-effect-neon .bsp-section::before {
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.015) 0px,
      rgba(255,255,255,.015) 1px,
      transparent 1px,
      transparent 4px
    );
}

/* ── GLASSMORPHISM ── */
.bsp-effect-glass .bsp-card {
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.bsp-effect-glass .bsp-card:hover {
  background: rgba(255,255,255,.08);
  border-color: color-mix(in srgb, var(--bsp-accent) 40%, transparent);
  transform: translateY(-8px) scale(1.015);
  box-shadow:
    0 20px 60px rgba(0,0,0,.5),
    0 0 30px color-mix(in srgb, var(--bsp-accent) 20%, transparent);
}

.bsp-effect-glass .bsp-section::before {
  background-image: none;
}

/* Blur orb adicional para glass */
.bsp-effect-glass .bsp-particles .bsp-particle {
  filter: blur(4px);
  width: calc(var(--p-s) * 3);
  height: calc(var(--p-s) * 3);
  background: color-mix(in srgb, var(--bsp-accent) 30%, #ff00aa);
}

/* ── MINIMAL Premium ── */
.bsp-effect-minimal .bsp-card {
  background: var(--bsp-card-bg);
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,.3);
}

.bsp-effect-minimal .bsp-section::before,
.bsp-effect-minimal .bsp-section::after {
  display: none;
}

.bsp-effect-minimal .bsp-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
}

.bsp-effect-minimal .bsp-badge {
  box-shadow: none;
}

/* ============================================================
   ANIMACIÓN 3D TILT (aplicada por JS)
   ============================================================ */
.bsp-card[data-tilt] {
  transform-style: preserve-3d;
}

.bsp-card.bsp-tilted {
  transition: transform .1s ease, box-shadow .1s ease;
}

/* ============================================================
   ANIMACIÓN DE ENTRADA (cards aparecen con fade-up)
   ============================================================ */
.bsp-track-wrapper {
  animation: bsp-wrapper-in .8s ease both;
}

@keyframes bsp-wrapper-in {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .bsp-section {
    --bsp-w: 280px;
    --bsp-h: 360px;
    --bsp-pad: 48px;
  }

  .bsp-fade {
    width: 60px;
  }

  .bsp-card-title {
    font-size: .95rem;
  }
}

@media (max-width: 480px) {
  .bsp-section {
    --bsp-w: 240px;
    --bsp-h: 320px;
    --bsp-gap: 16px;
    --bsp-pad: 32px;
  }
}

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .bsp-track       { animation: none !important; }
  .bsp-particle    { animation: none !important; }
  .bsp-section::after { animation: none !important; }
  .bsp-card        { transition: none !important; }
  .bsp-card img    { transition: none !important; }
}

.bsp-card:focus-within {
  outline: 2px solid var(--bsp-accent);
  outline-offset: 4px;
}

/* ============================================================
   COLOR SCHEME – LIGHT (override)
   ============================================================ */
.bsp-section.bsp-light {
  --bsp-bg:      #f4f6f8;
  --bsp-card-bg: #ffffff;
  --bsp-text:    #1a1a2e;
}

.bsp-section.bsp-light .bsp-fade-left  { background: linear-gradient(to right,  #f4f6f8, transparent); }
.bsp-section.bsp-light .bsp-fade-right { background: linear-gradient(to left,   #f4f6f8, transparent); }
.bsp-section.bsp-light .bsp-section::before {
  background-image: radial-gradient(circle, rgba(0,0,0,.05) 1px, transparent 1px);
}
