/* ── Sekcja YouTube / Nagrania ─────────────────────────────
   Rozszerzenie style.css: korzysta z tych samych zmiennych (--bg, --gold, --chalk…),
   więc działa w trybie ciemnym i jasnym. */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Lista nagrań ── */
.rec-list-hero { padding: 3rem 6rem 2rem; }
/* Sekcja na całą szerokość (prawa strona to tło animacji „Spektrogram i transkrypcja” z animations.js),
   treść zostaje w dotychczasowej szerokości. Na wąskich ekranach animacja jest paskiem pod treścią. */
.rec-list-hero > :not(canvas) { max-width: 908px; }
.rec-list-hero.spectro-band { padding-bottom: calc(2rem + 84px); }
.rec-list-hero .yt-title { font-family: 'Libre Baskerville', serif; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; margin: .6rem 0 1.2rem; color: var(--chalk); }
.rec-list-hero .yt-title em { color: var(--gold); }
.rec-list-hero .yt-sub { color: var(--chalk2); font-size: 1.1rem; line-height: 1.7; max-width: 720px; margin-bottom: 1.6rem; }
.rec-list-hero .hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.rec-list-hero .btn svg, .rec-cta-icon svg { width: 1.1em; height: 1.1em; fill: currentColor; }

.rec-list-section { padding-top: 1rem; }
.rec-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.rec-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.rec-chip { font: 500 .9rem 'Outfit', sans-serif; color: var(--chalk2); background: var(--glow); border: 1px solid var(--border); border-radius: 2rem; padding: .45rem 1rem; cursor: pointer; transition: all .2s ease; }
.rec-chip span { font-family: 'DM Mono', monospace; font-size: .75rem; opacity: .7; margin-left: .25rem; }
.rec-chip:hover { color: var(--chalk); border-color: rgba(var(--gold-rgb), .4); }
.rec-chip.active { background: var(--gold); color: #14161d; border-color: var(--gold); }
.rec-search input { font: 400 .95rem 'Outfit', sans-serif; color: var(--chalk); background: var(--bg2); border: 1px solid var(--border); border-radius: .6rem; padding: .65rem 1rem; width: min(340px, 100%); }
.rec-search input:focus { outline: 2px solid rgba(var(--gold-rgb), .5); outline-offset: 1px; }

.rec-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.rec-card { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--border); border-radius: .9rem; overflow: hidden; text-decoration: none; color: inherit; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.rec-card[hidden] { display: none; }
.rec-card:hover { transform: translateY(-4px); border-color: rgba(var(--gold-rgb), .45); box-shadow: 0 20px 45px rgba(0,0,0,.25); }
.rec-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg3); }
.rec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-dur { position: absolute; right: .5rem; bottom: .5rem; background: rgba(0,0,0,.78); color: #fff; font: 500 .75rem 'DM Mono', monospace; padding: .15rem .45rem; border-radius: .3rem; }
.rec-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.2rem 1.3rem; flex: 1; }
.rec-card-cat { font: 500 .72rem 'DM Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.rec-card-title { font: 600 1.05rem/1.35 'Outfit', sans-serif; color: var(--chalk); }
.rec-card-sum { font-size: .92rem; line-height: 1.55; color: var(--chalk2); }
.rec-card-more { margin-top: auto; padding-top: .4rem; font-size: .88rem; font-weight: 500; color: var(--teal); }
.rec-empty { color: var(--chalk2); text-align: center; padding: 2rem 0; }

/* ── Strona nagrania ── */
.rec-article { padding: 2.5rem 6rem 3rem; max-width: 1180px; margin: 0 auto; }
.rec-header { max-width: 900px; margin-bottom: 2rem; }
.rec-title { font-family: 'Libre Baskerville', serif; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.25; color: var(--chalk); margin: .6rem 0 1rem; }
.rec-badges { margin-bottom: 1.2rem; }
.rec-lead { font-size: 1.15rem; line-height: 1.75; color: var(--chalk2); border-left: 3px solid var(--gold); padding-left: 1.2rem; }

.rec-player-wrap { margin-bottom: 2.5rem; }
.rec-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: .9rem; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 30px 70px rgba(0,0,0,.35); background: #000; }
.rec-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* Plakat zamiast odtwarzacza: iframe YouTube wczytuje się dopiero po kliknięciu. */
.rec-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; display: block; }
.rec-poster img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .88; transition: opacity .25s ease, transform .4s ease; }
.rec-poster:hover img, .rec-poster:focus-visible img { opacity: 1; transform: scale(1.015); }
.rec-play-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 5rem; height: 5rem; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 40px rgba(0,0,0,.5); transition: transform .2s ease; }
.rec-play-icon svg { width: 2.4rem; height: 2.4rem; fill: #fff; margin-left: .25rem; }
.rec-poster:hover .rec-play-icon, .rec-poster:focus-visible .rec-play-icon { transform: translate(-50%, -50%) scale(1.08); }
.rec-poster:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.rec-poster-note { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem 1rem .8rem; background: linear-gradient(to top, rgba(0,0,0,.75), transparent); color: #fff; font: 500 .82rem 'DM Mono', monospace; text-align: center; }

.rec-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.rec-grid > :only-child { grid-column: 1 / -1; }
.rec-topics, .rec-side { background: var(--bg2); border: 1px solid var(--border); border-radius: .9rem; padding: 1.6rem 1.8rem; }
.rec-topics h2, .rec-side h2 { font: 600 1.2rem 'Outfit', sans-serif; color: var(--chalk); margin-bottom: 1rem; }
.rec-topics ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.rec-topics li { position: relative; padding-left: 1.6rem; line-height: 1.55; color: var(--chalk2); }
.rec-topics li::before { content: '∎'; position: absolute; left: 0; top: .05em; color: var(--gold); font-size: .85em; }

/* Rozdziały i materiały z opisu nagrania */
.rec-overview, .rec-chapters, .rec-materials { margin-top: 2rem; background: var(--bg2); border: 1px solid var(--border); border-radius: .9rem; padding: 1.6rem 1.8rem; }
.rec-overview h2, .rec-chapters h2, .rec-materials h2 { font: 600 1.2rem 'Outfit', sans-serif; color: var(--chalk); margin-bottom: .6rem; }
.rec-overview p { color: var(--chalk2); line-height: 1.75; margin-bottom: .9rem; max-width: 820px; }
.rec-overview p:last-child { margin-bottom: 0; }
.rec-chapters .rec-note { margin-bottom: 1rem; }
.rec-chapters ol { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .55rem 2rem; }
.rec-chapters li { color: var(--chalk); line-height: 1.5; }
.rec-materials p { color: var(--chalk2); line-height: 1.7; margin-bottom: .7rem; max-width: 820px; }
.rec-materials ul { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-top: .4rem; }
.rec-materials a { display: inline-block; color: var(--teal); text-decoration: none; font-weight: 500; border: 1px solid rgba(var(--teal-rgb), .35); border-radius: 2rem; padding: .4rem 1rem; transition: background .2s ease; }
.rec-materials a:hover { background: rgba(var(--teal-rgb), .12); }

/* Powiązane nagrania i najnowsze nagrania na youtube.html */
.rec-related-title { font: 600 1.15rem 'Outfit', sans-serif; color: var(--chalk); margin: 0 0 1.2rem; }
.rec-cards--related { margin-bottom: 2.5rem; }
.rec-cards--latest { margin-top: 2rem; }
.rec-card-date { font: 500 .75rem 'DM Mono', monospace; color: var(--chalk2); }
.rec-list-badges { margin-bottom: 1.4rem; }
.rec-latest-more { margin-top: 2rem; }

/* CTA */
.rec-cta { display: flex; flex-direction: column; gap: .8rem; }
.rec-cta--bottom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 1.5rem 0 2.5rem; }
.rec-cta-card { display: flex; align-items: flex-start; gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--glow); text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.rec-cta-card:hover { border-color: rgba(var(--gold-rgb), .5); transform: translateY(-2px); background: rgba(var(--gold-rgb), .08); }
.rec-cta--bottom .rec-cta-card { flex-direction: column; padding: 1.4rem; background: var(--bg2); }
.rec-cta-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: .6rem; font: 700 .95rem 'DM Mono', monospace; }
.rec-cta-icon.yt { background: var(--red); color: #fff; }
.rec-cta-icon.gold { background: var(--gold); color: #14161d; }
.rec-cta-icon.teal { background: var(--teal); color: #10201f; font-size: 1.2rem; }
.rec-cta-body { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.rec-cta-body strong { color: var(--chalk); font-weight: 600; }
.rec-cta-body span { color: var(--chalk2); font-size: .9rem; line-height: 1.5; }
.rec-cta-arrow { color: var(--gold); font-weight: 600; }
.rec-cta--bottom .rec-cta-arrow { display: none; }

/* Transkrypt */
.rec-transcript-section { max-width: 1180px; margin: 0 auto; }
.rec-note { color: var(--chalk2); font-size: .95rem; line-height: 1.6; max-width: 820px; margin-bottom: 1.5rem; }
.rec-words { font-family: 'DM Mono', monospace; font-size: .8rem; opacity: .75; }
.rec-transcript { position: relative; background: var(--bg2); border: 1px solid var(--border); border-radius: .9rem; }
.rec-transcript-inner { padding: 1.8rem 2rem; max-width: 900px; }
.rec-transcript p { font-family: 'Libre Baskerville', serif; font-size: 1rem; line-height: 1.85; color: var(--chalk); margin-bottom: 1.1rem; }
.rec-transcript.collapsed { max-height: 34rem; overflow: hidden; }
.rec-fade { display: none; }
.rec-transcript.collapsed .rec-fade { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 9rem; background: linear-gradient(to bottom, transparent, var(--bg2)); pointer-events: none; }
.ts { font: 500 .78rem 'DM Mono', monospace; color: var(--gold); background: rgba(var(--gold-rgb), .1); border: 1px solid rgba(var(--gold-rgb), .25); border-radius: .3rem; padding: .05rem .4rem; margin-right: .35rem; cursor: pointer; vertical-align: .1em; }
.ts:hover { background: var(--gold); color: #14161d; }
.rec-expand { margin-top: 1.2rem; }

.rec-bottom { max-width: none; }
.rec-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.rec-pn { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.3rem; border: 1px solid var(--border); border-radius: .75rem; text-decoration: none; color: inherit; transition: border-color .2s ease; }
.rec-pn:hover { border-color: rgba(var(--gold-rgb), .5); }
.rec-pn span { font: 500 .78rem 'DM Mono', monospace; color: var(--gold); }
.rec-pn strong { color: var(--chalk); font-weight: 500; line-height: 1.4; }
.rec-pn.next { text-align: right; }
.rec-back { margin-top: 2rem; }
.rec-back a { color: var(--teal); text-decoration: none; font-weight: 500; }

/* ── Responsywność ── */
@media (max-width: 1000px) {
  .rec-grid { grid-template-columns: 1fr; }
  .rec-cta--bottom { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .rec-list-hero, .rec-article { padding-left: 1.5rem; padding-right: 1.5rem; }
  .rec-transcript-inner { padding: 1.2rem 1.1rem; }
  .rec-prevnext { grid-template-columns: 1fr; }
  .rec-pn.next { text-align: left; }
  .rec-search input { width: 100%; }
  .rec-search { width: 100%; }
}
