/* =========================================================
   SJP-Píldoras Formativas — front (autónomo, bajo .pildoras-page)
   Los colores por categoría se inyectan inline desde el JS (editables).
   ========================================================= */

.pildoras-page {
  --fondo:        #070C08;
  --fondo-card:   rgba(255,255,255,0.04);
  --borde:        rgba(255,255,255,0.07);
  --texto:        rgba(243,237,224,0.95);
  --texto-med:    rgba(243,237,224,0.75);
  --texto-bajo:   rgba(243,237,224,0.50);
  --texto-muted:  rgba(243,237,224,0.32);
  --acento:       #AABF55;

  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  width: 100%; max-width: 100%; overflow-x: clip;
}
.pildoras-page *, .pildoras-page *::before, .pildoras-page *::after { box-sizing: border-box; }
.pildoras-page p { margin: 0; }
.pildoras-page a { text-decoration: none; }
.pildoras-page img, .pildoras-page iframe { max-width: 100%; }
.pildoras-page [id] { scroll-margin-top: 80px; }

.pildoras-page .pw-pad { padding-left: 56px; padding-right: 56px; }

/* Reveal */
.pildoras-page .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.pildoras-page .reveal.visible { opacity: 1; transform: translateY(0); }
.pildoras-page .reveal-d1 { transition-delay: 0.07s; }
.pildoras-page .reveal-d2 { transition-delay: 0.14s; }
.pildoras-page .reveal-d3 { transition-delay: 0.21s; }

.pildoras-page .section-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--acento); display: block; margin-bottom: 14px; }

/* Tags y dots de categoría (color inline) */
.pildoras-page .cat-tag { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 8px; line-height: 1; }
.pildoras-page .cat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Tarjeta de vídeo vertical 9:16 ── */
.pildoras-page .vc { flex-shrink: 0; width: 170px; display: block; color: inherit; cursor: pointer; }
.pildoras-page .vc-thumb { width: 100%; aspect-ratio: 9/16; position: relative; overflow: hidden; background: var(--fondo-card); }
.pildoras-page .vc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.pildoras-page .vc:hover .vc-thumb img { transform: scale(1.04); }
.pildoras-page .vc-thumb-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,12,8,0.90) 0%, rgba(7,12,8,0.20) 45%, transparent 100%); }
.pildoras-page .vc-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.45); background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.pildoras-page .vc:hover .vc-play { opacity: 1; }
.pildoras-page .vc-play::after { content: ''; border-left: 11px solid rgba(255,255,255,0.9); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.pildoras-page .vc-tag { position: absolute; bottom: 8px; left: 8px; }
.pildoras-page .vc-new { position: absolute; top: 8px; left: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 2px rgba(138,158,58,0.3); }
.pildoras-page .vc-title { font-size: 12px; font-weight: 400; line-height: 1.45; color: var(--texto-med); margin-top: 8px; padding: 0 2px; }
.pildoras-page .vc--soon { pointer-events: none; }
.pildoras-page .vc--soon .vc-thumb { background: rgba(255,255,255,0.02); border: 1px dashed rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: center; }
.pildoras-page .vc--soon .vc-soon-label { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(243,237,224,0.18); text-align: center; line-height: 1.7; }
.pildoras-page .vc--soon .vc-title { color: var(--texto-muted); }
.pildoras-page .vc-ghost { flex-shrink: 0; width: 80px; pointer-events: none; }
.pildoras-page .vc-ghost-inner { width: 80px; aspect-ratio: 9/16; background: linear-gradient(to right, var(--fondo-card), transparent); }

/* ── Estantería ── */
.pildoras-page .ps-shelf { padding-top: 64px; padding-bottom: 0; border-bottom: 1px solid var(--borde); }
.pildoras-page .ps-head { margin-bottom: 28px; }
.pildoras-page .ps-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(28px, 3.8vw, 48px); line-height: 0.9; letter-spacing: 0.04em; text-transform: uppercase; color: var(--texto); margin-bottom: 10px; }
.pildoras-page .ps-desc { font-size: 13px; font-weight: 300; line-height: 1.65; color: var(--texto-bajo); max-width: 460px; }
.pildoras-page .ps-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding: 20px 0 40px 56px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.pildoras-page .ps-row::-webkit-scrollbar { display: none; }
.pildoras-page .ps-row .vc, .pildoras-page .ps-row .vc--soon { scroll-snap-align: start; }
.pildoras-page .ps-row .vc.is-hidden, .pildoras-page .ps-row .vc--soon.is-hidden { display: none; }
.pildoras-page .ps-disc-filter { display: flex; flex-wrap: nowrap; gap: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; border-bottom: 1px solid var(--borde); padding-left: 56px; margin-top: 24px; }
.pildoras-page .ps-disc-filter::-webkit-scrollbar { display: none; }
.pildoras-page .ps-disc-btn { flex-shrink: 0; font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; padding: 10px 18px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--texto-bajo); cursor: pointer; margin-bottom: -1px; transition: color 0.18s, border-color 0.18s; white-space: nowrap; }
.pildoras-page .ps-disc-btn:hover { color: var(--texto-med); }
.pildoras-page .ps-disc-btn.is-active { color: var(--shelf-accent, var(--texto)); border-bottom-color: var(--shelf-accent, var(--texto)); }
.pildoras-page .ps-row-empty { padding: 28px 56px 36px; font-size: 13px; font-weight: 300; line-height: 1.7; color: var(--texto-muted); }
.pildoras-page .ps-row-empty strong { display: block; font-size: 14px; font-weight: 400; color: var(--texto-bajo); margin-bottom: 4px; }

