/* ═══════════════════════════════════════════════════
   LOOPS – youtube-challenges.php page styles
   Extends base.css. Only components not already covered
   by the shared framework live here (kept intentionally lean).
   Relies on base.css custom properties (--accent, --border, --r-lg, …).
═══════════════════════════════════════════════════ */

/* ── Discipline filter bar wrapper ──
   Buttons themselves reuse .yt-filter-tab from base.css so the
   interaction pattern matches the rest of the site (e.g. youtube-coaches.php). */
.chal-filter-intro {
  margin-top: 48px;
}
.chal-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 8px;
}

/* ── FEATURED CHALLENGE (always visible, ignores the active filter) ── */
.featured-challenge {
  margin-top: 0;
  background: var(--black);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.16);
}
.featured-challenge::before {
  content: '';
  position: absolute; top: -140px; right: -100px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.featured-challenge-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr; /* Flexibles 50/50 Verhältnis statt fixer 420px */
  align-items: stretch; /* Streckt das Bild auf die volle Texthöhe */
}
.featured-thumb-wrap {
  position: relative;
  width: 100%;
  height: 100%; /* Nutzt die komplette Höhe der linken Zelle */
  background: var(--black2);
  overflow: hidden;
}
.featured-thumb-wrap img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; /* Füllt die Zelle perfekt aus */
  display: block; 
}

/*.featured-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black2);
  overflow: hidden;
}
.featured-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 100px;
  box-shadow: 0 4px 14px rgba(90,178,229,0.4);
}
  */

.featured-body {
  padding: 36px 40px;
  display: flex; flex-direction: column; justify-content: center;
  gap: 14px;
}
.featured-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}
.featured-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05; letter-spacing: 0.4px;
  color: #fff;
}
.featured-text {
  font-size: 15px; color: rgba(255,255,255,0.65); line-height: 1.7; max-width: 520px;
}
.featured-meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.featured-meta-pill {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.12);
}
.featured-cta { margin-top: 10px; align-self: flex-start; }

/* ── CHALLENGE GRID ── */
.chal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.chal-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.chal-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--off2);
  overflow: hidden;
}
.chal-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chal-discipline-pill {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
  background: rgba(17,17,16,0.75); color: #fff; backdrop-filter: blur(4px);
}
.chal-days-pill {
  position: absolute; top: 10px; right: 10px;
  font-family: 'Anton', sans-serif;
  font-size: 12px; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 100px;
  background: var(--accent); color: #fff;
}
.chal-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.chal-title { font-size: 16px; font-weight: 700; color: var(--black); line-height: 1.35; }
.chal-desc { font-size: 13.5px; color: var(--mid); line-height: 1.65; flex: 1; }
.chal-meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 4px; }
.chal-meta-tag {
  font-size: 10.5px; font-weight: 600; color: var(--mid);
  background: var(--off); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 100px;
}
.chal-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--accent-dark);
  text-decoration: none; margin-top: 6px;
}
.chal-card:hover .chal-cta { color: var(--accent-dim); }
.chal-cta::after { content: '▸'; transition: transform 0.15s; }
.chal-card:hover .chal-cta::after { transform: translateX(3px); }

/* ── Empty state shown by JS when a filter matches nothing ── */
.chal-empty { display: none; }
.chal-empty.visible { display: block; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 960px) {
  .featured-challenge-inner { grid-template-columns: 1fr; }
  .featured-thumb-wrap { aspect-ratio: 16 / 9; }
  .featured-body { padding: 28px 24px; }
}
@media (max-width: 640px) {
  .chal-grid { grid-template-columns: 1fr; }
  .featured-body { padding: 24px 20px; }
}
