/* ==========================================================================
   TafsirKurd 2.0 — IslamVoice video page (islamvoice.html). Builds on tk3.css.
   BRIEF #7: YouTube/Netflix style — big featured series, then rows.
   Cinema surfaces are always deep green-black (#0E1A14), in both themes, like
   the homepage feature. A25 floor: no filters/backdrop-filter on anything that
   scrolls, no infinite animation, rails are native overflow (no JS scrolling),
   thumbnails are the small YouTube renditions except in the hero.
   ========================================================================== */
:root { --cine: #0E1A14; --cine-2: #13221A; --cine-ink: #F4E8CC; --cine-ink-2: #D7CDB4; --cine-accent: #8CC4A4; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.tkv-hero { position: relative; overflow: hidden; background: var(--cine); color: var(--cine-ink); min-height: min(78vh, 640px); display: flex; }
.tkv-hero__bg { position: absolute; inset: 0; }
.tkv-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--d4) var(--ease); }
.tkv-hero__bg img.is-in { opacity: 1; }
.tkv-hero__bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(270deg, rgba(14, 26, 20, .96) 0%, rgba(14, 26, 20, .78) 38%, rgba(14, 26, 20, .15) 72%),
              linear-gradient(0deg, var(--cine) 0%, rgba(14, 26, 20, 0) 34%); }
.tkv-hero__in { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s6);
  padding-top: var(--s9); padding-bottom: var(--s7); width: 100%; }
.tkv-hero__body { max-width: 40rem; }
.tkv-hero__kick { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--cine-accent); font-weight: 700; font-size: var(--t-xs); }
.tkv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cine-accent); }
.tkv-hero__title { margin: var(--s3) 0 0; font: 700 clamp(1.9rem, 2.6vw + 1.1rem, 3.6rem)/1.25 var(--f-ui); text-wrap: balance; }
.tkv-hero__by { margin: var(--s3) 0 0; color: var(--cine-ink-2); font-size: var(--t-lg); }
.tkv-hero__by a { color: inherit; border-bottom: 1px solid rgba(244, 232, 204, .35); }
.tkv-hero__new { margin: var(--s2) 0 0; color: var(--cine-ink-2); font-size: var(--t-sm); opacity: .85; }
.tkv-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s5); }
.tkv-btn--light { background: var(--cine-ink); color: #0F3A25; }
.tkv-btn--light:hover { background: #fff; color: #0F3A25; }
.tkv-btn--light .tk-icon { fill: currentColor; }
.tkv-btn--glass { background: rgba(244, 232, 204, .14); color: var(--cine-ink); border: 1px solid rgba(244, 232, 204, .28); }
.tkv-btn--glass:hover { background: rgba(244, 232, 204, .24); color: var(--cine-ink); }
.tkv-hero__picks { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 190px); gap: var(--s3); overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; }
.tkv-hero__picks::-webkit-scrollbar { display: none; }
.tkv-pick { display: grid; gap: 6px; text-align: start; color: var(--cine-ink-2); font-size: var(--t-xs); line-height: 1.35; transition: transform var(--d2) var(--ease), color var(--d2) var(--ease); }
.tkv-pick__img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--cine-2); outline: 2px solid transparent;
  outline-offset: 2px; transition: outline-color var(--d2) var(--ease); }
.tkv-pick img { width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: opacity var(--d2) var(--ease); }
.tkv-pick:hover img, .tkv-pick[aria-pressed="true"] img { opacity: 1; }
.tkv-pick[aria-pressed="true"] { color: var(--cine-ink); }
.tkv-pick[aria-pressed="true"] .tkv-pick__img { outline-color: var(--cine-ink); }
.tkv-pick:hover { transform: translateY(-2px); }
.tkv-pick__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
@media (max-width: 900px) {
  .tkv-hero { min-height: 0; flex-direction: column; }
  .tkv-hero__bg { position: relative; aspect-ratio: 16 / 9; }
  .tkv-hero__bg::after { background: linear-gradient(0deg, var(--cine) 0%, rgba(14, 26, 20, 0) 55%); }
  .tkv-hero__in { padding-top: 0; margin-top: -48px; padding-bottom: var(--s6); gap: var(--s5); }
  .tkv-hero__cta .tk-btn { flex: 1; }
}