/* ── HERO ── */
.pildoras-page .ph-hero { background: var(--fondo); padding: 80px 0 0; position: relative; overflow: hidden; border-bottom: 1px solid var(--borde); }
.pildoras-page .ph-bg-word { position: absolute; left: -16px; top: 42%; transform: translateY(-50%); font-family: 'Bebas Neue', sans-serif; font-size: clamp(120px, 18vw, 220px); letter-spacing: 0.04em; color: rgba(138,158,58,0.03); line-height: 1; pointer-events: none; user-select: none; white-space: nowrap; }
.pildoras-page .ph-hero-inner { display: grid; grid-template-columns: 1fr 260px; gap: 72px; align-items: center; max-width: 1080px; margin: 0 auto; padding: 0 56px 64px; position: relative; z-index: 2; }
.pildoras-page .ph-breadcrumb { font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--acento); display: block; margin-bottom: 20px; }
.pildoras-page .ph-hero-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(52px, 7vw, 92px); line-height: 0.88; letter-spacing: 0.04em; text-transform: uppercase; color: var(--texto); margin-bottom: 24px; }
.pildoras-page .ph-hero-title em { color: var(--acento); font-style: normal; }
.pildoras-page .ph-hero-desc { font-size: 15px; font-weight: 300; line-height: 1.72; color: var(--texto-bajo); max-width: 440px; }
.pildoras-page .ph-hero-video { cursor: pointer; }
.pildoras-page .ph-video-frame { width: 100%; aspect-ratio: 9/16; position: relative; overflow: hidden; background: var(--fondo-card); }
.pildoras-page .ph-video-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.pildoras-page .ph-hero-video:hover .ph-video-frame img { transform: scale(1.03); }
.pildoras-page .ph-video-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,12,8,0.88) 0%, rgba(7,12,8,0.15) 50%, transparent 100%); }
.pildoras-page .ph-video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.pildoras-page .ph-hero-video:hover .ph-video-play { border-color: rgba(255,255,255,0.85); background: rgba(0,0,0,0.6); transform: translate(-50%,-50%) scale(1.08); }
.pildoras-page .ph-play-icon { display: block; border-left: 14px solid rgba(255,255,255,0.9); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.pildoras-page .ph-video-cat { position: absolute; bottom: 12px; left: 10px; }
.pildoras-page .ph-video-title { font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--texto-med); margin-top: 10px; padding: 0 2px; }
.pildoras-page .ph-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.pildoras-page .ph-stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--borde); position: relative; z-index: 2; }
.pildoras-page .ph-stat-cell { padding: 28px 40px; border-right: 1px solid var(--borde); display: flex; flex-direction: column; gap: 5px; }
.pildoras-page .ph-stat-cell:last-child { border-right: none; }
.pildoras-page .ph-stat-num { font-family: 'Bebas Neue', sans-serif; font-size: 32px; line-height: 1; letter-spacing: 0.04em; color: var(--acento); }
.pildoras-page .ph-stat-label { font-size: 10px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texto-muted); }

