/* =============================================================
 * LazyHackers Spotlight — rotating featured-article hero
 * Scoped under .spotlight to avoid clashes with site styles.
 * Theme: dark (#0c0c0e), accent: bright green (#00ff41)
 * ============================================================= */

.spotlight {
  --sl-bg: #0c0c0e;
  --sl-g:  #00ff41;
  --sl-t1: #f2f2f4;
  --sl-t2: #9898a8;
  --sl-card: rgba(255,255,255,0.06);
  --sl-border: rgba(255,255,255,0.10);

  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--sl-bg);
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  isolation: isolate;
  margin: 0 0 28px;
}

/* ---------- Slide ---------- */
.spotlight .sl {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  cursor: pointer;
  overflow: hidden;
}
.spotlight .sl.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.spotlight .sl img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center;
  z-index: 0;
}
.spotlight .sl.active img {
  animation: spotZoom 8s ease-out forwards;
}
@keyframes spotZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* Fallback placeholder when no image */
.spotlight .sl-ph {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(0,255,65,0.12), transparent 65%),
    linear-gradient(135deg, #111 0%, #0c0c0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(0,255,65,0.18);
  z-index: 0;
}

/* Gradient overlays (two layers via pseudo-elements) */
.spotlight .sl::before {
  /* horizontal left→right darken */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(12,12,14,0.92) 0%,
    rgba(12,12,14,0.50) 55%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}
.spotlight .sl::after {
  /* vertical bottom→top darken */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12,12,14,0.75) 0%,
    transparent 45%
  );
  z-index: 1;
  pointer-events: none;
}

/* ---------- Slide body (bottom-left content) ---------- */
.spotlight .sl-body {
  position: absolute;
  left: 40px;
  bottom: 36px;
  right: 110px;          /* leave room for right-side arrows */
  max-width: 680px;
  z-index: 10;            /* MUST be above ::after gradient */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spotlight .sl-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.spotlight .sl-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sl-t1);
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--sl-border);
  backdrop-filter: blur(8px);
}

.spotlight .sl-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #ffc23a;
  background: rgba(255,194,58,0.10);
  border: 1px solid rgba(255,194,58,0.35);
}

.spotlight .sl-featured-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #0c0c0e;
  background: var(--sl-g);
  box-shadow: 0 0 14px rgba(0,255,65,0.30);
}

.spotlight .sl-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--sl-t1);
  max-width: 640px;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.55);
}

.spotlight .sl-desc {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.50);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 600px;
}

.spotlight .sl-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.40);
}
.spotlight .sl-author-row > * { display: inline-flex; align-items: center; }
.spotlight .sl-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--sl-g);
  flex-shrink: 0;
}
.spotlight .sl-avatar-ph {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,255,65,0.18);
  border: 1px solid var(--sl-g);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--sl-g);
  font-family: 'Share Tech Mono', monospace;
  flex-shrink: 0;
}
.spotlight .sl-meta-sep { opacity: 0.5; }

.spotlight .sl-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--sl-g);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: inherit;
  margin-top: 4px;
}
.spotlight .sl-cta:hover {
  background: #2bff5e;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,255,65,0.30);
}

/* ---------- Controls: dots (bottom-right) ---------- */
.spotlight .sl-dots {
  position: absolute;
  bottom: 24px;
  right: 30px;
  display: flex;
  gap: 6px;
  z-index: 30;
}
.spotlight .sl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.30s ease, background 0.30s ease, box-shadow 0.30s ease, border-radius 0.30s ease;
}
.spotlight .sl-dot:hover { background: rgba(255,255,255,0.55); }
.spotlight .sl-dot.active {
  width: 22px;
  background: var(--sl-g);
  border-radius: 5px;
  box-shadow: 0 0 8px var(--sl-g);
}

/* ---------- Controls: arrows (right side, vertical center) ---------- */
.spotlight .sl-arrows {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 30;
}
.spotlight .sl-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(12,12,14,0.55);
  border: 1px solid var(--sl-border);
  color: var(--sl-t1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 14px;
  line-height: 1;
  backdrop-filter: blur(8px);
  padding: 0;
}
.spotlight .sl-arrow:hover {
  background: var(--sl-g);
  color: #000;
  border-color: var(--sl-g);
  box-shadow: 0 0 14px rgba(0,255,65,0.40);
}
.spotlight .sl-arrow svg { width: 14px; height: 14px; }

/* ---------- Progress bar (bottom) ---------- */
.spotlight .sl-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  z-index: 20;
  overflow: hidden;
}
.spotlight .sl-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--sl-g);
  box-shadow: 0 0 8px rgba(0,255,65,0.55);
}

/* ---------- Empty state ---------- */
.spotlight .sl-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .spotlight { height: 340px; border-radius: 12px; }
  .spotlight .sl-body { left: 22px; right: 80px; bottom: 28px; gap: 10px; }
  .spotlight .sl-title { font-size: 22px; line-height: 1.22; }
  .spotlight .sl-desc { font-size: 13px; -webkit-line-clamp: 2; }
  .spotlight .sl-arrows { right: 12px; gap: 6px; }
  .spotlight .sl-arrow { width: 30px; height: 30px; }
  .spotlight .sl-dots { right: 18px; bottom: 18px; }
}
@media (max-width: 480px) {
  .spotlight { height: 320px; }
  .spotlight .sl-title { font-size: 19px; }
  .spotlight .sl-desc { display: none; }
}
