/* ================================================================
   StumbleFlow — HOME (rediseño 2026)
   ----------------------------------------------------------------
   Hero split, carruseles con scroll-snap, tarjetas de ranking,
   newsletter y SVG animados. Mobile-first, con sensación de app.
   Depende de las variables --sf-* definidas en stumble.css
   ================================================================ */

.sf-home { --sf-gap: 20px; }

/* ---------- Utilidad: carrusel horizontal tipo app ---------- */
.sf-scroll-x {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;   /* momentum en iOS */
  overscroll-behavior-x: contain;      /* no arrastra la página entera */
  scrollbar-width: none;
  padding: 4px 2px 12px;
}
.sf-scroll-x::-webkit-scrollbar { display: none; }
.sf-scroll-x > * { scroll-snap-align: start; flex: 0 0 auto; }

/* ---------- Reveal al hacer scroll ---------- */
.sf-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.16, 1, .3, 1),
              transform .6s cubic-bezier(.16, 1, .3, 1);
}
.sf-reveal.is-in { opacity: 1; transform: none; }

/* ================================================================
   HERO
   ================================================================ */
.sf-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 12px;
}

.sf-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

@media (min-width: 1024px) {
  .sf-hero { padding: 56px 0 32px; }
  .sf-hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 0 32px;
  }
}

/* Halos de color del fondo */
.sf-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: .22;
}
.sf-hero__glow--a {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(168, 85, 247, .30), transparent 70%);
  top: -120px; left: -100px;
}
.sf-hero__glow--b {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(6, 182, 212, .20), transparent 70%);
  bottom: -140px; right: -80px;
}
@keyframes sf-float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, 30px) scale(1.08); }
}
@keyframes sf-float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-36px, -24px) scale(1.06); }
}