/* ── tools + generic ────────────────────────────────────────────────────── */
.tkv-tools { display: flex; align-items: center; gap: var(--s5); margin-top: var(--s6); flex-wrap: wrap; }
.tkv-search { flex: 1 1 360px; max-width: 560px; }
/* numbers strip beside the search (the catalogue at a glance) */
.tkv-stats { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: baseline; }
.tkv-stats div { display: grid; }
.tkv-stats b { font: 800 clamp(1.25rem, .8vw + 1rem, 1.7rem)/1.1 var(--f-ui); color: var(--green-ink); font-variant-numeric: tabular-nums; }
.tkv-stats span { color: var(--muted); font-size: var(--t-xs); }
/* teacher rails: portrait in the row head; teachers with 1–2 series share one grid */
.tk-row--sp .tk-row__head { align-items: center; }
.tkv-row__h { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.tkv-row__h h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkv-row__av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--wash); flex: none; border: 2px solid var(--surface); box-shadow: var(--shadow-1); }
.tkv-row__av img { width: 100%; height: 100%; object-fit: cover; }
.tkv-grid--sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s5) var(--s3); }
.tkv-h2 { font-size: var(--t-h3); margin: var(--s6) 0 var(--s4); color: var(--green-ink); }
.tkv-h3 { font-size: var(--t-xl); margin: 0 0 var(--s4); color: var(--green-ink); }
.tkv-note { margin: var(--s7) 0; padding: var(--s5); border-radius: var(--r-lg); background: var(--surface-2); text-align: center; color: var(--ink-2); }
.tkv-skcard { display: block; aspect-ratio: 16 / 9; border-radius: var(--r-md); background: var(--wash); }
.tkv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s6) var(--s4); }
.tk-media__meta { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 2px; }
.tk-media__count { position: absolute; bottom: 8px; inset-inline-start: 8px; background: rgba(8, 20, 14, .82); color: #F4E8CC; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 6px; display: inline-flex; gap: 4px; align-items: center; }
.tk-media__watched { position: absolute; inset: auto 0 0; height: 3px; background: #C0392B; }
.tk-speaker { display: block; }
.tk-speaker small { display: block; color: var(--muted); font-size: var(--t-xs); font-weight: 400; }
.tkv-back { display: flex; width: fit-content; align-items: center; gap: 6px; color: var(--cine-ink-2); font-size: var(--t-sm); margin-bottom: var(--s5); }
.tkv-back .tk-icon { transform: scaleX(-1); }
.tkv-back:hover { color: var(--cine-ink); }
.tkv-back--ink { color: var(--muted); margin-top: var(--s6); } .tkv-back--ink:hover { color: var(--green); }
.tkv-kick--ink { color: var(--green); }

/* ── episode list (series + watch sidebar + search) ─────────────────────── */
.tkv-eplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tkv-ep { display: grid; grid-template-columns: 36px 176px minmax(0, 1fr); gap: var(--s4); align-items: center; padding: 10px; border-radius: var(--r-md); color: var(--ink);
  transition: background-color var(--d1) var(--ease); }
.tkv-ep:hover { background: var(--wash); }
.tkv-ep[aria-current="true"] { background: var(--wash-2); }
.tkv-ep__n { font: 600 var(--t-sm)/1 var(--f-ui); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.tkv-ep__img { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--wash); }
.tkv-ep__img img { width: 100%; height: 100%; object-fit: cover; }
.tkv-ep__t { font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tkv-ep__m { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 2px; }
.tkv-ep__num { position: absolute; top: 6px; inset-inline-start: 6px; padding: 1px 7px; border-radius: 6px; background: rgba(8, 20, 14, .82); color: #F4E8CC; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (min-width: 601px) { .tkv-eplist:not(.tkv-eplist--compact) .tkv-ep__num { display: none; } }
.tkv-ep.is-seen .tkv-ep__img::after { content: ''; position: absolute; inset: 0; background: rgba(14, 26, 20, .38); pointer-events: none; }
.tkv-ep__seen { display: inline-flex; align-items: center; gap: 3px; color: var(--green); font-weight: 600; }
.tkv-ep__seen .tk-icon { width: 12px; height: 12px; fill: currentColor; }
.tkv-eplist--compact .tkv-ep { grid-template-columns: 140px minmax(0, 1fr); gap: var(--s3); padding: 8px; }
.tkv-eplist--compact .tkv-ep__n { display: none; }
.tkv-eplist--compact .tkv-ep__t { font-size: var(--t-sm); }
.tkv-more { display: flex; margin: var(--s5) auto 0; }
@media (max-width: 600px) { .tkv-ep { grid-template-columns: 128px minmax(0, 1fr); gap: var(--s3); padding: 8px 4px; } .tkv-ep__n { display: none; } .tkv-ep__t { font-size: var(--t-sm); } }

/* ── series view ────────────────────────────────────────────────────────── */
.tkv-sbanner { position: relative; overflow: hidden; background: var(--cine); color: var(--cine-ink); }
.tkv-sbanner__bg { position: absolute; inset: 0; }
.tkv-sbanner__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.tkv-sbanner__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(14, 26, 20, .97) 25%, rgba(14, 26, 20, .6) 70%, rgba(14, 26, 20, .35)); }
.tkv-sbanner__in { position: relative; padding-block: var(--s6) var(--s7); }
.tkv-sbanner__title { margin: var(--s2) 0 0; font: 700 clamp(1.6rem, 2vw + 1.1rem, 2.8rem)/1.3 var(--f-ui); max-width: 44rem; text-wrap: balance; }
.tkv-sbanner__desc { margin: var(--s3) 0 0; color: var(--cine-ink-2); max-width: 40rem; }
.tkv-sbanner__desc:empty { display: none; }
.tkv-smeta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s4); color: var(--cine-ink-2); font-size: var(--t-sm); }
.tkv-smeta__who { display: inline-flex; align-items: center; gap: 9px; color: var(--cine-ink); font-weight: 600; }
.tkv-smeta__who:hover { color: #fff; }
.tkv-smeta__av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: rgba(244, 232, 204, .12); border: 2px solid rgba(244, 232, 204, .35); flex: none; }
.tkv-smeta__av:empty { display: none; }
.tkv-smeta__av img { width: 100%; height: 100%; object-fit: cover; }
.tkv-smeta__chip { display: inline-flex; align-items: center; gap: 5px; }
.tkv-smeta__chip:empty { display: none; }
.tkv-smeta__chip .tk-icon { width: 14px; height: 14px; fill: currentColor; opacity: .8; }
.tkv-sprog { margin-top: var(--s4); max-width: 26rem; }
.tkv-sprog:empty { display: none; }
.tkv-sprog small { color: var(--cine-ink-2); font-size: var(--t-xs); }
.tkv-sprog__bar { height: 4px; border-radius: 4px; background: rgba(244, 232, 204, .18); overflow: hidden; margin-top: 6px; }
.tkv-sprog__bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--cine-accent); border-radius: 4px; }
.tkv-sbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); margin: var(--s6) 0 var(--s3); }
.tkv-sbar .tkv-h3 { margin: 0; }
.tkv-seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--wash); }
.tkv-seg button { height: 34px; padding: 0 14px; border-radius: 9px; font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }
.tkv-seg button[aria-pressed="true"] { background: var(--surface); color: var(--green); box-shadow: var(--shadow-1); }
@media (pointer: coarse) { .tkv-seg button { height: 44px; } }

/* ── speaker view ───────────────────────────────────────────────────────── */
.tkv-sphead { display: flex; align-items: center; gap: var(--s5); margin-bottom: var(--s7); }
.tkv-sphead__av { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--wash); flex: none; border: 3px solid var(--surface); box-shadow: var(--shadow-1); }
.tkv-sphead__av img { width: 100%; height: 100%; object-fit: cover; }
.tkv-sphead h1 { margin: 4px 0 0; font-size: var(--t-h2); line-height: 1.2; }
.tkv-sphead__meta { margin: 6px 0 0; color: var(--muted); }

/* reserve the picks row before the thumbnails arrive (no layout shift) */
.tkv-hero__picks { min-height: calc(150px * 9 / 16 + 30px); }
@media (min-width: 901px) { .tkv-hero__picks { min-height: calc(190px * 9 / 16 + 30px); } }