/* ── FILTRO sticky ── */
.pildoras-page .pf-filtros-wrap { position: sticky; top: 0; z-index: 80; background: var(--fondo); border-bottom: 1px solid var(--borde); box-shadow: 0 2px 20px rgba(0,0,0,0); transition: box-shadow 0.25s; }
.pildoras-page .pf-filtros-wrap.is-stuck { box-shadow: 0 2px 20px rgba(0,0,0,0.45); }
.pildoras-page .pf-filtros { display: flex; align-items: center; gap: 8px; padding: 14px 56px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.pildoras-page .pf-filtros::-webkit-scrollbar { display: none; }
.pildoras-page .pf-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--texto-bajo); background: transparent; border: 1px solid var(--borde); transition: color 0.2s, background 0.2s, border-color 0.2s; cursor: pointer; }
.pildoras-page .pf-pill .cat-dot { opacity: 0.5; transition: opacity 0.2s; width: 6px; height: 6px; }
.pildoras-page .pf-pill:hover { color: var(--texto-med); border-color: rgba(255,255,255,0.18); }
.pildoras-page .pf-pill:hover .cat-dot { opacity: 0.8; }
.pildoras-page .pf-pill.is-active .cat-dot { opacity: 1; }

/* ── CATÁLOGO ── */
.pildoras-page .pc-catalogo { padding: 80px 0 64px; border-top: 1px solid var(--borde); }
.pildoras-page .pc-head { margin-bottom: 40px; }
.pildoras-page .pc-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(32px, 4.5vw, 52px); line-height: 0.92; letter-spacing: 0.04em; text-transform: uppercase; color: var(--texto); margin-bottom: 12px; }
.pildoras-page .pc-intro { font-size: 13px; font-weight: 300; line-height: 1.65; color: var(--texto-bajo); }
.pildoras-page .pc-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 40px; }
.pildoras-page .pc-filter-btn { font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; padding: 7px 16px; background: transparent; border: 1px solid var(--borde); color: var(--texto-bajo); cursor: pointer; transition: color 0.18s, background 0.18s, border-color 0.18s; }
.pildoras-page .pc-filter-btn:hover { color: var(--texto-med); border-color: rgba(255,255,255,0.18); }
.pildoras-page .pc-filter-btn.is-active { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.2); color: var(--texto); }
.pildoras-page .pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 12px; }
.pildoras-page .pc-item.is-hidden { display: none; }
.pildoras-page .pc-empty, .pildoras-page .pc-empty-all { grid-column: 1 / -1; padding: 48px 0; text-align: center; font-size: 14px; font-weight: 300; line-height: 1.8; color: var(--texto-bajo); }

/* ── Responsive ── */
@media (max-width: 1100px) { .pildoras-page .ph-hero-inner { max-width: 100%; } }
@media (max-width: 900px) {
  .pildoras-page .pw-pad { padding-left: 32px; padding-right: 32px; }
  .pildoras-page .vc { width: 140px; }
  .pildoras-page .ps-row, .pildoras-page .ps-disc-filter, .pildoras-page .ps-row-empty { padding-left: 32px; }
  .pildoras-page .ph-hero-inner { grid-template-columns: 1fr 200px; gap: 40px; padding: 0 32px 48px; }
  .pildoras-page .ph-stat-cell { padding: 22px 24px; }
  .pildoras-page .pf-filtros { padding: 12px 32px; gap: 6px; }
}
@media (max-width: 680px) {
  .pildoras-page .ph-hero { padding: 56px 0 0; }
  .pildoras-page .ph-hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 0 20px 40px; }
  .pildoras-page .ph-hero-video { max-width: 220px; margin: 0 auto; }
  .pildoras-page .ph-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .pildoras-page .ph-stat-cell:nth-child(2) { border-right: none; }
  .pildoras-page .ph-stat-cell:nth-child(3), .pildoras-page .ph-stat-cell:nth-child(4) { border-top: 1px solid var(--borde); }
  .pildoras-page .ph-stat-cell:nth-child(4) { border-right: none; }
}
@media (max-width: 600px) {
  .pildoras-page .pw-pad { padding-left: 20px; padding-right: 20px; }
  .pildoras-page .vc { width: 66vw; max-width: 240px; }
  .pildoras-page .vc-ghost, .pildoras-page .vc-ghost-inner { width: 32px; }
  .pildoras-page .ps-row, .pildoras-page .ps-disc-filter, .pildoras-page .ps-row-empty { padding-left: 20px; }
  .pildoras-page .pf-filtros { padding: 10px 20px; }
  .pildoras-page .pf-pill { font-size: 9px; padding: 6px 12px; }
  .pildoras-page .pc-catalogo { padding: 56px 0 48px; }
  .pildoras-page .pc-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