/* Píldora "N AI Tools & Growing" */
.sf-pill-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(20, 20, 36, .6);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  color: var(--sf-text-1);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}
html:not(.dark) .sf-pill-live {
  background: rgba(255, 255, 255, .75);
  border-color: rgba(0, 0, 0, .08);
  color: #475569;
}
.sf-pill-live strong { color: var(--sf-text-0); font-weight: 800; }
html:not(.dark) .sf-pill-live strong { color: #0f172a; }

.sf-pill-live__dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #22c55e;
}
@keyframes sf-ping {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.sf-hero__title {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 800;
  font-size: clamp(2.25rem, 7.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--sf-text-0);
  margin: 0 0 18px;
}
html:not(.dark) .sf-hero__title { color: #0f172a; }

.sf-hero__title-grad {
  display: block;
  background: linear-gradient(100deg, #a855f7 0%, #8b5cf6 45%, #06b6d4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes sf-grad-pan {
  0%, 100% { background-position: 0% center; }
  50%      { background-position: 100% center; }
}

.sf-hero__sub {
  color: var(--sf-text-2);
  font-size: clamp(.95rem, 2.6vw, 1.1rem);
  line-height: 1.6;
  margin: 0 0 26px;
  max-width: 34rem;
}
html:not(.dark) .sf-hero__sub { color: #475569; }

.sf-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

/* ---------- Botones ---------- */
.sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s cubic-bezier(.16, 1, .3, 1),
              box-shadow .25s ease,
              background .25s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.sf-btn:active { transform: scale(.96); }

.sf-btn--primary {
  background: linear-gradient(135deg, #8b5cf6, #a855f7 55%, #06b6d4);
  background-size: 180% auto;
  color: #fff;
  box-shadow: 0 8px 26px rgba(139, 92, 246, .42);
}
.sf-btn--primary:hover {
  background-position: right center;
  box-shadow: 0 12px 34px rgba(139, 92, 246, .55);
  transform: translateY(-2px);
}

.sf-btn--ghost {
  background: rgba(20, 20, 36, .55);
  border-color: rgba(255, 255, 255, .10);
  color: var(--sf-text-0);
  backdrop-filter: blur(10px);
}
html:not(.dark) .sf-btn--ghost {
  background: rgba(255, 255, 255, .85);
  border-color: rgba(0, 0, 0, .10);
  color: #0f172a;
}
.sf-btn--ghost:hover {
  border-color: rgba(168, 85, 247, .45);
  transform: translateY(-2px);
}
.sf-btn__arrow { transition: transform .22s ease; }
.sf-btn--ghost:hover .sf-btn__arrow { transform: translateX(4px); }

/* Prueba social */
.sf-hero__social { display: flex; align-items: center; gap: 12px; }
.sf-avatars { display: flex; }
.sf-avatars__img {
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 2px solid var(--sf-bg-0);
  background: var(--sf-bg-2);
  margin-left: -10px;
  transition: transform .2s ease;
}
.sf-avatars__img:first-child { margin-left: 0; }
.sf-avatars:hover .sf-avatars__img { transform: translateY(-2px); }
.sf-hero__social-text { font-size: 13px; color: var(--sf-text-2); }
.sf-hero__social-text strong { color: #a855f7; font-weight: 800; }

/* ================================================================
   HERO — carrusel destacado (imagen completa + texto en overlay)

   Estilo Pinterest: la portada ocupa toda la tarjeta y el texto va
   encima sobre un velo degradado. Se diferencia del grid "Explore"
   por el marco con gradiente animado y el tamaño.
   ================================================================ */
.sf-hero__showcase { width: 100%; }

.sf-show {
  position: relative;
  border-radius: var(--sf-radius-xl);
  overflow: hidden;
  /* Borde fijo y discreto. Sin gradiente animado: molestaba. */
  border: 1px solid var(--sf-card-border);
  box-shadow: var(--sf-shadow-md);
}
html:not(.dark) .sf-show { border-color: rgba(0, 0, 0, .08); }

/* Pista deslizable: scroll nativo + snap. El JS solo añade el
   arrastre con ratón; en táctil ya funciona sin JS. */
.sf-show__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: calc(var(--sf-radius-xl) - 2px);
  cursor: grab;
}
.sf-show__track::-webkit-scrollbar { display: none; }
.sf-show__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.sf-show__track.is-dragging * { pointer-events: none; }

.sf-show__slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--sf-radius-xl) - 2px);
  background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
}
@media (min-width: 1024px) { .sf-show__slide { aspect-ratio: 5 / 4; } }

.sf-show__link { display: block; width: 100%; height: 100%; position: relative; text-decoration: none; }

.sf-show__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.16, 1, .3, 1);
  user-select: none;
  -webkit-user-drag: none;
}
@media (hover: hover) {
  .sf-show__slide:hover .sf-show__img { transform: scale(1.05); }
}
.sf-show__ph { display: block; width: 100%; height: 100%; }

/* Velo: mismo perfil que las tarjetas del grid "Explore", para que el
   hero se sienta de la misma familia. Cae rápido y deja ver la imagen
   en dos tercios de la tarjeta — sin él, con portadas claras parecía
   una imagen arriba y un panel de texto abajo. */
.sf-show__veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
              rgba(7, 7, 13, .95) 0%,
              rgba(7, 7, 13, .45) 30%,
              transparent 62%);
  pointer-events: none;
}

.sf-show__overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 16px 18px 18px;
  z-index: 2;
}

.sf-show__title {
  display: block;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .75);
}

.sf-show__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
}

.sf-show__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 9px 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: background .2s ease, transform .2s ease;
}
@media (hover: hover) {
  .sf-show__slide:hover .sf-show__cta {
    background: rgba(255, 255, 255, .24);
    transform: translateX(3px);
  }
}

/* Etiqueta translúcida sobre la imagen */
.sf-tag--glass {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  backdrop-filter: blur(10px);
}

.sf-badge-featured {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  box-shadow: 0 4px 16px rgba(168, 85, 247, .5);
  pointer-events: none;
}

.sf-show__save {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 3;
  width: 38px; height: 38px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 7, 13, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  transition: all .2s ease;
}
.sf-show__save:hover { background: var(--sf-pink); transform: scale(1.08); }
.sf-show__save.is-saved { background: var(--sf-pink); }

.sf-show__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 40px; height: 40px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 7, 13, .6);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .25s ease, background .2s ease;
}
.sf-show:hover .sf-show__nav { opacity: 1; }
.sf-show__nav:hover { background: rgba(168, 85, 247, .9); }
.sf-show__nav--prev { left: 12px; }
.sf-show__nav--next { right: 12px; }

/* En táctil no hay hover: se ocultan y se navega deslizando */
@media (hover: none) { .sf-show__nav { display: none; } }

.sf-show__dots {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 4;
}
.sf-show__dot {
  width: 22px; height: 4px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .3);
  cursor: pointer;
  transition: background .25s ease, width .25s ease;
}
.sf-show__dot.is-active {
  background: linear-gradient(90deg, #a855f7, #ec4899);
  width: 32px;
}

/* ================================================================
   Iconos de categoría (SVG propios animados)
   ================================================================ */
.sf-cico {
  display: inline-flex;
  width: 17px; height: 17px;
  flex-shrink: 0;
}
.sf-cico svg { width: 100%; height: 100%; }

.sf-cico__pulse { animation: sf-cico-pulse 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes sf-cico-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .72; transform: scale(1.14); }
}

.sf-cico__bar { animation: sf-cico-eq 1.25s ease-in-out infinite; transform-origin: center; }
.sf-cico__bar--1 { animation-delay: 0s;    }
.sf-cico__bar--2 { animation-delay: .18s;  }
.sf-cico__bar--3 { animation-delay: .34s;  }
.sf-cico__bar--4 { animation-delay: .12s;  }
@keyframes sf-cico-eq {
  0%, 100% { transform: scaleY(.62); }
  50%      { transform: scaleY(1.18); }
}

.sf-cico__d1 { animation: sf-cico-dot 1.4s ease-in-out infinite;       }
.sf-cico__d2 { animation: sf-cico-dot 1.4s ease-in-out .18s infinite;  }
.sf-cico__d3 { animation: sf-cico-dot 1.4s ease-in-out .36s infinite;  }
@keyframes sf-cico-dot {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1;   }
}

.sf-cico__l { animation: sf-cico-lr 2.4s ease-in-out infinite; }
.sf-cico__r { animation: sf-cico-lr 2.4s ease-in-out infinite reverse; }
@keyframes sf-cico-lr {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-1.1px); }
}

.sf-cico__draw {
  stroke-dasharray: 26;
  animation: sf-cico-draw 3s ease-in-out infinite;
}
@keyframes sf-cico-draw {
  0%      { stroke-dashoffset: 26; }
  45%,55% { stroke-dashoffset: 0;  }
  100%    { stroke-dashoffset: -26; }
}

.sf-cico__scan { animation: sf-cico-scan 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes sf-cico-scan {
  0%, 100% { opacity: .3; transform: scaleX(.55); }
  50%      { opacity: 1;  transform: scaleX(1);   }
}

.sf-cico__spin { animation: sf-cico-spin 9s linear infinite; transform-origin: center; }
@keyframes sf-cico-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ================================================================
   Píldoras de categorías
   ================================================================ */
.sf-cats { margin: 26px 0 8px; }
.sf-cats__track { gap: 10px; }

.sf-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(20, 20, 36, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--sf-text-1);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all .2s ease;
}
html:not(.dark) .sf-cat {
  background: rgba(255, 255, 255, .8);
  border-color: rgba(0, 0, 0, .08);
  color: #475569;
}
.sf-cat:hover {
  border-color: rgba(168, 85, 247, .45);
  color: #d8b4fe;
  transform: translateY(-2px);
}
.sf-cat.is-active {
  background: #fff;
  color: #0f172a;
  border-color: #fff;
  font-weight: 700;
}
.sf-cat__ico { font-size: 14px; }

/* ================================================================
   Carruseles de secciones
   ================================================================ */
.sf-rail-section { margin: 40px 0; }

.sf-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.sf-rail-head__left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.sf-sec-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sf-sec-icon svg { width: 22px; height: 22px; }
.sf-sec-icon--flame   { background: linear-gradient(135deg, #f97316, #ef4444); color: #fff; }
.sf-sec-icon--sparkle { background: linear-gradient(135deg, #a855f7, #6366f1); color: #fff; }
.sf-sec-icon--heart   { background: linear-gradient(135deg, #ec4899, #f43f5e); color: #fff; }

.sf-rail-title {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.15rem, 3.6vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--sf-text-0);
}
html:not(.dark) .sf-rail-title { color: #0f172a; }
.sf-rail-sub { margin: 2px 0 0; font-size: 13px; color: var(--sf-text-3); }

.sf-rail-more {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(20, 20, 36, .5);
  color: var(--sf-text-1);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all .2s ease;
}
html:not(.dark) .sf-rail-more {
  background: rgba(255, 255, 255, .8);
  border-color: rgba(0, 0, 0, .08);
  color: #475569;
}
.sf-rail-more:hover { border-color: rgba(168, 85, 247, .45); color: #d8b4fe; }

.sf-rail-wrap { position: relative; }
.sf-rail > .sf-tcard { width: 200px; }

@media (min-width: 640px)  { .sf-rail > .sf-tcard { width: 220px; } }
@media (min-width: 1024px) { .sf-rail > .sf-tcard { width: 236px; } }

/* Flechas de los carruseles (solo escritorio con ratón) */
.sf-rail-arrow {
  position: absolute;
  top: 38%;
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 999px;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(12, 12, 22, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  transition: background .2s ease, transform .2s ease, opacity .2s ease;
}
html:not(.dark) .sf-rail-arrow {
  background: rgba(255, 255, 255, .96);
  border-color: rgba(0, 0, 0, .1);
  color: #0f172a;
}
.sf-rail-arrow:hover { background: rgba(168, 85, 247, .9); color: #fff; transform: scale(1.08); }
.sf-rail-arrow--prev { left: -14px; }
.sf-rail-arrow--next { right: -14px; }
.sf-rail-arrow[hidden] { display: none !important; }

@media (min-width: 1024px) and (hover: hover) {
  .sf-rail-arrow { display: flex; }
}

/* ---------- Tarjeta de herramienta ---------- */
.sf-tcard {
  position: relative;
  border-radius: var(--sf-radius-md);
  overflow: hidden;
  background: var(--sf-card-bg);
  border: 1px solid var(--sf-card-border);
  transition: transform .28s cubic-bezier(.16, 1, .3, 1),
              border-color .28s ease,
              box-shadow .28s ease;
  isolation: isolate;
}
html:not(.dark) .sf-tcard { background: #fff; border-color: rgba(0, 0, 0, .07); }

@media (hover: hover) {
  .sf-tcard:hover {
    transform: translateY(-6px);
    border-color: rgba(168, 85, 247, .45);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .42);
  }
}
.sf-tcard:active { transform: scale(.98); }

/* La imagen ES la tarjeta: ocupa todo y el texto va encima. */
.sf-tcard__media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
  text-decoration: none;
}
.sf-tcard__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1);
  user-select: none;
  -webkit-user-drag: none;
}
@media (hover: hover) {
  .sf-tcard:hover .sf-tcard__media img { transform: scale(1.06); }
}
.sf-tcard__ph { display: block; width: 100%; height: 100%; }

.sf-tcard__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
              rgba(7, 7, 13, .95) 0%,
              rgba(7, 7, 13, .45) 32%,
              transparent 64%);
  pointer-events: none;
}

.sf-tcard__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 12px 13px;
}

.sf-tcard__title {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .75);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sf-tcard__desc {
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, .82);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sf-tcard__save {
  position: absolute;
  top: 9px; right: 9px;
  z-index: 3;
  width: 32px; height: 32px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 7, 13, .6);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transition: all .2s ease;
}
.sf-tcard__save:hover { background: var(--sf-pink); transform: scale(1.1); }
.sf-tcard__save.is-saved { background: var(--sf-pink); }

/* Medallas de ranking */
.sf-rank {
  position: absolute;
  top: 9px; left: 9px;
  z-index: 3;
  width: 27px; height: 27px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 900;
  color: #fff;
  background: rgba(7, 7, 13, .75);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
}
.sf-rank--1 {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: transparent; color: #4a2c00;
  box-shadow: 0 3px 12px rgba(245, 158, 11, .5);
}
.sf-rank--2 {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  border-color: transparent; color: #1e293b;
}
.sf-rank--3 {
  background: linear-gradient(135deg, #f0a868, #b45309);
  border-color: transparent; color: #fff;
}

.sf-badge-new {
  position: absolute;
  top: 9px; left: 9px;
  z-index: 3;
  padding: 3px 9px;
  border-radius: 7px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  font-size: 9.5px; font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 3px 12px rgba(139, 92, 246, .45);
}

.sf-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(168, 85, 247, .16);
  border: 1px solid rgba(168, 85, 247, .28);
  color: #d8b4fe;
  font-size: 11px; font-weight: 600;
}
.sf-tag--sm { padding: 3px 8px; font-size: 10px; }

.sf-metric {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: var(--sf-text-3);
}

/* ================================================================
   Most Loved — lista compacta
   ================================================================ */
.sf-loved {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px)  { .sf-loved { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sf-loved { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .sf-loved { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.sf-loved__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: var(--sf-radius-md);
  background: var(--sf-card-bg);
  border: 1px solid var(--sf-card-border);
  text-decoration: none;
  transition: transform .22s cubic-bezier(.16, 1, .3, 1),
              border-color .22s ease,
              box-shadow .22s ease;
}
html:not(.dark) .sf-loved__item { background: #fff; border-color: rgba(0, 0, 0, .07); }

@media (hover: hover) {
  .sf-loved__item:hover {
    transform: translateY(-3px);
    border-color: rgba(236, 72, 153, .4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
  }
}
.sf-loved__item:active { transform: scale(.985); }

.sf-loved__ico {
  width: 46px; height: 46px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
  display: flex; align-items: center; justify-content: center;
}
.sf-loved__ico img { width: 100%; height: 100%; object-fit: cover; }
.sf-loved__letter { font-size: 18px; font-weight: 800; color: #a855f7; }

.sf-loved__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sf-loved__name {
  font-size: 14px; font-weight: 700; color: var(--sf-text-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html:not(.dark) .sf-loved__name { color: #0f172a; }
.sf-loved__desc {
  font-size: 11.5px; line-height: 1.35; color: var(--sf-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sf-loved__stat {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--sf-text-2);
  flex-shrink: 0;
}
.sf-loved__stat b { color: var(--sf-text-0); font-weight: 800; }
html:not(.dark) .sf-loved__stat b { color: #0f172a; }
.sf-loved__votes { font-size: 11px; color: var(--sf-text-3); }

/* ================================================================
   Newsletter
   ================================================================ */
.sf-news {
  position: relative;
  overflow: hidden;
  margin: 48px 0 32px;
  padding: 28px;
  border-radius: var(--sf-radius-xl);
  background: linear-gradient(120deg,
              rgba(139, 92, 246, .28),
              rgba(99, 102, 241, .20) 55%,
              rgba(6, 182, 212, .18));
  border: 1px solid rgba(168, 85, 247, .28);
  display: grid;
  gap: 18px;
}
@media (min-width: 900px) {
  .sf-news {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 30px 34px;
  }
}
.sf-news__glow {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
  top: -110px; left: 45%;
  pointer-events: none;
}
.sf-news__title {
  margin: 0 0 4px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.15rem, 3.4vw, 1.5rem);
  font-weight: 800;
  color: #fff;
}
.sf-news__sub { margin: 0; color: rgba(255, 255, 255, .78); font-size: 14px; }

.sf-news__form { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.sf-news__input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 13px 17px;
  border-radius: 12px;
  background: rgba(7, 7, 13, .45);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}
.sf-news__input::placeholder { color: rgba(255, 255, 255, .5); }
.sf-news__input:focus { border-color: rgba(255, 255, 255, .5); background: rgba(7, 7, 13, .6); }
.sf-news__btn { padding: 13px 24px; flex-shrink: 0; }
.sf-news__msg { margin: 0; font-size: 13px; color: #fff; grid-column: 1 / -1; min-height: 1em; }

/* ================================================================
   Móvil — sensación de app nativa
   ================================================================ */
@media (max-width: 767px) {
  .sf-hero { padding: 14px 0 4px; }
  .sf-hero__inner { gap: 22px; }
  .sf-hero__actions { gap: 10px; }
  .sf-btn { flex: 1 1 auto; padding: 14px 18px; font-size: 14.5px; }

  /* Los carruseles llegan a sangre completa, como en las apps:
     el contenido "asoma" por el borde e invita a deslizar. */
  .sf-rail-wrap   { margin-inline: -16px; }
  .sf-rail        { padding-inline: 16px; }
  .sf-cats        { margin-inline: -16px; }
  .sf-cats__track { padding-inline: 16px; }

  .sf-rail-section { margin: 30px 0; }
  .sf-show        { min-height: 340px; padding: 14px; }
  .sf-show__slide { inset: 14px; }
  .sf-news        { padding: 22px 18px; margin: 34px 0 24px; }

  /* Respuesta táctil inmediata en todo lo pulsable */
  .sf-cat:active,
  .sf-rail-more:active,
  .sf-loved__item:active { transform: scale(.96); }
}

/* ================================================================
   SVG animados
   ================================================================ */
.sf-ico-flame {
  width: 18px; height: 18px;
  transform-origin: 50% 80%;
  animation: sf-flicker 2.6s ease-in-out infinite;
}
@keyframes sf-flicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25%      { transform: scale(1.08) rotate(-3deg); }
  50%      { transform: scale(.96) rotate(2deg); }
  75%      { transform: scale(1.05) rotate(-1deg); }
}

.sf-ico-sparkle { animation: sf-twinkle 3.2s ease-in-out infinite; }
@keyframes sf-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50%      { transform: scale(1.12) rotate(8deg); opacity: .9; }
}
.sf-ico-sparkle__s1 { animation: sf-star 2.4s ease-in-out infinite; transform-origin: center; }
.sf-ico-sparkle__s2 { animation: sf-star 2.4s ease-in-out .8s infinite; transform-origin: center; }
@keyframes sf-star {
  0%, 100% { opacity: .25; transform: scale(.6); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

.sf-ico-heart { animation: sf-beat 2.4s ease-in-out infinite; transform-origin: center; }
@keyframes sf-beat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.16); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.11); }
  56%      { transform: scale(1); }
}

/* Solo para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   Accesibilidad: sin animación si el sistema lo pide
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .sf-reveal { opacity: 1; transform: none; transition: none; }

  .sf-hero__glow,
  .sf-news__glow,
  .sf-hero__title-grad,
  .sf-pill-live__dot,
  .sf-ico-flame,
  .sf-ico-sparkle,
  .sf-ico-sparkle__s1,
  .sf-ico-sparkle__s2,
  .sf-ico-heart { animation: none !important; }

  .sf-btn, .sf-tcard, .sf-loved__item, .sf-show__slide { transition: none; }
}

/* Cursor de arrastre en los carruseles con ratón */
.sf-rail, .sf-cats__track { cursor: grab; }
.sf-rail.is-dragging, .sf-cats__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.sf-rail.is-dragging *, .sf-cats__track.is-dragging * { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .sf-show,
  .sf-cico__pulse, .sf-cico__bar, .sf-cico__d1, .sf-cico__d2, .sf-cico__d3,
  .sf-cico__l, .sf-cico__r, .sf-cico__draw, .sf-cico__scan, .sf-cico__spin {
    animation: none !important;
  }
}
